Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
0f353387
Commit
0f353387
authored
Sep 23, 2009
by
dt
Browse files
Fix a one off error in figuring out the cached generator.
Though there's still a bug in that canReadLine() returns false.
parent
261796c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
View file @
0f353387
...
...
@@ -354,16 +354,18 @@ void CMakeRunPage::initializePage()
m_generatorComboBox
->
setVisible
(
true
);
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
))
{
if
(
fi
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
while
(
fi
.
canReadLine
())
{
QString
line
=
fi
.
readLine
();
if
(
line
.
startsWith
(
"CMAKE_GENERATOR:INTERNAL="
))
{
int
splitpos
=
line
.
indexOf
(
'='
);
if
(
splitpos
!=
-
1
)
{
cachedGenerator
=
line
.
mid
(
splitpos
).
trimmed
();
cachedGenerator
=
line
.
mid
(
splitpos
+
1
).
trimmed
();
}
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment