diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index f4026c6aaa5..a12773dfe19 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -115,11 +115,11 @@ QProcess *CMakeManager::createXmlFile(const QStringList &arguments, const QStrin cmake->setProcessChannelMode(QProcess::MergedChannels); #ifdef Q_OS_WIN - QString generator = "-GCodeBlocks - MinGW Makefiles"; + const QString generator = QLatin1String("-GCodeBlocks - MinGW Makefiles"); #else // Q_OS_WIN - QString generator = "-GCodeBlocks - Unix Makefiles"; + const QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles"); #endif // Q_OS_WIN - QString srcdir = buildDirectory.exists("CMakeCache.txt") ? QString(".") : sourceDirectory; + const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory; qDebug()<start(cmakeExecutable(), QStringList() << srcdir << arguments << generator); return cmake; @@ -132,8 +132,8 @@ QString CMakeManager::findCbpFile(const QDir &directory) // so this method below could find the wrong cbp file, if the user changes the project() // 2name foreach (const QString &cbpFile , directory.entryList()) { - if (cbpFile.endsWith(".cbp")) - return directory.path() + "/" + cbpFile; + if (cbpFile.endsWith(QLatin1String(".cbp"))) + return directory.path() + QLatin1Char('/') + cbpFile; } return QString::null; } @@ -142,14 +142,14 @@ QString CMakeManager::findCbpFile(const QDir &directory) QString CMakeManager::qtVersionForQMake(const QString &qmakePath) { QProcess qmake; - qmake.start(qmakePath, QStringList()<<"--version"); + qmake.start(qmakePath, QStringList(QLatin1String("--version"))); if (!qmake.waitForFinished()) return false; QString output = qmake.readAllStandardOutput(); - QRegExp regexp("(QMake version|Qmake version:)[\\s]*([\\d.]*)"); + QRegExp regexp(QLatin1String("(QMake version|Qmake version:)[\\s]*([\\d.]*)")); regexp.indexIn(output); - if (regexp.cap(2).startsWith("2.")) { - QRegExp regexp2("Using Qt version[\\s]*([\\d\\.]*)"); + if (regexp.cap(2).startsWith(QLatin1String("2."))) { + QRegExp regexp2(QLatin1String("Using Qt version[\\s]*([\\d\\.]*)")); regexp2.indexIn(output); return regexp2.cap(1); } @@ -176,17 +176,17 @@ void CMakeRunner::run(QFutureInterface &fi) QString executable = m_executable; m_mutex.unlock(); QProcess cmake; - cmake.start(executable, QStringList()<<"--help"); + cmake.start(executable, QStringList(QLatin1String("--help"))); cmake.waitForFinished(); QString response = cmake.readAll(); - QRegExp versionRegexp("^cmake version ([*\\d\\.]*)-(|patch (\\d*))(|\\r)\\n"); + QRegExp versionRegexp(QLatin1String("^cmake version ([*\\d\\.]*)-(|patch (\\d*))(|\\r)\\n")); versionRegexp.indexIn(response); m_mutex.lock(); - m_supportsQtCreator = response.contains("QtCreator"); + m_supportsQtCreator = response.contains(QLatin1String("QtCreator")); m_version = versionRegexp.cap(1); if (!versionRegexp.capturedTexts().size()>3) - m_version += "." + versionRegexp.cap(3); + m_version += QLatin1Char('.') + versionRegexp.cap(3); m_cacheUpToDate = true; m_mutex.unlock(); fi.reportFinished(); @@ -243,15 +243,15 @@ CMakeSettingsPage::CMakeSettingsPage() { Core::ICore *core = Core::ICore::instance(); QSettings * settings = core->settings(); - settings->beginGroup("CMakeSettings"); - m_cmakeRunner.setExecutable(settings->value("cmakeExecutable").toString()); + settings->beginGroup(QLatin1String("CMakeSettings")); + m_cmakeRunner.setExecutable(settings->value(QLatin1String("cmakeExecutable")).toString()); settings->endGroup(); } QString CMakeSettingsPage::findCmakeExecutable() const { ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment(); - return env.searchInPath("cmake"); + return env.searchInPath(QLatin1String("cmake")); } QString CMakeSettingsPage::id() const @@ -280,7 +280,7 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent) QFormLayout *fl = new QFormLayout(w); m_pathchooser = new Core::Utils::PathChooser(w); m_pathchooser->setExpectedKind(Core::Utils::PathChooser::Command); - fl->addRow("CMake executable", m_pathchooser); + fl->addRow(tr("CMake executable"), m_pathchooser); m_pathchooser->setPath(cmakeExecutable()); return w; } @@ -288,8 +288,8 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent) void CMakeSettingsPage::saveSettings() const { QSettings *settings = Core::ICore::instance()->settings(); - settings->beginGroup("CMakeSettings"); - settings->setValue("cmakeExecutable", m_cmakeRunner.executable()); + settings->beginGroup(QLatin1String("CMakeSettings")); + settings->setValue(QLatin1String("cmakeExecutable"), m_cmakeRunner.executable()); settings->endGroup(); } diff --git a/src/plugins/coreplugin/dialogs/saveitemsdialog.ui b/src/plugins/coreplugin/dialogs/saveitemsdialog.ui index 6f37a47ddda..2565ed2c4e5 100644 --- a/src/plugins/coreplugin/dialogs/saveitemsdialog.ui +++ b/src/plugins/coreplugin/dialogs/saveitemsdialog.ui @@ -59,7 +59,7 @@ - Automatically save all Files before building + Automatically save all files before building diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index 0bde9292018..1cbfefd5c71 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -96,6 +96,19 @@ QDebug operator<<(QDebug dgb, const WelcomeMode::WelcomePageData &d) return dgb; } +// Format a title + ruler for projects/session labels +static inline QString devTitleLabel(const QString &text) +{ + QString rc = QLatin1String( + "" + "" + "

" + ""); + rc += text; + rc += QLatin1String("


"); + return rc; +} + // --- WelcomeMode WelcomeMode::WelcomeMode() : m_d(new WelcomeModePrivate) @@ -108,6 +121,8 @@ WelcomeMode::WelcomeMode() : m_d->rssFetcher = new RSSFetcher(8, this); m_d->m_welcomePage = new QWidget(m_d->m_widget); m_d->ui.setupUi(m_d->m_welcomePage); + m_d->ui.projTitleLabel->setText(devTitleLabel(tr("Projects"))); + m_d->ui.titleLabel->setText(devTitleLabel(tr("Sessions"))); m_d->ui.sessTreeWidget->viewport()->setAutoFillBackground(false); m_d->ui.projTreeWidget->viewport()->setAutoFillBackground(false); m_d->ui.newsTreeWidget->viewport()->setAutoFillBackground(false); diff --git a/src/plugins/coreplugin/welcomemode.ui b/src/plugins/coreplugin/welcomemode.ui index a89d02e3887..588c700e247 100644 --- a/src/plugins/coreplugin/welcomemode.ui +++ b/src/plugins/coreplugin/welcomemode.ui @@ -475,14 +475,6 @@ p, li { white-space: pre-wrap; } - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; color:#555555;">Sessions</span></p> -<hr /></body></html> - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -597,14 +589,6 @@ p, li { white-space: pre-wrap; } - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; color:#555555;">Projects</span></p> -<hr /></body></html> - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index b1166456411..ea895715395 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -1726,7 +1726,7 @@ void FakeVimHandler::Private::handleCommand(const QString &cmd) void FakeVimHandler::Private::handleExCommand(const QString &cmd0) { QString cmd = cmd0; - if (cmd.startsWith("%")) + if (cmd.startsWith(QLatin1Char('%'))) cmd = "1,$" + cmd.mid(1); int beginLine = -1; @@ -1822,7 +1822,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0) enterCommandMode(); showBlackMessage(tr("\"%1\" %2L, %3C") .arg(m_currentFileName).arg(data.count('\n')).arg(data.size())); - } else if (cmd.startsWith("!")) { + } else if (cmd.startsWith(QLatin1Char('!'))) { selectRange(beginLine, endLine); QString command = cmd.mid(1).trimmed(); QString text = removeSelectedText(); @@ -1838,15 +1838,14 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0) setPosition(firstPositionInLine(beginLine)); enterCommandMode(); //qDebug() << "FILTER: " << command; - showBlackMessage(tr("%1 lines filtered").arg(text.count('\n'))); - } else if (cmd.startsWith(">")) { + showBlackMessage(tr("%n lines filtered", 0, text.count('\n'))); + } else if (cmd.startsWith(QLatin1Char('>'))) { m_anchor = firstPositionInLine(beginLine); setPosition(firstPositionInLine(endLine)); shiftRegionRight(1); leaveVisualMode(); enterCommandMode(); - showBlackMessage(tr("%1 lines >ed %2 time") - .arg(endLine - beginLine + 1).arg(1)); + showBlackMessage(tr("%n lines >ed %1 time", 0, (endLine - beginLine + 1)).arg(1)); } else if (cmd == "red" || cmd == "redo") { // :redo redo(); enterCommandMode();