summaryrefslogtreecommitdiff
path: root/ui/qt
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2017-05-26 23:58:07 +0200
committerMichael Mann <mmann78@netscape.net>2017-05-27 12:20:02 +0000
commit2023f419f45c6285232e4df8fcce9f99043be1f1 (patch)
tree8d4e6b8d60e2ac8a3592f472ae1bf37cb18e3941 /ui/qt
parentc9b0e9c81335e098cdb256b1c58597cda96703b1 (diff)
downloadwireshark-2023f419f45c6285232e4df8fcce9f99043be1f1.tar.gz
Qt: About dialog fails when configured without plugins
The about dialog compilation fails when plugins and LUA are disabled. Add the missing preprocessor statements. Also make the plugin tab really empty when there's nothing to report. Change-Id: Idba0dc86e7110e56b2d949f517c966a121d28e47 Reviewed-on: https://code.wireshark.org/review/21768 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/about_dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
index aa3c657b9b..ecbd0660d5 100644
--- a/ui/qt/about_dialog.cpp
+++ b/ui/qt/about_dialog.cpp
@@ -84,6 +84,7 @@ const QString AboutDialog::about_folders_row(const char *name, const QString dir
.arg(typ_file);
}
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
static void plugins_add_description(const char *name, const char *version,
const char *types, const char *filename,
void *user_data)
@@ -92,7 +93,7 @@ static void plugins_add_description(const char *name, const char *version,
QStringList plugin_row = QStringList() << name << version << types << filename;
*plugin_data << plugin_row;
}
-
+#endif
const QString AboutDialog::plugins_scan()
{
@@ -278,7 +279,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
/* Plugins */
-
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA) || defined(HAVE_EXTCAP)
message = QString("<table cellpadding=\"%1\">\n").arg(one_em / 4);
message += "<tr><th align=\"left\">Name</th><th align=\"left\">Version</th><th align=\"left\">Type</th><th align=\"left\">Path</th></tr>\n";
@@ -286,6 +287,9 @@ AboutDialog::AboutDialog(QWidget *parent) :
message += "</table>";
ui->te_plugins->setHtml(message);
+#else
+ ui->te_plugins->setVisible(false);
+#endif
/* Shortcuts */
bool have_shortcuts = false;