diff options
-rw-r--r-- | common/trace_parser.cpp | 2 | ||||
-rw-r--r-- | gui/apitrace.cpp | 2 | ||||
-rw-r--r-- | gui/traceloader.cpp | 11 | ||||
-rw-r--r-- | gui/traceloader.h | 1 |
4 files changed, 14 insertions, 2 deletions
diff --git a/common/trace_parser.cpp b/common/trace_parser.cpp index a728577..2eff0cd 100644 --- a/common/trace_parser.cpp +++ b/common/trace_parser.cpp @@ -148,6 +148,8 @@ void Parser::close(void) { } } bitmasks.clear(); + + next_call_no = 0; } diff --git a/gui/apitrace.cpp b/gui/apitrace.cpp index bc86209..edf98b9 100644 --- a/gui/apitrace.cpp +++ b/gui/apitrace.cpp @@ -148,10 +148,12 @@ void ApiTrace::setFileName(const QString &name) { if (m_fileName != name) { m_fileName = name; + m_tempFileName = QString(); m_frames.clear(); m_errors.clear(); m_editedCalls.clear(); + m_queuedErrors.clear(); m_needsSaving = false; emit invalidated(); diff --git a/gui/traceloader.cpp b/gui/traceloader.cpp index 0fee815..cf9b37b 100644 --- a/gui/traceloader.cpp +++ b/gui/traceloader.cpp @@ -38,6 +38,16 @@ void TraceLoader::loadTrace(const QString &filename) loadHelpFile(); } + if (!m_frameBookmarks.isEmpty()) { + qDeleteAll(m_signatures); + qDeleteAll(m_enumSignatures); + m_signatures.clear(); + m_enumSignatures.clear(); + m_frameBookmarks.clear(); + m_createdFrames.clear(); + m_parser.close(); + } + if (!m_parser.open(filename.toLatin1())) { qDebug() << "error: failed to open " << filename; return; @@ -51,7 +61,6 @@ void TraceLoader::loadTrace(const QString &filename) //Load the entire file into memory parseTrace(); } - emit finishedParsing(); } diff --git a/gui/traceloader.h b/gui/traceloader.h index 4b88ec6..e950b09 100644 --- a/gui/traceloader.h +++ b/gui/traceloader.h @@ -85,7 +85,6 @@ private: private: Trace::Parser m_parser; - QString m_fileName; ApiTrace::FrameMarker m_frameMarker; typedef QMap<int, FrameBookmark> FrameBookmarks; |