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
Tobias Hunger
qt-creator
Commits
092fd7c2
Commit
092fd7c2
authored
Mar 25, 2010
by
Tobias Hunger
Browse files
Enable shadow building by default for Qt4 projects
Reviewed-by: dt
parent
c1c155f5
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
View file @
092fd7c2
...
...
@@ -61,7 +61,7 @@ enum { debug = 0 };
Qt4BuildConfiguration
::
Qt4BuildConfiguration
(
Qt4Target
*
target
)
:
BuildConfiguration
(
target
,
QLatin1String
(
QT4_BC_ID
)),
m_shadowBuild
(
fals
e
),
m_shadowBuild
(
tru
e
),
m_qtVersionId
(
-
1
),
m_toolChainType
(
-
1
),
// toolChainType() makes sure to return the default toolchainType
m_qmakeBuildConfiguration
(
0
),
...
...
@@ -72,7 +72,7 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4Target *target) :
Qt4BuildConfiguration
::
Qt4BuildConfiguration
(
Qt4Target
*
target
,
const
QString
&
id
)
:
BuildConfiguration
(
target
,
id
),
m_shadowBuild
(
fals
e
),
m_shadowBuild
(
tru
e
),
m_qtVersionId
(
-
1
),
m_toolChainType
(
-
1
),
// toolChainType() makes sure to return the default toolchainType
m_qmakeBuildConfiguration
(
0
),
...
...
@@ -115,8 +115,8 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map)
if
(
!
BuildConfiguration
::
fromMap
(
map
))
return
false
;
m_shadowBuild
=
map
.
value
(
QLatin1String
(
USE_SHADOW_BUILD_KEY
),
fals
e
).
toBool
();
m_buildDirectory
=
map
.
value
(
QLatin1String
(
BUILD_DIRECTORY_KEY
)).
toString
();
m_shadowBuild
=
map
.
value
(
QLatin1String
(
USE_SHADOW_BUILD_KEY
),
tru
e
).
toBool
();
m_buildDirectory
=
map
.
value
(
QLatin1String
(
BUILD_DIRECTORY_KEY
)
,
qt4Target
()
->
defaultBuildDirectory
()
).
toString
();
m_qtVersionId
=
map
.
value
(
QLatin1String
(
QT_VERSION_ID_KEY
)).
toInt
();
m_toolChainType
=
map
.
value
(
QLatin1String
(
TOOLCHAIN_KEY
)).
toInt
();
m_qmakeBuildConfiguration
=
QtVersion
::
QmakeBuildConfigs
(
map
.
value
(
QLatin1String
(
BUILD_CONFIGURATION_KEY
)).
toInt
());
...
...
@@ -154,6 +154,10 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map)
void
Qt4BuildConfiguration
::
ctor
()
{
m_buildDirectory
=
qt4Target
()
->
defaultBuildDirectory
();
if
(
m_buildDirectory
==
target
()
->
project
()
->
projectDirectory
())
m_shadowBuild
=
false
;
QtVersionManager
*
vm
=
QtVersionManager
::
instance
();
connect
(
vm
,
SIGNAL
(
qtVersionsChanged
(
QList
<
int
>
)),
this
,
SLOT
(
qtVersionsChanged
(
QList
<
int
>
)));
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
092fd7c2
...
...
@@ -781,6 +781,12 @@ bool Qt4Project::wasEvaluateCanceled()
return
m_cancelEvaluate
;
}
QString
Qt4Project
::
defaultTopLevelBuildDirectory
()
const
{
QFileInfo
info
(
file
()
->
fileName
());
return
projectDirectory
()
+
QChar
(
'/'
)
+
info
.
baseName
()
+
QLatin1String
(
"-build"
);
}
void
Qt4Project
::
asyncUpdate
()
{
if
(
debug
)
...
...
src/plugins/qt4projectmanager/qt4project.h
View file @
092fd7c2
...
...
@@ -161,6 +161,8 @@ public:
/// \internal
bool
wasEvaluateCanceled
();
QString
defaultTopLevelBuildDirectory
()
const
;
signals:
/// emitted after parse
void
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
node
);
...
...
src/plugins/qt4projectmanager/qt4target.cpp
View file @
092fd7c2
...
...
@@ -314,6 +314,29 @@ ToolChain::ToolChainType Qt4Target::preferredToolChainType(const QList<ToolChain
return
preferredType
;
}
QString
Qt4Target
::
defaultBuildDirectory
()
const
{
if
(
id
()
==
QLatin1String
(
Constants
::
S60_DEVICE_TARGET_ID
)
||
id
()
==
QLatin1String
(
Constants
::
S60_EMULATOR_TARGET_ID
)
#if defined(Q_OS_WIN)
||
id
()
==
QLatin1String
(
Constants
::
MAEMO_DEVICE_TARGET_ID
)
#endif
)
return
project
()
->
projectDirectory
();
QString
shortName
=
QLatin1String
(
"unknown"
);
if
(
id
()
==
QLatin1String
(
Constants
::
DESKTOP_TARGET_ID
))
shortName
=
QLatin1String
(
"desktop"
);
else
if
(
id
()
==
QLatin1String
(
Constants
::
S60_EMULATOR_TARGET_ID
))
shortName
=
QLatin1String
(
"symbian_emulator"
);
else
if
(
id
()
==
QLatin1String
(
Constants
::
S60_DEVICE_TARGET_ID
))
shortName
=
QLatin1String
(
"symbian"
);
else
if
(
id
()
==
QLatin1String
(
Constants
::
MAEMO_DEVICE_TARGET_ID
))
shortName
=
QLatin1String
(
"maemo"
);
return
qt4Project
()
->
defaultTopLevelBuildDirectory
()
+
QChar
(
'/'
)
+
shortName
;
}
bool
Qt4Target
::
fromMap
(
const
QVariantMap
&
map
)
{
if
(
!
Target
::
fromMap
(
map
))
...
...
src/plugins/qt4projectmanager/qt4target.h
View file @
092fd7c2
...
...
@@ -68,6 +68,8 @@ public:
QList
<
ProjectExplorer
::
ToolChain
::
ToolChainType
>
filterToolChainTypes
(
const
QList
<
ProjectExplorer
::
ToolChain
::
ToolChainType
>
&
candidates
)
const
;
ProjectExplorer
::
ToolChain
::
ToolChainType
preferredToolChainType
(
const
QList
<
ProjectExplorer
::
ToolChain
::
ToolChainType
>
&
candidates
)
const
;
QString
defaultBuildDirectory
()
const
;
signals:
void
buildDirectoryInitialized
();
/// emitted if the build configuration changed in a way that
...
...
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