Qt: Always show the Plugins tab in the about box.
Always show the Plugins tab. We probably have plugins via extcap even if Lua and dissector plugins are disabled. Tell the user if we don't find any plugins. Change-Id: I7ab1fb302298232a847193754b53688620855959 Reviewed-on: https://code.wireshark.org/review/25543 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
c84b0aeead
commit
d4b5943ba8
|
@ -111,6 +111,7 @@ QStringList AuthorListModel::headerColumns() const
|
|||
return QStringList() << tr("Name") << tr("Email");
|
||||
}
|
||||
|
||||
#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)
|
||||
|
@ -119,6 +120,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
|
||||
|
||||
PluginListModel::PluginListModel(QObject * parent) : AStringListListModel(parent)
|
||||
{
|
||||
|
@ -349,8 +351,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||
|
||||
|
||||
/* Plugins */
|
||||
#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
||||
|
||||
ui->label_no_plugins->hide();
|
||||
PluginListModel * pluginModel = new PluginListModel(this);
|
||||
AStringListListSortFilterProxyModel * pluginFilterModel = new AStringListListSortFilterProxyModel(this);
|
||||
pluginFilterModel->setSourceModel(pluginModel);
|
||||
|
@ -366,10 +367,14 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||
connect(ui->tblPlugins, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(handleCopyMenu(QPoint)));
|
||||
connect(ui->searchPlugins, SIGNAL(textChanged(QString)), pluginFilterModel, SLOT(setFilter(QString)));
|
||||
connect(ui->cmbType, SIGNAL(currentIndexChanged(QString)), pluginTypeModel, SLOT(setFilter(QString)));
|
||||
|
||||
#else
|
||||
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tab_plugins));
|
||||
#endif
|
||||
if (ui->tblPlugins->model()->rowCount() < 1) {
|
||||
foreach (QWidget *w, ui->tab_plugins->findChildren<QWidget *>()) {
|
||||
w->hide();
|
||||
}
|
||||
ui->label_no_plugins->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
|
||||
ui->label_no_plugins->setEnabled(false);
|
||||
ui->label_no_plugins->show();
|
||||
}
|
||||
|
||||
/* Shortcuts */
|
||||
ShortcutListModel * shortcutModel = new ShortcutListModel(this);
|
||||
|
|
|
@ -179,6 +179,13 @@
|
|||
<string>Plugins</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_no_plugins">
|
||||
<property name="text">
|
||||
<string>No plugins found.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
|
|
Loading…
Reference in New Issue