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
91198532
Commit
91198532
authored
Nov 26, 2009
by
dt
Browse files
Make setDisplayName easier and break displayName signals
Fix for that will come later
parent
801e9948
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/buildconfiguration.cpp
View file @
91198532
...
...
@@ -80,7 +80,10 @@ QString BuildConfiguration::displayName() const
void
BuildConfiguration
::
setDisplayName
(
const
QString
&
name
)
{
if
(
value
(
"ProjectExplorer.BuildConfiguration.DisplayName"
).
toString
()
==
name
)
return
;
setValue
(
"ProjectExplorer.BuildConfiguration.DisplayName"
,
name
);
emit
displayNameChanged
();
}
QVariant
BuildConfiguration
::
value
(
const
QString
&
key
)
const
...
...
src/plugins/projectexplorer/buildconfiguration.h
View file @
91198532
...
...
@@ -82,6 +82,7 @@ public:
signals:
void
environmentChanged
();
void
buildDirectoryChanged
();
void
displayNameChanged
();
protected:
BuildConfiguration
(
Project
*
project
);
...
...
src/plugins/projectexplorer/buildsettingspropertiespage.cpp
View file @
91198532
...
...
@@ -200,8 +200,7 @@ BuildSettingsWidget::BuildSettingsWidget(Project *project)
connect
(
m_removeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
deleteConfiguration
()));
connect
(
m_project
,
SIGNAL
(
buildConfigurationDisplayNameChanged
(
ProjectExplorer
::
BuildConfiguration
*
)),
this
,
SLOT
(
buildConfigurationDisplayNameChanged
(
ProjectExplorer
::
BuildConfiguration
*
)));
// TODO update on displayNameChange
connect
(
m_project
,
SIGNAL
(
activeBuildConfigurationChanged
()),
this
,
SLOT
(
checkMakeActiveLabel
()));
...
...
@@ -231,17 +230,6 @@ void BuildSettingsWidget::updateAddButtonMenu()
}
}
void
BuildSettingsWidget
::
buildConfigurationDisplayNameChanged
(
BuildConfiguration
*
bc
)
{
for
(
int
i
=
0
;
i
<
m_buildConfigurationComboBox
->
count
();
++
i
)
{
if
(
m_buildConfigurationComboBox
->
itemData
(
i
).
value
<
BuildConfiguration
*>
()
==
bc
)
{
m_buildConfigurationComboBox
->
setItemText
(
i
,
bc
->
displayName
());
break
;
}
}
}
void
BuildSettingsWidget
::
updateBuildSettings
()
{
// TODO save position, entry from combbox
...
...
@@ -350,7 +338,7 @@ void BuildSettingsWidget::cloneConfiguration(BuildConfiguration *sourceConfigura
newDisplayName
=
Project
::
makeUnique
(
newDisplayName
,
buildConfigurationDisplayNames
);
m_buildConfiguration
=
m_project
->
buildConfigurationFactory
()
->
clone
(
sourceConfiguration
);
m_
project
->
setDisplayNameFor
(
m_buildConfiguration
,
newDisplayName
);
m_
buildConfiguration
->
setDisplayName
(
newDisplayName
);
updateBuildSettings
();
}
...
...
src/plugins/projectexplorer/buildsettingspropertiespage.h
View file @
91198532
...
...
@@ -94,7 +94,6 @@ public:
~
BuildSettingsWidget
();
private
slots
:
void
buildConfigurationDisplayNameChanged
(
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
updateBuildSettings
();
void
currentIndexChanged
(
int
index
);
void
activeBuildConfigurationChanged
();
...
...
src/plugins/projectexplorer/buildstepspage.cpp
View file @
91198532
...
...
@@ -49,6 +49,7 @@ BuildStepsPage::BuildStepsPage(Project *project, bool clean) :
BuildConfigWidget
(),
m_clean
(
clean
)
{
Q_UNUSED
(
project
)
m_vbox
=
new
QVBoxLayout
(
this
);
m_vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_vbox
->
setSpacing
(
0
);
...
...
src/plugins/projectexplorer/project.cpp
View file @
91198532
...
...
@@ -463,23 +463,6 @@ EditorConfiguration *Project::editorConfiguration() const
return
m_editorConfiguration
;
}
void
Project
::
setDisplayNameFor
(
BuildConfiguration
*
configuration
,
const
QString
&
displayName
)
{
if
(
configuration
->
displayName
()
==
displayName
)
return
;
QString
dn
=
displayName
;
QStringList
displayNames
;
foreach
(
BuildConfiguration
*
bc
,
m_buildConfigurationValues
)
{
if
(
bc
!=
configuration
)
displayNames
<<
bc
->
displayName
();
}
dn
=
makeUnique
(
displayName
,
displayNames
);
configuration
->
setDisplayName
(
displayName
);
emit
buildConfigurationDisplayNameChanged
(
configuration
);
}
QByteArray
Project
::
predefinedMacros
(
const
QString
&
)
const
{
return
QByteArray
();
...
...
src/plugins/projectexplorer/project.h
View file @
91198532
...
...
@@ -88,10 +88,6 @@ public:
void
removeBuildConfiguration
(
BuildConfiguration
*
configuration
);
QList
<
BuildConfiguration
*>
buildConfigurations
()
const
;
// remove and add "QString uniqueConfigurationDisplayName(const QString &proposedName) const" instead
// move into BuildConfiguration *
void
setDisplayNameFor
(
BuildConfiguration
*
configuration
,
const
QString
&
displayName
);
BuildConfiguration
*
activeBuildConfiguration
()
const
;
void
setActiveBuildConfiguration
(
BuildConfiguration
*
configuration
);
...
...
@@ -146,10 +142,6 @@ signals:
void
removedBuildConfiguration
(
ProjectExplorer
::
Project
*
p
,
BuildConfiguration
*
bc
);
void
addedBuildConfiguration
(
ProjectExplorer
::
Project
*
p
,
BuildConfiguration
*
bc
);
// This signal is jut there for updating the tree list in the buildsettings wizard
void
buildConfigurationDisplayNameChanged
(
BuildConfiguration
*
bc
);
protected:
/* This method is called when the project .user file is saved. Simply call
* writer.saveValue() for each value you want to save. Make sure to always
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
91198532
...
...
@@ -343,7 +343,7 @@ Qt4BuildConfiguration *Qt4Project::activeQt4BuildConfiguration() const
void
Qt4Project
::
defaultQtVersionChanged
()
{
if
(
static_cast
<
Qt4BuildConfiguration
*>
(
activeBuildConfiguration
()
)
->
qtVersionId
()
==
0
)
if
(
active
Qt4
BuildConfiguration
()
->
qtVersionId
()
==
0
)
m_rootProjectNode
->
update
();
}
...
...
src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
View file @
91198532
...
...
@@ -165,7 +165,7 @@ void Qt4ProjectConfigWidget::init(ProjectExplorer::BuildConfiguration *bc)
void
Qt4ProjectConfigWidget
::
changeConfigName
(
const
QString
&
newName
)
{
m_buildConfiguration
->
project
()
->
setDisplayName
For
(
m_buildConfiguration
,
newName
);
m_buildConfiguration
->
setDisplayName
(
newName
);
}
void
Qt4ProjectConfigWidget
::
setupQtVersionsComboBox
()
...
...
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