Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
52d07a9b
Commit
52d07a9b
authored
Dec 14, 2009
by
dt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BuildConfigurations know their project, these signals can be simpler
parent
b5099480
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
22 deletions
+13
-22
src/plugins/projectexplorer/project.cpp
src/plugins/projectexplorer/project.cpp
+2
-2
src/plugins/projectexplorer/project.h
src/plugins/projectexplorer/project.h
+3
-5
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+0
-1
src/plugins/projectexplorer/projectwindow.cpp
src/plugins/projectexplorer/projectwindow.cpp
+6
-10
src/plugins/projectexplorer/projectwindow.h
src/plugins/projectexplorer/projectwindow.h
+2
-4
No files found.
src/plugins/projectexplorer/project.cpp
View file @
52d07a9b
...
...
@@ -85,7 +85,7 @@ void Project::addBuildConfiguration(BuildConfiguration *configuration)
// add it
m_buildConfigurationValues
.
push_back
(
configuration
);
emit
addedBuildConfiguration
(
this
,
configuration
);
emit
addedBuildConfiguration
(
configuration
);
}
void
Project
::
removeBuildConfiguration
(
BuildConfiguration
*
configuration
)
...
...
@@ -96,7 +96,7 @@ void Project::removeBuildConfiguration(BuildConfiguration *configuration)
m_buildConfigurationValues
.
removeOne
(
configuration
);
emit
removedBuildConfiguration
(
this
,
configuration
);
emit
removedBuildConfiguration
(
configuration
);
delete
configuration
;
}
...
...
src/plugins/projectexplorer/project.h
View file @
52d07a9b
...
...
@@ -127,9 +127,7 @@ signals:
void
fileListChanged
();
// TODO clean up signal names
// might be better to also have
// a aboutToRemoveRunConfiguration
// and a removedBuildConfiguration
// might be better to also have aboutToRemove signals
// a runconfiguration display name changed is missing
void
activeBuildConfigurationChanged
();
void
activeRunConfigurationChanged
();
...
...
@@ -138,8 +136,8 @@ signals:
void
removedRunConfiguration
(
ProjectExplorer
::
Project
*
p
,
const
QString
&
name
);
void
addedRunConfiguration
(
ProjectExplorer
::
Project
*
p
,
const
QString
&
name
);
void
removedBuildConfiguration
(
ProjectExplorer
::
Project
*
p
,
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
addedBuildConfiguration
(
ProjectExplorer
::
Project
*
p
,
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
removedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
addedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
bc
);
protected:
/* This method is called when the project .user file is saved. Simply call
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
52d07a9b
...
...
@@ -836,7 +836,6 @@ void ProjectExplorerPlugin::unloadProject()
QList
<
Core
::
IFile
*>
filesToSave
;
filesToSave
<<
fi
;
// FIXME: What we want here is to check whether we need to safe any of the pro/pri files in this project
// check the number of modified files
int
readonlycount
=
0
;
...
...
src/plugins/projectexplorer/projectwindow.cpp
View file @
52d07a9b
...
...
@@ -518,10 +518,10 @@ BuildConfigurationComboBox::BuildConfigurationComboBox(Project *p, QWidget *pare
// this, SLOT(nameChanged(ProjectExplorer::BuildConfiguration *)));
connect
(
p
,
SIGNAL
(
activeBuildConfigurationChanged
()),
this
,
SLOT
(
activeConfigurationChanged
()));
connect
(
p
,
SIGNAL
(
addedBuildConfiguration
(
ProjectExplorer
::
Project
*
,
ProjectExplorer
::
BuildConfiguration
*
)),
this
,
SLOT
(
addedBuildConfiguration
(
ProjectExplorer
::
Project
*
,
ProjectExplorer
::
BuildConfiguration
*
)));
connect
(
p
,
SIGNAL
(
removedBuildConfiguration
(
ProjectExplorer
::
Project
*
,
ProjectExplorer
::
BuildConfiguration
*
)),
this
,
SLOT
(
removedBuildConfiguration
(
ProjectExplorer
::
Project
*
,
ProjectExplorer
::
BuildConfiguration
*
)));
connect
(
p
,
SIGNAL
(
addedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
)),
this
,
SLOT
(
addedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
)));
connect
(
p
,
SIGNAL
(
removedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
)),
this
,
SLOT
(
removedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
)));
connect
(
m_comboBox
,
SIGNAL
(
activated
(
int
)),
this
,
SLOT
(
changedIndex
(
int
)));
}
...
...
@@ -560,10 +560,8 @@ void BuildConfigurationComboBox::activeConfigurationChanged()
ignoreIndexChange
=
false
;
}
void
BuildConfigurationComboBox
::
addedBuildConfiguration
(
ProjectExplorer
::
Project
*
project
,
ProjectExplorer
::
BuildConfiguration
*
bc
)
void
BuildConfigurationComboBox
::
addedBuildConfiguration
(
BuildConfiguration
*
bc
)
{
Q_UNUSED
(
project
);
ignoreIndexChange
=
true
;
m_comboBox
->
addItem
(
bc
->
displayName
(),
QVariant
::
fromValue
(
bc
));
...
...
@@ -572,10 +570,8 @@ void BuildConfigurationComboBox::addedBuildConfiguration(ProjectExplorer::Projec
ignoreIndexChange
=
false
;
}
void
BuildConfigurationComboBox
::
removedBuildConfiguration
(
ProjectExplorer
::
Project
*
project
,
BuildConfiguration
*
bc
)
void
BuildConfigurationComboBox
::
removedBuildConfiguration
(
BuildConfiguration
*
bc
)
{
Q_UNUSED
(
project
);
ignoreIndexChange
=
true
;
const
int
index
(
buildConfigurationToIndex
(
bc
));
if
(
index
==
-
1
)
...
...
src/plugins/projectexplorer/projectwindow.h
View file @
52d07a9b
...
...
@@ -97,10 +97,8 @@ public:
private
slots
:
void
nameChanged
(
BuildConfiguration
*
bc
);
void
activeConfigurationChanged
();
void
addedBuildConfiguration
(
ProjectExplorer
::
Project
*
project
,
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
removedBuildConfiguration
(
ProjectExplorer
::
Project
*
project
,
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
addedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
removedBuildConfiguration
(
ProjectExplorer
::
BuildConfiguration
*
bc
);
void
changedIndex
(
int
newIndex
);
private:
int
buildConfigurationToIndex
(
BuildConfiguration
*
bc
);
...
...
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