#include <texteditor/snippets/snippeteditor.h>
#include <QtCore/QLatin1String>
+#include <QtCore/QCoreApplication>
using namespace CppEditor;
using namespace Internal;
QString CppSnippetProvider::displayName() const
{
- return tr("C++");
+ return QCoreApplication::translate("CppEditor::Internal::CppSnippetProvider", "C++");
}
void CppSnippetProvider::decorateEditor(TextEditor::SnippetEditor *editor) const
debugToolBarLayout->addStretch();
debugToolBarLayout->addWidget(new Utils::StyledSeparator);
- QDockWidget *dock = new QDockWidget(tr("Debugger Toolbar"));
+ QDockWidget *dock = new QDockWidget(DebuggerMainWindowPrivate::tr("Debugger Toolbar"));
dock->setObjectName(QLatin1String("Debugger Toolbar"));
dock->setWidget(debugToolBar);
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
QString DebuggerRunControlFactory::displayName() const
{
- return tr("Debug");
+ return DebuggerRunControl::tr("Debug");
}
// Find Qt installation by running qmake
if (!check) {
//appendMessage(errorMessage, true);
- Core::ICore::instance()->showWarningWithOptions(tr("Debugger"),
+ Core::ICore::instance()->showWarningWithOptions(DebuggerRunControl::tr("Debugger"),
check.errorMessage, QString(), check.settingsCategory, check.settingsPage);
return 0;
}
Q_ASSERT(client);
}
-} // namespace Internal
-} // namespace Git
-
-namespace {
-
class BaseGitDiffArgumentsWidget : public Git::Internal::BaseGitArgumentsWidget
{
+ Q_OBJECT
public:
BaseGitDiffArgumentsWidget(Git::Internal::GitSettings *settings,
Git::Internal::GitClient *client,
class GitCommitDiffArgumentsWidget : public BaseGitDiffArgumentsWidget
{
+ Q_OBJECT
public:
GitCommitDiffArgumentsWidget(Git::Internal::GitSettings *settings,
Git::Internal::GitClient *client, const QString &directory,
class GitFileDiffArgumentsWidget : public BaseGitDiffArgumentsWidget
{
+ Q_OBJECT
public:
GitFileDiffArgumentsWidget(Git::Internal::GitSettings *settings,
Git::Internal::GitClient *client, const QString &directory,
class GitBranchDiffArgumentsWidget : public BaseGitDiffArgumentsWidget
{
+ Q_OBJECT
public:
GitBranchDiffArgumentsWidget(Git::Internal::GitSettings *settings,
Git::Internal::GitClient *client, const QString &directory,
class GitShowArgumentsWidget : public Git::Internal::BaseGitArgumentsWidget
{
+ Q_OBJECT
public:
GitShowArgumentsWidget(Git::Internal::GitSettings *settings,
Git::Internal::GitClient *client,
class GitBlameArgumentsWidget : public Git::Internal::BaseGitArgumentsWidget
{
+ Q_OBJECT
public:
GitBlameArgumentsWidget(Git::Internal::GitSettings *settings,
Git::Internal::GitClient *client, const QString &directory,
QString m_fileName;
};
-} // namespace
-
inline Core::IEditor* locateEditor(const Core::ICore *core, const char *property, const QString &entry)
{
foreach (Core::IEditor *ed, core->editorManager()->openedEditors())
return VCSBase::VCSBaseOutputWindow::instance();
}
-namespace Git {
-namespace Internal {
-
static inline QString msgRepositoryNotFound(const QString &dir)
{
return GitClient::tr("Unable to determine the repository for %1.").arg(dir);
} // namespace Internal
} // namespace Git
+
+#include "gitclient.moc"
#include "helpmode.h"
#include "helpconstants.h"
-#include <QtGui/QIcon>
-#include <QtGui/QWidget>
+#include <QtCore/QCoreApplication>
using namespace Help;
using namespace Help::Internal;
{
setObjectName(QLatin1String("HelpMode"));
}
+
+QString HelpMode::displayName() const
+{
+ return QCoreApplication::translate("Help::Internal::HelpMode", "Help");
+}
+
+int HelpMode::priority() const
+{
+ return Constants::P_MODE_HELP;
+}
+
+QString HelpMode::id() const
+{
+ return QLatin1String(Constants::ID_MODE_HELP);
+}
+
+Core::Context HelpMode::context() const
+{
+ return Core::Context(Constants::C_MODE_HELP);
+}
#ifndef HELPMODE_H
#define HELPMODE_H
-#include "helpmode.h"
-#include "helpconstants.h"
-
#include <coreplugin/imode.h>
#include <QtCore/QString>
class HelpMode : public Core::IMode
{
public:
- HelpMode(QObject *parent = 0);
+ explicit HelpMode(QObject *parent = 0);
- QString displayName() const { return tr("Help"); }
+ QString displayName() const;
QIcon icon() const { return m_icon; }
- int priority() const { return Constants::P_MODE_HELP; }
+ int priority() const;
QWidget *widget() { return m_widget; }
- QString id() const { return QLatin1String(Constants::ID_MODE_HELP); }
+ QString id() const;
QString type() const { return QString(); }
- Core::Context context() const { return Core::Context(Constants::C_MODE_HELP); }
+ Core::Context context() const;
QString contextHelpId() const { return QString(); }
void setWidget(QWidget *widget) { m_widget = widget; }
public:
ProjectsMode(QWidget *proWindow) : m_widget(proWindow) {}
- QString displayName() const { return tr("Projects"); }
+ QString displayName() const { return QCoreApplication::translate("ProjectExplorer::ProjectsMode", "Projects"); }
QIcon icon() const { return QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png")); }
int priority() const { return Constants::P_MODE_SESSION; }
QWidget *widget() { return m_widget; }
if (list.first() == "item") {
RewriterTransaction transaction = view()->beginRewriterTransaction();
Q_ASSERT(false); //this code is out of date
- ItemLibraryEntry itemLibraryEntry; //= view()->model()->metaInfo().itemLibraryInfo()->entry(list.at(1));
+ ItemLibraryEntry itemLibraryEntry; // = view()->model()->metaInfo().itemLibraryInfo()->entry(list.at(1));
QmlItemNode newNode = view()->createQmlItemNode(itemLibraryEntry, pos, parentNode);
newNode.modelNode().variantProperty("width") = rect.width();
newNode.modelNode().variantProperty("height") = rect.height();
#ifndef STATESEDITORIMAGEPROVIDER_H
#define STATESEDITORIMAGEPROVIDER_H
-#include <QDeclarativeImageProvider>
-#include <QWeakPointer>
#include"abstractview.h"
-namespace QmlDesigner {
+#include <QtDeclarative/QDeclarativeImageProvider>
+#include <QtCore/QWeakPointer>
+namespace QmlDesigner {
namespace Internal {
class StatesEditorView;
QWeakPointer<NodeInstanceView> m_nodeInstanceView;
};
-}
-
-}
+} // namespace Internal
+} // namespace QmlDesigner
#endif // STATESEDITORIMAGEPROVIDER_H
#include <texteditor/snippets/snippeteditor.h>
#include <QtCore/QLatin1String>
+#include <QtCore/QCoreApplication>
using namespace QmlJSEditor;
using namespace Internal;
QString QmlJSSnippetProvider::displayName() const
{
- return tr("QML");
+ return QCoreApplication::translate("QmlJSEditor::Internal::QmlJSSnippetProvider", "QML");
}
void QmlJSSnippetProvider::decorateEditor(TextEditor::SnippetEditor *editor) const
#include "maemoconstants.h"
#include "maemodeviceconfigurations.h"
+#include <projectexplorer/projectexplorerconstants.h>
+
#include <coreplugin/filemanager.h>
#include <coreplugin/ssh/sshconnection.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qtversionmanager.h>
#include <utils/environment.h>
-#include <QtCore/QCoreApplication>
#include <QtGui/QDesktopServices>
#include <QtCore/QDir>
#include <QtCore/QProcess>
#include <QtCore/QString>
-#define TR(text) QCoreApplication::translate("Qt4ProjectManager::Internal::MaemoGlobal", text)
-
namespace Qt4ProjectManager {
namespace Internal {
namespace {
QString MaemoGlobal::failedToConnectToServerMessage(const Core::SshConnection::Ptr &connection,
const MaemoDeviceConfig::ConstPtr &deviceConfig)
{
- QString errorMsg = TR("Could not connect to host: %1")
+ QString errorMsg = tr("Could not connect to host: %1")
.arg(connection->errorString());
if (deviceConfig->type() == MaemoDeviceConfig::Simulator) {
if (connection->errorState() == Core::SshTimeoutError
|| connection->errorState() == Core::SshSocketError) {
- errorMsg += TR("\nDid you start Qemu?");
+ errorMsg += tr("\nDid you start Qemu?");
}
} else if (connection->errorState() == Core::SshTimeoutError) {
- errorMsg += TR("\nIs the device connected and set up for network access?");
+ errorMsg += tr("\nIs the device connected and set up for network access?");
}
return errorMsg;
}
QString MaemoGlobal::deviceConfigurationName(const MaemoDeviceConfig::ConstPtr &devConf)
{
- return devConf ? devConf->name() : TR("(No device)");
+ return devConf ? devConf->name() : tr("(No device)");
}
QString MaemoGlobal::maddeRoot(const QtVersion *qtVersion)
}
dir.cdUp();
if (!dir.rmdir(fileInfo.fileName())) {
- error = TR("Failed to remove directory '%1'.")
+ error = tr("Failed to remove directory '%1'.")
.arg(QDir::toNativeSeparators(filePath));
return false;
}
} else {
if (!QFile::remove(filePath)) {
- error = TR("Failed to remove file '%1'.")
+ error = tr("Failed to remove file '%1'.")
.arg(QDir::toNativeSeparators(filePath));
return false;
}
#include <utils/environment.h>
-#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/deployconfiguration.h>
#include <QtCore/QList>
#include <QtCore/QSharedPointer>
+#include <QtCore/QCoreApplication>
#define ASSERT_STATE_GENERIC(State, expected, actual) \
MaemoGlobal::assertState<State>(expected, actual, Q_FUNC_INFO)
QT_END_NAMESPACE
namespace Core { class SshConnection; }
-
namespace Qt4ProjectManager {
class QtVersion;
namespace Internal {
class MaemoGlobal
{
+ Q_DECLARE_TR_FUNCTIONS(Qt4ProjectManager::Internal::MaemoGlobal)
public:
enum MaemoVersion { Maemo5, Maemo6 };
#include <texteditor/texteditorconstants.h>
#include <QtCore/QLatin1String>
+#include <QtCore/QCoreApplication>
using namespace TextEditor;
using namespace Internal;
QString PlainTextSnippetProvider::displayName() const
{
- return tr("Text");
+ return QCoreApplication::translate("TextEditor::Internal::PlainTextSnippetProvider", "Text");
}
void PlainTextSnippetProvider::decorateEditor(TextEditor::SnippetEditor *) const