diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-10 14:22:07 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-10 19:36:46 +0000 |
commit | de83e48d7908e2f50d9cdbe41207b77a41332f2d (patch) | |
tree | 266838c82dbe2f10ec7a69473738b4ac70631c32 | |
parent | 03369e63a5e74f096475383d429ac5b57d6f1763 (diff) |
Fix invocation of static methods.
Change-Id: Id151e5e43c53ba09d17556e98b5573faa2a98c19
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r-- | src/activeqt/container/qaxscript.cpp | 2 | ||||
-rw-r--r-- | src/activeqt/container/qaxwidget.cpp | 4 | ||||
-rw-r--r-- | src/activeqt/control/qaxserverbase.cpp | 12 | ||||
-rw-r--r-- | src/activeqt/control/qaxserverdll.cpp | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp index 1d1711b..cb1a2c5 100644 --- a/src/activeqt/container/qaxscript.cpp +++ b/src/activeqt/container/qaxscript.cpp @@ -327,7 +327,7 @@ QWidget *QAxScriptSite::window() const if (w) w = w->window(); if (!w && qApp) - w = qApp->activeWindow(); + w = QApplication::activeWindow(); return w; } diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp index ae3e3e1..4da3871 100644 --- a/src/activeqt/container/qaxwidget.cpp +++ b/src/activeqt/container/qaxwidget.cpp @@ -517,7 +517,7 @@ bool QAxNativeEventFilter::nativeEventFilter(const QByteArray &, void *m, long * QMouseEvent e(type, pos, gpos, (Qt::MouseButton)button, translateMouseButtonState(msg->wParam), translateModifierState(msg->wParam)); - QApplication::sendEvent(ax, &e); + QCoreApplication::sendEvent(ax, &e); } } } @@ -1391,7 +1391,7 @@ HRESULT WINAPI QAxClientSite::RemoveMenus(HMENU /*hmenuShared*/) HRESULT WINAPI QAxClientSite::SetStatusText(LPCOLESTR pszStatusText) { QStatusTipEvent tip(QString::fromWCharArray(pszStatusText)); - QApplication::sendEvent(widget, &tip); + QCoreApplication::sendEvent(widget, &tip); return S_OK; } diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index aa00823..1402d32 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -789,7 +789,7 @@ private: LRESULT QT_WIN_CALLBACK axs_FilterProc(int nCode, WPARAM wParam, LPARAM lParam) { if (qApp && !invokeCount) - qApp->sendPostedEvents(); + QCoreApplication::sendPostedEvents(); return CallNextHookEx(qax_hhook, nCode, wParam, lParam); } @@ -905,7 +905,7 @@ public: int argc = 0; new QApplication(argc, 0); } - qApp->setQuitOnLastWindowClosed(false); + QGuiApplication::setQuitOnLastWindowClosed(false); if (qAxOutProcServer) QAbstractEventDispatcher::instance()->installNativeEventFilter(qax_winEventFilter()); @@ -920,7 +920,7 @@ public: // If we created QApplication instance, ensure native event loop starts properly // by calling processEvents. if (qax_ownQApp) - qApp->processEvents(); + QCoreApplication::processEvents(); HRESULT res; // Create the ActiveX wrapper - aggregate if requested @@ -1320,7 +1320,7 @@ bool QAxServerBase::internalCreate() if (isWidget) { if (!stayTopLevel) { QEvent e(QEvent::EmbeddingControl); - QApplication::sendEvent(qt.widget, &e); + QCoreApplication::sendEvent(qt.widget, &e); } qt.widget->setAttribute(Qt::WA_QuitOnClose, false); qt.widget->move(0, 0); @@ -3342,7 +3342,7 @@ HRESULT WINAPI QAxServerBase::OnAmbientPropertyChange(DISPID dispID) case DISPID_AMBIENT_RIGHTTOLEFT: if (var.vt != VT_BOOL) break; - qApp->setLayoutDirection(var.boolVal?Qt::RightToLeft:Qt::LeftToRight); + QGuiApplication::setLayoutDirection(var.boolVal ? Qt::RightToLeft : Qt::LeftToRight); break; } @@ -3581,7 +3581,7 @@ HRESULT WINAPI QAxServerBase::TranslateAcceleratorW(MSG *pMsg) QKeyEvent override(QEvent::ShortcutOverride, key, (Qt::KeyboardModifiers)state); override.ignore(); - QApplication::sendEvent(qt.widget->focusWidget(), &override); + QCoreApplication::sendEvent(qt.widget->focusWidget(), &override); if (override.isAccepted()) return S_FALSE; } diff --git a/src/activeqt/control/qaxserverdll.cpp b/src/activeqt/control/qaxserverdll.cpp index fa4619b..7117cbb 100644 --- a/src/activeqt/control/qaxserverdll.cpp +++ b/src/activeqt/control/qaxserverdll.cpp @@ -96,7 +96,7 @@ STDAPI DllCanUnloadNow() return S_OK; // check if qApp still runs widgets (in other DLLs) - QWidgetList widgets = qApp->allWidgets(); + QWidgetList widgets = QApplication::allWidgets(); int count = widgets.count(); for (int w = 0; w < widgets.count(); ++w) { // remove all Qt generated widgets |