diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 67261645ac..67e509eeef 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -122,6 +122,7 @@ QString QCoreApplicationPrivate::appName() const #ifndef Q_OS_WINRT +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Q_CORE_EXPORT HINSTANCE qWinAppInst() // get Windows app handle { return GetModuleHandle(0); @@ -145,6 +146,7 @@ Q_CORE_EXPORT int qWinAppCmdShow() // get main window sho : SW_SHOWDEFAULT; #endif } +#endif /***************************************************************************** qWinMain() - Initializes Windows. Called from WinMain() in qtmain_win.cpp diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index e05de4f085..1a0efae2dc 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -55,7 +55,6 @@ QT_BEGIN_NAMESPACE -HINSTANCE qWinAppInst(); extern uint qGlobalPostedEventsCount(); #ifndef TIME_KILL_SYNCHRONOUS @@ -310,7 +309,7 @@ QWindowsMessageWindowClassContext::QWindowsMessageWindowClassContext() wc.lpfnWndProc = qt_internal_proc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; - wc.hInstance = qWinAppInst(); + wc.hInstance = GetModuleHandle(0); wc.hIcon = 0; wc.hCursor = 0; wc.hbrBackground = 0; @@ -327,7 +326,7 @@ QWindowsMessageWindowClassContext::QWindowsMessageWindowClassContext() QWindowsMessageWindowClassContext::~QWindowsMessageWindowClassContext() { if (className) { - UnregisterClass(className, qWinAppInst()); + UnregisterClass(className, GetModuleHandle(0)); delete [] className; } } @@ -345,7 +344,7 @@ static HWND qt_create_internal_window(const QEventDispatcherWin32 *eventDispatch 0, 0, 0, 0, // geometry HWND_MESSAGE, // parent 0, // menu handle - qWinAppInst(), // application + GetModuleHandle(0), // application 0); // windows creation data. if (!wnd) { |