Commit 957a8f34 authored by hjk's avatar hjk

debugger: some encoding correctness

parent b390e56d
......@@ -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
......
......@@ -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;
}
/*!
......
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)
......
......@@ -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);
......
......@@ -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();
......
......@@ -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));
......
......@@ -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();
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment