Skip to content
Snippets Groups Projects
Commit b6bd021a authored by con's avatar con
Browse files

Avoid some unnecessary byte array <-> string conversions.

Reviewed-by: dt
parent 15c4e5d4
No related branches found
No related tags found
No related merge requests found
...@@ -235,6 +235,9 @@ bool S60Devices::readWin() ...@@ -235,6 +235,9 @@ bool S60Devices::readWin()
bool S60Devices::detectQtForDevices() 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) { for (int i = 0; i < m_devices.size(); ++i) {
if (!m_devices.at(i).qt.isEmpty()) if (!m_devices.at(i).qt.isEmpty())
continue; continue;
...@@ -243,14 +246,11 @@ bool S60Devices::detectQtForDevices() ...@@ -243,14 +246,11 @@ bool S60Devices::detectQtForDevices()
m_devices[i].qt = QString(); m_devices[i].qt = QString();
continue; 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; QByteArray buffer;
int index = -1; int index = -1;
while (!qtDll.atEnd()) { while (!qtDll.atEnd()) {
buffer = qtDll.read(10000); buffer = qtDll.read(10000);
index = buffer.indexOf(indicator.toLatin1()); index = buffer.indexOf(indicator);
if (index >= 0) if (index >= 0)
break; break;
if (!qtDll.atEnd()) if (!qtDll.atEnd())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment