summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-08-10 14:28:40 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-08-10 14:28:40 (GMT)
commitb9718d4fdd092ee63d91b5f84f0c34d23c3a18ac (patch)
tree2d5415d0886f41559f36e38f0e3026c3e02cdba8 /src
parentf4dba5394f6772a61af56fd25052e29a44de89ed (diff)
parent9c4ed99ede2de8dae005cef9a6c519e2b561a54f (diff)
downloadQt-b9718d4fdd092ee63d91b5f84f0c34d23c3a18ac.zip
Qt-b9718d4fdd092ee63d91b5f84f0c34d23c3a18ac.tar.gz
Qt-b9718d4fdd092ee63d91b5f84f0c34d23c3a18ac.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication.h4
-rw-r--r--src/gui/kernel/qapplication_win.cpp11
-rw-r--r--src/gui/kernel/qstandardgestures.cpp8
-rw-r--r--src/gui/widgets/qtoolbararealayout.cpp2
4 files changed, 8 insertions, 17 deletions
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index 19ae085..58e0cc3 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -375,10 +375,6 @@ private:
friend class QDirectPainterPrivate;
#endif
-#if defined(Q_WS_WIN)
- friend QApplicationPrivate* getQApplicationPrivateInternal();
-#endif
-
#if defined(Q_WS_MAC) || defined(Q_WS_X11)
Q_PRIVATE_SLOT(d_func(), void _q_alertTimeOut())
#endif
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index cb67409..d5448db 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -428,11 +428,6 @@ extern QCursor *qt_grab_cursor();
#define __export
#endif
-QApplicationPrivate* getQApplicationPrivateInternal()
-{
- return qApp->d_func();
-}
-
extern "C" LRESULT CALLBACK QtWndProc(HWND, UINT, WPARAM, LPARAM);
class QETWidget : public QWidget // event translator widget
@@ -1461,7 +1456,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
// we receive the message for each toplevel window included internal hidden ones,
// but the aboutToQuit signal should be emitted only once.
- QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
if (endsession && !qAppPriv->aboutToQuitEmitted) {
qAppPriv->aboutToQuitEmitted = true;
int index = QApplication::staticMetaObject.indexOfSignal("aboutToQuit()");
@@ -1648,7 +1643,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
} else {
switch (message) {
case WM_TOUCH:
- result = getQApplicationPrivateInternal()->translateTouchEvent(msg);
+ result = QApplicationPrivate::instance()->translateTouchEvent(msg);
break;
case WM_KEYDOWN: // keyboard event
case WM_SYSKEYDOWN:
@@ -3719,7 +3714,7 @@ bool QETWidget::translateGestureEvent(const MSG &msg)
memset(&gi, 0, sizeof(GESTUREINFO));
gi.cbSize = sizeof(GESTUREINFO);
- QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
BOOL bResult = qAppPriv->GetGestureInfo((HANDLE)msg.lParam, &gi);
if (bResult) {
const QPoint widgetPos = QPoint(gi.ptsLocation.x, gi.ptsLocation.y);
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index ac03cd2..b4c3787 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -293,7 +293,7 @@ QPinchGesture::QPinchGesture(QWidget *parent)
: QGesture(*new QPinchGesturePrivate, parent)
{
if (parent) {
- QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
qAppPriv->widgetGestures[parent].pinch = this;
#ifdef Q_WS_WIN
qt_widget_private(parent)->winSetupGestures();
@@ -307,7 +307,7 @@ bool QPinchGesture::event(QEvent *event)
switch (event->type()) {
case QEvent::ParentAboutToChange:
if (QWidget *w = qobject_cast<QWidget*>(parent())) {
- getQApplicationPrivateInternal()->widgetGestures[w].pinch = 0;
+ QApplicationPrivate::instance()->widgetGestures[w].pinch = 0;
#ifdef Q_WS_WIN
qt_widget_private(w)->winSetupGestures();
#endif
@@ -315,7 +315,7 @@ bool QPinchGesture::event(QEvent *event)
break;
case QEvent::ParentChange:
if (QWidget *w = qobject_cast<QWidget*>(parent())) {
- getQApplicationPrivateInternal()->widgetGestures[w].pinch = this;
+ QApplicationPrivate::instance()->widgetGestures[w].pinch = this;
#ifdef Q_WS_WIN
qt_widget_private(w)->winSetupGestures();
#endif
@@ -333,7 +333,7 @@ bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event)
Q_D(QPinchGesture);
if (receiver->isWidgetType() && event->type() == QEvent::NativeGesture) {
QNativeGestureEvent *ev = static_cast<QNativeGestureEvent*>(event);
- QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
+ QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
QApplicationPrivate::WidgetStandardGesturesMap::iterator it;
it = qAppPriv->widgetGestures.find(static_cast<QWidget*>(receiver));
if (it == qAppPriv->widgetGestures.end())
diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp
index b4a0ef0..afd526a 100644
--- a/src/gui/widgets/qtoolbararealayout.cpp
+++ b/src/gui/widgets/qtoolbararealayout.cpp
@@ -1156,8 +1156,8 @@ QLayoutItem *QToolBarAreaLayout::unplug(const QList<int> &path, QToolBarAreaLayo
if (!next.skip()) {
newExtraSpace = next.pos - previous.pos - pick(line.o, previous.sizeHint());
previous.resize(line.o, next.pos - previous.pos);
+ break;
}
- break;
}
break;
}