summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/buildmanager.cpp4
-rw-r--r--src/plugins/projectexplorer/buildmanager.h3
-rw-r--r--src/plugins/projectexplorer/buildsystem.cpp2
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp1
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp26
-rw-r--r--src/plugins/projectexplorer/projectexplorer.h4
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp16
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h5
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp1
-rw-r--r--src/plugins/projectexplorer/taskwindow.h1
12 files changed, 28 insertions, 39 deletions
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index c777a61ee8..4f866490a1 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -779,7 +779,7 @@ void AppOutputPane::slotRunControlFinished2(RunControl *sender)
if (current && current == sender)
enableButtons(current);
- emit ProjectExplorerPlugin::instance()->updateRunActions();
+ ProjectExplorerPlugin::updateRunActions();
#ifdef Q_OS_WIN
const bool isRunning = Utils::anyOf(m_runControlTabs, [](const RunControlTab &rt) {
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index ad9e980e01..a93a33d1aa 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -183,7 +183,7 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
connect(this, &BuildConfiguration::enabledChanged, this, [this] {
if (isActive() && project() == SessionManager::startupProject()) {
ProjectExplorerPlugin::updateActions();
- emit ProjectExplorerPlugin::instance()->updateRunActions();
+ ProjectExplorerPlugin::updateRunActions();
}
});
}
diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp
index 720b501681..27c46a54a6 100644
--- a/src/plugins/projectexplorer/buildmanager.cpp
+++ b/src/plugins/projectexplorer/buildmanager.cpp
@@ -265,9 +265,6 @@ BuildManager::BuildManager(QObject *parent, QAction *cancelBuildAction)
connect(d->m_taskWindow, &Internal::TaskWindow::tasksChanged,
this, &BuildManager::updateTaskCount);
- connect(d->m_taskWindow, &Internal::TaskWindow::tasksCleared,
- this,&BuildManager::tasksCleared);
-
connect(&d->m_progressWatcher, &QFutureWatcherBase::canceled,
this, &BuildManager::cancel);
connect(&d->m_progressWatcher, &QFutureWatcherBase::finished,
@@ -457,7 +454,6 @@ void BuildManager::updateTaskCount()
{
const int errors = getErrorTaskCount();
ProgressManager::setApplicationLabel(errors > 0 ? QString::number(errors) : QString());
- emit m_instance->tasksChanged();
}
void BuildManager::finish()
diff --git a/src/plugins/projectexplorer/buildmanager.h b/src/plugins/projectexplorer/buildmanager.h
index 29351b2eb6..d62786ed81 100644
--- a/src/plugins/projectexplorer/buildmanager.h
+++ b/src/plugins/projectexplorer/buildmanager.h
@@ -102,9 +102,6 @@ public slots:
signals:
void buildStateChanged(ProjectExplorer::Project *pro);
void buildQueueFinished(bool success);
- void tasksChanged();
- void taskAdded(const ProjectExplorer::Task &task);
- void tasksCleared();
private:
static void addToTaskWindow(const ProjectExplorer::Task &task, int linkedOutputLines, int skipLines);
diff --git a/src/plugins/projectexplorer/buildsystem.cpp b/src/plugins/projectexplorer/buildsystem.cpp
index f360ea6648..ea299cd522 100644
--- a/src/plugins/projectexplorer/buildsystem.cpp
+++ b/src/plugins/projectexplorer/buildsystem.cpp
@@ -316,7 +316,7 @@ void BuildSystem::emitBuildSystemUpdated()
QString BuildSystem::disabledReason(const QString &buildKey) const
{
- if (hasParsingData()) {
+ if (!hasParsingData()) {
QString msg = isParsing() ? tr("The project is currently being parsed.")
: tr("The project could not be fully parsed.");
const FilePath projectFilePath = buildTarget(buildKey).projectFilePath;
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 2ab52663d0..9748b52f7f 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -2053,6 +2053,7 @@ Utils::optional<QString> MsvcToolChain::generateEnvironmentSettings(const Utils:
}
if (Utils::HostOsInfo::isWindowsHost())
saver.write("chcp 65001\r\n");
+ saver.write("set VSCMD_SKIP_SENDTELEMETRY=1\r\n");
saver.write(call + "\r\n");
saver.write("@echo " + marker.toLocal8Bit() + "\r\n");
saver.write("set\r\n");
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 575543d77b..af5973fb4b 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -453,7 +453,7 @@ public:
void activeRunConfigurationChanged();
void activeBuildConfigurationChanged();
- void slotUpdateRunActions();
+ void doUpdateRunActions();
void currentModeChanged(Core::Id mode, Core::Id oldMode);
@@ -1714,8 +1714,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
connect(dd->m_projectTreeExpandAllAction, &QAction::triggered,
ProjectTree::instance(), &ProjectTree::expandAll);
- connect(this, &ProjectExplorerPlugin::updateRunActions,
- dd, &ProjectExplorerPluginPrivate::slotUpdateRunActions);
connect(this, &ProjectExplorerPlugin::settingsChanged,
dd, &ProjectExplorerPluginPrivate::updateRunWithoutDeployMenu);
@@ -2483,7 +2481,7 @@ void ProjectExplorerPluginPrivate::startRunControl(RunControl *runControl)
Qt::QueuedConnection);
++m_activeRunControlCount;
runControl->initiateStart();
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
void ProjectExplorerPluginPrivate::showOutputPaneForRunControl(RunControl *runControl)
@@ -2540,7 +2538,7 @@ void ProjectExplorerPluginPrivate::buildQueueFinished(bool success)
m_delayedRunConfiguration = nullptr;
m_shouldHaveRunConfiguration = false;
m_runMode = Constants::NO_RUN_MODE;
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
QList<QPair<QString, QString> > ProjectExplorerPluginPrivate::recentProjects() const
@@ -2903,7 +2901,8 @@ void ProjectExplorerPlugin::runRunConfiguration(RunConfiguration *rc,
dd->executeRunConfiguration(rc, runMode);
break;
}
- emit m_instance->updateRunActions();
+
+ dd->doUpdateRunActions();
}
QList<QPair<Runnable, Utils::ProcessHandle>> ProjectExplorerPlugin::runningRunControlProcesses()
@@ -3001,7 +3000,7 @@ void ProjectExplorerPluginPrivate::activeRunConfigurationChanged()
if (rc == previousRunConfiguration)
return;
updateActions();
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
void ProjectExplorerPluginPrivate::activeBuildConfigurationChanged()
@@ -3015,7 +3014,7 @@ void ProjectExplorerPluginPrivate::activeBuildConfigurationChanged()
return;
updateActions();
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
void ProjectExplorerPluginPrivate::updateDeployActions()
@@ -3064,7 +3063,7 @@ void ProjectExplorerPluginPrivate::updateDeployActions()
enableDeploySessionAction = false;
m_deploySessionAction->setEnabled(enableDeploySessionAction);
- emit m_instance->updateRunActions();
+ doUpdateRunActions();
}
bool ProjectExplorerPlugin::canRunStartupProject(Core::Id runMode, QString *whyNot)
@@ -3139,13 +3138,15 @@ bool ProjectExplorerPlugin::canRunStartupProject(Core::Id runMode, QString *whyN
return true;
}
-void ProjectExplorerPluginPrivate::slotUpdateRunActions()
+void ProjectExplorerPluginPrivate::doUpdateRunActions()
{
QString whyNot;
const bool state = ProjectExplorerPlugin::canRunStartupProject(Constants::NORMAL_RUN_MODE, &whyNot);
m_runAction->setEnabled(state);
m_runAction->setToolTip(whyNot);
m_runWithoutDeployAction->setEnabled(state);
+
+ emit m_instance->runActionsUpdated();
}
void ProjectExplorerPluginPrivate::addToRecentProjects(const QString &fileName, const QString &displayName)
@@ -4002,6 +4003,11 @@ void ProjectExplorerPlugin::removeFromRecentProjects(const QString &fileName,
dd->removeFromRecentProjects(fileName, displayName);
}
+void ProjectExplorerPlugin::updateRunActions()
+{
+ dd->doUpdateRunActions();
+}
+
QList<QPair<QString, QString> > ProjectExplorerPlugin::recentProjects()
{
return dd->recentProjects();
diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h
index 2c803aa784..afc84671cb 100644
--- a/src/plugins/projectexplorer/projectexplorer.h
+++ b/src/plugins/projectexplorer/projectexplorer.h
@@ -182,6 +182,8 @@ public:
static void clearRecentProjects();
static void removeFromRecentProjects(const QString &fileName, const QString &displayName);
+ static void updateRunActions();
+
signals:
void finishedInitialization();
@@ -193,7 +195,7 @@ signals:
void settingsChanged();
- void updateRunActions();
+ void runActionsUpdated();
private:
static bool coreAboutToClose();
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 8a6f7afaa4..b1128896f6 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -203,11 +203,6 @@ RunConfiguration::RunConfiguration(Target *target, Core::Id id)
RunConfiguration::~RunConfiguration() = default;
-bool RunConfiguration::isActive() const
-{
- return target()->isActive() && target()->activeRunConfiguration() == this;
-}
-
QString RunConfiguration::disabledReason() const
{
BuildSystem *bs = activeBuildSystem();
@@ -252,11 +247,6 @@ QMap<Core::Id, QVariantMap> RunConfiguration::aspectData() const
return data;
}
-BuildConfiguration *RunConfiguration::activeBuildConfiguration() const
-{
- return target()->activeBuildConfiguration();
-}
-
BuildSystem *RunConfiguration::activeBuildSystem() const
{
return target()->buildSystem();
@@ -304,8 +294,10 @@ void RunConfiguration::update()
emit enabledChanged();
- if (isActive() && project() == SessionManager::startupProject())
- emit ProjectExplorerPlugin::instance()->updateRunActions();
+ const bool isActive = target()->isActive() && target()->activeRunConfiguration() == this;
+
+ if (isActive && project() == SessionManager::startupProject())
+ ProjectExplorerPlugin::updateRunActions();
}
BuildTargetInfo RunConfiguration::buildTargetInfo() const
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index f79001a571..437d3f4ef0 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -128,8 +128,6 @@ class PROJECTEXPLORER_EXPORT RunConfiguration : public ProjectConfiguration
public:
~RunConfiguration() override;
- bool isActive() const;
-
virtual QString disabledReason() const;
virtual bool isEnabled() const;
@@ -179,8 +177,7 @@ signals:
protected:
RunConfiguration(Target *target, Core::Id id);
- /// convenience function to get current build configuration.
- BuildConfiguration *activeBuildConfiguration() const;
+ /// convenience function to get current build system. Try to avoid.
BuildSystem *activeBuildSystem() const;
using Updater = std::function<void()>;
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index d7f0c92c84..9548be0552 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -380,7 +380,6 @@ void TaskWindow::clearTasks(Core::Id categoryId)
d->m_model->clearTasks(categoryId);
emit tasksChanged();
- emit tasksCleared();
navigateStateChanged();
}
diff --git a/src/plugins/projectexplorer/taskwindow.h b/src/plugins/projectexplorer/taskwindow.h
index efefb72658..7f11ca1fb1 100644
--- a/src/plugins/projectexplorer/taskwindow.h
+++ b/src/plugins/projectexplorer/taskwindow.h
@@ -79,7 +79,6 @@ public:
signals:
void tasksChanged();
- void tasksCleared();
private:
void updateFilter() override;