summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-11-12 13:43:08 +0100
committerEike Ziller <eike.ziller@theqtcompany.com>2015-11-12 13:43:17 +0100
commitd13b22e6bc43a0196c123164b2927b1b45ab3dcc (patch)
tree8a85de65ff9a59788d428de9e3d92d04b9c9f9b2 /src/plugins/projectexplorer
parent2afae6f2c6fbbbfdbb2da51646de6aa613a71d38 (diff)
parent0bcddcd0140f9daf54ba0b74b4afc3736c225fe0 (diff)
downloadqt-creator-d13b22e6bc43a0196c123164b2927b1b45ab3dcc.tar.gz
Merge remote-tracking branch 'origin/3.6'
Conflicts: src/plugins/coreplugin/editormanager/editormanager.cpp Change-Id: Ibdf433b54e36e58182b7094f78d47ed3e8c81684
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/dependenciespanel.cpp3
-rw-r--r--src/plugins/projectexplorer/deploymentdataview.ui21
-rw-r--r--src/plugins/projectexplorer/environmentwidget.cpp3
-rw-r--r--src/plugins/projectexplorer/kitmanager.cpp4
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp17
-rw-r--r--src/plugins/projectexplorer/projectwizardpage.cpp21
-rw-r--r--src/plugins/projectexplorer/waitforstopdialog.h1
7 files changed, 49 insertions, 21 deletions
diff --git a/src/plugins/projectexplorer/dependenciespanel.cpp b/src/plugins/projectexplorer/dependenciespanel.cpp
index 019d614d44..f569bc76e2 100644
--- a/src/plugins/projectexplorer/dependenciespanel.cpp
+++ b/src/plugins/projectexplorer/dependenciespanel.cpp
@@ -233,7 +233,8 @@ DependenciesWidget::DependenciesWidget(Project *project, QWidget *parent)
layout->addItem(new QSpacerItem(0, 0 , QSizePolicy::Expanding, QSizePolicy::Fixed), 0, 1);
m_cascadeSetActiveCheckBox = new QCheckBox;
- m_cascadeSetActiveCheckBox->setText(tr("Synchronize active kit, build, and deploy configuration between projects."));
+ m_cascadeSetActiveCheckBox->setText(tr("Synchronize configuration"));
+ m_cascadeSetActiveCheckBox->setToolTip(tr("Synchronize active kit, build, and deploy configuration between projects."));
m_cascadeSetActiveCheckBox->setChecked(SessionManager::isProjectConfigurationCascading());
connect(m_cascadeSetActiveCheckBox, &QCheckBox::toggled,
SessionManager::instance(), &SessionManager::setProjectConfigurationCascading);
diff --git a/src/plugins/projectexplorer/deploymentdataview.ui b/src/plugins/projectexplorer/deploymentdataview.ui
index ea1bca0994..fce1e99706 100644
--- a/src/plugins/projectexplorer/deploymentdataview.ui
+++ b/src/plugins/projectexplorer/deploymentdataview.ui
@@ -14,6 +14,18 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
<item>
<widget class="QLabel" name="label">
<property name="text">
@@ -22,7 +34,14 @@
</widget>
</item>
<item>
- <widget class="QTreeView" name="deploymentDataView"/>
+ <widget class="QTreeView" name="deploymentDataView">
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>100</height>
+ </size>
+ </property>
+ </widget>
</item>
</layout>
</widget>
diff --git a/src/plugins/projectexplorer/environmentwidget.cpp b/src/plugins/projectexplorer/environmentwidget.cpp
index 2ea3f3d0bb..af0829792c 100644
--- a/src/plugins/projectexplorer/environmentwidget.cpp
+++ b/src/plugins/projectexplorer/environmentwidget.cpp
@@ -52,6 +52,7 @@ namespace ProjectExplorer {
class EnvironmentValidator : public QValidator
{
+ Q_OBJECT
public:
EnvironmentValidator(QWidget *parent, Utils::EnvironmentModel *model,
QTreeView *view,
@@ -409,3 +410,5 @@ void Internal::EnvironmentTreeView::keyPressEvent(QKeyEvent *event)
} // namespace ProjectExplorer
+
+#include "environmentwidget.moc"
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
index 0125b0e8a9..05f75c3df5 100644
--- a/src/plugins/projectexplorer/kitmanager.cpp
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -171,6 +171,8 @@ void KitManager::restoreKits()
Kit *toStore = 0;
foreach (Kit *current, kitsToValidate) {
toStore = current;
+ toStore->setup(); // Make sure all kitinformation are properly set up before merging them
+ // with the information from the user settings file
// Check whether we had this kit stored and prefer the stored one:
for (int i = 0; i < kitsToCheck.count(); ++i) {
@@ -191,8 +193,6 @@ void KitManager::restoreKits()
break;
}
}
- if (toStore == current)
- toStore->setup();
addKit(toStore);
sdkKits << toStore;
}
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 69cad4e824..c4db9a25e6 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1161,10 +1161,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_projectExplorerSettings.environmentId = QUuid::createUuid();
int tmp = s->value(QLatin1String("ProjectExplorer/Settings/StopBeforeBuild"),
Utils::HostOsInfo::isWindowsHost() ? 1 : 0).toInt();
- dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
if (tmp < 0 || tmp > ProjectExplorerSettings::StopAll)
tmp = Utils::HostOsInfo::isWindowsHost() ? 1 : 0;
-
dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
connect(dd->m_sessionManagerAction, &QAction::triggered,
@@ -2294,14 +2292,13 @@ int ProjectExplorerPluginPrivate::queue(QList<Project *> projects, QList<Id> ste
if (!m_instance->saveModifiedFiles())
return -1;
- if (m_projectExplorerSettings.stopBeforeBuild != ProjectExplorerSettings::StopNone) {
- QList<RunControl *> toStop;
- foreach (RunControl *rc, m_outputPane->allRunControls()) {
- if (rc->isRunning()
- && (m_projectExplorerSettings.stopBeforeBuild == ProjectExplorerSettings::StopAll
- || projects.contains(rc->project())))
- toStop << rc;
- }
+ if (m_projectExplorerSettings.stopBeforeBuild != ProjectExplorerSettings::StopNone
+ && stepIds.contains(Constants::BUILDSTEPS_BUILD)) {
+ bool stopAll = (m_projectExplorerSettings.stopBeforeBuild == ProjectExplorerSettings::StopAll);
+ const QList<RunControl *> toStop
+ = Utils::filtered(m_outputPane->allRunControls(), [&projects, stopAll](RunControl *rc) {
+ return rc->isRunning() && (stopAll || projects.contains(rc->project()));
+ });
if (!toStop.isEmpty()) {
bool stopThem = true;
diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp
index 4c0d5f99c9..965897b1e3 100644
--- a/src/plugins/projectexplorer/projectwizardpage.cpp
+++ b/src/plugins/projectexplorer/projectwizardpage.cpp
@@ -186,17 +186,22 @@ void BestNodeSelector::inspect(AddNewTree *tree, bool isContextNode)
}
if (m_deploys)
return;
+
const QString projectDirectory = ProjectExplorerPlugin::directoryFor(node);
const int projectDirectorySize = projectDirectory.size();
- if (!m_commonDirectory.startsWith(projectDirectory) && !isContextNode)
+ if (m_commonDirectory != projectDirectory
+ && !m_commonDirectory.startsWith(projectDirectory + QLatin1Char('/'))
+ && !isContextNode)
return;
- bool betterMatch = tree->priority() > 0
- && (projectDirectorySize > m_bestMatchLength
- || (projectDirectorySize == m_bestMatchLength && tree->priority() > m_bestMatchPriority));
+
+ bool betterMatch = isContextNode
+ || (tree->priority() > 0
+ && (projectDirectorySize > m_bestMatchLength
+ || (projectDirectorySize == m_bestMatchLength && tree->priority() > m_bestMatchPriority)));
if (betterMatch) {
m_bestMatchPriority = tree->priority();
- m_bestMatchLength = projectDirectorySize;
+ m_bestMatchLength = isContextNode ? std::numeric_limits<int>::max() : projectDirectorySize;
m_bestChoice = tree;
}
}
@@ -268,7 +273,8 @@ static inline AddNewTree *buildAddProjectTree(SessionNode *root, const QString &
return new AddNewTree(root, children, root->displayName());
}
-static inline AddNewTree *buildAddFilesTree(FolderNode *root, const QStringList &files, Node *contextNode, BestNodeSelector *selector)
+static inline AddNewTree *buildAddFilesTree(FolderNode *root, const QStringList &files,
+ Node *contextNode, BestNodeSelector *selector)
{
QList<AddNewTree *> children;
foreach (FolderNode *fn, root->subFolderNodes()) {
@@ -289,7 +295,8 @@ static inline AddNewTree *buildAddFilesTree(FolderNode *root, const QStringList
return new AddNewTree(root, children, root->displayName());
}
-static inline AddNewTree *buildAddFilesTree(SessionNode *root, const QStringList &files, Node *contextNode, BestNodeSelector *selector)
+static inline AddNewTree *buildAddFilesTree(SessionNode *root, const QStringList &files,
+ Node *contextNode, BestNodeSelector *selector)
{
QList<AddNewTree *> children;
foreach (ProjectNode *pn, root->projectNodes()) {
diff --git a/src/plugins/projectexplorer/waitforstopdialog.h b/src/plugins/projectexplorer/waitforstopdialog.h
index 42530caccc..ed1f04956f 100644
--- a/src/plugins/projectexplorer/waitforstopdialog.h
+++ b/src/plugins/projectexplorer/waitforstopdialog.h
@@ -46,6 +46,7 @@ namespace Internal {
class WaitForStopDialog : public QDialog
{
+ Q_OBJECT
public:
WaitForStopDialog(QList<ProjectExplorer::RunControl *> runControls);