Skip to content
GitLab
Menu
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
ac28279e
Commit
ac28279e
authored
Mar 10, 2011
by
dt
Browse files
TargetSetupPage: Only offer qt versions that have a toolchain
Task-Nr: QTCREATORBUG-3886
parent
11311b6e
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
View file @
ac28279e
...
...
@@ -136,7 +136,7 @@ QList<BuildConfigurationInfo> Qt4DesktopTargetFactory::availableBuildConfigurati
QList
<
QtVersion
*>
knownVersions
=
QtVersionManager
::
instance
()
->
versionsForTargetId
(
id
,
minimumQtVersion
);
foreach
(
QtVersion
*
version
,
knownVersions
)
{
if
(
!
version
->
isValid
())
if
(
!
version
->
isValid
()
||
!
version
->
toolChainAvailable
()
)
continue
;
QtVersion
::
QmakeBuildConfigs
config
=
version
->
defaultBuildConfig
();
...
...
src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
View file @
ac28279e
...
...
@@ -136,7 +136,7 @@ QList<BuildConfigurationInfo> Qt4SimulatorTargetFactory::availableBuildConfigura
QList
<
QtVersion
*>
knownVersions
=
QtVersionManager
::
instance
()
->
versionsForTargetId
(
id
,
minimumQtVersion
);
foreach
(
QtVersion
*
version
,
knownVersions
)
{
if
(
!
version
->
isValid
())
if
(
!
version
->
isValid
()
||
!
version
->
toolChainAvailable
()
)
continue
;
QtVersion
::
QmakeBuildConfigs
config
=
version
->
defaultBuildConfig
();
QString
dir
=
defaultShadowBuildDirectory
(
Qt4Project
::
defaultTopLevelBuildDirectory
(
proFilePath
),
id
);
...
...
src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp
View file @
ac28279e
...
...
@@ -156,7 +156,7 @@ QList<BuildConfigurationInfo> Qt4MaemoTargetFactory::availableBuildConfiguration
QList
<
QtVersion
*>
knownVersions
=
QtVersionManager
::
instance
()
->
versionsForTargetId
(
id
,
minimumQtVersion
);
foreach
(
QtVersion
*
version
,
knownVersions
)
{
if
(
!
version
->
isValid
())
if
(
!
version
->
isValid
()
||
!
version
->
toolChainAvailable
()
)
continue
;
QtVersion
::
QmakeBuildConfigs
config
=
version
->
defaultBuildConfig
();
QString
dir
=
defaultShadowBuildDirectory
(
Qt4Project
::
defaultTopLevelBuildDirectory
(
proFilePath
),
id
);
...
...
src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
View file @
ac28279e
...
...
@@ -45,6 +45,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/customexecutablerunconfiguration.h>
#include <projectexplorer/toolchainmanager.h>
using
ProjectExplorer
::
idFromMap
;
using
namespace
Qt4ProjectManager
;
...
...
@@ -139,8 +140,9 @@ QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurati
QList
<
QtVersion
*>
knownVersions
=
QtVersionManager
::
instance
()
->
versionsForTargetId
(
id
,
minimumQtVersion
);
foreach
(
QtVersion
*
version
,
knownVersions
)
{
if
(
!
version
->
isValid
())
if
(
!
version
->
isValid
()
||
!
version
->
toolChainAvailable
()
)
continue
;
bool
buildAll
=
version
->
defaultBuildConfig
()
&
QtVersion
::
BuildAll
;
QtVersion
::
QmakeBuildConfigs
config
=
buildAll
?
QtVersion
::
BuildAll
:
QtVersion
::
QmakeBuildConfig
(
0
);
QString
dir
=
QFileInfo
(
proFilePath
).
absolutePath
(),
id
;
...
...
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
ac28279e
...
...
@@ -254,10 +254,10 @@ void QtVersionManager::removeVersion(QtVersion *version)
bool
QtVersionManager
::
supportsTargetId
(
const
QString
&
id
)
const
{
foreach
(
QtVersion
*
version
,
m_versions
)
{
if
(
version
->
supportsTargetId
(
id
))
QList
<
QtVersion
*>
versions
=
QtVersionManager
::
instance
()
->
versionsForTargetId
(
id
);
foreach
(
QtVersion
*
v
,
versions
)
if
(
v
->
isValid
()
&&
v
->
toolChainAvailable
())
return
true
;
}
return
false
;
}
...
...
@@ -1750,6 +1750,16 @@ bool QtVersion::isValid() const
&&
!
m_abis
.
isEmpty
();
}
bool
QtVersion
::
toolChainAvailable
()
const
{
if
(
!
isValid
())
return
false
;
foreach
(
const
ProjectExplorer
::
Abi
&
abi
,
qtAbis
())
if
(
!
ProjectExplorer
::
ToolChainManager
::
instance
()
->
findToolChains
(
abi
).
isEmpty
())
return
true
;
return
false
;
}
QString
QtVersion
::
invalidReason
()
const
{
if
(
isValid
())
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
ac28279e
...
...
@@ -95,7 +95,8 @@ public:
QtVersion
();
~
QtVersion
();
bool
isValid
()
const
;
//TOOD check that the dir exists and the name is non empty
bool
isValid
()
const
;
bool
toolChainAvailable
()
const
;
QString
invalidReason
()
const
;
QString
description
()
const
;
bool
isAutodetected
()
const
{
return
m_isAutodetected
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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