summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-04 15:03:45 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-04 15:03:45 +0200
commitaa20a95f5983bdb7c7badb375f46d47e6451fcf8 (patch)
tree0e653c4e2c4ae40af0ef74f3d238bfb1576349b2
parent7a0ae98978870fbc01e51c0ff60f9f51404d197b (diff)
Use base-class prefix instead of QApplication:: where possible.
-rw-r--r--src/gui/guikernel/qdnd_qpa.cpp24
-rw-r--r--src/gui/guikernel/qeventdispatcher_qpa.cpp6
-rw-r--r--src/gui/guikernel/qguiapplication.cpp4
3 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/guikernel/qdnd_qpa.cpp b/src/gui/guikernel/qdnd_qpa.cpp
index b744c2f085..82e8d580ae 100644
--- a/src/gui/guikernel/qdnd_qpa.cpp
+++ b/src/gui/guikernel/qdnd_qpa.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qapplication.h"
+#include "qguiapplication.h"
#ifndef QT_NO_DRAGANDDROP
@@ -95,7 +95,7 @@ public:
// ### Temporary workaround for 4.2-rc1!!! To prevent flickering when
// using drag'n drop in a client application. (task 126956)
// setAttribute() should be done unconditionally!
- if (QApplication::type() == QApplication::GuiServer)
+ // if (QApplication::type() == QApplication::GuiServer)
setAttribute(Qt::WA_TransparentForMouseEvents);
}
@@ -157,13 +157,13 @@ void QDragManager::updateCursor()
if (qt_qws_dnd_deco)
qt_qws_dnd_deco->show();
if (currentActionForOverrideCursor != global_accepted_action) {
- QApplication::changeOverrideCursor(QCursor(dragCursor(global_accepted_action), 0, 0));
+ QGuiApplication::changeOverrideCursor(QCursor(dragCursor(global_accepted_action), 0, 0));
currentActionForOverrideCursor = global_accepted_action;
}
} else {
- QCursor *overrideCursor = QApplication::overrideCursor();
+ QCursor *overrideCursor = QGuiApplication::overrideCursor();
if (!overrideCursor || overrideCursor->shape() != Qt::ForbiddenCursor) {
- QApplication::changeOverrideCursor(QCursor(Qt::ForbiddenCursor));
+ QGuiApplication::changeOverrideCursor(QCursor(Qt::ForbiddenCursor));
currentActionForOverrideCursor = Qt::IgnoreAction;
}
if (qt_qws_dnd_deco)
@@ -242,7 +242,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
if (object->target() != cw) {
if (object->target()) {
QDragLeaveEvent dle;
- QApplication::sendEvent(object->target(), &dle);
+ QCoreApplication::sendEvent(object->target(), &dle);
willDrop = false;
global_accepted_action = Qt::IgnoreAction;
updateCursor();
@@ -253,7 +253,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
object->d_func()->target = cw;
QDragEnterEvent dee(cw->mapFromGlobal(me->globalPos()), possible_actions, dropData,
me->buttons(), me->modifiers());
- QApplication::sendEvent(object->target(), &dee);
+ QCoreApplication::sendEvent(object->target(), &dee);
willDrop = dee.isAccepted() && dee.dropAction() != Qt::IgnoreAction;
global_accepted_action = willDrop ? dee.dropAction() : Qt::IgnoreAction;
updateCursor();
@@ -266,7 +266,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
dme.setDropAction(global_accepted_action);
dme.accept();
}
- QApplication::sendEvent(cw, &dme);
+ QCoreApplication::sendEvent(cw, &dme);
willDrop = dme.isAccepted();
global_accepted_action = willDrop ? dme.dropAction() : Qt::IgnoreAction;
updatePixmap();
@@ -284,7 +284,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
if (restoreCursor) {
willDrop = false;
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
restoreCursor = false;
}
@@ -296,7 +296,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
QDropEvent de(object->target()->mapFromGlobal(me->globalPos()), possible_actions, dropData,
me->buttons(), me->modifiers());
- QApplication::sendEvent(object->target(), &de);
+ QCoreApplication::sendEvent(object->target(), &de);
if (de.isAccepted())
global_accepted_action = de.dropAction();
else
@@ -370,12 +370,12 @@ void QDragManager::cancel(bool deleteSource)
if (object->target()) {
QDragLeaveEvent dle;
- QApplication::sendEvent(object->target(), &dle);
+ QCoreApplication::sendEvent(object->target(), &dle);
}
#ifndef QT_NO_CURSOR
if (restoreCursor) {
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
restoreCursor = false;
}
#endif
diff --git a/src/gui/guikernel/qeventdispatcher_qpa.cpp b/src/gui/guikernel/qeventdispatcher_qpa.cpp
index 6271804740..690209a265 100644
--- a/src/gui/guikernel/qeventdispatcher_qpa.cpp
+++ b/src/gui/guikernel/qeventdispatcher_qpa.cpp
@@ -40,10 +40,10 @@
****************************************************************************/
#include "qplatformdefs.h"
-#include "qapplication.h"
+#include "qcoreapplication.h"
#include "qeventdispatcher_qpa_p.h"
#include "private/qeventdispatcher_unix_p.h"
-#include "private/qapplication_p.h"
+#include "private/qguiapplication_p.h"
#include "qplatformeventloopintegration_qpa.h"
#include <QWindowSystemInterface>
@@ -216,7 +216,7 @@ bool QEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags)
// handle gui and posted events
d->interrupt = false;
- QApplication::sendPostedEvents();
+ QCoreApplication::sendPostedEvents();
while (!d->interrupt) { // also flushes output buffer ###can be optimized
QWindowSystemInterfacePrivate::WindowSystemEvent *event;
diff --git a/src/gui/guikernel/qguiapplication.cpp b/src/gui/guikernel/qguiapplication.cpp
index 24a3e333c1..e9e140297c 100644
--- a/src/gui/guikernel/qguiapplication.cpp
+++ b/src/gui/guikernel/qguiapplication.cpp
@@ -672,13 +672,13 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
void QGuiApplicationPrivate::processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e)
{
QEvent event(QEvent::Enter);
- QApplication::sendSpontaneousEvent(e->enter.data(), &event);
+ QCoreApplication::sendSpontaneousEvent(e->enter.data(), &event);
}
void QGuiApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e)
{
QEvent event(QEvent::Leave);
- QApplication::sendSpontaneousEvent(e->leave.data(), &event);
+ QCoreApplication::sendSpontaneousEvent(e->leave.data(), &event);
}
void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *)