diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-09-04 21:49:11 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-09-05 12:55:39 +0000 |
commit | 90062a32b747223e14adfb3d563ca37082887038 (patch) | |
tree | c34bf924acabb7f677286e8415c95397047853ca /ui/qt/preference_editor_frame.cpp | |
parent | a35311d3123e8fe7d43647462ec6f7d80f97fa85 (diff) | |
download | wireshark-90062a32b747223e14adfb3d563ca37082887038.tar.gz |
Qt: fix applying UINT preferences in base 8 or 16
While we are at it:
- fix a crash when clicking on the cancel button from the preference modification context menu
- redissect the packet list when modifying a preference from the context menu
Bug: 11502
Change-Id: I7269f7093f1f38c46ec7744fd619ab67f31eb4e7
Reviewed-on: https://code.wireshark.org/review/10386
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>
Diffstat (limited to 'ui/qt/preference_editor_frame.cpp')
-rw-r--r-- | ui/qt/preference_editor_frame.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/qt/preference_editor_frame.cpp b/ui/qt/preference_editor_frame.cpp index 3b15d605f2..5cba49d64f 100644 --- a/ui/qt/preference_editor_frame.cpp +++ b/ui/qt/preference_editor_frame.cpp @@ -33,6 +33,8 @@ #include "qt_ui_utils.h" +#include "wireshark_application.h" + #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) // Qt::escape #include <QTextDocument> @@ -45,7 +47,8 @@ PreferenceEditorFrame::PreferenceEditorFrame(QWidget *parent) : AccordionFrame(parent), ui(new Ui::PreferenceEditorFrame), module_(NULL), - pref_(NULL) + pref_(NULL), + new_range_(NULL) { ui->setupUi(this); } @@ -128,7 +131,7 @@ void PreferenceEditorFrame::uintLineEditTextEdited(const QString &new_str) } bool ok; - uint new_uint = new_str.toUInt(&ok); + uint new_uint = new_str.toUInt(&ok, 0); if (ok) { new_uint_ = new_uint; ui->preferenceLineEdit->setSyntaxState(SyntaxLineEdit::Valid); @@ -215,6 +218,11 @@ void PreferenceEditorFrame::on_okButton_clicked() } } on_cancelButton_clicked(); + // Emit signals once UI is hidden + if (apply) { + wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged); + wsApp->emitAppSignal(WiresharkApplication::PreferencesChanged); + } } void PreferenceEditorFrame::on_cancelButton_clicked() |