Qt+Windows: Adjust our DBAR check logic.
authorGerald Combs <gerald@wireshark.org>
Wed, 21 Feb 2018 23:27:10 +0000 (15:27 -0800)
committerAnders Broman <a.broman58@gmail.com>
Thu, 22 Feb 2018 05:12:03 +0000 (05:12 +0000)
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>
ui/qt/wireshark_application.cpp

index be905ea19b14541cca2b42498cd436a14d87ecc2..04721a53a3b8015b513ba8a5701bada6f661edfd 100644 (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);