From 0d041aca4948c69eeff77a9559c6654a3aaf009f Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Sun, 17 Apr 2011 02:42:07 -0400 Subject: [PATCH] the filename is stored in the trace --- gui/mainwindow.cpp | 7 +++---- gui/mainwindow.h | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 420c715..4edf1fa 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -168,10 +168,9 @@ void MainWindow::replayStop() void MainWindow::newTraceFile(const QString &fileName) { - m_traceFileName = fileName; m_trace->setFileName(fileName); - if (m_traceFileName.isEmpty()) { + if (fileName.isEmpty()) { m_ui.actionReplay->setEnabled(false); m_ui.actionLookupState->setEnabled(false); setWindowTitle(tr("QApiTrace")); @@ -235,10 +234,10 @@ void MainWindow::finishedLoadingTrace() void MainWindow::replayTrace(bool dumpState) { - if (m_traceFileName.isEmpty()) + if (m_trace->fileName().isEmpty()) return; - m_retracer->setFileName(m_traceFileName); + m_retracer->setFileName(m_trace->fileName()); m_retracer->setCaptureState(dumpState); if (m_retracer->captureState() && m_selectedEvent) { int index = 0; diff --git a/gui/mainwindow.h b/gui/mainwindow.h index d2c9f28..e723cdd 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -78,8 +78,6 @@ private: QProgressBar *m_progressBar; - QString m_traceFileName; - ApiTraceEvent *m_selectedEvent; ApiTraceEvent *m_stateEvent; -- 2.43.0