Commit 31206920 authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk

ProjectExplorer: Use Qt5-style connects and clean up

Clean up code a bit: Remove private slots, etc.

Change-Id: I745925c76ed4e0be69a11ca911741309fc4286e7
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent d134bdfb
......@@ -180,12 +180,10 @@ void Project::addTarget(Target *t)
// add it
d->m_targets.push_back(t);
connect(t, SIGNAL(environmentChanged()),
SLOT(changeEnvironment()));
connect(t, SIGNAL(buildConfigurationEnabledChanged()),
this, SLOT(changeBuildConfigurationEnabled()));
connect(t, SIGNAL(buildDirectoryChanged()),
this, SLOT(onBuildDirectoryChanged()));
connect(t, &Target::environmentChanged, this, &Project::changeEnvironment);
connect(t, &Target::buildConfigurationEnabledChanged,
this, &Project::changeBuildConfigurationEnabled);
connect(t, &Target::buildDirectoryChanged, this, &Project::onBuildDirectoryChanged);
emit addedTarget(t);
// check activeTarget:
......
......@@ -61,8 +61,7 @@ class Target;
class ProjectPrivate;
// Documentation inside.
class PROJECTEXPLORER_EXPORT Project
: public QObject
class PROJECTEXPLORER_EXPORT Project : public QObject
{
friend class SessionManager; // for setActiveTarget
Q_OBJECT
......@@ -180,12 +179,11 @@ protected:
void removeProjectLanguage(Core::Id id);
void setProjectLanguage(Core::Id id, bool enabled);
private slots:
private:
void changeEnvironment();
void changeBuildConfigurationEnabled();
void onBuildDirectoryChanged();
private:
void setActiveTarget(Target *target);
ProjectPrivate *d;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment