diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 79 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_p.h | 14 | ||||
-rw-r--r-- | src/gui/kernel/qdesktopwidget_qpa.cpp | 1 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 11 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 1 |
6 files changed, 4 insertions, 105 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index f37e8d9759..60ff9dcd08 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -64,17 +64,11 @@ #include "qdnd_p.h" #include "qcolormap.h" #include "qdebug.h" -#include "private/qgraphicssystemfactory_p.h" -#include "private/qgraphicssystem_p.h" #include "private/qstylesheetstyle_p.h" #include "private/qstyle_p.h" #include "qmessagebox.h" #include <QtGui/qgraphicsproxywidget.h> -#ifdef QT_GRAPHICSSYSTEM_RUNTIME -#include "private/qgraphicssystem_runtime_p.h" -#endif - #include "qinputcontext.h" #include "qkeymapper_p.h" @@ -453,10 +447,6 @@ QPalette *QApplicationPrivate::app_pal = 0; // default application palett QPalette *QApplicationPrivate::sys_pal = 0; // default system palette QPalette *QApplicationPrivate::set_pal = 0; // default palette set by programmer -QGraphicsSystem *QApplicationPrivate::graphics_system = 0; // default graphics system -QString QApplicationPrivate::graphics_system_name; // graphics system id - for delayed initialization -bool QApplicationPrivate::runtime_graphics_system = false; - #ifndef Q_WS_QPA Q_GLOBAL_STATIC(QMutex, applicationFontMutex) QFont *QApplicationPrivate::app_font = 0; // default application font @@ -607,8 +597,6 @@ void QApplicationPrivate::process_cmdline() widgetCount = true; } else if (qstrcmp(arg, "-testability") == 0) { load_testability = true; - } else if (arg == "-graphicssystem" && i < argc-1) { - graphics_system_name = QString::fromLocal8Bit(argv[++i]); } else { argv[j++] = argv[i]; } @@ -678,8 +666,6 @@ void QApplicationPrivate::process_cmdline() the same time \o -reverse, sets the application's layout direction to Qt::RightToLeft - \o -graphicssystem, sets the backend to be used for on-screen widgets - and QPixmaps. Available options are \c{raster} and \c{opengl}. \o -qmljsdebugger=, activates the QML/JS debugger with a specified port. The value must be of format port:1234[,block], where block is optional and will make the application wait until a debugger connects to it. @@ -813,21 +799,6 @@ void QApplicationPrivate::construct( qt_is_gui_used = (qt_appType != QApplication::Tty); process_cmdline(); - // the environment variable has the lowest precedence of runtime graphicssystem switches - if (graphics_system_name.isEmpty()) - graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM")); - -#if defined(Q_WS_X11) && !defined(QT_NO_EGL) - if (graphics_system_name.isEmpty()) { - bool linksWithMeeGoTouch = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libmeegotouchcore")); - bool linksWithMeeGoGraphicsSystemHelper = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libQtMeeGoGraphicsSystemHelper")); - - if (linksWithMeeGoTouch && !linksWithMeeGoGraphicsSystemHelper) { - qWarning("Running non-meego graphics system enabled MeeGo touch, forcing native graphicssystem\n"); - graphics_system_name = QLatin1String("native"); - } - } -#endif // Must be called before initialize() qt_init(this, qt_appType @@ -970,14 +941,6 @@ void QApplicationPrivate::initialize() QWidgetPrivate::mapper = new QWidgetMapper; QWidgetPrivate::allWidgets = new QWidgetSet; -#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA) - // initialize the graphics system - on X11 this is initialized inside - // qt_init() in qapplication_x11.cpp because of several reasons. - // On QWS, the graphics system is set by the QScreen plugin. - // We don't use graphics systems in Qt QPA - graphics_system = QGraphicsSystemFactory::create(graphics_system_name); -#endif - if (qt_appType != QApplication::Tty) (void) QApplication::style(); // trigger creation of application style // trigger registering of QVariant's GUI types @@ -1166,8 +1129,6 @@ QApplication::~QApplication() QApplicationPrivate::app_style = 0; delete QApplicationPrivate::app_icon; QApplicationPrivate::app_icon = 0; - delete QApplicationPrivate::graphics_system; - QApplicationPrivate::graphics_system = 0; #ifndef QT_NO_CURSOR d->cursor_list.clear(); #endif @@ -1628,46 +1589,6 @@ QStyle* QApplication::setStyle(const QString& style) } /*! - \since 4.5 - - Sets the default graphics backend to \a system, which will be used for - on-screen widgets and QPixmaps. The available systems are \c{"native"}, - \c{"raster"} and \c{"opengl"}. - - There are several ways to set the graphics backend, in order of decreasing - precedence: - \list - \o the application commandline \c{-graphicssystem} switch - \o QApplication::setGraphicsSystem() - \o the QT_GRAPHICSSYSTEM environment variable - \o the Qt configure \c{-graphicssystem} switch - \endlist - If the highest precedence switch sets an invalid name, the error will be - ignored and the default backend will be used. - - \warning This function is only effective before the QApplication constructor - is called. - - \note The \c{"opengl"} option is currently experimental. -*/ - -void QApplication::setGraphicsSystem(const QString &system) -{ -#ifdef Q_WS_QPA - Q_UNUSED(system); -#else -# ifdef QT_GRAPHICSSYSTEM_RUNTIME - if (QApplicationPrivate::graphics_system_name == QLatin1String("runtime")) { - QRuntimeGraphicsSystem *r = - static_cast<QRuntimeGraphicsSystem *>(QApplicationPrivate::graphics_system); - r->setGraphicsSystem(system); - } else -# endif - QApplicationPrivate::graphics_system_name = system; -#endif -} - -/*! Returns the color specification. \sa QApplication::setColorSpec() diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 1bf7e8a240..11f683c9b3 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -154,7 +154,8 @@ public: enum ColorSpec { NormalColor=0, CustomColor=1, ManyColor=2 }; static int colorSpec(); static void setColorSpec(int); - static void setGraphicsSystem(const QString &); + // ### Qt4 compatibility, remove? + static inline void setGraphicsSystem(const QString &) {} #ifndef QT_NO_CURSOR static QCursor *overrideCursor(); diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 2617f98c1f..6ab1cc2e73 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -69,10 +69,6 @@ #include <private/qthread_p.h> #include "QtCore/qpoint.h" #include <QTime> -#ifdef Q_WS_QWS -#include "QtGui/qscreen_qws.h" -#include <private/qgraphicssystem_qws_p.h> -#endif #ifdef Q_OS_SYMBIAN #include <w32std.h> #endif @@ -87,7 +83,6 @@ QT_BEGIN_NAMESPACE class QClipboard; class QGraphicsScene; -class QGraphicsSystem; class QInputContext; class QObject; class QWidget; @@ -325,12 +320,6 @@ public: static bool autoSipEnabled; static QString desktopStyleKey(); - static QGraphicsSystem *graphicsSystem() -#if defined(Q_WS_QWS) - { return QScreen::instance()->graphicsSystem(); } -#else - { return graphics_system; } -#endif void createEventDispatcher(); QString appName() const; @@ -429,9 +418,6 @@ public: static QPalette *app_pal; static QPalette *sys_pal; static QPalette *set_pal; - static QGraphicsSystem *graphics_system; - static QString graphics_system_name; - static bool runtime_graphics_system; private: #ifndef Q_WS_QPA diff --git a/src/gui/kernel/qdesktopwidget_qpa.cpp b/src/gui/kernel/qdesktopwidget_qpa.cpp index cff05f5836..41cacf2236 100644 --- a/src/gui/kernel/qdesktopwidget_qpa.cpp +++ b/src/gui/kernel/qdesktopwidget_qpa.cpp @@ -41,7 +41,6 @@ #include "qdesktopwidget.h" #include "private/qapplication_p.h" -#include "private/qgraphicssystem_p.h" #include <QWidget> #include "private/qwidget_p.h" #include "private/qdesktopwidget_qpa_p.h" diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index f6c95719c2..e1f9ee70ce 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -121,7 +121,6 @@ #include "private/qabstractscrollarea_p.h" #include "private/qevent_p.h" -#include "private/qgraphicssystem_p.h" #include "private/qgesturemanager_p.h" #ifdef QT_KEYPAD_NAVIGATION @@ -161,11 +160,7 @@ static inline bool qRectIntersects(const QRect &r1, const QRect &r2) static inline bool hasBackingStoreSupport() { -#ifdef Q_WS_MAC - return QApplicationPrivate::graphicsSystem() != 0; -#else return true; -#endif } #ifdef Q_WS_MAC @@ -375,10 +370,8 @@ QWindowSurface *QWidgetPrivate::createDefaultWindowSurface() } else #endif { - if (QApplicationPrivate::graphicsSystem()) - surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q->windowHandle()); - else - surface = createDefaultWindowSurface_sys(); + QWindow *win = topData()->window; + surface = QGuiApplicationPrivate::platformIntegration()->createWindowSurface(win, win->winId()); } return surface; diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index 5fea32eb9b..0421c6b1a8 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -45,7 +45,6 @@ #include "QtGui/private/qbackingstore_p.h" #include "QtGui/private/qwidget_p.h" #include "QtGui/private/qwidgetwindow_qpa_p.h" -#include "QtGui/private/qgraphicssystem_p.h" #include "QtGui/private/qapplication_p.h" #include "QtGui/qdesktopwidget.h" #include "QtGui/qplatformwindow_qpa.h" |