forked from qt-creator/qt-creator
ProjectExplorer: Use Qt5-style connects and clean up
Clean up code a bit: Remove private slots, etc. Change-Id: I745925c76ed4e0be69a11ca911741309fc4286e7 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -180,12 +180,10 @@ void Project::addTarget(Target *t)
|
|||||||
|
|
||||||
// add it
|
// add it
|
||||||
d->m_targets.push_back(t);
|
d->m_targets.push_back(t);
|
||||||
connect(t, SIGNAL(environmentChanged()),
|
connect(t, &Target::environmentChanged, this, &Project::changeEnvironment);
|
||||||
SLOT(changeEnvironment()));
|
connect(t, &Target::buildConfigurationEnabledChanged,
|
||||||
connect(t, SIGNAL(buildConfigurationEnabledChanged()),
|
this, &Project::changeBuildConfigurationEnabled);
|
||||||
this, SLOT(changeBuildConfigurationEnabled()));
|
connect(t, &Target::buildDirectoryChanged, this, &Project::onBuildDirectoryChanged);
|
||||||
connect(t, SIGNAL(buildDirectoryChanged()),
|
|
||||||
this, SLOT(onBuildDirectoryChanged()));
|
|
||||||
emit addedTarget(t);
|
emit addedTarget(t);
|
||||||
|
|
||||||
// check activeTarget:
|
// check activeTarget:
|
||||||
|
@@ -61,8 +61,7 @@ class Target;
|
|||||||
class ProjectPrivate;
|
class ProjectPrivate;
|
||||||
|
|
||||||
// Documentation inside.
|
// Documentation inside.
|
||||||
class PROJECTEXPLORER_EXPORT Project
|
class PROJECTEXPLORER_EXPORT Project : public QObject
|
||||||
: public QObject
|
|
||||||
{
|
{
|
||||||
friend class SessionManager; // for setActiveTarget
|
friend class SessionManager; // for setActiveTarget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -180,12 +179,11 @@ protected:
|
|||||||
void removeProjectLanguage(Core::Id id);
|
void removeProjectLanguage(Core::Id id);
|
||||||
void setProjectLanguage(Core::Id id, bool enabled);
|
void setProjectLanguage(Core::Id id, bool enabled);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void changeEnvironment();
|
void changeEnvironment();
|
||||||
void changeBuildConfigurationEnabled();
|
void changeBuildConfigurationEnabled();
|
||||||
void onBuildDirectoryChanged();
|
void onBuildDirectoryChanged();
|
||||||
|
|
||||||
private:
|
|
||||||
void setActiveTarget(Target *target);
|
void setActiveTarget(Target *target);
|
||||||
ProjectPrivate *d;
|
ProjectPrivate *d;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user