Use !atEnd() instead of canReadLine(). The later is rather broken.

This commit is contained in:
dt
2009-09-23 15:40:19 +02:00
parent 84b3f0af7b
commit 6639389c74

View File

@@ -355,12 +355,11 @@ void CMakeRunPage::initializePage()
QString cachedGenerator;
// Try to find out generator from CMakeCachhe file, if it exists
QFile fi(m_buildDirectory + "/CMakeCache.txt");
if (fi.exists()) {
// Cache exists, then read it...
if (fi.open(QIODevice::ReadOnly | QIODevice::Text)) {
while (fi.canReadLine()) {
while (!fi.atEnd()) {
QString line = fi.readLine();
if (line.startsWith("CMAKE_GENERATOR:INTERNAL=")) {
int splitpos = line.indexOf('=');