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
5f9cb8fe
Commit
5f9cb8fe
authored
Sep 30, 2009
by
con
Browse files
Results of review.
parent
c22923c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/cmakeprojectmanager/cmakeproject.h
View file @
5f9cb8fe
...
...
@@ -122,7 +122,6 @@ public:
ProjectExplorer
::
ToolChain
::
ToolChainType
toolChainType
()
const
;
ProjectExplorer
::
ToolChain
*
toolChain
(
ProjectExplorer
::
BuildConfiguration
*
configuration
)
const
;
bool
parseCMakeLists
();
protected:
virtual
void
saveSettingsImpl
(
ProjectExplorer
::
PersistentSettingsWriter
&
writer
);
virtual
bool
restoreSettingsImpl
(
ProjectExplorer
::
PersistentSettingsReader
&
reader
);
...
...
@@ -135,6 +134,7 @@ private slots:
void
slotActiveBuildConfiguration
();
private:
bool
parseCMakeLists
();
void
updateToolChain
(
const
QString
&
compiler
);
void
buildTree
(
CMakeProjectNode
*
rootNode
,
QList
<
ProjectExplorer
::
FileNode
*>
list
);
...
...
@@ -155,6 +155,8 @@ private:
ProjectExplorer
::
FileWatcher
*
m_watcher
;
bool
m_insideFileChanged
;
QSet
<
QString
>
m_watchedFiles
;
friend
class
CMakeBuildConfigurationFactory
;
// for parseCMakeLists
};
class
CMakeCbpParser
:
public
QXmlStreamReader
...
...
src/plugins/projectexplorer/buildconfiguration.cpp
View file @
5f9cb8fe
...
...
@@ -33,10 +33,6 @@
using
namespace
ProjectExplorer
;
BuildConfiguration
::
BuildConfiguration
()
{
}
BuildConfiguration
::
BuildConfiguration
(
const
QString
&
name
)
:
m_name
(
name
)
{
...
...
src/plugins/projectexplorer/buildconfiguration.h
View file @
5f9cb8fe
...
...
@@ -41,27 +41,30 @@
namespace
ProjectExplorer
{
class
Project
;
class
PROJECTEXPLORER_EXPORT
BuildConfiguration
:
public
QObject
{
Q_OBJECT
public:
explicit
BuildConfiguration
();
BuildConfiguration
(
const
QString
&
name
);
BuildConfiguration
(
const
QString
&
name
,
BuildConfiguration
*
source
);
void
setName
(
const
QString
&
name
);
QString
name
()
const
;
QString
displayName
()
const
;
void
setDisplayName
(
const
QString
&
name
);
QVariant
value
(
const
QString
&
key
)
const
;
void
setValue
(
const
QString
&
key
,
QVariant
value
);
QMap
<
QString
,
QVariant
>
toMap
()
const
;
void
setValuesFromMap
(
QMap
<
QString
,
QVariant
>
map
);
private:
void
setName
(
const
QString
&
name
);
QHash
<
QString
,
QVariant
>
m_values
;
QString
m_name
;
friend
class
Project
;
};
class
PROJECTEXPLORER_EXPORT
IBuildConfigurationFactory
:
public
QObject
...
...
src/plugins/projectexplorer/buildsettingspropertiespage.cpp
View file @
5f9cb8fe
...
...
@@ -272,6 +272,7 @@ void BuildSettingsWidget::createConfiguration()
QAction
*
action
=
qobject_cast
<
QAction
*>
(
sender
());
const
QString
&
type
=
action
->
data
().
toString
();
if
(
m_project
->
buildConfigurationFactory
()
->
create
(
type
))
{
// TODO switching to last buildconfiguration in list might not be what we want
m_buildConfiguration
=
m_project
->
buildConfigurations
().
last
()
->
name
();
updateBuildSettings
();
}
...
...
src/plugins/projectexplorer/project.cpp
View file @
5f9cb8fe
...
...
@@ -216,7 +216,7 @@ bool Project::restoreSettings()
if
(
!
restoreSettingsImpl
(
reader
))
return
false
;
if
(
m_activeBuildConfiguration
.
isEmpty
()
&&
!
m_buildConfigurations
.
isEmpty
())
if
(
m_activeBuildConfiguration
.
isEmpty
()
&&
!
m_buildConfiguration
Value
s
.
isEmpty
())
setActiveBuildConfiguration
(
m_buildConfigurationValues
.
at
(
0
));
if
(
!
m_activeRunConfiguration
&&
!
m_runConfigurations
.
isEmpty
())
...
...
src/plugins/projectexplorer/project.h
View file @
5f9cb8fe
...
...
@@ -101,6 +101,7 @@ public:
void
copyBuildConfiguration
(
const
QString
&
source
,
const
QString
&
dest
);
BuildConfiguration
*
buildConfiguration
(
const
QString
&
name
)
const
;
QList
<
BuildConfiguration
*>
buildConfigurations
()
const
;
// remove and add "QString uniqueConfigurationDisplayName(const QString &proposedName) const" instead
void
setDisplayNameFor
(
BuildConfiguration
*
configuration
,
const
QString
&
displayName
);
BuildConfiguration
*
activeBuildConfiguration
()
const
;
void
setActiveBuildConfiguration
(
BuildConfiguration
*
configuration
);
...
...
@@ -184,7 +185,6 @@ protected:
private:
QList
<
BuildStep
*>
m_buildSteps
;
QList
<
BuildStep
*>
m_cleanSteps
;
QStringList
m_buildConfigurations
;
QMap
<
QString
,
QVariant
>
m_values
;
QList
<
BuildConfiguration
*>
m_buildConfigurationValues
;
QString
m_activeBuildConfiguration
;
...
...
Write
Preview
Supports
Markdown
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