Commit 726b907c authored by hjk's avatar hjk

Debugger: Remove debuggerstringutils.h

With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 3333352e
...@@ -97,9 +97,9 @@ def qdump__Core__Id(d, value): ...@@ -97,9 +97,9 @@ def qdump__Core__Id(d, value):
d.putPlainChildren(value) d.putPlainChildren(value)
def qdump__Debugger__Internal__GdbMi(d, value): def qdump__Debugger__Internal__GdbMi(d, value):
str = d.encodeByteArray(value["m_name"]) + "3a20" \ val = d.encodeString(value["m_name"]) + "3a002000" \
+ d.encodeByteArray(value["m_data"]) + d.encodeString(value["m_data"])
d.putValue(str, "latin1") d.putValue(val, "utf16")
d.putPlainChildren(value) d.putPlainChildren(value)
def qdump__Debugger__Internal__DisassemblerLine(d, value): def qdump__Debugger__Internal__DisassemblerLine(d, value):
...@@ -107,11 +107,11 @@ def qdump__Debugger__Internal__DisassemblerLine(d, value): ...@@ -107,11 +107,11 @@ def qdump__Debugger__Internal__DisassemblerLine(d, value):
d.putPlainChildren(value) d.putPlainChildren(value)
def qdump__Debugger__Internal__WatchData(d, value): def qdump__Debugger__Internal__WatchData(d, value):
d.putByteArrayValue(value["iname"]) d.putStringValue(value["iname"])
d.putPlainChildren(value) d.putPlainChildren(value)
def qdump__Debugger__Internal__WatchItem(d, value): def qdump__Debugger__Internal__WatchItem(d, value):
d.putByteArrayValue(value["iname"]) d.putStringValue(value["iname"])
d.putPlainChildren(value) d.putPlainChildren(value)
def qdump__Debugger__Internal__BreakpointModelId(d, value): def qdump__Debugger__Internal__BreakpointModelId(d, value):
......
...@@ -117,7 +117,7 @@ RunControl *BareMetalRunControlFactory::create( ...@@ -117,7 +117,7 @@ RunControl *BareMetalRunControlFactory::create(
foreach (const BareMetalGdbCommandsDeployStep *bs, bsl->allOfType<BareMetalGdbCommandsDeployStep>()) { foreach (const BareMetalGdbCommandsDeployStep *bs, bsl->allOfType<BareMetalGdbCommandsDeployStep>()) {
if (!sp.commandsAfterConnect.endsWith("\n")) if (!sp.commandsAfterConnect.endsWith("\n"))
sp.commandsAfterConnect.append("\n"); sp.commandsAfterConnect.append("\n");
sp.commandsAfterConnect.append(bs->gdbCommands().toLatin1()); sp.commandsAfterConnect.append(bs->gdbCommands());
} }
} }
} }
...@@ -126,8 +126,8 @@ RunControl *BareMetalRunControlFactory::create( ...@@ -126,8 +126,8 @@ RunControl *BareMetalRunControlFactory::create(
sp.inferior.commandLineArguments = rc->arguments(); sp.inferior.commandLineArguments = rc->arguments();
sp.symbolFile = bin; sp.symbolFile = bin;
sp.startMode = AttachToRemoteServer; sp.startMode = AttachToRemoteServer;
sp.commandsAfterConnect = p->initCommands().toLatin1(); sp.commandsAfterConnect = p->initCommands();
sp.commandsForReset = p->resetCommands().toLatin1(); sp.commandsForReset = p->resetCommands();
sp.remoteChannel = p->channel(); sp.remoteChannel = p->channel();
sp.useContinueInsteadOfRun = true; sp.useContinueInsteadOfRun = true;
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggericons.h" #include "debuggericons.h"
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "debuggerstringutils.h"
#include "simplifytype.h" #include "simplifytype.h"
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
...@@ -425,44 +424,43 @@ Breakpoint BreakHandler::findWatchpoint(const BreakpointParameters &params) cons ...@@ -425,44 +424,43 @@ Breakpoint BreakHandler::findWatchpoint(const BreakpointParameters &params) cons
void BreakHandler::saveBreakpoints() void BreakHandler::saveBreakpoints()
{ {
const QString one = _("1");
QList<QVariant> list; QList<QVariant> list;
foreach (TreeItem *n, rootItem()->children()) { foreach (TreeItem *n, rootItem()->children()) {
BreakpointItem *b = static_cast<BreakpointItem *>(n); BreakpointItem *b = static_cast<BreakpointItem *>(n);
const BreakpointParameters &params = b->m_params; const BreakpointParameters &params = b->m_params;
QMap<QString, QVariant> map; QMap<QString, QVariant> map;
if (params.type != BreakpointByFileAndLine) if (params.type != BreakpointByFileAndLine)
map.insert(_("type"), params.type); map.insert("type", params.type);
if (!params.fileName.isEmpty()) if (!params.fileName.isEmpty())
map.insert(_("filename"), params.fileName); map.insert("filename", params.fileName);
if (params.lineNumber) if (params.lineNumber)
map.insert(_("linenumber"), params.lineNumber); map.insert("linenumber", params.lineNumber);
if (!params.functionName.isEmpty()) if (!params.functionName.isEmpty())
map.insert(_("funcname"), params.functionName); map.insert("funcname", params.functionName);
if (params.address) if (params.address)
map.insert(_("address"), params.address); map.insert("address", params.address);
if (!params.condition.isEmpty()) if (!params.condition.isEmpty())
map.insert(_("condition"), params.condition); map.insert("condition", params.condition);
if (params.ignoreCount) if (params.ignoreCount)
map.insert(_("ignorecount"), params.ignoreCount); map.insert("ignorecount", params.ignoreCount);
if (params.threadSpec >= 0) if (params.threadSpec >= 0)
map.insert(_("threadspec"), params.threadSpec); map.insert("threadspec", params.threadSpec);
if (!params.enabled) if (!params.enabled)
map.insert(_("disabled"), one); map.insert("disabled", "1");
if (params.oneShot) if (params.oneShot)
map.insert(_("oneshot"), one); map.insert("oneshot", "1");
if (params.pathUsage != BreakpointPathUsageEngineDefault) if (params.pathUsage != BreakpointPathUsageEngineDefault)
map.insert(_("usefullpath"), QString::number(params.pathUsage)); map.insert("usefullpath", QString::number(params.pathUsage));
if (params.tracepoint) if (params.tracepoint)
map.insert(_("tracepoint"), one); map.insert("tracepoint", "1");
if (!params.module.isEmpty()) if (!params.module.isEmpty())
map.insert(_("module"), params.module); map.insert("module", params.module);
if (!params.command.isEmpty()) if (!params.command.isEmpty())
map.insert(_("command"), params.command); map.insert("command", params.command);
if (!params.expression.isEmpty()) if (!params.expression.isEmpty())
map.insert(_("expression"), params.expression); map.insert("expression", params.expression);
if (!params.message.isEmpty()) if (!params.message.isEmpty())
map.insert(_("message"), params.message); map.insert("message", params.message);
list.append(map); list.append(map);
} }
setSessionValue("Breakpoints", list); setSessionValue("Breakpoints", list);
...@@ -475,52 +473,52 @@ void BreakHandler::loadBreakpoints() ...@@ -475,52 +473,52 @@ void BreakHandler::loadBreakpoints()
foreach (const QVariant &var, list) { foreach (const QVariant &var, list) {
const QMap<QString, QVariant> map = var.toMap(); const QMap<QString, QVariant> map = var.toMap();
BreakpointParameters params(BreakpointByFileAndLine); BreakpointParameters params(BreakpointByFileAndLine);
QVariant v = map.value(_("filename")); QVariant v = map.value("filename");
if (v.isValid()) if (v.isValid())
params.fileName = v.toString(); params.fileName = v.toString();
v = map.value(_("linenumber")); v = map.value("linenumber");
if (v.isValid()) if (v.isValid())
params.lineNumber = v.toString().toInt(); params.lineNumber = v.toString().toInt();
v = map.value(_("condition")); v = map.value("condition");
if (v.isValid()) if (v.isValid())
params.condition = v.toString().toLatin1(); params.condition = v.toString();
v = map.value(_("address")); v = map.value("address");
if (v.isValid()) if (v.isValid())
params.address = v.toString().toULongLong(); params.address = v.toString().toULongLong();
v = map.value(_("ignorecount")); v = map.value("ignorecount");
if (v.isValid()) if (v.isValid())
params.ignoreCount = v.toString().toInt(); params.ignoreCount = v.toString().toInt();
v = map.value(_("threadspec")); v = map.value("threadspec");
if (v.isValid()) if (v.isValid())
params.threadSpec = v.toString().toInt(); params.threadSpec = v.toString().toInt();
v = map.value(_("funcname")); v = map.value("funcname");
if (v.isValid()) if (v.isValid())
params.functionName = v.toString(); params.functionName = v.toString();
v = map.value(_("disabled")); v = map.value("disabled");
if (v.isValid()) if (v.isValid())
params.enabled = !v.toInt(); params.enabled = !v.toInt();
v = map.value(_("oneshot")); v = map.value("oneshot");
if (v.isValid()) if (v.isValid())
params.oneShot = v.toInt(); params.oneShot = v.toInt();
v = map.value(_("usefullpath")); v = map.value("usefullpath");
if (v.isValid()) if (v.isValid())
params.pathUsage = static_cast<BreakpointPathUsage>(v.toInt()); params.pathUsage = static_cast<BreakpointPathUsage>(v.toInt());
v = map.value(_("tracepoint")); v = map.value("tracepoint");
if (v.isValid()) if (v.isValid())
params.tracepoint = bool(v.toInt()); params.tracepoint = bool(v.toInt());
v = map.value(_("type")); v = map.value("type");
if (v.isValid() && v.toInt() != UnknownBreakpointType) if (v.isValid() && v.toInt() != UnknownBreakpointType)
params.type = BreakpointType(v.toInt()); params.type = BreakpointType(v.toInt());
v = map.value(_("module")); v = map.value("module");
if (v.isValid()) if (v.isValid())
params.module = v.toString(); params.module = v.toString();
v = map.value(_("command")); v = map.value("command");
if (v.isValid()) if (v.isValid())
params.command = v.toString(); params.command = v.toString();
v = map.value(_("expression")); v = map.value("expression");
if (v.isValid()) if (v.isValid())
params.expression = v.toString(); params.expression = v.toString();
v = map.value(_("message")); v = map.value("message");
if (v.isValid()) if (v.isValid())
params.message = v.toString(); params.message = v.toString();
if (params.isValid()) if (params.isValid())
...@@ -732,7 +730,7 @@ PROPERTY(QString, fileName, setFileName) ...@@ -732,7 +730,7 @@ PROPERTY(QString, fileName, setFileName)
PROPERTY(QString, functionName, setFunctionName) PROPERTY(QString, functionName, setFunctionName)
PROPERTY(BreakpointType, type, setType) PROPERTY(BreakpointType, type, setType)
PROPERTY(int, threadSpec, setThreadSpec) PROPERTY(int, threadSpec, setThreadSpec)
PROPERTY(QByteArray, condition, setCondition) PROPERTY(QString, condition, setCondition)
PROPERTY(QString, command, setCommand) PROPERTY(QString, command, setCommand)
PROPERTY(quint64, address, setAddress) PROPERTY(quint64, address, setAddress)
PROPERTY(QString, expression, setExpression) PROPERTY(QString, expression, setExpression)
...@@ -753,16 +751,16 @@ const BreakpointParameters &Breakpoint::parameters() const ...@@ -753,16 +751,16 @@ const BreakpointParameters &Breakpoint::parameters() const
void Breakpoint::addToCommand(DebuggerCommand *cmd) const void Breakpoint::addToCommand(DebuggerCommand *cmd) const
{ {
cmd->arg("modelid", id().toByteArray()); cmd->arg("modelid", id().toString());
cmd->arg("id", int(response().id.majorPart())); cmd->arg("id", int(response().id.majorPart()));
cmd->arg("type", type()); cmd->arg("type", type());
cmd->arg("ignorecount", ignoreCount()); cmd->arg("ignorecount", ignoreCount());
cmd->arg("condition", condition().toHex()); cmd->arg("condition", toHex(condition()));
cmd->arg("command", command().toUtf8().toHex()); cmd->arg("command", toHex(command()));
cmd->arg("function", functionName().toUtf8()); cmd->arg("function", functionName());
cmd->arg("oneshot", isOneShot()); cmd->arg("oneshot", isOneShot());
cmd->arg("enabled", isEnabled()); cmd->arg("enabled", isEnabled());
cmd->arg("file", fileName().toUtf8()); cmd->arg("file", fileName());
cmd->arg("line", lineNumber()); cmd->arg("line", lineNumber());
cmd->arg("address", address()); cmd->arg("address", address());
cmd->arg("expression", expression()); cmd->arg("expression", expression());
......
...@@ -93,8 +93,8 @@ public: ...@@ -93,8 +93,8 @@ public:
// obtained the BreakpointItem pointer. // obtained the BreakpointItem pointer.
BreakpointPathUsage pathUsage() const; BreakpointPathUsage pathUsage() const;
void setPathUsage(const BreakpointPathUsage &u); void setPathUsage(const BreakpointPathUsage &u);
QByteArray condition() const; QString condition() const;
void setCondition(const QByteArray &condition); void setCondition(const QString &condition);
int ignoreCount() const; int ignoreCount() const;
void setIgnoreCount(const int &count); void setIgnoreCount(const int &count);
int threadSpec() const; int threadSpec() const;
......
...@@ -46,24 +46,12 @@ QDebug operator<<(QDebug d, const BreakpointIdBase &id) ...@@ -46,24 +46,12 @@ QDebug operator<<(QDebug d, const BreakpointIdBase &id)
return d; return d;
} }
QByteArray BreakpointIdBase::toByteArray() const
{
if (!isValid())
return "<invalid bkpt>";
QByteArray ba = QByteArray::number(m_majorPart);
if (isMinor()) {
ba.append('.');
ba.append(QByteArray::number(m_minorPart));
}
return ba;
}
QString BreakpointIdBase::toString() const QString BreakpointIdBase::toString() const
{ {
if (!isValid()) if (!isValid())
return QLatin1String("<invalid bkpt>"); return QLatin1String("<invalid bkpt>");
if (isMinor()) if (isMinor())
return QString::fromLatin1("%1.%2").arg(m_majorPart).arg(m_minorPart); return QString("%1.%2").arg(m_majorPart).arg(m_minorPart);
return QString::number(m_majorPart); return QString::number(m_majorPart);
} }
...@@ -79,7 +67,7 @@ QString BreakpointIdBase::toString() const ...@@ -79,7 +67,7 @@ QString BreakpointIdBase::toString() const
*/ */
BreakpointModelId::BreakpointModelId(const QByteArray &ba) BreakpointModelId::BreakpointModelId(const QString &ba)
{ {
int pos = ba.indexOf('\''); int pos = ba.indexOf('\'');
if (pos == -1) { if (pos == -1) {
...@@ -102,7 +90,7 @@ BreakpointModelId::BreakpointModelId(const QByteArray &ba) ...@@ -102,7 +90,7 @@ BreakpointModelId::BreakpointModelId(const QByteArray &ba)
are deleted, so, the ID is used. are deleted, so, the ID is used.
*/ */
BreakpointResponseId::BreakpointResponseId(const QByteArray &ba) BreakpointResponseId::BreakpointResponseId(const QString &ba)
{ {
int pos = ba.indexOf('.'); int pos = ba.indexOf('.');
if (pos == -1) { if (pos == -1) {
...@@ -203,23 +191,23 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const ...@@ -203,23 +191,23 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
return !differencesTo(rhs); return !differencesTo(rhs);
} }
bool BreakpointParameters::conditionsMatch(const QByteArray &other) const bool BreakpointParameters::conditionsMatch(const QString &other) const
{ {
// Some versions of gdb "beautify" the passed condition. // Some versions of gdb "beautify" the passed condition.
QByteArray s1 = condition; QString s1 = condition;
s1.replace(' ', ""); s1.replace(' ', "");
QByteArray s2 = other; QString s2 = other;
s2.replace(' ', ""); s2.replace(' ', "");
return s1 == s2; return s1 == s2;
} }
void BreakpointParameters::updateLocation(const QByteArray &location) void BreakpointParameters::updateLocation(const QString &location)
{ {
if (location.size()) { if (location.size()) {
int pos = location.indexOf(':'); int pos = location.indexOf(':');
lineNumber = location.mid(pos + 1).toInt(); lineNumber = location.mid(pos + 1).toInt();
QString file = QString::fromUtf8(location.left(pos)); QString file = location.left(pos);
if (file.startsWith(QLatin1Char('"')) && file.endsWith(QLatin1Char('"'))) if (file.startsWith('"') && file.endsWith('"'))
file = file.mid(1, file.size() - 2); file = file.mid(1, file.size() - 2);
QFileInfo fi(file); QFileInfo fi(file);
if (fi.isReadable()) if (fi.isReadable())
...@@ -238,9 +226,9 @@ bool BreakpointParameters::isCppBreakpoint() const ...@@ -238,9 +226,9 @@ bool BreakpointParameters::isCppBreakpoint() const
if (type == BreakpointByFileAndLine) { if (type == BreakpointByFileAndLine) {
auto qmlExtensionString = QString::fromLocal8Bit(qgetenv("QTC_QMLDEBUGGER_FILEEXTENSIONS")); auto qmlExtensionString = QString::fromLocal8Bit(qgetenv("QTC_QMLDEBUGGER_FILEEXTENSIONS"));
if (qmlExtensionString.isEmpty()) if (qmlExtensionString.isEmpty())
qmlExtensionString = QLatin1Literal(".qml;.js"); qmlExtensionString = ".qml;.js";
auto qmlFileExtensions = qmlExtensionString.split(QLatin1Literal(";"), QString::SkipEmptyParts); auto qmlFileExtensions = qmlExtensionString.split(";", QString::SkipEmptyParts);
foreach (QString extension, qmlFileExtensions) { foreach (QString extension, qmlFileExtensions) {
if (fileName.endsWith(extension, Qt::CaseInsensitive)) if (fileName.endsWith(extension, Qt::CaseInsensitive))
return false; return false;
......
...@@ -48,7 +48,6 @@ public: ...@@ -48,7 +48,6 @@ public:
bool operator!() const { return !isValid(); } bool operator!() const { return !isValid(); }
operator const void*() const { return isValid() ? this : 0; } operator const void*() const { return isValid() ? this : 0; }
quint32 toInternalId() const { return m_majorPart | (m_minorPart << 16); } quint32 toInternalId() const { return m_majorPart | (m_minorPart << 16); }
QByteArray toByteArray() const;
QString toString() const; QString toString() const;
bool operator==(const BreakpointIdBase &id) const bool operator==(const BreakpointIdBase &id) const
{ return m_majorPart == id.m_majorPart && m_minorPart == id.m_minorPart; } { return m_majorPart == id.m_majorPart && m_minorPart == id.m_minorPart; }
...@@ -66,7 +65,7 @@ public: ...@@ -66,7 +65,7 @@ public:
BreakpointModelId() { m_majorPart = m_minorPart = 0; } BreakpointModelId() { m_majorPart = m_minorPart = 0; }
explicit BreakpointModelId(quint16 ma) { m_majorPart = ma; m_minorPart = 0; } explicit BreakpointModelId(quint16 ma) { m_majorPart = ma; m_minorPart = 0; }
BreakpointModelId(quint16 ma, quint16 mi) { m_majorPart = ma; m_minorPart = mi; } BreakpointModelId(quint16 ma, quint16 mi) { m_majorPart = ma; m_minorPart = mi; }
explicit BreakpointModelId(const QByteArray &ba); // "21.2" explicit BreakpointModelId(const QString &ba); // "21.2"
}; };
class BreakpointResponseId : public BreakpointIdBase class BreakpointResponseId : public BreakpointIdBase
...@@ -75,7 +74,7 @@ public: ...@@ -75,7 +74,7 @@ public:
BreakpointResponseId() { m_majorPart = m_minorPart = 0; } BreakpointResponseId() { m_majorPart = m_minorPart = 0; }
explicit BreakpointResponseId(quint16 ma) { m_majorPart = ma; m_minorPart = 0; } explicit BreakpointResponseId(quint16 ma) { m_majorPart = ma; m_minorPart = 0; }
BreakpointResponseId(quint16 ma, quint16 mi) { m_majorPart = ma; m_minorPart = mi; } BreakpointResponseId(quint16 ma, quint16 mi) { m_majorPart = ma; m_minorPart = mi; }
explicit BreakpointResponseId(const QByteArray &ba); // "21.2" explicit BreakpointResponseId(const QString &ba); // "21.2"
}; };
...@@ -183,7 +182,7 @@ public: ...@@ -183,7 +182,7 @@ public:
BreakpointParts differencesTo(const BreakpointParameters &rhs) const; BreakpointParts differencesTo(const BreakpointParameters &rhs) const;
bool isValid() const; bool isValid() const;
bool equals(const BreakpointParameters &rhs) const; bool equals(const BreakpointParameters &rhs) const;
bool conditionsMatch(const QByteArray &other) const; bool conditionsMatch(const QString &other) const;
bool isWatchpoint() const bool isWatchpoint() const
{ return type == WatchpointAtAddress || type == WatchpointAtExpression; } { return type == WatchpointAtAddress || type == WatchpointAtExpression; }
// Enough for now. // Enough for now.
...@@ -191,7 +190,7 @@ public: ...@@ -191,7 +190,7 @@ public:
bool isTracepoint() const { return tracepoint; } bool isTracepoint() const { return tracepoint; }
bool isCppBreakpoint() const; bool isCppBreakpoint() const;
QString toString() const; QString toString() const;
void updateLocation(const QByteArray &location); // file.cpp:42 void updateLocation(const QString &location); // file.cpp:42
bool operator==(const BreakpointParameters &p) const { return equals(p); } bool operator==(const BreakpointParameters &p) const { return equals(p); }
bool operator!=(const BreakpointParameters &p) const { return !equals(p); } bool operator!=(const BreakpointParameters &p) const { return !equals(p); }
...@@ -200,7 +199,7 @@ public: ...@@ -200,7 +199,7 @@ public:
bool enabled; //!< Should we talk to the debugger engine? bool enabled; //!< Should we talk to the debugger engine?
BreakpointPathUsage pathUsage; //!< Should we use the full path when setting the bp? BreakpointPathUsage pathUsage; //!< Should we use the full path when setting the bp?
QString fileName; //!< Short name of source file. QString fileName; //!< Short name of source file.
QByteArray condition; //!< Condition associated with breakpoint. QString condition; //!< Condition associated with breakpoint.
int ignoreCount; //!< Ignore count associated with breakpoint. int ignoreCount; //!< Ignore count associated with breakpoint.
int lineNumber; //!< Line in source file. int lineNumber; //!< Line in source file.
quint64 address; //!< Address for address based data breakpoints. quint64 address; //!< Address for address based data breakpoints.
......
...@@ -460,7 +460,7 @@ void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data) ...@@ -460,7 +460,7 @@ void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data)
data->expression = m_lineEditExpression->text(); data->expression = m_lineEditExpression->text();
if (partsMask & ConditionPart) if (partsMask & ConditionPart)
data->condition = m_lineEditCondition->text().toUtf8(); data->condition = m_lineEditCondition->text();
if (partsMask & IgnoreCountPart) if (partsMask & IgnoreCountPart)
data->ignoreCount = m_spinBoxIgnoreCount->text().toInt(); data->ignoreCount = m_spinBoxIgnoreCount->text().toInt();
if (partsMask & ThreadSpecPart) if (partsMask & ThreadSpecPart)
...@@ -510,7 +510,7 @@ void BreakpointDialog::setParts(unsigned mask, const BreakpointParameters &data) ...@@ -510,7 +510,7 @@ void BreakpointDialog::setParts(unsigned mask, const BreakpointParameters &data)
} }
if (mask & ConditionPart) if (mask & ConditionPart)
m_lineEditCondition->setText(QString::fromUtf8(data.condition)); m_lineEditCondition->setText(data.condition);
if (mask & IgnoreCountPart) if (mask & IgnoreCountPart)
m_spinBoxIgnoreCount->setValue(data.ignoreCount); m_spinBoxIgnoreCount->setValue(data.ignoreCount);
if (mask & ThreadSpecPart) if (mask & ThreadSpecPart)
...@@ -916,7 +916,7 @@ void BreakTreeView::editBreakpoints(const Breakpoints &bps) ...@@ -916,7 +916,7 @@ void BreakTreeView::editBreakpoints(const Breakpoints &bps)
return; return;
MultiBreakPointsDialog dialog; MultiBreakPointsDialog dialog;
dialog.setCondition(QString::fromLatin1(bp.condition())); dialog.setCondition(bp.condition());
dialog.setIgnoreCount(bp.ignoreCount()); dialog.setIgnoreCount(bp.ignoreCount());
dialog.setThreadSpec(bp.threadSpec()); dialog.setThreadSpec(bp.threadSpec());
...@@ -929,7 +929,7 @@ void BreakTreeView::editBreakpoints(const Breakpoints &bps) ...@@ -929,7 +929,7 @@ void BreakTreeView::editBreakpoints(const Breakpoints &bps)
foreach (Breakpoint bp, bps) { foreach (Breakpoint bp, bps) {
if (bp) { if (bp) {
bp.setCondition(newCondition.toLatin1()); bp.setCondition(newCondition);
bp.setIgnoreCount(newIgnoreCount); bp.setIgnoreCount(newIgnoreCount);
bp.setThreadSpec(newThreadSpec); bp.setThreadSpec(newThreadSpec);
} }
......
HEADERS += $$PWD/cdbengine.h \ HEADERS += $$PWD/cdbengine.h \
cdb/bytearrayinputstream.h \
cdb/cdbparsehelpers.h \