diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-11-22 15:22:33 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-26 22:22:27 +0100 |
commit | da033ca3eb390539720674e843015a5c7601e0b2 (patch) | |
tree | f1179cba490c5d158004008191ace01511fbaea5 | |
parent | 654ea6effd1302cb1884c9b8b83104f422ab6b83 (diff) | |
download | qtactiveqt-da033ca3eb390539720674e843015a5c7601e0b2.tar.gz |
Point QCoreApplication to location of DLL in ActiveQt.
Task-number: QTBUG-34989
[ChangeLog][ActiveQt][QTBUG-34989] Pick up plugins from deployment location of Active X DLLs.
Change-Id: I53f1f8789ede9b6816c2d794b5a991cdf78b1c50
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | src/activeqt/control/qaxserverdll.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/activeqt/control/qaxserverdll.cpp b/src/activeqt/control/qaxserverdll.cpp index 39f58e9..be854cc 100644 --- a/src/activeqt/control/qaxserverdll.cpp +++ b/src/activeqt/control/qaxserverdll.cpp @@ -39,7 +39,9 @@ ****************************************************************************/ #include <qapplication.h> +#include <private/qcoreapplication_p.h> #include <qwidget.h> +#include <qdir.h> #include <qt_windows.h> @@ -120,6 +122,10 @@ STDAPI DllCanUnloadNow() EXTERN_C BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /* lpvReserved */) { GetModuleFileName(hInstance, qAxModuleFilename, MAX_PATH); + // Point QApplication here such that the directory is added to the patch, and qt.conf and + // deployed plugins are found. + QCoreApplicationPrivate::setApplicationFilePath(QDir::cleanPath(QString::fromWCharArray(qAxModuleFilename))); + qAxInstance = hInstance; qAxIsServer = true; |