From 26f6cbf8b59dffa7f47b315031b7055ec3421315 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 1 Mar 2019 16:58:35 +0100 Subject: [PATCH] Perf profiler: Fix UI text Change-Id: I3a2e7a67db1259f847f04ff523bd9a2b12863510 Reviewed-by: Ulf Hermann --- src/plugins/perfprofiler/perfconfigwidget.cpp | 4 +-- src/plugins/perfprofiler/perfdatareader.cpp | 18 +++++------ src/plugins/perfprofiler/perfloaddialog.ui | 6 ++-- .../perfprofiler/perfprofilerruncontrol.cpp | 8 ++--- src/plugins/perfprofiler/perfprofilertool.cpp | 32 +++++++++---------- .../perfprofiler/perfprofilertracemanager.cpp | 8 ++--- .../perfprofiler/perftracepointdialog.ui | 4 +-- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/plugins/perfprofiler/perfconfigwidget.cpp b/src/plugins/perfprofiler/perfconfigwidget.cpp index 1aaefcd77d2..c6049cc451c 100644 --- a/src/plugins/perfprofiler/perfconfigwidget.cpp +++ b/src/plugins/perfprofiler/perfconfigwidget.cpp @@ -211,7 +211,7 @@ void PerfConfigWidget::handleProcessFinished() if (tracePoints.isEmpty()) { Core::AsynchronousMessageBox::warning( - tr("No trace points found"), + tr("No Trace Points Found"), tr("Trace points can be defined with \"perf probe -a\".")); } else { for (const QByteArray &event : qAsConst(tracePoints)) { @@ -233,7 +233,7 @@ void PerfConfigWidget::handleProcessError(QProcess::ProcessError error) { if (error == QProcess::FailedToStart) { Core::AsynchronousMessageBox::warning( - tr("Cannot list trace points"), + tr("Cannot List Trace Points"), tr("\"perf probe -l\" failed to start. Is perf installed?")); m_ui->useTracePointsButton->setEnabled(true); } diff --git a/src/plugins/perfprofiler/perfdatareader.cpp b/src/plugins/perfprofiler/perfdatareader.cpp index 3cfb7c2989c..0c34ed583b1 100644 --- a/src/plugins/perfprofiler/perfdatareader.cpp +++ b/src/plugins/perfprofiler/perfdatareader.cpp @@ -75,8 +75,8 @@ PerfDataReader::PerfDataReader(QObject *parent) : } if (exitCode != 0) { QMessageBox::warning(Core::ICore::mainWindow(), - tr("Perf data parser failed"), - tr("The perf data parser failed to process all the samples. " + tr("Perf Data Parser Failed"), + tr("The Perf data parser failed to process all the samples. " "Your trace is incomplete. The exit code was %1.") .arg(exitCode)); } @@ -101,17 +101,17 @@ PerfDataReader::PerfDataReader(QObject *parent) : connect(&m_input, &QProcess::errorOccurred, this, [this](QProcess::ProcessError e){ switch (e) { case QProcess::FailedToStart: - emit processFailed(tr("perfparser failed to start")); + emit processFailed(tr("perfparser failed to start.")); QMessageBox::warning(Core::ICore::mainWindow(), - tr("Perf data parser failed"), - tr("Could not start the 'perfparser' utility program. " - "Make sure a working perf parser is available at the location " + tr("Perf Data Parser Failed"), + tr("Could not start the perfparser utility program. " + "Make sure a working Perf parser is available at the location " "given by the PERFPROFILER_PARSER_FILEPATH environment " "variable.")); break; case QProcess::Crashed: QMessageBox::warning(Core::ICore::mainWindow(), - tr("Perf data parser crashed"), + tr("Perf Data Parser Crashed"), tr("This is a bug. Please report it.")); break; case QProcess::ReadError: @@ -346,8 +346,8 @@ void PerfDataReader::writeChunk() m_input.kill(); emit finished(); QMessageBox::warning(Core::ICore::mainWindow(), - tr("Cannot send data to Perf data parser"), - tr("The perf data parser doesn't accept further input. " + tr("Cannot Send Data to Perf Data Parser"), + tr("The Perf data parser does not accept further input. " "Your trace is incomplete.")); } } diff --git a/src/plugins/perfprofiler/perfloaddialog.ui b/src/plugins/perfprofiler/perfloaddialog.ui index 5bc41cd26ba..c08b6433f1a 100644 --- a/src/plugins/perfprofiler/perfloaddialog.ui +++ b/src/plugins/perfprofiler/perfloaddialog.ui @@ -19,7 +19,7 @@ - &Trace File: + &Trace file: traceFileLineEdit @@ -39,7 +39,7 @@ - Directory of &Executable: + Directory of &executable: executableDirLineEdit @@ -64,7 +64,7 @@ - + diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp index d01d5c07568..50aa9696a11 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp @@ -138,10 +138,10 @@ public: // The terminate() below will frequently lead to QProcess::Crashed. We're not interested // in that. FailedToStart is the only actual failure. if (e == QProcess::FailedToStart) { - QString msg = tr("perf process failed to start"); + QString msg = tr("Perf Process Failed to Start"); QMessageBox::warning(Core::ICore::mainWindow(), - msg, tr("Make sure you are running a recent Linux kernel and " - "that the 'perf' utility is available.")); + msg, tr("Make sure that you are running a recent Linux kernel and " + "that the \"perf\" utility is available.")); reportFailure(msg); } }); @@ -227,7 +227,7 @@ void PerfProfilerRunner::start() }); connect(recorder, &DeviceProcess::readyReadStandardOutput, this, [this, reader, recorder] { if (!reader->feedParser(recorder->readAllStandardOutput())) - reportFailure(tr("Failed to transfer perf data to perfparser")); + reportFailure(tr("Failed to transfer Perf data to perfparser.")); }); } diff --git a/src/plugins/perfprofiler/perfprofilertool.cpp b/src/plugins/perfprofiler/perfprofilertool.cpp index 17361031890..ff5a171a6f7 100644 --- a/src/plugins/perfprofiler/perfprofilertool.cpp +++ b/src/plugins/perfprofiler/perfprofilertool.cpp @@ -89,19 +89,19 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) : options->menu()->setEnabled(true); const Core::Context globalContext(Core::Constants::C_GLOBAL); - m_loadPerfData = new QAction(tr("Load perf.data file"), options); + m_loadPerfData = new QAction(tr("Load perf.data File"), options); Core::Command *command = Core::ActionManager::registerAction( m_loadPerfData, Constants::PerfProfilerTaskLoadPerf, globalContext); connect(m_loadPerfData, &QAction::triggered, this, &PerfProfilerTool::showLoadPerfDialog); options->addAction(command); - m_loadTrace = new QAction(tr("Load trace file"), options); + m_loadTrace = new QAction(tr("Load Trace File"), options); command = Core::ActionManager::registerAction(m_loadTrace, Constants::PerfProfilerTaskLoadTrace, globalContext); connect(m_loadTrace, &QAction::triggered, this, &PerfProfilerTool::showLoadTraceDialog); options->addAction(command); - m_saveTrace = new QAction(tr("Save trace file"), options); + m_saveTrace = new QAction(tr("Save Trace File"), options); command = Core::ActionManager::registerAction(m_saveTrace, Constants::PerfProfilerTaskSaveTrace, globalContext); connect(m_saveTrace, &QAction::triggered, this, &PerfProfilerTool::showSaveTraceDialog); @@ -126,7 +126,7 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) : }); options->addAction(command); - QAction *tracePointsAction = new QAction(tr("Create memory trace points"), options); + QAction *tracePointsAction = new QAction(tr("Create Memory Trace Points"), options); tracePointsAction->setIcon(Debugger::Icons::TRACEPOINT_TOOLBAR.icon()); tracePointsAction->setIconVisibleInMenu(false); tracePointsAction->setToolTip(tr("Create trace points for memory profiling on the target " @@ -141,7 +141,7 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) : m_tracePointsButton->setDefaultAction(tracePointsAction); auto action = new QAction(tr("Performance Analyzer"), this); - action->setToolTip(tr("The Performance Analyzer can be used to find performance bottlenecks")); + action->setToolTip(tr("Finds performance bottlenecks.")); menu->addAction(ActionManager::registerAction(action, Constants::PerfProfilerLocalActionId), Debugger::Constants::G_ANALYZER_TOOLS); QObject::connect(action, &QAction::triggered, this, [this] { @@ -251,7 +251,7 @@ void PerfProfilerTool::createViews() connect(m_recordButton, &QAbstractButton::clicked, this, &PerfProfilerTool::setRecording); m_clearButton->setIcon(Utils::Icons::CLEAN_TOOLBAR.icon()); - m_clearButton->setToolTip(tr("Discard data")); + m_clearButton->setToolTip(tr("Discard data.")); connect(m_clearButton, &QAbstractButton::clicked, this, &PerfProfilerTool::clear); m_filterButton->setIcon(Utils::Icons::FILTER.icon()); @@ -410,10 +410,10 @@ void PerfProfilerTool::onReaderFinished() m_readerRunning = false; if (m_traceManager->traceDuration() <= 0) { QMessageBox::warning(Core::ICore::mainWindow(), - tr("No data loaded"), + tr("No Data Loaded"), tr("The profiler did not produce any samples. " - "Make sure you are running a recent Linux kernel and that the " - "'perf' utility is available and generates useful call " + "Make sure that you are running a recent Linux kernel and that " + "the \"perf\" utility is available and generates useful call " "graphs.")); clear(); } else { @@ -612,7 +612,7 @@ void PerfProfilerTool::showLoadTraceDialog() m_perspective.select(); QString filename = QFileDialog::getOpenFileName( - ICore::mainWindow(), tr("Load trace file"), + ICore::mainWindow(), tr("Load Trace File"), "", tr("Trace File (*.ptr)")); if (filename.isEmpty()) return; @@ -627,7 +627,7 @@ void PerfProfilerTool::showSaveTraceDialog() m_perspective.select(); QString filename = QFileDialog::getSaveFileName( - ICore::mainWindow(), tr("Save trace file"), + ICore::mainWindow(), tr("Save Trace File"), "", tr("Trace File (*.ptr)")); if (filename.isEmpty()) return; @@ -641,8 +641,8 @@ void PerfProfilerTool::showSaveTraceDialog() void PerfProfilerTool::setAggregated(bool aggregated) { m_aggregateButton->setChecked(aggregated); - m_aggregateButton->setToolTip(aggregated ? tr("Show all addresses") - : tr("Aggregate by functions")); + m_aggregateButton->setToolTip(aggregated ? tr("Show all addresses.") + : tr("Aggregate by functions.")); emit aggregatedChanged(aggregated); } @@ -653,8 +653,8 @@ void PerfProfilerTool::setRecording(bool recording) m_recordButton->setIcon(recording ? recordOn : recordOff); m_recordButton->setChecked(recording); - m_recordButton->setToolTip(recording ? tr("Stop collecting profile data") : - tr("Collect profile data")); + m_recordButton->setToolTip(recording ? tr("Stop collecting profile data.") : + tr("Collect profile data.")); emit recordingChanged(recording); } @@ -668,7 +668,7 @@ void PerfProfilerTool::updateTime(qint64 duration, qint64 delay) m_recordedLabel->clear(); if (delay > 0) - m_delayLabel->setText(tr("Processing Delay: %1.%2s").arg(delay / e9) + m_delayLabel->setText(tr("Processing delay: %1.%2s").arg(delay / e9) .arg(qAbs(delay / e8) % ten)); else if (delay == 0) m_delayLabel->clear(); diff --git a/src/plugins/perfprofiler/perfprofilertracemanager.cpp b/src/plugins/perfprofiler/perfprofilertracemanager.cpp index a4272ad1177..4e98b969548 100644 --- a/src/plugins/perfprofiler/perfprofilertracemanager.cpp +++ b/src/plugins/perfprofiler/perfprofilertracemanager.cpp @@ -94,13 +94,13 @@ void PerfProfilerEventStorage::clear() m_file.clear(); m_size = 0; if (!m_file.open()) - m_errorHandler(tr("Failed to reset temporary trace file")); + m_errorHandler(tr("Failed to reset temporary trace file.")); } void PerfProfilerEventStorage::finalize() { if (!m_file.flush()) - m_errorHandler(tr("Failed to flush temporary trace file")); + m_errorHandler(tr("Failed to flush temporary trace file.")); } bool PerfProfilerEventStorage::replay( @@ -110,13 +110,13 @@ bool PerfProfilerEventStorage::replay( case Timeline::TraceStashFile::ReplaySuccess: return true; case Timeline::TraceStashFile::ReplayOpenFailed: - m_errorHandler(tr("Cannot re-open temporary trace file")); + m_errorHandler(tr("Cannot re-open temporary trace file.")); break; case Timeline::TraceStashFile::ReplayLoadFailed: // Happens if the loader rejects an event. Not an actual error break; case Timeline::TraceStashFile::ReplayReadPastEnd: - m_errorHandler(tr("Read past end from temporary trace file")); + m_errorHandler(tr("Read past end from temporary trace file.")); break; } return false; diff --git a/src/plugins/perfprofiler/perftracepointdialog.ui b/src/plugins/perfprofiler/perftracepointdialog.ui index 8b2a077a998..ce2f1f4c408 100644 --- a/src/plugins/perfprofiler/perftracepointdialog.ui +++ b/src/plugins/perfprofiler/perftracepointdialog.ui @@ -11,7 +11,7 @@ - Creating memory trace points + Creating Memory Trace Points @@ -29,7 +29,7 @@ - Elevate privileges using + Elevate privileges using: