aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/simple_dialog.cpp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-08-11 14:08:08 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2015-08-11 12:09:07 +0000
commitecc4f756bdb6175cc0b3b11af2f90884db1c602c (patch)
tree99d8ca48a72752e1257d4b8b321f41d1767ee020 /ui/qt/simple_dialog.cpp
parent70d06deb2e31bd605e672200a7755764febe94ae (diff)
Added Reload Lua plugins.
This is initial support for reloading Lua plugins without restarting the application. Still todo: - Deregister FileHandlers - Support deregister ProtoField with existing abbrev (same_name_hfinfo) - Add a progress dialog when reloading many plugins - Search for memory leakages in wslua functions Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1 Reviewed-on: https://code.wireshark.org/review/5028 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/simple_dialog.cpp')
-rw-r--r--ui/qt/simple_dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/qt/simple_dialog.cpp b/ui/qt/simple_dialog.cpp
index 8996aebee1..2288751df2 100644
--- a/ui/qt/simple_dialog.cpp
+++ b/ui/qt/simple_dialog.cpp
@@ -104,7 +104,7 @@ SimpleDialog::SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask, const
return;
}
- if (!parent || !wsApp->isInitialized()) {
+ if (!parent || !wsApp->isInitialized() || wsApp->isReloadingLua()) {
message_queue_ << msg_pair;
if (type > max_severity_) {
max_severity_ = type;
@@ -168,7 +168,11 @@ void SimpleDialog::displayQueuedMessages(QWidget *parent)
return;
}
- QMessageBox mb(parent);
+ // Use last parent if not set
+ static QWidget *parent_w = NULL;
+ if (parent) parent_w = parent;
+
+ QMessageBox mb(parent_w);
switch(max_severity_) {
case ESD_TYPE_ERROR: