summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-08-10 14:07:33 (GMT)
committerhjk <qtc-committer@nokia.com>2009-08-10 14:11:15 (GMT)
commit0c98e05dfeccdca99bc180ccccd04b38305ad025 (patch)
treeabc30e4df232178be7cca6160b98c8a3206abc76 /src
parent24aa36349b9fc0be9d9bf80b0db607588e0a54f6 (diff)
downloadQt-0c98e05dfeccdca99bc180ccccd04b38305ad025.zip
Qt-0c98e05dfeccdca99bc180ccccd04b38305ad025.tar.gz
Qt-0c98e05dfeccdca99bc180ccccd04b38305ad025.tar.bz2
Compile fix on Linux.
Reviewed-by: brad The declaration of getQApplicationPrivateInternal was only available as 'friend' on Q_WS_WIN.
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
3 files changed, 7 insertions, 16 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())