diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qabstractbutton.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qeffects.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/qmenu.cpp | 12 | ||||
-rw-r--r-- | src/gui/widgets/qmenubar.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qpushbutton.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qtabwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qtextbrowser.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbar.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbutton.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qwidgetresizehandler.cpp | 2 |
10 files changed, 24 insertions, 24 deletions
diff --git a/src/gui/widgets/qabstractbutton.cpp b/src/gui/widgets/qabstractbutton.cpp index f28288e..6337b5c 100644 --- a/src/gui/widgets/qabstractbutton.cpp +++ b/src/gui/widgets/qabstractbutton.cpp @@ -379,7 +379,7 @@ void QAbstractButtonPrivate::moveFocus(int key) #else bool exclusive = autoExclusive; #endif - QWidget *f = qApp->focusWidget(); + QWidget *f = QApplication::focusWidget(); QAbstractButton *fb = qobject_cast<QAbstractButton *>(f); if (!fb || !buttonList.contains(fb)) return; diff --git a/src/gui/widgets/qeffects.cpp b/src/gui/widgets/qeffects.cpp index 140953d..19cdf89 100644 --- a/src/gui/widgets/qeffects.cpp +++ b/src/gui/widgets/qeffects.cpp @@ -588,8 +588,8 @@ void qScrollEffect(QWidget* w, QEffects::DirFlags orient, int time) if (!w) return; - qApp->sendPostedEvents(w, QEvent::Move); - qApp->sendPostedEvents(w, QEvent::Resize); + QApplication::sendPostedEvents(w, QEvent::Move); + QApplication::sendPostedEvents(w, QEvent::Resize); Qt::WindowFlags flags = Qt::ToolTip; // those can be popups - they would steal the focus, but are disabled @@ -610,8 +610,8 @@ void qFadeEffect(QWidget* w, int time) if (!w) return; - qApp->sendPostedEvents(w, QEvent::Move); - qApp->sendPostedEvents(w, QEvent::Resize); + QApplication::sendPostedEvents(w, QEvent::Move); + QApplication::sendPostedEvents(w, QEvent::Resize); Qt::WindowFlags flags = Qt::ToolTip; diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 711f1f4..7baea94 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -1048,7 +1048,7 @@ void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e if (q->testAttribute(Qt::WA_DontShowOnScreen)) { hideUpToMenuBar(); } else { - for(QWidget *widget = qApp->activePopupWidget(); widget; ) { + for(QWidget *widget = QApplication::activePopupWidget(); widget; ) { if (QMenu *qmenu = qobject_cast<QMenu*>(widget)) { if(qmenu == q) hideUpToMenuBar(); @@ -1843,7 +1843,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction) if (adjustToDesktop) { //handle popup falling "off screen" - if (qApp->layoutDirection() == Qt::RightToLeft) { + if (QApplication::layoutDirection() == Qt::RightToLeft) { if(snapToMouse) //position flowing left from the mouse pos.setX(mouse.x()-size.width()); @@ -1881,9 +1881,9 @@ void QMenu::popup(const QPoint &p, QAction *atAction) } setGeometry(QRect(pos, size)); #ifndef QT_NO_EFFECTS - int hGuess = qApp->layoutDirection() == Qt::RightToLeft ? QEffects::LeftScroll : QEffects::RightScroll; + int hGuess = QApplication::layoutDirection() == Qt::RightToLeft ? QEffects::LeftScroll : QEffects::RightScroll; int vGuess = QEffects::DownScroll; - if (qApp->layoutDirection() == Qt::RightToLeft) { + if (QApplication::layoutDirection() == Qt::RightToLeft) { if ((snapToMouse && (pos.x() + size.width()/2 > mouse.x())) || (qobject_cast<QMenu*>(d->causedPopup.widget) && pos.x() + size.width()/2 > d->causedPopup.widget->x())) hGuess = QEffects::RightScroll; @@ -2575,7 +2575,7 @@ void QMenu::keyPressEvent(QKeyEvent *e) { d->hideMenu(this); #ifndef QT_NO_MENUBAR - if (QMenuBar *mb = qobject_cast<QMenuBar*>(qApp->focusWidget())) { + if (QMenuBar *mb = qobject_cast<QMenuBar*>(QApplication::focusWidget())) { mb->d_func()->setKeyboardMode(false); } #endif @@ -2719,7 +2719,7 @@ void QMenu::keyPressEvent(QKeyEvent *e) #ifdef Q_OS_WIN32 if (key_consumed && (e->key() == Qt::Key_Control || e->key() == Qt::Key_Shift || e->key() == Qt::Key_Meta)) - qApp->beep(); + QApplication::beep(); #endif // Q_OS_WIN32 } if (key_consumed) diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index fc7e901..51e38e6 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -284,7 +284,7 @@ void QMenuBarPrivate::setKeyboardMode(bool b) } keyboardState = b; if(b) { - QWidget *fw = qApp->focusWidget(); + QWidget *fw = QApplication::focusWidget(); if (fw != q) keyboardFocusWidget = fw; if(!currentAction && !actionList.isEmpty()) @@ -294,7 +294,7 @@ void QMenuBarPrivate::setKeyboardMode(bool b) if(!popupState) setCurrentAction(0); if(keyboardFocusWidget) { - if (qApp->focusWidget() == q) + if (QApplication::focusWidget() == q) keyboardFocusWidget->setFocus(Qt::MenuBarFocusReason); keyboardFocusWidget = 0; } diff --git a/src/gui/widgets/qpushbutton.cpp b/src/gui/widgets/qpushbutton.cpp index 5001001..b526f02 100644 --- a/src/gui/widgets/qpushbutton.cpp +++ b/src/gui/widgets/qpushbutton.cpp @@ -589,7 +589,7 @@ void QPushButtonPrivate::_q_popupPressed() int x = globalPos.x(); int y = globalPos.y(); if (horizontal) { - if (globalPos.y() + rect.height() + menuSize.height() <= qApp->desktop()->height()) { + if (globalPos.y() + rect.height() + menuSize.height() <= QApplication::desktop()->height()) { y += rect.height(); } else { y -= menuSize.height(); @@ -597,7 +597,7 @@ void QPushButtonPrivate::_q_popupPressed() if (q->layoutDirection() == Qt::RightToLeft) x += rect.width() - menuSize.width(); } else { - if (globalPos.x() + rect.width() + menu->sizeHint().width() <= qApp->desktop()->width()) + if (globalPos.x() + rect.width() + menu->sizeHint().width() <= QApplication::desktop()->width()) x += rect.width(); else x -= menuSize.width(); diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp index 43b2f54..c97154c 100644 --- a/src/gui/widgets/qtabwidget.cpp +++ b/src/gui/widgets/qtabwidget.cpp @@ -1057,7 +1057,7 @@ void QTabWidget::keyPressEvent(QKeyEvent *e) break; } } - if (!qApp->focusWidget()) + if (!QApplication::focusWidget()) d->tabs->setFocus(); } else { e->ignore(); diff --git a/src/gui/widgets/qtextbrowser.cpp b/src/gui/widgets/qtextbrowser.cpp index a1f4d34..d849184 100644 --- a/src/gui/widgets/qtextbrowser.cpp +++ b/src/gui/widgets/qtextbrowser.cpp @@ -263,7 +263,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url) Q_Q(QTextBrowser); #ifndef QT_NO_CURSOR if (q->isVisible()) - qApp->setOverrideCursor(Qt::WaitCursor); + QApplication::setOverrideCursor(Qt::WaitCursor); #endif textOrSourceChanged = true; @@ -295,9 +295,9 @@ void QTextBrowserPrivate::setSource(const QUrl &url) if (q->isVisible()) { QString firstTag = txt.left(txt.indexOf(QLatin1Char('>')) + 1); - if (firstTag.left(3) == QLatin1String("<qt") && firstTag.contains(QLatin1String("type")) && firstTag.contains(QLatin1String("detail"))) { + if (firstTag.startsWith(QLatin1String("<qt")) && firstTag.contains(QLatin1String("type")) && firstTag.contains(QLatin1String("detail"))) { #ifndef QT_NO_CURSOR - qApp->restoreOverrideCursor(); + QApplication::restoreOverrideCursor(); #endif #ifndef QT_NO_WHATSTHIS QWhatsThis::showText(QCursor::pos(), txt, q); @@ -342,7 +342,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url) #ifndef QT_NO_CURSOR if (q->isVisible()) - qApp->restoreOverrideCursor(); + QApplication::restoreOverrideCursor(); #endif emit q->sourceChanged(url); } diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index 20f2c23..7787a66 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -1181,7 +1181,7 @@ bool QToolBar::event(QEvent *event) if (!d->layout->expanded) break; - QWidget *w = qApp->activePopupWidget(); + QWidget *w = QApplication::activePopupWidget(); if (waitForPopup(this, w)) { d->waitForPopupTimer->start(); break; @@ -1201,7 +1201,7 @@ void QToolBarPrivate::_q_waitForPopup() { Q_Q(QToolBar); - QWidget *w = qApp->activePopupWidget(); + QWidget *w = QApplication::activePopupWidget(); if (!waitForPopup(q, w)) { waitForPopupTimer->stop(); if (!q->underMouse()) diff --git a/src/gui/widgets/qtoolbutton.cpp b/src/gui/widgets/qtoolbutton.cpp index 7d41d1e..0eb6364 100644 --- a/src/gui/widgets/qtoolbutton.cpp +++ b/src/gui/widgets/qtoolbutton.cpp @@ -895,7 +895,7 @@ void QToolButtonPrivate::popupTimerDone() horizontal = false; #endif QPoint p; - QRect screen = qApp->desktop()->availableGeometry(q); + QRect screen = QApplication::desktop()->availableGeometry(q); QSize sh = ((QToolButton*)(QMenu*)actualMenu)->receivers(SIGNAL(aboutToShow()))? QSize() : actualMenu->sizeHint(); QRect rect = q->rect(); if (horizontal) { diff --git a/src/gui/widgets/qwidgetresizehandler.cpp b/src/gui/widgets/qwidgetresizehandler.cpp index 9171244..0e5b28a 100644 --- a/src/gui/widgets/qwidgetresizehandler.cpp +++ b/src/gui/widgets/qwidgetresizehandler.cpp @@ -258,7 +258,7 @@ void QWidgetResizeHandler::mouseMoveEvent(QMouseEvent *e) #ifdef Q_WS_X11 // Workaround for window managers which refuse to move a tool window partially offscreen. - QRect desktop = qApp->desktop()->availableGeometry(widget); + QRect desktop = QApplication::desktop()->availableGeometry(widget); pp.rx() = qMax(pp.x(), desktop.left()); pp.ry() = qMax(pp.y(), desktop.top()); p.rx() = qMin(p.x(), desktop.right()); |