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 <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Martin Kaiser 2016-12-24 13:16:38 +01:00 committed by Alexis La Goutte
parent 55549f5ac8
commit 0c4d074f28
1 changed files with 2 additions and 1 deletions

View File

@ -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"))