Commit db9a967f authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Mercurial: Compile with QT_NO_CAST_FROM_ASCII, const-correctness.

parent 5e8d179a
......@@ -63,11 +63,11 @@ void CommitEditor::setFields(const QFileInfo &repositoryRoot, const QString &bra
fileModel = new VCSBase::SubmitFileModel(this);
//TODO Messy tidy this up
typedef QPair<QString, QString> PAIR;
typedef QPair<QString, QString> StringStringPair;
QStringList shouldTrack;
foreach (PAIR status, repoStatus) {
if (status.first == "Untracked")
foreach (const StringStringPair &status, repoStatus) {
if (status.first == QLatin1String("Untracked"))
shouldTrack.append(status.second);
else
fileModel->addFile(status.second, status.first, false);
......@@ -76,8 +76,8 @@ void CommitEditor::setFields(const QFileInfo &repositoryRoot, const QString &bra
VCSBase::VCSBaseSubmitEditor::filterUntrackedFilesOfProject(repositoryRoot.absoluteFilePath(),
&shouldTrack);
foreach (QString track, shouldTrack) {
foreach (PAIR status, repoStatus) {
foreach (const QString &track, shouldTrack) {
foreach (const StringStringPair &status, repoStatus) {
if (status.second == track)
fileModel->addFile(status.second, status.first, false);
}
......
......@@ -74,14 +74,6 @@ const char * const DIFFEXT = "diff";
const char * const COMMITKIND = "Mercurial Commit Log Editor";
const char * const COMMITMIMETYPE = "application/vnd.nokia.text.scs_mercurial_commitlog";
#ifndef Q_WS_MAC
const char * const MODIFIER = "Alt+";
const char * const MENUKEY = "Alt+H, ";
#else
const char * const MODIFIER = "Meta+";
const char * const MENUKEY = "Meta+H, ";
#endif
//menu items
//File menu actions
const char * const ANNOTATE = "Mercurial.Annotate";
......
......@@ -78,7 +78,7 @@ bool MercurialClient::add(const QString &filename)
{
QFileInfo file(filename);
QStringList args;
args << "add" << file.absoluteFilePath();
args << QLatin1String("add") << file.absoluteFilePath();
return hgProcessSync(file, args);
}
......@@ -87,7 +87,7 @@ bool MercurialClient::remove(const QString &filename)
{
QFileInfo file(filename);
QStringList args;
args << "remove" << file.absoluteFilePath();
args << QLatin1String("remove") << file.absoluteFilePath();
return hgProcessSync(file, args);
}
......@@ -95,15 +95,15 @@ bool MercurialClient::remove(const QString &filename)
bool MercurialClient::manifestSync(const QString &filename)
{
QFileInfo file(filename);
QStringList args("manifest");
QStringList args(QLatin1String("manifest"));
QByteArray output;
hgProcessSync(file, args, &output);
QStringList files = QString::fromLocal8Bit(output).split('\n');
const QStringList files = QString::fromLocal8Bit(output).split(QLatin1Char('\n'));
foreach (QString fileName, files) {
QFileInfo managedFile(filename);
foreach (const QString &fileName, files) {
const QFileInfo managedFile(fileName);
if (file == managedFile)
return true;
}
......@@ -145,18 +145,18 @@ bool MercurialClient::hgProcessSync(const QFileInfo &file, const QStringList &ar
QString MercurialClient::branchQuerySync(const QFileInfo &repositoryRoot)
{
QByteArray output;
if (hgProcessSync(repositoryRoot, QStringList("branch"), &output))
if (hgProcessSync(repositoryRoot, QStringList(QLatin1String("branch")), &output))
return QTextCodec::codecForLocale()->toUnicode(output).trimmed();
return QString("Unknown Branch");
return QLatin1String("Unknown Branch");
}
void MercurialClient::annotate(const QFileInfo &file)
{
QStringList args;
args << "annotate" << "-u" << "-c" << "-d" << file.absoluteFilePath();
args << QLatin1String("annotate") << QLatin1String("-u") << QLatin1String("-c") << QLatin1String("-d") << file.absoluteFilePath();
const QString kind = Constants::ANNOTATELOG;
const QString kind = QLatin1String(Constants::ANNOTATELOG);
const QString title = tr("Hg Annotate %1").arg(file.fileName());
VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, file.absolutePath(), true,
......@@ -172,7 +172,8 @@ void MercurialClient::diff(const QFileInfo &fileOrDir)
QString id;
QString workingPath;
args << "diff" << "-g" << "-p" << "-U 8";
args << QLatin1String("diff") << QLatin1String("-g") << QLatin1String("-p")
<< QLatin1String("-U 8");
if (!fileOrDir.isDir()) {
args.append(fileOrDir.absoluteFilePath());
......@@ -183,7 +184,7 @@ void MercurialClient::diff(const QFileInfo &fileOrDir)
workingPath = fileOrDir.absoluteFilePath();
}
const QString kind = Constants::DIFFLOG;
const QString kind = QLatin1String(Constants::DIFFLOG);
const QString title = tr("Hg diff %1").arg(fileOrDir.isDir() ? id : fileOrDir.fileName());
VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, workingPath, true,
......@@ -195,12 +196,10 @@ void MercurialClient::diff(const QFileInfo &fileOrDir)
void MercurialClient::log(const QFileInfo &fileOrDir)
{
QStringList args;
QStringList args(QLatin1String("log"));
QString id;
QString workingDir;
args << "log";
if (!fileOrDir.isDir()) {
args.append(fileOrDir.absoluteFilePath());
id = fileOrDir.absoluteFilePath();
......@@ -210,7 +209,7 @@ void MercurialClient::log(const QFileInfo &fileOrDir)
workingDir = fileOrDir.absoluteFilePath();
}
const QString kind = Constants::FILELOG;
const QString kind = QLatin1String(Constants::FILELOG);
const QString title = tr("Hg log %1").arg(fileOrDir.isDir() ? id : fileOrDir.fileName());
VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, workingDir, true,
......@@ -222,15 +221,14 @@ void MercurialClient::log(const QFileInfo &fileOrDir)
void MercurialClient::revert(const QFileInfo &fileOrDir, const QString &revision)
{
QStringList args;
args << "revert";
QStringList args(QLatin1String("revert"));
if (!revision.isEmpty())
args << "-r" << revision;
args << QLatin1String("-r") << revision;
if (!fileOrDir.isDir())
args.append(fileOrDir.absoluteFilePath());
else
args.append("--all");
args.append(QLatin1String("--all"));
QSharedPointer<HgTask> job(new HgTask(fileOrDir.isDir() ? fileOrDir.absoluteFilePath() :
fileOrDir.absolutePath(), args, false));
......@@ -240,7 +238,7 @@ void MercurialClient::revert(const QFileInfo &fileOrDir, const QString &revision
void MercurialClient::status(const QFileInfo &fileOrDir)
{
QStringList args;
args << "status";
args << QLatin1String("status");
if (!fileOrDir.isDir())
args.append(fileOrDir.absoluteFilePath());
......@@ -266,19 +264,19 @@ void MercurialClient::statusParser(const QByteArray &data)
QStringList rawStatusList = QTextCodec::codecForLocale()->toUnicode(data).split(QLatin1Char('\n'));
foreach (QString string, rawStatusList) {
foreach (const QString &string, rawStatusList) {
QPair<QString, QString> status;
if (string.startsWith('M'))
status.first = "Modified";
else if (string.startsWith('A'))
status.first = "Added";
else if (string.startsWith('R'))
status.first = "Removed";
else if (string.startsWith('!'))
status.first = "Deleted";
else if (string.startsWith('?'))
status.first = "Untracked";
if (string.startsWith(QLatin1Char('M')))
status.first = QLatin1String("Modified");
else if (string.startsWith(QLatin1Char('A')))
status.first = QLatin1String("Added");
else if (string.startsWith(QLatin1Char('R')))
status.first = QLatin1String("Removed");
else if (string.startsWith(QLatin1Char('!')))
status.first = QLatin1String("Deleted");
else if (string.startsWith(QLatin1Char('?')))
status.first = QLatin1String("Untracked");
else
continue;
......@@ -294,10 +292,8 @@ void MercurialClient::statusParser(const QByteArray &data)
void MercurialClient::import(const QFileInfo &repositoryRoot, const QStringList &files)
{
QStringList args;
args << "import" << "--no-commit";
foreach (QString file, files)
args.append(file);
args << QLatin1String("import") << QLatin1String("--no-commit");
args += files;
QSharedPointer<HgTask> job(new HgTask(repositoryRoot.absoluteFilePath(), args, false));
jobManager->enqueueJob(job);
......@@ -306,7 +302,7 @@ void MercurialClient::import(const QFileInfo &repositoryRoot, const QStringList
void MercurialClient::pull(const QFileInfo &repositoryRoot, const QString &repository)
{
QStringList args;
args << "pull";
args << QLatin1String("pull");
if (!repository.isEmpty())
args.append(repository);
......@@ -317,7 +313,7 @@ void MercurialClient::pull(const QFileInfo &repositoryRoot, const QString &repos
void MercurialClient::push(const QFileInfo &repositoryRoot, const QString &repository)
{
QStringList args;
args << "push";
args << QLatin1String("push");
if (!repository.isEmpty())
args.append(repository);
......@@ -328,13 +324,13 @@ void MercurialClient::push(const QFileInfo &repositoryRoot, const QString &repos
void MercurialClient::incoming(const QFileInfo &repositoryRoot, const QString &repository)
{
QStringList args;
args << "incoming" << "-g" << "-p";
args << QLatin1String("incoming") << QLatin1String("-g") << QLatin1String("-p");
if (!repository.isEmpty())
args.append(repository);
QString id = MercurialPlugin::instance()->currentProjectName();
const QString kind = Constants::DIFFLOG;
const QString kind = QLatin1String(Constants::DIFFLOG);
const QString title = tr("Hg incoming %1").arg(id);
VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, repositoryRoot.absoluteFilePath(),
......@@ -347,11 +343,11 @@ void MercurialClient::incoming(const QFileInfo &repositoryRoot, const QString &r
void MercurialClient::outgoing(const QFileInfo &repositoryRoot)
{
QStringList args;
args << "outgoing" << "-g" << "-p";
args << QLatin1String("outgoing") << QLatin1String("-g") << QLatin1String("-p");
QString id = MercurialPlugin::instance()->currentProjectName();
const QString kind = Constants::DIFFLOG;
const QString kind = QLatin1String(Constants::DIFFLOG);
const QString title = tr("Hg outgoing %1").arg(id);
VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, repositoryRoot.absoluteFilePath(), true,
......@@ -364,9 +360,10 @@ void MercurialClient::outgoing(const QFileInfo &repositoryRoot)
void MercurialClient::view(const QString &source, const QString &id)
{
QStringList args;
args << "log" << "-p" << "-g" << "-r" << id;
args << QLatin1String("log") << QLatin1String("-p") << QLatin1String("-g")
<< QLatin1String("-r") << id;
const QString kind = Constants::DIFFLOG;
const QString kind = QLatin1String(Constants::DIFFLOG);
const QString title = tr("Hg log %1").arg(id);
VCSBase::VCSBaseEditor *editor = createVCSEditor(kind, title, source,
......@@ -378,9 +375,7 @@ void MercurialClient::view(const QString &source, const QString &id)
void MercurialClient::update(const QFileInfo &repositoryRoot, const QString &revision)
{
QStringList args;
args << "update";
QStringList args(QLatin1String("update"));
if (!revision.isEmpty())
args << revision;
......@@ -393,7 +388,8 @@ void MercurialClient::commit(const QFileInfo &repositoryRoot, const QStringList
{
QStringList args;
args << "commit" << "-u" << commiterInfo << "-l" << commitMessageFile << files;
args << QLatin1String("commit") << QLatin1String("-u") << commiterInfo
<< QLatin1String("-l") << commitMessageFile << files;
QSharedPointer<HgTask> job(new HgTask(repositoryRoot.absoluteFilePath(), args, false));
jobManager->enqueueJob(job);
}
......@@ -424,13 +420,14 @@ VCSBase::VCSBaseEditor *MercurialClient::createVCSEditor(const QString &kind, QS
{
VCSBase::VCSBaseEditor *baseEditor = 0;
Core::IEditor* outputEditor = locateEditor(core, registerDynamicProperty, dynamicPropertyValue);
const QString progressMsg = tr("Working...");
if (outputEditor) {
// Exists already
outputEditor->createNew(tr("Working..."));
outputEditor->createNew(progressMsg);
baseEditor = VCSBase::VCSBaseEditor::getVcsBaseEditor(outputEditor);
QTC_ASSERT(baseEditor, return 0);
} else {
outputEditor = core->editorManager()->openEditorWithContents(kind, &title, tr("Working..."));
outputEditor = core->editorManager()->openEditorWithContents(kind, &title, progressMsg);
outputEditor->file()->setProperty(registerDynamicProperty, dynamicPropertyValue);
baseEditor = VCSBase::VCSBaseEditor::getVcsBaseEditor(outputEditor);
QTC_ASSERT(baseEditor, return 0);
......
......@@ -47,11 +47,11 @@ using namespace Mercurial;
MercurialEditor::MercurialEditor(const VCSBase::VCSBaseEditorParameters *type, QWidget *parent)
: VCSBase::VCSBaseEditor(type, parent),
exactIdentifier12(Constants::CHANGEIDEXACT12),
exactIdentifier40(Constants::CHANGEIDEXACT40),
changesetIdentifier12(Constants::CHANGESETID12),
changesetIdentifier40(Constants::CHANGESETID40),
diffIdentifier(Constants::DIFFIDENTIFIER)
exactIdentifier12(QLatin1String(Constants::CHANGEIDEXACT12)),
exactIdentifier40(QLatin1String(Constants::CHANGEIDEXACT40)),
changesetIdentifier12(QLatin1String(Constants::CHANGESETID12)),
changesetIdentifier40(QLatin1String(Constants::CHANGESETID40)),
diffIdentifier(QLatin1String(Constants::DIFFIDENTIFIER))
{
}
......
......@@ -36,9 +36,7 @@
#include <vcsbase/vcsbaseeditor.h>
#include <QtCore/QProcess>
#include <QtCore/QTime>
#include <QtCore/QString>
#include <QtCore/QSettings>
#include <QtCore/QDebug>
using namespace Mercurial::Internal;
......@@ -99,7 +97,7 @@ void MercurialJobRunner::restart()
void MercurialJobRunner::getSettings()
{
MercurialSettings *settings = MercurialPlugin::instance()->settings();
const MercurialSettings *settings = MercurialPlugin::instance()->settings();
binary = settings->binary();
timeout = settings->timeout();
standardArguments = settings->standardArguments();
......
......@@ -201,10 +201,10 @@ MercurialSettings *MercurialPlugin::settings()
void MercurialPlugin::createMenu()
{
QList<int> context = QList<int>()<< core->uniqueIDManager()->uniqueIdentifier(Core::Constants::C_GLOBAL);
QList<int> context = QList<int>()<< core->uniqueIDManager()->uniqueIdentifier(QLatin1String(Core::Constants::C_GLOBAL));
// Create menu item for Mercurial
mercurialContainer = actionManager->createMenu("Mercurial.MercurialMenu");
mercurialContainer = actionManager->createMenu(QLatin1String("Mercurial.MercurialMenu"));
QMenu *menu = mercurialContainer->menu();
menu->setTitle(tr("Mercurial"));
......@@ -214,17 +214,17 @@ void MercurialPlugin::createMenu()
}
createFileActions(context);
createSeparator(context, "FileDirSeperator");
createSeparator(context, QLatin1String("FileDirSeperator"));
createDirectoryActions(context);
createSeparator(context, "DirRepoSeperator");
createSeparator(context, QLatin1String("DirRepoSeperator"));
createRepositoryActions(context);
createSeparator(context, "Repository Management");
createSeparator(context, QLatin1String("Repository Management"));
createRepositoryManagementActions(context);
createSeparator(context, "LessUsedfunctionality");
createSeparator(context, QLatin1String("LessUsedfunctionality"));
createLessUsedActions(context);
// Request the Tools menu and add the Mercurial menu to it
Core::ActionContainer *toolsMenu = actionManager->actionContainer(Core::Constants::M_TOOLS);
Core::ActionContainer *toolsMenu = actionManager->actionContainer(QLatin1String(Core::Constants::M_TOOLS));
toolsMenu->addMenu(mercurialContainer);
connect(core, SIGNAL(contextChanged(Core::IContext *)), this, SLOT(updateActions()));
......@@ -233,40 +233,40 @@ void MercurialPlugin::createMenu()
}
void MercurialPlugin::createFileActions(QList<int> &context)
void MercurialPlugin::createFileActions(const QList<int> &context)
{
Core::Command *command;
annotateFile = new Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(annotateFile, Constants::ANNOTATE, context);
command = actionManager->registerAction(annotateFile, QLatin1String(Constants::ANNOTATE), context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(annotateFile, SIGNAL(triggered()), this, SLOT(annotateCurrentFile()));
mercurialContainer->addAction(command);
diffFile = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(diffFile, Constants::DIFF, context);
command = actionManager->registerAction(diffFile, QLatin1String(Constants::DIFF), context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr(Constants::MENUKEY) + tr(Constants::MODIFIER) + "D"));
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+D")));
connect(diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
mercurialContainer->addAction(command);
logFile = new Utils::ParameterAction(tr("Log Current File"), tr("Log \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(logFile, Constants::LOG, context);
command = actionManager->registerAction(logFile, QLatin1String(Constants::LOG), context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr(Constants::MENUKEY) + tr(Constants::MODIFIER) + "L"));
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+L")));
connect(logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
mercurialContainer->addAction(command);
revertFile = new Utils::ParameterAction(tr("Revert Current File"), tr("Revert \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(revertFile, Constants::REVERT, context);
command = actionManager->registerAction(revertFile, QLatin1String(Constants::REVERT), context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(revertFile, SIGNAL(triggered()), this, SLOT(revertCurrentFile()));
mercurialContainer->addAction(command);
statusFile = new Utils::ParameterAction(tr("Status Current File"), tr("Status \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(statusFile, Constants::STATUS, context);
command = actionManager->registerAction(statusFile, QLatin1String(Constants::STATUS), context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(tr(Constants::MENUKEY) + tr(Constants::MODIFIER) + "S"));
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+S")));
connect(statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
mercurialContainer->addAction(command);
}
......@@ -299,32 +299,32 @@ void MercurialPlugin::statusCurrentFile()
client->status(currentFile());
}
void MercurialPlugin::createDirectoryActions(QList<int> &context)
void MercurialPlugin::createDirectoryActions(const QList<int> &context)
{
QAction *action;
Core::Command *command;
action = new QAction(tr("Diff"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::DIFFMULTI, context);
command = actionManager->registerAction(action, QLatin1String(Constants::DIFFMULTI), context);
connect(action, SIGNAL(triggered()), this, SLOT(diffRepository()));
mercurialContainer->addAction(command);
action = new QAction(tr("Log"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::LOGMULTI, context);
command = actionManager->registerAction(action, QLatin1String(Constants::LOGMULTI), context);
connect(action, SIGNAL(triggered()), this, SLOT(logRepository()));
mercurialContainer->addAction(command);
action = new QAction(tr("Revert"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::REVERTMULTI, context);
command = actionManager->registerAction(action, QLatin1String(Constants::REVERTMULTI), context);
connect(action, SIGNAL(triggered()), this, SLOT(revertMulti()));
mercurialContainer->addAction(command);
action = new QAction(tr("Status"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::STATUSMULTI, context);
command = actionManager->registerAction(action, QLatin1String(Constants::STATUSMULTI), context);
connect(action, SIGNAL(triggered()), this, SLOT(statusMulti()));
mercurialContainer->addAction(command);
}
......@@ -352,48 +352,48 @@ void MercurialPlugin::statusMulti()
client->status(currentProjectRoot());
}
void MercurialPlugin::createRepositoryActions(QList<int> &context)
void MercurialPlugin::createRepositoryActions(const QList<int> &context)
{
QAction *action = new QAction(tr("Pull"), this);
actionList.append(action);
Core::Command *command = actionManager->registerAction(action, Constants::PULL, context);
Core::Command *command = actionManager->registerAction(action, QLatin1String(Constants::PULL), context);
connect(action, SIGNAL(triggered()), this, SLOT(pull()));
mercurialContainer->addAction(command);
action = new QAction(tr("Push"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::PUSH, context);
command = actionManager->registerAction(action, QLatin1String(Constants::PUSH), context);
connect(action, SIGNAL(triggered()), this, SLOT(push()));
mercurialContainer->addAction(command);
action = new QAction(tr("Update"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::UPDATE, context);
command = actionManager->registerAction(action, QLatin1String(Constants::UPDATE), context);
connect(action, SIGNAL(triggered()), this, SLOT(update()));
mercurialContainer->addAction(command);
action = new QAction(tr("Import"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::IMPORT, context);
command = actionManager->registerAction(action, QLatin1String(Constants::IMPORT), context);
connect(action, SIGNAL(triggered()), this, SLOT(import()));
mercurialContainer->addAction(command);
action = new QAction(tr("Incoming"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::INCOMING, context);
command = actionManager->registerAction(action, QLatin1String(Constants::INCOMING), context);
connect(action, SIGNAL(triggered()), this, SLOT(incoming()));
mercurialContainer->addAction(command);
action = new QAction(tr("Outgoing"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::OUTGOING, context);
command = actionManager->registerAction(action, QLatin1String(Constants::OUTGOING), context);
connect(action, SIGNAL(triggered()), this, SLOT(outgoing()));
mercurialContainer->addAction(command);
action = new QAction(tr("Commit"), this);
actionList.append(action);
command = actionManager->registerAction(action, Constants::COMMIT, context);
command->setDefaultKeySequence(QKeySequence(tr(Constants::MENUKEY) + tr(Constants::MODIFIER) + "C"));
command = actionManager->registerAction(action, QLatin1String(Constants::COMMIT), context);
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+C")));
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
mercurialContainer->addAction(command);
}
......@@ -401,7 +401,7 @@ void MercurialPlugin::createRepositoryActions(QList<int> &context)
void MercurialPlugin::pull()
{
SrcDestDialog dialog;
dialog.setWindowTitle("Pull Source");
dialog.setWindowTitle(tr("Pull Source"));
if (dialog.exec() != QDialog::Accepted)
return;
QString repository = dialog.getRepositoryString();
......@@ -411,7 +411,7 @@ void MercurialPlugin::pull()
void MercurialPlugin::push()
{
SrcDestDialog dialog;
dialog.setWindowTitle("Push Destination");
dialog.setWindowTitle(tr("Push Destination"));
if (dialog.exec() != QDialog::Accepted)
return;
QString repository = dialog.getRepositoryString();
......@@ -421,7 +421,7 @@ void MercurialPlugin::push()
void MercurialPlugin::update()
{
RevertDialog updateDialog;
updateDialog.setWindowTitle("Update");
updateDialog.setWindowTitle(tr("Update"));
if (updateDialog.exec() != QDialog::Accepted)
return;
client->update(currentProjectRoot(), updateDialog.revision());
......@@ -443,7 +443,7 @@ void MercurialPlugin::import()
void MercurialPlugin::incoming()
{
SrcDestDialog dialog;
dialog.setWindowTitle("Incoming Source");
dialog.setWindowTitle(tr("Incoming Source"));
if (dialog.exec() != QDialog::Accepted)
return;
QString repository = dialog.getRepositoryString();
......@@ -457,21 +457,21 @@ void MercurialPlugin::outgoing()
void MercurialPlugin::createSubmitEditorActions()
{
QList<int> context = QList<int>()<< core->uniqueIDManager()->uniqueIdentifier(Constants::COMMITKIND);
QList<int> context = QList<int>()<< core->uniqueIDManager()->uniqueIdentifier(QLatin1String(Constants::COMMITKIND));
Core::Command *command;
editorCommit = new QAction(VCSBase::VCSBaseSubmitEditor::submitIcon(), tr("Commit"), this);
command = actionManager->registerAction(editorCommit, Constants::COMMIT, context);
command = actionManager->registerAction(editorCommit, QLatin1String(Constants::COMMIT), context);
connect(editorCommit, SIGNAL(triggered()), this, SLOT(commitFromEditor()));
editorDiff = new QAction(VCSBase::VCSBaseSubmitEditor::diffIcon(), tr("Diff Selected Files"), this);
command = actionManager->registerAction(editorDiff, Constants::DIFFEDITOR, context);
command = actionManager->registerAction(editorDiff, QLatin1String(Constants::DIFFEDITOR), context);
editorUndo = new QAction(tr("&Undo"), this);
co