diff options
author | hjk <qtc-committer@nokia.com> | 2009-05-29 10:35:04 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-05-29 10:35:29 +0200 |
commit | 957a8f3479f93454cf5258f882b381b7a213d934 (patch) | |
tree | e59d3de2859f2f1dbca281da1485421c66b035cf /src/plugins/debugger | |
parent | b390e56d676cd0a838e4b59b51b431535f760bb0 (diff) | |
download | qt-creator-957a8f3479f93454cf5258f882b381b7a213d934.tar.gz |
debugger: some encoding correctness
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/debugger.pro | 3 | ||||
-rw-r--r-- | src/plugins/debugger/debuggermanager.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/debuggeroutputwindow.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/tcf/tcfengine.cpp | 5 | ||||
-rw-r--r-- | src/plugins/debugger/watchhandler.cpp | 6 | ||||
-rw-r--r-- | src/plugins/debugger/watchwindow.cpp | 4 |
6 files changed, 13 insertions, 9 deletions
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index b66a6a911d..1d30ef924f 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 90af18e685..42df3f27d5 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 0b62498d7c..9c51a5300c 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 38e36b7c67..abc26ebb76 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 fe03cf9c9e..421b22e9f1 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 68196cae37..a75cd747c8 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); |