Remove QtWidgets dependencies
authorHarald Fernengel <harald.fernengel@nokia.com>
Tue, 13 Mar 2012 20:00:57 +0000 (21:00 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 15 Mar 2012 08:50:18 +0000 (09:50 +0100)
Remove references to libQtOpenGL, and use QGuiApplication instead of
QApplication

Change-Id: If8f652223492cf758175a260c27b687f3af1c4ad
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/plugins/platforms/xlib/qglxintegration.cpp
src/plugins/platforms/xlib/qxlibwindow.cpp
src/plugins/platforms/xlib/xlib.pro

index 5162140..b2d44cf 100644 (file)
@@ -41,7 +41,6 @@
 
 #include <QDebug>
 #include <QLibrary>
-#include <QGLFormat>
 
 #include "qxlibwindow.h"
 #include "qxlibscreen.h"
index 94c4332..00403ae 100644 (file)
@@ -62,7 +62,8 @@
 
 #include <QtGui/QWindowSystemInterface>
 #include <QSocketNotifier>
-#include <QApplication>
+#include <QGuiApplication>
+#include <QStyleHints>
 #include <QDebug>
 
 //#define MYX11_DEBUG
@@ -379,10 +380,11 @@ void QXlibWindow::mousePressEvent(XButtonEvent *e)
 
     QEvent::Type type = QEvent::MouseButtonPress;
 
-    if (e->window == prevWindow && long(e->time) - prevTime < QApplication::doubleClickInterval()
+    const int doubleClickInterval = qApp->styleHints()->mouseDoubleClickInterval();
+    if (e->window == prevWindow && long(e->time) - prevTime < doubleClickInterval
         && qAbs(e->x - prevX) < 5 && qAbs(e->y - prevY) < 5) {
         type = QEvent::MouseButtonDblClick;
-        prevTime = e->time - QApplication::doubleClickInterval(); //no double click next time
+        prevTime = e->time - doubleClickInterval; //no double click next time
     } else {
         prevTime = e->time;
     }
@@ -724,7 +726,7 @@ void QXlibWindow::doSizeHints()
     s.flags |= USSize;
     s.flags |= PSize;
     s.flags |= PWinGravity;
-    s.win_gravity = QApplication::isRightToLeft() ? NorthEastGravity : NorthWestGravity;
+    s.win_gravity = QGuiApplication::isRightToLeft() ? NorthEastGravity : NorthWestGravity;
     XSetWMNormalHints(mScreen->display()->nativeDisplay(), x_window, &s);
 }
 
index 463130a..a4e006f 100644 (file)
@@ -43,7 +43,6 @@ mac {
 CONFIG += qpa/genericunixfontdatabase
 
 contains(QT_CONFIG, opengl) {
-    QT += opengl
     !contains(QT_CONFIG, opengles2) {
 #        load(qpa/glx/convenience)
         HEADERS += qglxintegration.h