diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-01-11 10:46:02 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-01-12 14:20:25 +0000 |
commit | da798683de1743589bd94dfaab9beed23feb0720 (patch) | |
tree | ee5b9072922f80de3f43356372bfe4db77f09c07 /ui/qt/main_window_slots.cpp | |
parent | d6ca6cbe7421a3eb75494c3aa955ff5d7c07a52a (diff) |
Qt: Refactor testCaptureFileClose
Cleanup arguments and simplify code for button texts.
Change-Id: Ie505650889212082e088a525f4b82e62b9177b0d
Reviewed-on: https://code.wireshark.org/review/13180
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>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 0e63dd6bb9..17c3eba1c6 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -202,7 +202,7 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned } } - if (!testCaptureFileClose(false)) { + if (!testCaptureFileClose()) { return false; } @@ -3532,7 +3532,7 @@ void MainWindow::on_actionCaptureStart_triggered() /* XXX - will closing this remove a temporary file? */ QString before_what(tr(" before starting a new capture")); - if (testCaptureFileClose(FALSE, before_what)) { + if (testCaptureFileClose(before_what)) { startCapture(); } else { // simply clicking the button sets it to 'checked' even though we've @@ -3550,7 +3550,7 @@ void MainWindow::on_actionCaptureStop_triggered() void MainWindow::on_actionCaptureRestart_triggered() { QString before_what(tr(" before restarting a new capture")); - if (!testCaptureFileClose(false, before_what, true)) + if (!testCaptureFileClose(before_what, RestartButtons)) return; /* TODO: GTK use only this: capture_restart(&cap_session_); */ |