Merge remote-tracking branch 'origin/4.5'

Change-Id: I32715e2fdbb14e4fccc4c58d3fd6052d7c1127f3
This commit is contained in:
Eike Ziller
2017-11-24 10:03:38 +01:00
17 changed files with 218 additions and 117 deletions

View File

@@ -40,6 +40,7 @@ CMakeInputsNode::CMakeInputsNode(const Utils::FileName &cmakeLists) :
setPriority(Node::DefaultPriority - 10); // Bottom most!
setDisplayName(QCoreApplication::translate("CMakeFilesProjectNode", "CMake Modules"));
setIcon(QIcon(":/projectexplorer/images/session.png")); // TODO: Use a better icon!
setListInProject(false);
}
QByteArray CMakeInputsNode::generateId(const Utils::FileName &inputFile)
@@ -57,6 +58,7 @@ CMakeListsNode::CMakeListsNode(const Utils::FileName &cmakeListPath) :
{
static QIcon folderIcon = Core::FileIconProvider::directoryIcon(Constants::FILEOVERLAY_CMAKE);
setIcon(folderIcon);
setListInProject(false);
}
bool CMakeListsNode::showInSimpleTree() const
@@ -69,6 +71,7 @@ CMakeProjectNode::CMakeProjectNode(const Utils::FileName &directory) :
{
setPriority(Node::DefaultProjectPriority + 1000);
setIcon(QIcon(":/projectexplorer/images/projectexplorer.png")); // TODO: Use proper icon!
setListInProject(false);
}
bool CMakeProjectNode::showInSimpleTree() const
@@ -86,6 +89,7 @@ CMakeTargetNode::CMakeTargetNode(const Utils::FileName &directory, const QString
{
setPriority(Node::DefaultProjectPriority + 900);
setIcon(QIcon(":/projectexplorer/images/build.png")); // TODO: Use proper icon!
setListInProject(false);
}
QByteArray CMakeTargetNode::generateId(const Utils::FileName &directory, const QString &target)

View File

@@ -39,6 +39,7 @@
#include <utils/detailswidget.h>
#include <utils/fancylineedit.h>
#include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
@@ -64,7 +65,17 @@ const char TITLE_KEY[] = "CMakeProjectManager.CMakeRunConfiguation.Title";
CMakeRunConfiguration::CMakeRunConfiguration(Target *target)
: RunConfiguration(target)
{
addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier()));
// Workaround for QTCREATORBUG-19354:
auto cmakeRunEnvironmentModifier = [](RunConfiguration *rc, Utils::Environment &env) {
if (!Utils::HostOsInfo::isWindowsHost() || !rc)
return;
const Kit *k = rc->target()->kit();
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(k);
if (qt)
env.prependOrSetPath(qt->qmakeProperty("QT_INSTALL_BINS"));
};
addExtraAspect(new LocalEnvironmentAspect(this, cmakeRunEnvironmentModifier));
addExtraAspect(new ArgumentsAspect(this, "CMakeProjectManager.CMakeRunConfiguration.Arguments"));
addExtraAspect(new TerminalAspect(this, "CMakeProjectManager.CMakeRunConfiguration.UseTerminal"));
addExtraAspect(new WorkingDirectoryAspect(this, "CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"));