diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2015-11-18 00:11:28 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-11-18 07:18:50 +0000 |
commit | 13297438d98e3388d650fc55c2a77d5b52367e1f (patch) | |
tree | 20f7e34c6248dcf3c3460fc173056e40e9a137fe | |
parent | 8c211d51ef66b64c708f7ad079e7e7e913ac9f14 (diff) |
Lua: Disable Reload Lua Plugins while reading file.
Hide the menu item if built without Lua.
Change-Id: I316cddd55064da590eb4167b495a7fb00a41581f
Reviewed-on: https://code.wireshark.org/review/11931
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r-- | ui/qt/main_window.cpp | 4 | ||||
-rw-r--r-- | ui/qt/main_window.h | 2 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 822b47f0a9..40ee722ded 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -251,6 +251,10 @@ MainWindow::MainWindow(QWidget *parent) : interfaceSelectionChanged(); loadWindowGeometry(); +#ifndef HAVE_LUA + main_ui_->actionAnalyzeReloadLuaPlugins->setVisible(false); +#endif + //To prevent users use features before initialization complete //Otherwise unexpected problems may occur setFeaturesEnabled(false); diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 7bf23771ba..da232a0e0a 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -448,9 +448,7 @@ private slots: void on_actionAnalyzeEnabledProtocols_triggered(); void on_actionAnalyzeDecodeAs_triggered(); -#ifdef HAVE_LUA void on_actionAnalyzeReloadLuaPlugins_triggered(); -#endif void openFollowStreamDialog(follow_type_t type); void on_actionAnalyzeFollowTCPStream_triggered(); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 672ef9cfbb..d7e53bba67 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -655,6 +655,8 @@ void MainWindow::captureFileReadStarted(const QString &action) { QString msgtip = QString(); main_ui_->statusBar->pushFileStatus(msg, msgtip); main_ui_->mainStack->setCurrentWidget(&master_split_); + main_ui_->actionAnalyzeReloadLuaPlugins->setEnabled(false); + WiresharkApplication::processEvents(); } @@ -678,6 +680,7 @@ void MainWindow::captureFileReadFinished() { setForCapturedPackets(true); main_ui_->statusBar->setFileName(capture_file_); + main_ui_->actionAnalyzeReloadLuaPlugins->setEnabled(true); packet_list_->captureFileReadFinished(); @@ -2548,9 +2551,9 @@ void MainWindow::on_actionAnalyzeDecodeAs_triggered() wsApp->flushAppSignals(); } -#ifdef HAVE_LUA void MainWindow::on_actionAnalyzeReloadLuaPlugins_triggered() { +#ifdef HAVE_LUA if (wsApp->isReloadingLua()) return; @@ -2573,8 +2576,8 @@ void MainWindow::on_actionAnalyzeReloadLuaPlugins_triggered() wsApp->setReloadingLua(false); SimpleDialog::displayQueuedMessages(); -} #endif +} void MainWindow::openFollowStreamDialog(follow_type_t type) { FollowStreamDialog *fsd = new FollowStreamDialog(*this, capture_file_, type); |