From: Zack Rusin <zack@kde.org>
Date: Wed, 6 Apr 2011 21:29:39 +0000 (-0400)
Subject: Add name of the file in the window bar.
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a228d6925ef961df3166dc9ee8f40adb64c553e9;p=apitrace

Add name of the file in the window bar.
---

diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index f221112..f67b654 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -160,9 +160,13 @@ void MainWindow::newTraceFile(const QString &fileName)
     if (m_traceFileName.isEmpty()) {
         m_ui.actionReplay->setEnabled(false);
         m_ui.actionLookupState->setEnabled(false);
+        setWindowTitle(tr("QApiTrace"));
     } else {
+        QFileInfo info(fileName);
         m_ui.actionReplay->setEnabled(true);
         m_ui.actionLookupState->setEnabled(true);
+        setWindowTitle(
+            tr("QApiTrace - %1").arg(info.fileName()));
     }
 }