Debugger: Convert to Tr::tr

Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-07-05 15:37:08 +02:00
parent bb3549a721
commit 9894c6eaf0
143 changed files with 2272 additions and 36880 deletions

View File

@@ -24,14 +24,18 @@
****************************************************************************/
#include "console.h"
#include "consoleview.h"
#include "consoleproxymodel.h"
#include "consoleitemdelegate.h"
#include "../debuggertr.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/icore.h>
#include <utils/utilsicons.h>
#include <aggregation/aggregate.h>
#include <coreplugin/find/itemviewfind.h>
@@ -46,8 +50,7 @@ const char SHOW_LOG[] = "showLog";
const char SHOW_WARNING[] = "showWarning";
const char SHOW_ERROR[] = "showError";
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
/////////////////////////////////////////////////////////////////////
//
@@ -103,8 +106,8 @@ Console::Console()
m_showDebug.setDefaultValue(true);
m_showDebug.setSettingsKey(CONSOLE, SHOW_LOG);
m_showDebug.setLabelText(tr("Show debug, log, and info messages."));
m_showDebug.setToolTip(tr("Show debug, log, and info messages."));
m_showDebug.setLabelText(Tr::tr("Show debug, log, and info messages."));
m_showDebug.setToolTip(Tr::tr("Show debug, log, and info messages."));
m_showDebug.setValue(true);
m_showDebug.action()->setIcon(Utils::Icons::INFO_TOOLBAR.icon());
connect(&m_showDebug, &Utils::BoolAspect::valueChanged,
@@ -115,8 +118,8 @@ Console::Console()
m_showWarning.setDefaultValue(true);
m_showWarning.setSettingsKey(CONSOLE, SHOW_WARNING);
m_showWarning.setLabelText(tr("Show warning messages."));
m_showWarning.setToolTip(tr("Show warning messages."));
m_showWarning.setLabelText(Tr::tr("Show warning messages."));
m_showWarning.setToolTip(Tr::tr("Show warning messages."));
m_showWarning.setValue(true);
m_showWarning.action()->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
connect(m_showWarning.action(), &QAction::toggled,
@@ -127,8 +130,8 @@ Console::Console()
m_showError.setDefaultValue(true);
m_showError.setSettingsKey(CONSOLE, SHOW_ERROR);
m_showError.setLabelText(tr("Show error messages."));
m_showError.setToolTip(tr("Show error messages."));
m_showError.setLabelText(Tr::tr("Show error messages."));
m_showError.setToolTip(Tr::tr("Show error messages."));
m_showError.setValue(true);
m_showError.action()->setIcon(Utils::Icons::CRITICAL_TOOLBAR.icon());
connect(m_showError.action(), &QAction::toggled,
@@ -162,6 +165,11 @@ QList<QWidget *> Console::toolBarWidgets() const
m_spacer, m_statusLabel};
}
QString Console::displayName() const
{
return Tr::tr("QML Debugger Console");
}
int Console::priorityInStatusBar() const
{
return 20;
@@ -269,14 +277,12 @@ void Console::evaluate(const QString &expression)
m_consoleItemModel->shiftEditableRow();
m_scriptEvaluator(expression);
} else {
auto item = new ConsoleItem(ConsoleItem::ErrorType,
QCoreApplication::translate(
"Debugger::Internal::Console",
"Can only evaluate during a debug session."));
auto item = new ConsoleItem(
ConsoleItem::ErrorType,
QCoreApplication::translate("Debugger", "Can only evaluate during a debug session."));
m_consoleItemModel->shiftEditableRow();
printItem(item);
}
}
} // Internal
} // Debugger
} // Debugger::Internal