diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-01-29 10:26:28 -0800 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-01-31 13:49:48 +0000 |
commit | 4a79cf2e1ab056faaddd252aa56520435b318a56 (patch) | |
tree | cd1c0201340669bf17a62212a2b9b7ad9edac352 /ui/qt | |
parent | 057b8d7dde25f638a13de45d8e3fcb51da7fb28d (diff) |
Switch from QLibrary to ws_load_library.
From the comments in qlibrary_win.cpp:
// We make the following attempts at locating the library:
[ ... ]
// Windows
// if (absolute)
// fileName
// fileName + ".dll"
// else
// fileName + ".dll"
// fileName
We were passing "riched20.dll" to QLibrary, which meant that it searched
for "riched20.dll.dll" first.
Switch to ws_load_library, which we use elsewhere and which has much
safer default behavior.
Change-Id: Ic8f0cf5686c9b1856d37e76be4404d6236c076e5
Reviewed-on: https://code.wireshark.org/review/13607
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/wireshark_application.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index 20c81e578b..c3f027bc62 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -65,10 +65,12 @@ #include "ui/software_update.h" #include "ui/last_open_dir.h" #include "ui/recent_utils.h" -#include <wsutil/utf8_entities.h> + +#include "wsutil/utf8_entities.h" #ifdef _WIN32 # include "ui/win32/console_win32.h" +# include "wsutil/file_util.h" #endif /* _WIN32 */ #include <QAction> @@ -85,11 +87,6 @@ #include <QUrl> #include <QColorDialog> -#ifdef Q_OS_WIN -#include <QDebug> -#include <QLibrary> -#endif - #ifdef _MSC_VER #pragma warning(pop) #endif @@ -558,13 +555,7 @@ WiresharkApplication::WiresharkApplication(int &argc, char **argv) : #ifdef Q_OS_WIN /* RichEd20.DLL is needed for native file dialog filter entries. */ - if (QLibrary::isLibrary("riched20.dll")) { - QLibrary riched20("riched20.dll"); - riched20.load(); - if (!riched20.isLoaded()) { - qDebug() << riched20.errorString(); - } - } + ws_load_library("riched20.dll"); #endif // Q_OS_WIN #if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) |