From 5a919255146e15da8a99262a155a9a4b75e6cfdc Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 3 May 2011 20:20:44 +0200 Subject: [PATCH] QGuiApplication is not QPA specific Rename files to reflect that QGuiApplication is going to be used everywhere. --- src/gui/image/qbitmap.cpp | 2 +- src/gui/image/qicon.cpp | 1 + src/gui/image/qiconloader.cpp | 7 +++++-- src/gui/image/qnativeimage.cpp | 2 +- src/gui/image/qpicture.cpp | 1 + src/gui/image/qpixmap.cpp | 2 +- src/gui/image/qpixmap_blitter.cpp | 2 +- src/gui/image/qpixmap_qpa.cpp | 2 +- src/gui/image/qpixmapdata.cpp | 2 +- src/gui/image/qpixmapdatafactory.cpp | 2 +- src/gui/image/qpixmapfilter.cpp | 2 +- src/gui/kernel/kernel.pri | 6 +++--- src/gui/kernel/qapplication.h | 2 +- src/gui/kernel/qapplication_p.h | 2 +- src/gui/kernel/{qguiapplication_qpa.cpp => qguiapplication.cpp} | 6 +++--- src/gui/kernel/{qguiapplication_qpa.h => qguiapplication.h} | 0 src/gui/kernel/{qguiapplication_qpa_p.h => qguiapplication_p.h} | 2 +- src/gui/kernel/qsessionmanager_qpa.cpp | 1 + src/gui/kernel/qwindowcontext_qpa.cpp | 1 + src/gui/painting/qcolormap_qpa.cpp | 4 ++-- src/gui/painting/qdrawutil.cpp | 1 - 21 files changed, 28 insertions(+), 22 deletions(-) rename src/gui/kernel/{qguiapplication_qpa.cpp => qguiapplication.cpp} (99%) rename src/gui/kernel/{qguiapplication_qpa.h => qguiapplication.h} (100%) rename src/gui/kernel/{qguiapplication_qpa_p.h => qguiapplication_p.h} (99%) diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp index ec2104f..b861997 100644 --- a/src/gui/image/qbitmap.cpp +++ b/src/gui/image/qbitmap.cpp @@ -44,7 +44,7 @@ #include "qimage.h" #include "qvariant.h" #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 76224fe..cfd837d 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -54,6 +54,7 @@ #include "qcache.h" #include "qdebug.h" #include "private/qguiplatformplugin_p.h" +#include "qguiapplication.h" #ifdef Q_WS_MAC #include diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index c7ff18d..19be636 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -41,7 +41,7 @@ #ifndef QT_NO_ICON #include -#include +#include #include #include @@ -489,8 +489,8 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st if (basePixmap.isNull()) basePixmap.load(filename); +#if 0 // ### Qt5 int actualSize = qMin(size.width(), size.height()); - QString key = QLatin1Literal("$qt_theme_") % HexString(basePixmap.cacheKey()) % HexString(mode) @@ -507,6 +507,9 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st QPixmapCache::insert(key, cachedPixmap); } return cachedPixmap; +#else + return basePixmap; +#endif } QPixmap ScalableEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index 2e4e814..18b302e 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -45,7 +45,7 @@ #include "private/qpaintengine_raster_p.h" -#include "private/qguiapplication_qpa_p.h" +#include "private/qguiapplication_p.h" #if defined(Q_WS_X11) && !defined(QT_NO_MITSHM) #include diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp index 4a71fa5..9fd4fbd 100644 --- a/src/gui/image/qpicture.cpp +++ b/src/gui/image/qpicture.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include "qdatastream.h" #include "qfile.h" diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 25e818f..aee1f2b 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -52,7 +52,7 @@ #include "qpainter.h" #include "qdatastream.h" #include "qbuffer.h" -#include +#include #include #include "qevent.h" #include "qfile.h" diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index a761d11..da1c8e1 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/src/gui/image/qpixmap_qpa.cpp b/src/gui/image/qpixmap_qpa.cpp index 093b9b6..da301ba 100644 --- a/src/gui/image/qpixmap_qpa.cpp +++ b/src/gui/image/qpixmap_qpa.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include -#include +#include QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) { diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp index 0f604e4..a56504e 100644 --- a/src/gui/image/qpixmapdata.cpp +++ b/src/gui/image/qpixmapdata.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp index 2c165da..906d8dd 100644 --- a/src/gui/image/qpixmapdatafactory.cpp +++ b/src/gui/image/qpixmapdatafactory.cpp @@ -60,7 +60,7 @@ # include #endif -#include "private/qguiapplication_qpa_p.h" +#include "private/qguiapplication_p.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index f440304..ecab3d7 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -48,7 +48,7 @@ #include "qpixmapfilter_p.h" #include "qvarlengtharray.h" -#include "private/qguiapplication_qpa_p.h" +#include "private/qguiapplication_p.h" #include "private/qpaintengineex_p.h" #include "private/qpaintengine_raster_p.h" #include "qmath.h" diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index e02230c..8cd6249 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -203,8 +203,8 @@ qpa { kernel/qplatformclipboard_qpa.h \ kernel/qplatformnativeinterface_qpa.h \ kernel/qwindowformat_qpa.h \ - kernel/qguiapplication_qpa.h \ - kernel/qguiapplication_qpa_p.h \ + kernel/qguiapplication.h \ + kernel/qguiapplication_p.h \ kernel/qwidgetwindow_qpa_p.h \ kernel/qwindow_qpa_p.h \ kernel/qwindow_qpa.h @@ -234,7 +234,7 @@ qpa { kernel/qplatformnativeinterface_qpa.cpp \ kernel/qsessionmanager_qpa.cpp \ kernel/qwindowformat_qpa.cpp \ - kernel/qguiapplication_qpa.cpp \ + kernel/qguiapplication.cpp \ kernel/qwidgetwindow_qpa.cpp \ kernel/qwindow_qpa.cpp diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 11f683c..f1dc3e8 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -59,7 +59,7 @@ # include #endif #ifdef Q_WS_QPA -# include +# include #endif QT_BEGIN_HEADER diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 6ab1cc2..d401c2f 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -76,7 +76,7 @@ #include #include "qwindowsysteminterface_qpa_p.h" #include "QtGui/qplatformintegration_qpa.h" -#include "QtGui/private/qguiapplication_qpa_p.h" +#include "QtGui/private/qguiapplication_p.h" #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qguiapplication_qpa.cpp b/src/gui/kernel/qguiapplication.cpp similarity index 99% rename from src/gui/kernel/qguiapplication_qpa.cpp rename to src/gui/kernel/qguiapplication.cpp index aece38b..2e2ca66 100644 --- a/src/gui/kernel/qguiapplication_qpa.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qguiapplication_qpa.h" +#include "qguiapplication.h" -#include "private/qguiapplication_qpa_p.h" +#include "private/qguiapplication_p.h" #include "private/qplatformintegrationfactory_qpa_p.h" #include "private/qevent_p.h" @@ -123,7 +123,7 @@ QGuiApplication::~QGuiApplication() // flush clipboard contents if (QGuiApplicationPrivate::qt_clipboard) { QEvent event(QEvent::Clipboard); - QApplication::sendEvent(QGuiApplicationPrivate::qt_clipboard, &event); + QGuiApplication::sendEvent(QGuiApplicationPrivate::qt_clipboard, &event); } d->eventDispatcher->closingDown(); diff --git a/src/gui/kernel/qguiapplication_qpa.h b/src/gui/kernel/qguiapplication.h similarity index 100% rename from src/gui/kernel/qguiapplication_qpa.h rename to src/gui/kernel/qguiapplication.h diff --git a/src/gui/kernel/qguiapplication_qpa_p.h b/src/gui/kernel/qguiapplication_p.h similarity index 99% rename from src/gui/kernel/qguiapplication_qpa_p.h rename to src/gui/kernel/qguiapplication_p.h index 3a01b38..64e0cc1 100644 --- a/src/gui/kernel/qguiapplication_qpa_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -42,7 +42,7 @@ #ifndef QGUIAPPLICATION_QPA_P_H #define QGUIAPPLICATION_QPA_P_H -#include +#include #include diff --git a/src/gui/kernel/qsessionmanager_qpa.cpp b/src/gui/kernel/qsessionmanager_qpa.cpp index ef532d7..bd6fc62 100644 --- a/src/gui/kernel/qsessionmanager_qpa.cpp +++ b/src/gui/kernel/qsessionmanager_qpa.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include +#include #include #ifndef QT_NO_SESSIONMANAGER diff --git a/src/gui/kernel/qwindowcontext_qpa.cpp b/src/gui/kernel/qwindowcontext_qpa.cpp index 3dd4870..fc97c52 100644 --- a/src/gui/kernel/qwindowcontext_qpa.cpp +++ b/src/gui/kernel/qwindowcontext_qpa.cpp @@ -41,6 +41,7 @@ #include "qplatformglcontext_qpa.h" #include "qwindowcontext_qpa.h" +#include "qwindow_qpa.h" #include #include diff --git a/src/gui/painting/qcolormap_qpa.cpp b/src/gui/painting/qcolormap_qpa.cpp index 9de8dcc..24015a0 100644 --- a/src/gui/painting/qcolormap_qpa.cpp +++ b/src/gui/painting/qcolormap_qpa.cpp @@ -42,7 +42,7 @@ #include "qcolormap.h" #include "qcolor.h" #include "qpaintdevice.h" -#include "private/qapplication_p.h" +#include "private/qguiapplication_p.h" QT_BEGIN_NAMESPACE @@ -66,7 +66,7 @@ void QColormap::initialize() { screenMap = new QColormapPrivate; - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); QList screens = pi->screens(); screenMap->depth = screens.at(0)->depth(); diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp index e4094a8..bbd23c2 100644 --- a/src/gui/painting/qdrawutil.cpp +++ b/src/gui/painting/qdrawutil.cpp @@ -42,7 +42,6 @@ #include "qdrawutil.h" #include "qbitmap.h" #include "qpixmapcache.h" -#include "qapplication.h" #include "qpainter.h" #include "qpalette.h" #include -- 2.7.4