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
Tobias Hunger
qt-creator
Commits
7f58e0e8
Commit
7f58e0e8
authored
Jun 10, 2010
by
Tobias Hunger
Browse files
Improve detection of simulator Qts
* Make this more reliable and faster using less code. Reviewed-by: dt
parent
6d6c8e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
7f58e0e8
...
...
@@ -1410,35 +1410,15 @@ void QtVersion::updateToolChainAndMkspec() const
else
if
(
value
==
"build_all"
)
m_defaultConfigIsDebugAndRelease
=
true
;
}
// Is this actually a simulator Qt?
if
(
configValues
.
contains
(
QLatin1String
(
"simulator"
)))
{
m_targetIds
.
clear
();
m_targetIds
.
insert
(
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
));
}
delete
reader
;
ProFileCacheManager
::
instance
()
->
decRefCount
();
m_toolChainUpToDate
=
true
;
// Check qconfig.h for QT_SIMULATOR define on desktop builds and switch the
// Qt version to Qt simulator target:
if
(
m_targetIds
.
contains
(
Constants
::
DESKTOP_TARGET_ID
))
{
QString
path
(
headerInstallPath
());
path
.
append
(
QLatin1String
(
"/Qt/qconfig.h"
));
QFile
qconfig
(
path
);
if
(
!
qconfig
.
exists
())
return
;
qconfig
.
open
(
QIODevice
::
ReadOnly
);
QTextStream
stream
(
&
qconfig
);
QString
line
;
bool
isSimulator
=
false
;
while
(
!
(
line
=
stream
.
readLine
()).
isNull
())
{
if
(
line
.
startsWith
(
QLatin1String
(
"#define QT_SIMULATOR"
)))
{
isSimulator
=
true
;
break
;
}
}
qconfig
.
close
();
if
(
isSimulator
)
{
m_targetIds
.
remove
(
QLatin1String
(
Constants
::
DESKTOP_TARGET_ID
));
m_targetIds
.
insert
(
QLatin1String
(
Constants
::
QT_SIMULATOR_TARGET_ID
));
}
}
}
QString
QtVersion
::
mwcDirectory
()
const
...
...
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