aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/breakpoint.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp10
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp10
-rw-r--r--src/plugins/debugger/disassemblerlines.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp8
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp2
-rw-r--r--src/plugins/debugger/qml/qmlinspectoragent.cpp4
7 files changed, 21 insertions, 21 deletions
diff --git a/src/plugins/debugger/breakpoint.cpp b/src/plugins/debugger/breakpoint.cpp
index 6596633d5f4..5766a77406c 100644
--- a/src/plugins/debugger/breakpoint.cpp
+++ b/src/plugins/debugger/breakpoint.cpp
@@ -136,7 +136,7 @@ void BreakpointParameters::updateLocation(const QString &location)
{
if (location.size()) {
int pos = location.indexOf(':');
- lineNumber = location.mid(pos + 1).toInt();
+ lineNumber = location.midRef(pos + 1).toInt();
QString file = location.left(pos);
if (file.startsWith('"') && file.endsWith('"'))
file = file.mid(1, file.size() - 2);
@@ -345,7 +345,7 @@ void BreakpointParameters::updateFromGdbOutput(const GdbMi &bkpt)
QString what = bkpt["what"].data();
if (what.startsWith("*0x")) {
type = WatchpointAtAddress;
- address = what.mid(1).toULongLong(0, 0);
+ address = what.midRef(1).toULongLong(0, 0);
} else {
type = WatchpointAtExpression;
expression = what;
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 75de739c7d7..28fa1bcf9ae 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -2245,7 +2245,7 @@ static inline bool checkCommandToken(const QString &tokenPrefix, const QString &
if (!c.startsWith(tokenPrefix))
return false;
bool ok;
- *token = c.mid(tokenPrefixSize, size - tokenPrefixSize - 1).toInt(&ok);
+ *token = c.midRef(tokenPrefixSize, size - tokenPrefixSize - 1).toInt(&ok);
return ok;
}
@@ -2266,19 +2266,19 @@ void CdbEngine::parseOutputLine(QString line)
const int tokenPos = creatorExtPrefix.size() + 2;
const int tokenEndPos = line.indexOf('|', tokenPos);
QTC_ASSERT(tokenEndPos != -1, return);
- const int token = line.mid(tokenPos, tokenEndPos - tokenPos).toInt();
+ const int token = line.midRef(tokenPos, tokenEndPos - tokenPos).toInt();
// remainingChunks
const int remainingChunksPos = tokenEndPos + 1;
const int remainingChunksEndPos = line.indexOf('|', remainingChunksPos);
QTC_ASSERT(remainingChunksEndPos != -1, return);
- const int remainingChunks = line.mid(remainingChunksPos, remainingChunksEndPos - remainingChunksPos).toInt();
+ const int remainingChunks = line.midRef(remainingChunksPos, remainingChunksEndPos - remainingChunksPos).toInt();
// const char 'serviceName'
const int whatPos = remainingChunksEndPos + 1;
const int whatEndPos = line.indexOf('|', whatPos);
QTC_ASSERT(whatEndPos != -1, return);
const QString what = line.mid(whatPos, whatEndPos - whatPos);
// Build up buffer, call handler once last chunk was encountered
- m_extensionMessageBuffer += line.mid(whatEndPos + 1);
+ m_extensionMessageBuffer += line.midRef(whatEndPos + 1);
if (remainingChunks == 0) {
handleExtensionMessage(type, token, what, m_extensionMessageBuffer);
m_extensionMessageBuffer.clear();
@@ -2843,7 +2843,7 @@ void CdbEngine::handleWidgetAt(const DebuggerResponse &response)
break;
}
// 0x000 -> nothing found
- if (!watchExp.mid(sepPos + 1).toULongLong(nullptr, 0)) {
+ if (!watchExp.midRef(sepPos + 1).toULongLong(nullptr, 0)) {
message = QString("No widget could be found at %1, %2.").arg(m_watchPointX).arg(m_watchPointY);
break;
}
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index 69dce9a7b89..d01e82f649f 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -652,7 +652,7 @@ QString decodeData(const QString &ba, const QString &encoding)
case DebuggerEncoding::JulianDateAndMillisecondsSinceMidnight: {
const int p = ba.indexOf('/');
const QDate date = dateFromData(ba.left(p).toInt());
- const QTime time = timeFromData(ba.mid(p + 1 ).toInt());
+ const QTime time = timeFromData(ba.midRef(p + 1 ).toInt());
const QDateTime dateTime = QDateTime(date, time);
return dateTime.isValid() ? dateTime.toString(Qt::TextDate) : "(invalid)";
}
@@ -693,15 +693,15 @@ QString decodeData(const QString &ba, const QString &encoding)
qint64 msecs = ba.left(p0).toLongLong();
++p0;
- Qt::TimeSpec spec = Qt::TimeSpec(ba.mid(p0, p1 - p0).toInt());
+ Qt::TimeSpec spec = Qt::TimeSpec(ba.midRef(p0, p1 - p0).toInt());
++p1;
- qulonglong offset = ba.mid(p1, p2 - p1).toInt();
+ qulonglong offset = ba.midRef(p1, p2 - p1).toInt();
++p2;
QByteArray timeZoneId = QByteArray::fromHex(ba.mid(p2, p3 - p2).toUtf8());
++p3;
- int status = ba.mid(p3, p4 - p3).toInt();
+ int status = ba.midRef(p3, p4 - p3).toInt();
++p4;
- int tiVersion = ba.mid(p4).toInt();
+ int tiVersion = ba.midRef(p4).toInt();
QDate date;
QTime time;
diff --git a/src/plugins/debugger/disassemblerlines.cpp b/src/plugins/debugger/disassemblerlines.cpp
index a809b6fa735..dbe9c06f4fd 100644
--- a/src/plugins/debugger/disassemblerlines.cpp
+++ b/src/plugins/debugger/disassemblerlines.cpp
@@ -47,7 +47,7 @@ void DisassemblerLine::fromString(const QString &unparsed)
// Mac gdb has an overflow reporting 64bit addresses causing the instruction
// to follow the last digit "0x000000013fff4810mov 1,1". Truncate here.
- if (pos > 19 && unparsed.mid(3, 16).toULongLong())
+ if (pos > 19 && unparsed.midRef(3, 16).toULongLong())
pos = 19;
QString addr = unparsed.left(pos);
@@ -191,7 +191,7 @@ void DisassemblerLines::appendUnparsed(const QString &unparsed)
}
dl.address = address.left(pos1 - 1).toULongLong(nullptr, 0);
dl.function = m_lastFunction;
- dl.offset = address.mid(pos2).toUInt();
+ dl.offset = address.midRef(pos2).toUInt();
} else {
// Plain data like "0x0000cd64:\tadd\tlr, pc, lr\n"
dl.address = address.toULongLong(nullptr, 0);
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 844c99164e1..b51afe098e5 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -167,7 +167,7 @@ static QString msgWinException(const QString &data, unsigned *exCodeIn = nullptr
const int addressPos = blankPos != -1 ? data.indexOf("0x", blankPos + 1) : -1;
if (addressPos < 0)
return GdbEngine::tr("An exception was triggered.");
- const unsigned exCode = data.mid(exCodePos, blankPos - exCodePos).toUInt(nullptr, 0);
+ const unsigned exCode = data.midRef(exCodePos, blankPos - exCodePos).toUInt(nullptr, 0);
if (exCodeIn)
*exCodeIn = exCode;
const quint64 address = data.mid(addressPos).trimmed().toULongLong(nullptr, 0);
@@ -1390,7 +1390,7 @@ void GdbEngine::handleStop2(const GdbMi &data)
const GdbMi wpt = data["wpt"];
const QString rid = wpt["number"].data();
const Breakpoint bp = breakHandler()->findBreakpointByResponseId(rid);
- const quint64 bpAddress = wpt["exp"].data().mid(1).toULongLong(nullptr, 0);
+ const quint64 bpAddress = wpt["exp"].data().midRef(1).toULongLong(nullptr, 0);
QString msg;
if (bp) {
if (bp->type() == WatchpointAtExpression)
@@ -2154,7 +2154,7 @@ void GdbEngine::handleWatchInsert(const DebuggerResponse &response, const Breakp
bp->setResponseId(wpt["number"].data());
QString exp = wpt["exp"].data();
if (exp.startsWith('*'))
- bp->setAddress(exp.mid(1).toULongLong(nullptr, 0));
+ bp->setAddress(exp.midRef(1).toULongLong(nullptr, 0));
QTC_CHECK(!bp->needsChange());
notifyBreakpointInsertOk(bp);
} else if (ba.startsWith("Hardware watchpoint ")
@@ -2165,7 +2165,7 @@ void GdbEngine::handleWatchInsert(const DebuggerResponse &response, const Breakp
const QString address = ba.mid(end + 2).trimmed();
bp->setResponseId(ba.mid(begin, end - begin));
if (address.startsWith('*'))
- bp->setAddress(address.mid(1).toULongLong(nullptr, 0));
+ bp->setAddress(address.midRef(1).toULongLong(nullptr, 0));
QTC_CHECK(!bp->needsChange());
notifyBreakpointInsertOk(bp);
} else {
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index 9e6733ae94c..f422225d452 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -499,7 +499,7 @@ void PdbEngine::handleOutput2(const QString &data)
const int pos2 = line.lastIndexOf(':');
QTC_ASSERT(pos2 != -1, continue);
const QString fileName = line.mid(pos1 + 4, pos2 - pos1 - 4);
- const int lineNumber = line.mid(pos2 + 1).toInt();
+ const int lineNumber = line.midRef(pos2 + 1).toInt();
const Breakpoint bp = Utils::findOrDefault(breakHandler()->breakpoints(), [&](const Breakpoint &bp) {
return bp->parameters().isLocatedAt(fileName, lineNumber, bp->markerFileName())
|| bp->requestedParameters().isLocatedAt(fileName, lineNumber, bp->markerFileName());
diff --git a/src/plugins/debugger/qml/qmlinspectoragent.cpp b/src/plugins/debugger/qml/qmlinspectoragent.cpp
index 8ef259e37c2..36272270c9e 100644
--- a/src/plugins/debugger/qml/qmlinspectoragent.cpp
+++ b/src/plugins/debugger/qml/qmlinspectoragent.cpp
@@ -437,7 +437,7 @@ void QmlInspectorAgent::verifyAndInsertObjectInTree(const ObjectReference &objec
const int firstIndex = strlen("inspect");
const int secondIndex = iname.indexOf('.', firstIndex + 1);
if (secondIndex != -1)
- engineId = iname.mid(firstIndex + 1, secondIndex - firstIndex - 1).toInt();
+ engineId = iname.midRef(firstIndex + 1, secondIndex - firstIndex - 1).toInt();
}
// Still not found? Maybe we're loading the engine itself.
@@ -462,7 +462,7 @@ void QmlInspectorAgent::verifyAndInsertObjectInTree(const ObjectReference &objec
int lastIndex = iname.lastIndexOf('.');
int secondLastIndex = iname.lastIndexOf('.', lastIndex - 1);
if (secondLastIndex != WatchItem::InvalidId)
- parentId = iname.mid(secondLastIndex + 1, lastIndex - secondLastIndex - 1).toInt();
+ parentId = iname.midRef(secondLastIndex + 1, lastIndex - secondLastIndex - 1).toInt();
else
parentId = engineId;
} else {