aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/shared')
-rw-r--r--src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp43
-rw-r--r--src/plugins/debugger/shared/cdbsymbolpathlisteditor.h7
-rw-r--r--src/plugins/debugger/shared/symbolpathsdialog.cpp16
-rw-r--r--src/plugins/debugger/shared/symbolpathsdialog.h2
4 files changed, 30 insertions, 38 deletions
diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
index 9fb662bc4e5..212c5d3eada 100644
--- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
+++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.cpp
@@ -25,26 +25,26 @@
#include "cdbsymbolpathlisteditor.h"
+#include "debuggertr.h"
+#include "symbolpathsdialog.h"
+
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
-#include <utils/pathchooser.h>
#include <utils/checkablemessagebox.h>
+#include <utils/pathchooser.h>
#include <utils/temporarydirectory.h>
-#include "symbolpathsdialog.h"
-
+#include <QAction>
#include <QCheckBox>
#include <QDebug>
-#include <QAction>
#include <QFormLayout>
#include <QLabel>
#include <QPushButton>
using namespace Utils;
-namespace Debugger {
-namespace Internal {
+namespace Debugger::Internal {
// Internal helper dialog prompting for a cache directory using a PathChooser.
//
@@ -55,8 +55,6 @@ namespace Internal {
class CacheDirectoryDialog : public QDialog
{
- Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::CaheDirectoryDialog)
-
public:
explicit CacheDirectoryDialog(QWidget *parent);
@@ -74,14 +72,14 @@ CacheDirectoryDialog::CacheDirectoryDialog(QWidget *parent) :
QDialog(parent), m_chooser(new PathChooser),
m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel))
{
- setWindowTitle(tr("Select Local Cache Folder"));
+ setWindowTitle(Tr::tr("Select Local Cache Folder"));
setModal(true);
auto formLayout = new QFormLayout;
m_chooser->setExpectedKind(PathChooser::ExistingDirectory);
m_chooser->setHistoryCompleter("Debugger.CdbCacheDir.History");
m_chooser->setMinimumWidth(400);
- formLayout->addRow(tr("Path:"), m_chooser);
+ formLayout->addRow(Tr::tr("Path:"), m_chooser);
auto mainLayout = new QVBoxLayout;
mainLayout->addLayout(formLayout);
@@ -109,14 +107,14 @@ void CacheDirectoryDialog::accept()
}
// Does a file of the same name exist?
if (cache.exists()) {
- Core::AsynchronousMessageBox::warning(tr("Already Exists"),
- tr("A file named \"%1\" already exists.").arg(cache.toUserOutput()));
+ Core::AsynchronousMessageBox::warning(Tr::tr("Already Exists"),
+ Tr::tr("A file named \"%1\" already exists.").arg(cache.toUserOutput()));
return;
}
// Create
if (!cache.ensureWritableDir()) {
- Core::AsynchronousMessageBox::warning(tr("Cannot Create"),
- tr("The folder \"%1\" could not be created.").arg(cache.toUserOutput()));
+ Core::AsynchronousMessageBox::warning(Tr::tr("Cannot Create"),
+ Tr::tr("The folder \"%1\" could not be created.").arg(cache.toUserOutput()));
return;
}
QDialog::accept();
@@ -133,21 +131,21 @@ CdbSymbolPathListEditor::CdbSymbolPathListEditor(QWidget *parent) :
PathListEditor(parent)
{
QPushButton *button = insertButton(lastInsertButtonIndex + 1,
- tr("Insert Symbol Server..."), this, [this](){
+ Tr::tr("Insert Symbol Server..."), this, [this] {
addSymbolPath(SymbolServerPath);
});
- button->setToolTip(tr("Adds the Microsoft symbol server providing symbols for operating system "
- "libraries. Requires specifying a local cache directory."));
+ button->setToolTip(Tr::tr("Adds the Microsoft symbol server providing symbols for operating system "
+ "libraries. Requires specifying a local cache directory."));
- button = insertButton(lastInsertButtonIndex + 1, tr("Insert Symbol Cache..."), this, [this]() {
+ button = insertButton(lastInsertButtonIndex + 1, Tr::tr("Insert Symbol Cache..."), this, [this] {
addSymbolPath(SymbolCachePath);
});
- button->setToolTip(tr("Uses a directory to cache symbols used by the debugger."));
+ button->setToolTip(Tr::tr("Uses a directory to cache symbols used by the debugger."));
- button = insertButton(lastInsertButtonIndex + 1, tr("Set up Symbol Paths..."), this, [this](){
+ button = insertButton(lastInsertButtonIndex + 1, Tr::tr("Set up Symbol Paths..."), this, [this] {
setupSymbolPaths();
});
- button->setToolTip(tr("Configure Symbol paths that are used to locate debug symbol files."));
+ button->setToolTip(Tr::tr("Configure Symbol paths that are used to locate debug symbol files."));
}
bool CdbSymbolPathListEditor::promptCacheDirectory(QWidget *parent, FilePath *cacheDirectory)
@@ -252,5 +250,4 @@ int CdbSymbolPathListEditor::indexOfSymbolPath(const QStringList &paths,
return -1;
}
-} // namespace Internal
-} // namespace Debugger
+} // Debugger::Internal
diff --git a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h
index f7dffcdda09..3e02d7c627a 100644
--- a/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h
+++ b/src/plugins/debugger/shared/cdbsymbolpathlisteditor.h
@@ -29,8 +29,7 @@
namespace Utils { class FilePath; }
-namespace Debugger {
-namespace Internal {
+namespace Debugger::Internal {
// Internal helper dialog prompting for a cache directory
// using a PathChooser.
@@ -41,7 +40,6 @@ namespace Internal {
class CdbSymbolPathListEditor : public Utils::PathListEditor
{
- Q_OBJECT
public:
enum SymbolPathMode{
SymbolServerPath,
@@ -66,5 +64,4 @@ private:
void setupSymbolPaths();
};
-} // namespace Internal
-} // namespace Debugger
+} // Debugger::Internal
diff --git a/src/plugins/debugger/shared/symbolpathsdialog.cpp b/src/plugins/debugger/shared/symbolpathsdialog.cpp
index 379f01ecb6b..0ebbf3ff8c6 100644
--- a/src/plugins/debugger/shared/symbolpathsdialog.cpp
+++ b/src/plugins/debugger/shared/symbolpathsdialog.cpp
@@ -25,6 +25,8 @@
#include "symbolpathsdialog.h"
+#include "debuggertr.h"
+
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QMessageBox>
@@ -32,13 +34,12 @@
using namespace Utils;
-namespace Debugger {
-namespace Internal {
+namespace Debugger::Internal {
SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) :
QDialog(parent)
{
- setWindowTitle(tr("Set up Symbol Paths", nullptr));
+ setWindowTitle(Tr::tr("Set up Symbol Paths", nullptr));
m_pixmapLabel = new QLabel(this);
m_pixmapLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
@@ -46,7 +47,7 @@ SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) :
m_pixmapLabel->setMargin(5);
m_pixmapLabel->setPixmap(QMessageBox::standardIcon(QMessageBox::Question));
- m_msgLabel = new QLabel(tr("<html><head/><body><p>The debugger is not configured to use the "
+ m_msgLabel = new QLabel(Tr::tr("<html><head/><body><p>The debugger is not configured to use the "
"public Microsoft Symbol Server.<br/>This is recommended for retrieval of the symbols "
"of the operating system libraries.</p>"
"<p><span style=\" font-style:italic;\">Note:</span> It is recommended, that if you use "
@@ -58,9 +59,9 @@ SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) :
m_msgLabel->setTextFormat(Qt::RichText);
m_msgLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
- m_useLocalSymbolCache = new QCheckBox(tr("Use Local Symbol Cache"));
+ m_useLocalSymbolCache = new QCheckBox(Tr::tr("Use Local Symbol Cache"));
- m_useSymbolServer = new QCheckBox(tr("Use Microsoft Symbol Server"));
+ m_useSymbolServer = new QCheckBox(Tr::tr("Use Microsoft Symbol Server"));
m_pathChooser = new PathChooser;
@@ -130,5 +131,4 @@ bool SymbolPathsDialog::useCommonSymbolPaths(bool &useSymbolCache,
return ret == QDialog::Accepted;
}
-} // Internal
-} // Debugger
+} // Debugger::Internal
diff --git a/src/plugins/debugger/shared/symbolpathsdialog.h b/src/plugins/debugger/shared/symbolpathsdialog.h
index 1619de0193e..408e0f352ea 100644
--- a/src/plugins/debugger/shared/symbolpathsdialog.h
+++ b/src/plugins/debugger/shared/symbolpathsdialog.h
@@ -36,8 +36,6 @@ namespace Debugger::Internal {
class SymbolPathsDialog : public QDialog
{
- Q_OBJECT
-
public:
explicit SymbolPathsDialog(QWidget *parent = nullptr);
~SymbolPathsDialog() override;