diff --git a/qtcreator.pri b/qtcreator.pri index 83ff7ceea1c6aaaeb7e02c3b1c51ac1b70943f31..1c109760dd036d0a4c81936c22b4ac3d30a406a3 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -89,6 +89,8 @@ LIBS += -L$$IDE_LIBRARY_PATH # DEFINES += QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_TO_ASCII +DEFINES += QT_USE_STRINGBUILDER_FOR_CONCATENATION +DEFINES += QT_USE_OPERATOR_PLUS_FOR_CONCATENATION unix { debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp index 0a405e5c7e72cd2e6cca7e1f0fc2d2359c0613b7..430f849c6b1525f4f8e016012abe69d8f1598541 100644 --- a/src/libs/utils/savedaction.cpp +++ b/src/libs/utils/savedaction.cpp @@ -190,9 +190,10 @@ void SavedAction::setTextPattern(const QString &value) QString SavedAction::toString() const { - return "value: " + m_value.toString() - + " defaultvalue: " + m_defaultValue.toString() - + " settingskey: " + m_settingsGroup + '/' + m_settingsKey; + return QLatin1String("value: ") + m_value.toString() + + QLatin1String(" defaultvalue: ") + m_defaultValue.toString() + + QLatin1String(" settingskey: ") + m_settingsGroup + + '/' + m_settingsKey; } /*! diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index b66a6a911d8ffb711acdb9d7bd11bf273984751d..1d30ef924f2d61bc5f45bb88ee8d62713aea75d5 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -1,6 +1,9 @@ TEMPLATE = lib TARGET = Debugger +#DEFINES += QT_USE_FAST_OPERATOR_PLUS +#DEFINES += QT_USE_FAST_CONCATENATION + # CONFIG += single include(../../qtcreatorplugin.pri) include(../../plugins/projectexplorer/projectexplorer.pri) diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 90af18e6855c608a6093bec18dda46dc7ad7a5b1..42df3f27d575b56c715bad85461c9278f5a6b2ad 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -653,7 +653,7 @@ void DebuggerManager::showStatusMessage(const QString &msg, int timeout) if (Debugger::Constants::Internal::debug) qDebug() << "STATUS MSG: " << msg; showDebuggerOutput("status:", msg); - m_statusLabel->setText(" " + msg); + m_statusLabel->setText(QLatin1String(" ") + msg); if (timeout > 0) { m_statusTimer->setSingleShot(true); m_statusTimer->start(timeout); diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index 0b62498d7c8440cfa0c1fce490c713607c0d8f88..9c51a5300c78785dd3117ac4c8e89b01736428bc 100644 --- a/src/plugins/debugger/debuggeroutputwindow.cpp +++ b/src/plugins/debugger/debuggeroutputwindow.cpp @@ -181,7 +181,7 @@ public slots: void gotoResult(int i) { QString needle = QString::number(i) + '^'; - QString needle2 = "stdout:" + needle; + QString needle2 = QLatin1String("stdout:") + needle; QTextCursor cursor(document()); do { const QString line = cursor.block().text(); diff --git a/src/plugins/debugger/tcf/tcfengine.cpp b/src/plugins/debugger/tcf/tcfengine.cpp index 38e36b7c6766dc59f132acae2d64f56b67cb7ba4..abc26ebb76d2a210db0e222315130ad4bc16bd5b 100644 --- a/src/plugins/debugger/tcf/tcfengine.cpp +++ b/src/plugins/debugger/tcf/tcfengine.cpp @@ -358,8 +358,9 @@ void TcfEngine::handleResponse(const QByteArray &response) int token = parts.at(1).toInt(); QByteArray message = parts.at(2); JsonValue data(parts.at(3)); - emit tcfOutputAvailable("", QString::number(token) + "^" - + quoteUnprintableLatin1(response) + data.toString()); + emit tcfOutputAvailable("", QString("%1^%2%3").arg(token) + .arg(quoteUnprintableLatin1(response)) + .arg(QString::fromUtf8(data.toString()))); TcfCommand tcf = m_cookieForToken[token]; JsonValue result(data); SDEBUG("GOOD RESPONSE: " << quoteUnprintableLatin1(response)); diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index fe03cf9c9ee05af346e77f6560cd9a578dd99561..421b22e9f1ee8ed4b8db40e61ac03beace2b004d 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -595,9 +595,9 @@ QVariant WatchHandler::headerData(int section, Qt::Orientation orientation, return QVariant(); if (role == Qt::DisplayRole) { switch (section) { - case 0: return tr("Name") + QLatin1String(" "); - case 1: return tr("Value") + QLatin1String(" "); - case 2: return tr("Type") + QLatin1String(" "); + case 0: return QString(tr("Name") + QLatin1String(" ")); + case 1: return QString(tr("Value") + QLatin1String(" ")); + case 2: return QString(tr("Type") + QLatin1String(" ")); } } return QVariant(); diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 68196cae374c41c9dbf77d3c12f60950767f2352..a75cd747c831ee700d87700657d39569e558179b 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -89,10 +89,10 @@ public: model->setData(index, value, Qt::EditRole); if (index.column() == 1) { // the value column - theDebuggerAction(AssignValue)->trigger(exp + '=' + value); + theDebuggerAction(AssignValue)->trigger(QString(exp + '=' + value)); } else if (index.column() == 2) { // the type column - theDebuggerAction(AssignType)->trigger(exp + '=' + value); + theDebuggerAction(AssignType)->trigger(QString(exp + '=' + value)); } else if (index.column() == 0) { // the watcher name column theDebuggerAction(RemoveWatchExpression)->trigger(exp);