From 0c4d074f2835711c10b41ca72c507c03b4c9cc55 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Sat, 24 Dec 2016 13:16:38 +0100 Subject: extcap_options_dialog: fix compilation with Qt4 Qt4's QFileInfo::exist() can only be used with an existing QFileInfo object. The version that accepts the file name as paramter was introduced in Qt5. Create a temporary QFileInfo object and call exists() on this object. Change-Id: I162cc22ecba61b2c2f16f9f0916b0db7969abb51 Reviewed-on: https://code.wireshark.org/review/19408 Reviewed-by: Martin Kaiser Petri-Dish: Martin Kaiser Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte --- ui/qt/extcap_options_dialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/qt/extcap_options_dialog.cpp b/ui/qt/extcap_options_dialog.cpp index fceb2bc120..7dcf618c00 100644 --- a/ui/qt/extcap_options_dialog.cpp +++ b/ui/qt/extcap_options_dialog.cpp @@ -335,7 +335,8 @@ void ExtcapOptionsDialog::on_buttonBox_helpRequested() /* The help information is a file url and has been provided as-is by the extcap. Before attempting to open the it, check if it actually exists. */ - if ( ! QFileInfo::exists(help_url.path()) ) + QFileInfo help_file(help_url.path()); + if ( !help_file.exists() ) { QMessageBox::warning(this, tr("Extcap Help cannot be found"), QString(tr("The help for the extcap interface %1 cannot be found. Given file: %2")) -- cgit v1.2.3