Qt+Windows: Adjust our DBAR check logic.

Don't bother fetching a file's version if its name doesn't match any of
the DBAR DLL list entries. Otherwise we try to open a bunch of DLLs we
don't care about.

Change-Id: Icab11450839195c1259bb307ae88988f52917487
Reviewed-on: https://code.wireshark.org/review/25973
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Gerald Combs 2018-02-21 15:27:10 -08:00 committed by Anders Broman
parent b293c97ad3
commit b443d4646e
1 changed files with 2 additions and 1 deletions

View File

@ -627,10 +627,11 @@ void WiresharkApplication::checkForDbar()
if (inproc_default.isEmpty()) continue;
foreach (QString dbar_dll, dbar_dlls) {
if (! inproc_default.contains(dbar_dll, Qt::CaseInsensitive)) continue;
// XXX We don't expand environment variables in the path.
unsigned int dll_version = fileVersion(inproc_default);
unsigned int bad_version = 1 << 16 | 8; // Offending DBAR version is 1.8.
if (inproc_default.contains(dbar_dll, Qt::CaseInsensitive) && dll_version == bad_version) {
if (dll_version == bad_version) {
QMessageBox dbar_msgbox;
dbar_msgbox.setIcon(QMessageBox::Warning);
dbar_msgbox.setStandardButtons(QMessageBox::Ok);