Commit 61291e94 authored by hjk's avatar hjk

debugger: fix Qt namespace recognition for Qt 5

The "magic" symbol was QString::fromAscii, which might be fully inlined
in Qt 5. Use QString::fromAscii_helper instead, and also make the detection
a bit more robust in case the magic symbol is not found.

Change-Id: I99e61797356a0d90467d32e54acc2d2a104d609a
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 00f7677f
......@@ -5005,12 +5005,15 @@ void GdbEngine::handleNamespaceExtraction(const GdbResponse &response)
QByteArray ba = file.readAll();
file.close();
file.remove();
int pos = ba.indexOf("7QString9fromAscii");
int pos1 = pos - 1;
while (pos1 > 0 && ba.at(pos1) != 'N' && ba.at(pos1) > '@')
--pos1;
++pos1;
const QByteArray ns = ba.mid(pos1, pos - pos1);
QByteArray ns;
int pos = ba.indexOf("7QString16fromAscii_helper");
if (pos > -1) {
int pos1 = pos - 1;
while (pos1 > 0 && ba.at(pos1) != 'N' && ba.at(pos1) > '@')
--pos1;
++pos1;
ns = ba.mid(pos1, pos - pos1);
}
if (ns.isEmpty()) {
showMessage(_("FOUND NON-NAMESPACED QT"));
} else {
......
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