aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/manage_interfaces_dialog.cpp
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-02-19 19:47:16 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-02-20 14:26:46 +0000
commita795a3033a3cf1d5a182224a8cd5e3d39ba00349 (patch)
tree9708d0213821b3b09bccd1ceadc1d6aa22cf9021 /ui/qt/manage_interfaces_dialog.cpp
parent5eafa903f64ceb0dc3390bd47f8325070299b04f (diff)
Qt: only "Comment" column should be editable in Local Interfaces management tab
Bug: 12146 Change-Id: Ife481b7c0b201a54749e212416571aa3dcaf7542 Reviewed-on: https://code.wireshark.org/review/14017 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/qt/manage_interfaces_dialog.cpp')
-rw-r--r--ui/qt/manage_interfaces_dialog.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp
index ef216b1f80..5a3e263b5c 100644
--- a/ui/qt/manage_interfaces_dialog.cpp
+++ b/ui/qt/manage_interfaces_dialog.cpp
@@ -102,6 +102,7 @@ ManageInterfacesDialog::ManageInterfacesDialog(QWidget *parent) :
#ifndef Q_OS_WIN
ui->localList->setColumnHidden(col_l_friendly_name_, true);
#endif
+ ui->localList->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->pipeList->setItemDelegateForColumn(col_p_pipe_, &new_pipe_item_delegate_);
new_pipe_item_delegate_.setTree(ui->pipeList);
@@ -122,6 +123,7 @@ ManageInterfacesDialog::ManageInterfacesDialog(QWidget *parent) :
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateWidgets()));
connect(this, SIGNAL(ifsChanged()), parent, SIGNAL(ifsChanged()));
+ connect(ui->localList, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(localListItemDoubleClicked(QTreeWidgetItem *, int)));
#ifdef HAVE_PCAP_REMOTE
connect(this, SIGNAL(remoteAdded(GList*, remote_options*)), this, SLOT(addRemoteInterfaces(GList*, remote_options*)));
@@ -455,7 +457,7 @@ void ManageInterfacesDialog::localAccepted()
/* write new description string to preferences */
if (prefs.capture_devices_descr)
g_free(prefs.capture_devices_descr);
- prefs.capture_devices_descr = qstring_strdup(comment_list.join(","));;
+ prefs.capture_devices_descr = qstring_strdup(comment_list.join(","));
}
}
@@ -464,6 +466,13 @@ void ManageInterfacesDialog::on_buttonBox_helpRequested()
wsApp->helpTopicAction(HELP_CAPTURE_MANAGE_INTERFACES_DIALOG);
}
+void ManageInterfacesDialog::localListItemDoubleClicked(QTreeWidgetItem * item, int column)
+{
+ if (column == col_l_comment_) {
+ ui->localList->editItem(item, column);
+ }
+}
+
#ifdef HAVE_PCAP_REMOTE
void ManageInterfacesDialog::remoteSelectionChanged(QTreeWidgetItem*, int)
{