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>
This commit is contained in:
parent
057b8d7dde
commit
4a79cf2e1a
|
@ -3440,7 +3440,7 @@ WinMain (struct HINSTANCE__ *hInstance,
|
|||
comm_ctrl.dwICC = ICC_WIN95_CLASSES;
|
||||
InitCommonControlsEx(&comm_ctrl);
|
||||
|
||||
/* RichEd20.DLL is needed for filter entries. */
|
||||
/* RichEd20.DLL is needed for native file dialog filter entries. */
|
||||
ws_load_library("riched20.dll");
|
||||
|
||||
set_has_console(FALSE);
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue