diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 11 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_qpa.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qclipboard_qpa.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qdesktopwidget_qpa.cpp | 16 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_glib_qpa.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_qpa.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 11 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qplatformscreen_qpa.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 2 |
13 files changed, 37 insertions, 34 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index b1d9b89205..6168199076 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2318,17 +2318,6 @@ void QApplication::aboutQt() \sa QWidget::setFocus(), QWidget::clearFocus(), Qt::FocusReason */ -/*! - \since 4.5 - \fn void QApplication::fontDatabaseChanged() - - This signal is emitted when application fonts are loaded or removed. - - \sa QFontDatabase::addApplicationFont(), - QFontDatabase::addApplicationFontFromData(), - QFontDatabase::removeAllApplicationFonts(), - QFontDatabase::removeApplicationFont() -*/ #ifndef QT_NO_TRANSLATION #if defined(Q_WS_MAC) diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 852932910b..02d59c8034 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -402,7 +402,6 @@ private: friend class QTextControl; #endif friend class QAction; - friend class QFontDatabasePrivate; #if defined(Q_WS_QWS) friend class QInputContext; diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index a1c120183a..1996bdaa13 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -352,7 +352,7 @@ void QApplication::restoreOverrideCursor() QWidget *QApplication::topLevelAt(const QPoint &pos) { - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); QList<QPlatformScreen *> screens = pi->screens(); QList<QPlatformScreen *>::const_iterator screen = screens.constBegin(); @@ -382,7 +382,7 @@ void QApplication::alert(QWidget *, int) QPlatformNativeInterface *QApplication::platformNativeInterface() { - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); return pi->nativeInterface(); } diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp index b8ce60e00d..89c0afa22d 100644 --- a/src/gui/kernel/qclipboard_qpa.cpp +++ b/src/gui/kernel/qclipboard_qpa.cpp @@ -64,14 +64,14 @@ bool QClipboard::event(QEvent *e) const QMimeData* QClipboard::mimeData(Mode mode) const { - QPlatformClipboard *clipboard = QApplicationPrivate::platformIntegration()->clipboard(); + QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard(); if (!clipboard->supportsMode(mode)) return 0; return clipboard->mimeData(mode); } void QClipboard::setMimeData(QMimeData* src, Mode mode) { - QPlatformClipboard *clipboard = QApplicationPrivate::platformIntegration()->clipboard(); + QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard(); if (!clipboard->supportsMode(mode)) return; clipboard->setMimeData(src,mode); @@ -81,7 +81,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode) bool QClipboard::supportsMode(Mode mode) const { - QPlatformClipboard *clipboard = QApplicationPrivate::platformIntegration()->clipboard(); + QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard(); return clipboard->supportsMode(mode); } diff --git a/src/gui/kernel/qdesktopwidget_qpa.cpp b/src/gui/kernel/qdesktopwidget_qpa.cpp index 41cacf2236..b79e4e1618 100644 --- a/src/gui/kernel/qdesktopwidget_qpa.cpp +++ b/src/gui/kernel/qdesktopwidget_qpa.cpp @@ -50,7 +50,7 @@ QT_USE_NAMESPACE void QDesktopWidgetPrivate::updateScreenList() { - QList<QPlatformScreen *> screenList = QApplicationPrivate::platformIntegration()->screens(); + QList<QPlatformScreen *> screenList = QGuiApplicationPrivate::platformIntegration()->screens(); int targetLength = screenList.length(); int currentLength = screens.length(); @@ -71,7 +71,7 @@ void QDesktopWidgetPrivate::updateScreenList() } QRegion virtualGeometry; - bool doVirtualGeometry = QApplicationPrivate::platformIntegration()->isVirtualDesktop(); + bool doVirtualGeometry = QGuiApplicationPrivate::platformIntegration()->isVirtualDesktop(); // update the geometry of each screen widget for (int i = 0; i < screens.length(); i++) { @@ -100,7 +100,7 @@ QDesktopWidget::~QDesktopWidget() bool QDesktopWidget::isVirtualDesktop() const { - return QApplicationPrivate::platformIntegration()->isVirtualDesktop(); + return QGuiApplicationPrivate::platformIntegration()->isVirtualDesktop(); } int QDesktopWidget::primaryScreen() const @@ -110,14 +110,14 @@ int QDesktopWidget::primaryScreen() const int QDesktopWidget::numScreens() const { - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); return qMax(pi->screens().size(), 1); } QWidget *QDesktopWidget::screen(int screen) { Q_D(QDesktopWidget); - if (QApplicationPrivate::platformIntegration()->isVirtualDesktop()) + if (QGuiApplicationPrivate::platformIntegration()->isVirtualDesktop()) return &d->virtualScreen; if (screen < 0 || screen >= d->screens.length()) return d->screens.at(0); @@ -126,7 +126,7 @@ QWidget *QDesktopWidget::screen(int screen) const QRect QDesktopWidget::availableGeometry(int screenNo) const { - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); QList<QPlatformScreen *> screens = pi->screens(); if (screenNo == -1) screenNo = 0; @@ -138,7 +138,7 @@ const QRect QDesktopWidget::availableGeometry(int screenNo) const const QRect QDesktopWidget::screenGeometry(int screenNo) const { - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); QList<QPlatformScreen *> screens = pi->screens(); if (screenNo == -1) screenNo = 0; @@ -162,7 +162,7 @@ int QDesktopWidget::screenNumber(const QWidget *w) const int QDesktopWidget::screenNumber(const QPoint &p) const { - QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); QList<QPlatformScreen *> screens = pi->screens(); for (int i = 0; i < screens.size(); ++i) diff --git a/src/gui/kernel/qeventdispatcher_glib_qpa.cpp b/src/gui/kernel/qeventdispatcher_glib_qpa.cpp index 25d6cda819..c63e94e8c8 100644 --- a/src/gui/kernel/qeventdispatcher_glib_qpa.cpp +++ b/src/gui/kernel/qeventdispatcher_glib_qpa.cpp @@ -135,7 +135,7 @@ bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) { static bool init = false; if (!init) { - if (QApplicationPrivate::platformIntegration()->createEventLoopIntegration()) { + if (QGuiApplicationPrivate::platformIntegration()->createEventLoopIntegration()) { qWarning("Eventloop integration is not supported by the glib event dispatcher"); qWarning("Use the UNIX event dispatcher by defining environment variable QT_NO_GLIB=1"); } diff --git a/src/gui/kernel/qeventdispatcher_qpa.cpp b/src/gui/kernel/qeventdispatcher_qpa.cpp index 2ad7129691..26c8745954 100644 --- a/src/gui/kernel/qeventdispatcher_qpa.cpp +++ b/src/gui/kernel/qeventdispatcher_qpa.cpp @@ -144,8 +144,8 @@ public: if (!m_integrationInitialised) { QEventDispatcherQPAPrivate *that = const_cast<QEventDispatcherQPAPrivate *>(this); if (qApp && (qApp->thread() == QThread::currentThread())) { // guiThread - if (QApplicationPrivate::platformIntegration()) { - that->eventLoopIntegration = QApplicationPrivate::platformIntegration()->createEventLoopIntegration(); + if (QGuiApplicationPrivate::platformIntegration()) { + that->eventLoopIntegration = QGuiApplicationPrivate::platformIntegration()->createEventLoopIntegration(); if (that->eventLoopIntegration) { that->selectWorker = new SelectWorker(that); that->barrierBeforeBlocking = new Rendezvous; diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 6d680ecdfb..a34d6b626c 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -884,6 +884,17 @@ Qt::LayoutDirection QGuiApplication::layoutDirection() return layout_direction; } +/*! + \since 4.5 + \fn void QGuiApplication::fontDatabaseChanged() + + This signal is emitted when application fonts are loaded or removed. + + \sa QFontDatabase::addApplicationFont(), + QFontDatabase::addApplicationFontFromData(), + QFontDatabase::removeAllApplicationFonts(), + QFontDatabase::removeApplicationFont() +*/ QT_END_NAMESPACE diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h index 4230a6572c..44f9ad90a8 100644 --- a/src/gui/kernel/qguiapplication.h +++ b/src/gui/kernel/qguiapplication.h @@ -103,6 +103,9 @@ public: static int exec(); bool notify(QObject *, QEvent *); +Q_SIGNALS: + void fontDatabaseChanged(); + protected: bool event(QEvent *); bool compressEvent(QEvent *, QObject *receiver, QPostEventList *); @@ -116,6 +119,7 @@ private: #ifndef QT_NO_GESTURES friend class QGestureManager; #endif + friend class QFontDatabasePrivate; }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qplatformscreen_qpa.cpp b/src/gui/kernel/qplatformscreen_qpa.cpp index 2e1a13769d..8b686781ab 100644 --- a/src/gui/kernel/qplatformscreen_qpa.cpp +++ b/src/gui/kernel/qplatformscreen_qpa.cpp @@ -91,7 +91,7 @@ QPlatformScreen * QPlatformScreen::platformScreenForWidget(const QWidget *widget if (topData) screenIndex = topData->screenIndex; QPlatformIntegration *integration = - QApplicationPrivate::platformIntegration(); + QGuiApplicationPrivate::platformIntegration(); return integration->screens()[screenIndex]; } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 7022c38581..58b52a734b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1301,7 +1301,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) #elif defined(Q_WS_QPA) if (desktopWidget) { int screen = desktopWidget->d_func()->topData()->screenIndex; - QPlatformIntegration *platform = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *platform = QGuiApplicationPrivate::platformIntegration(); platform->moveToScreen(q, screen); } #else diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index 0421c6b1a8..8c55708429 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -101,7 +101,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO if (!surface ) { if (win) { - surface = QApplicationPrivate::platformIntegration()->createWindowSurface(win, win->winId()); + surface = QGuiApplicationPrivate::platformIntegration()->createWindowSurface(win, win->winId()); q->setWindowSurface(surface); } else { q->setAttribute(Qt::WA_PaintOnScreen,true); @@ -122,7 +122,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO } } - QApplicationPrivate::platformIntegration()->moveToScreen(q, topData()->screenIndex); + QGuiApplicationPrivate::platformIntegration()->moveToScreen(q, topData()->screenIndex); // qDebug() << "create_sys" << q << q->internalWinId(); } @@ -218,7 +218,7 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f) maybeTopData()->screenIndex = targetScreen; // only if it is already created if (q->testAttribute(Qt::WA_WState_Created)) { - QPlatformIntegration *platform = QApplicationPrivate::platformIntegration(); + QPlatformIntegration *platform = QGuiApplicationPrivate::platformIntegration(); platform->moveToScreen(q, targetScreen); } } diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 17afd53300..92b62e9276 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -86,7 +86,7 @@ void QWindow::create() { Q_D(QWindow); if (!d->platformWindow) { - d->platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(this); + d->platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(this); d->windowFlags = d->platformWindow->setWindowFlags(d->windowFlags); if (!d->windowTitle.isNull()) d->platformWindow->setWindowTitle(d->windowTitle); |