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
16ff6ac7
Commit
16ff6ac7
authored
Mar 15, 2010
by
dt
Browse files
Fix QtVersion to not run qmake on constructing
Only if we need the information.
parent
dfa0c14f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
16ff6ac7
...
...
@@ -631,6 +631,14 @@ QString QtVersion::mkspecPath() const
QString
QtVersion
::
qtVersionString
()
const
{
if
(
m_qtVersionString
.
isNull
())
{
QFileInfo
qmake
(
m_qmakeCommand
);
if
(
qmake
.
exists
()
&&
qmake
.
isExecutable
())
{
m_qtVersionString
=
DebuggingHelperLibrary
::
qtVersionForQMake
(
qmake
.
absoluteFilePath
());
}
else
{
m_qtVersionString
=
QLatin1String
(
""
);
}
}
return
m_qtVersionString
;
}
...
...
@@ -657,14 +665,7 @@ void QtVersion::setQMakeCommand(const QString& qmakeCommand)
m_toolChainUpToDate
=
false
;
// TODO do i need to optimize this?
m_versionInfoUpToDate
=
false
;
m_hasDebuggingHelper
=
!
debuggingHelperLibrary
().
isEmpty
();
QFileInfo
qmake
(
qmakeCommand
);
if
(
qmake
.
exists
()
&&
qmake
.
isExecutable
())
{
m_qtVersionString
=
DebuggingHelperLibrary
::
qtVersionForQMake
(
qmake
.
absoluteFilePath
());
}
else
{
m_qtVersionString
.
clear
();
}
m_qtVersionString
=
QString
();
updateSourcePath
();
}
...
...
@@ -985,8 +986,15 @@ void QtVersion::updateVersionInfo() const
}
}
if
(
m_versionInfo
.
contains
(
"QT_INSTALL_DATA"
))
m_versionInfo
.
insert
(
"QMAKE_MKSPECS"
,
QDir
::
cleanPath
(
m_versionInfo
.
value
(
"QT_INSTALL_DATA"
)
+
"/mkspecs"
));
if
(
m_versionInfo
.
contains
(
"QT_INSTALL_DATA"
))
{
QString
qtInstallData
=
m_versionInfo
.
value
(
"QT_INSTALL_DATA"
);
m_versionInfo
.
insert
(
"QMAKE_MKSPECS"
,
QDir
::
cleanPath
(
qtInstallData
+
"/mkspecs"
));
if
(
qtInstallData
.
isEmpty
())
m_hasDebuggingHelper
=
false
;
else
m_hasDebuggingHelper
=
DebuggingHelperLibrary
::
debuggingHelperLibraryByInstallData
(
qtInstallData
).
isEmpty
();
}
// Now check for a qt that is configured with a prefix but not installed
if
(
m_versionInfo
.
contains
(
"QT_INSTALL_BINS"
))
{
...
...
@@ -1015,6 +1023,7 @@ void QtVersion::updateVersionInfo() const
m_hasDemos
=
true
;
}
}
m_versionInfoUpToDate
=
true
;
}
...
...
@@ -1417,6 +1426,7 @@ QtVersion::QmakeBuildConfigs QtVersion::defaultBuildConfig() const
bool
QtVersion
::
hasDebuggingHelper
()
const
{
updateVersionInfo
();
return
m_hasDebuggingHelper
;
}
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
16ff6ac7
...
...
@@ -155,7 +155,7 @@ private:
int
m_id
;
bool
m_isAutodetected
;
QString
m_autodetectionSource
;
bool
m_hasDebuggingHelper
;
mutable
bool
m_hasDebuggingHelper
;
// controlled by m_versionInfoUpToDate
QString
m_mwcDirectory
;
QString
m_s60SDKDirectory
;
...
...
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