Commit b6bd021a authored by con's avatar con

Avoid some unnecessary byte array <-> string conversions.

Reviewed-by: dt
parent 15c4e5d4
......@@ -235,6 +235,9 @@ bool S60Devices::readWin()
bool S60Devices::detectQtForDevices()
{
// Do not normalize these backslashes since they are in ARM binaries:
const QByteArray indicator("\\src\\corelib\\kernel\\qobject.h");
const int indicatorlength = indicator.size();
for (int i = 0; i < m_devices.size(); ++i) {
if (!m_devices.at(i).qt.isEmpty())
continue;
......@@ -243,14 +246,11 @@ bool S60Devices::detectQtForDevices()
m_devices[i].qt = QString();
continue;
}
// Do not normalize these backslashes since they are in ARM binaries:
const QString indicator("\\src\\corelib\\kernel\\qobject.h");
int indicatorlength = indicator.length();
QByteArray buffer;
int index = -1;
while (!qtDll.atEnd()) {
buffer = qtDll.read(10000);
index = buffer.indexOf(indicator.toLatin1());
index = buffer.indexOf(indicator);
if (index >= 0)
break;
if (!qtDll.atEnd())
......
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