qt: show marker when capture file comment has changed
authorPeter Wu <peter@lekensteyn.nl>
Fri, 19 Feb 2016 17:27:44 +0000 (18:27 +0100)
committerPeter Wu <peter@lekensteyn.nl>
Wed, 24 Feb 2016 10:04:58 +0000 (10:04 +0000)
Fixes a missing "*" marker in the title and this warning when the
capture file comment is modified:

    QWidget::setWindowModified: The window title does not contain a '[*]' placeholder

Change-Id: Iea0a63cf8c8f9abd577397c8881f0399d2e798ba
Reviewed-on: https://code.wireshark.org/review/14010
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
ui/qt/main_window.cpp

index a8991e5f3b9108403dc555ee4c8c00499854202c..25f501363a0edcb008542aa83ff1180a6a73bfe6 100644 (file)
@@ -1902,7 +1902,7 @@ void MainWindow::setTitlebarForCaptureFile()
                                                      NULL);
             if (utf8_filename) {
                 QFileInfo fi(utf8_filename);
-                setWSWindowTitle(fi.fileName());
+                setWSWindowTitle(QString("[*]%1").arg(fi.fileName()));
                 setWindowFilePath(utf8_filename);
                 g_free(utf8_filename);
             } else {