From 0d0992c7120bdfa703d860e3112c9e83a7c10d18 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Mon, 22 Aug 2011 16:01:50 +0200 Subject: [PATCH] QmlProfiler: changed file extension for traces Change-Id: I71e8f30169912bc7c72ad76e75920bb9bc27c53e Reviewed-on: http://codereview.qt.nokia.com/3325 Reviewed-by: Qt Sanity Bot Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/qmlprofilertool.cpp | 8 ++++---- src/plugins/qmlprofiler/qmlprofilertool.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index bd4c6505809..d65472809ba 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -564,10 +564,10 @@ void QmlProfilerTool::logError(const QString &msg) void QmlProfilerTool::showSaveDialog() { Core::ICore *core = Core::ICore::instance(); - QString filename = QFileDialog::getSaveFileName(core->mainWindow(), tr("Save QML Trace"), QString(), tr("QML traces (*.xml)")); + QString filename = QFileDialog::getSaveFileName(core->mainWindow(), tr("Save QML Trace"), QString(), tr("QML traces (%1)").arg(TraceFileExtension)); if (!filename.isEmpty()) { - if (!filename.endsWith(QLatin1String(".xml"))) - filename += QLatin1String(".xml"); + if (!filename.endsWith(QLatin1String(TraceFileExtension))) + filename += QLatin1String(TraceFileExtension); d->m_traceWindow->getEventList()->save(filename); } } @@ -575,7 +575,7 @@ void QmlProfilerTool::showSaveDialog() void QmlProfilerTool::showLoadDialog() { Core::ICore *core = Core::ICore::instance(); - QString filename = QFileDialog::getOpenFileName(core->mainWindow(), tr("Load QML Trace"), QString(), tr("QML traces (*.xml)")); + QString filename = QFileDialog::getOpenFileName(core->mainWindow(), tr("Load QML Trace"), QString(), tr("QML traces (%1)").arg(TraceFileExtension)); if (!filename.isEmpty()) { // delayed load (prevent graphical artifacts due to long load time) diff --git a/src/plugins/qmlprofiler/qmlprofilertool.h b/src/plugins/qmlprofiler/qmlprofilertool.h index c8147a6e413..3164d702ad4 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.h +++ b/src/plugins/qmlprofiler/qmlprofilertool.h @@ -41,6 +41,8 @@ namespace QmlProfiler { namespace Internal { +#define TraceFileExtension "*.qtd" + class QmlProfilerTool : public Analyzer::IAnalyzerTool { Q_OBJECT