Merge remote-tracking branch 'origin/4.2'

Change-Id: Ia98031eb87f1859c3736faa0cdd8b655e8a50689
This commit is contained in:
Orgad Shaneh
2016-11-14 11:15:40 +02:00
175 changed files with 2145 additions and 1563 deletions

View File

@@ -61,6 +61,7 @@ BuildDirReader::Parameters::Parameters(const CMakeBuildConfiguration *bc)
cmakeExecutable = cmake->cmakeExecutable();
pathMapper = cmake->pathMapper();
isAutorun = cmake->isAutoRun();
auto tc = ProjectExplorer::ToolChainKitInformation::toolChain(k, ProjectExplorer::ToolChain::Language::Cxx);
if (tc)

View File

@@ -83,6 +83,7 @@ public:
QString platform;
QString toolset;
QStringList generatorArguments;
bool isAutorun = false;
};
static BuildDirReader *createReader(const BuildDirReader::Parameters &p);

View File

@@ -507,7 +507,7 @@ CMakeConfig CMakeConfigurationKitInformation::defaultConfiguration(const Kit *k)
// Qt4:
config << CMakeConfigItem(CMAKE_QMAKE_KEY, "%{Qt:qmakeExecutable}");
// Qt5:
config << CMakeConfigItem(CMAKE_PREFIX_PATH_KEY, "%{Qt:QT_INSTALL_LIBS}");
config << CMakeConfigItem(CMAKE_PREFIX_PATH_KEY, "%{Qt:QT_INSTALL_PREFIX}");
config << CMakeConfigItem(CMAKE_C_TOOLCHAIN_KEY, "%{Compiler:Executable:C}");
config << CMakeConfigItem(CMAKE_CXX_TOOLCHAIN_KEY, "%{Compiler:Executable:Cxx}");
@@ -535,7 +535,7 @@ QList<Task> CMakeConfigurationKitInformation::validate(const Kit *k) const
const bool isQt4 = version && version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0);
Utils::FileName qmakePath;
QStringList qtLibDirs;
QStringList qtInstallDirs;
Utils::FileName tcCPath;
Utils::FileName tcCxxPath;
foreach (const CMakeConfigItem &i, config) {
@@ -549,7 +549,7 @@ QList<Task> CMakeConfigurationKitInformation::validate(const Kit *k) const
else if (i.key == CMAKE_CXX_TOOLCHAIN_KEY)
tcCxxPath = expandedValue;
else if (i.key == CMAKE_PREFIX_PATH_KEY)
qtLibDirs = CMakeConfigItem::cmakeSplitValue(expandedValue.toString());
qtInstallDirs = CMakeConfigItem::cmakeSplitValue(expandedValue.toString());
}
QList<Task> result;
@@ -572,7 +572,7 @@ QList<Task> CMakeConfigurationKitInformation::validate(const Kit *k) const
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
}
if (version && !qtLibDirs.contains(version->qmakeProperty("QT_INSTALL_LIBS")) && !isQt4) {
if (version && !qtInstallDirs.contains(version->qmakeProperty("QT_INSTALL_PREFIX")) && !isQt4) {
if (version->isValid()) {
result << Task(Task::Warning, tr("CMake configuration has no CMAKE_PREFIX_PATH set "
"that points to the kit Qt version."),

View File

@@ -153,7 +153,7 @@ TeaLeafReader::TeaLeafReader()
{
connect(EditorManager::instance(), &EditorManager::aboutToSave,
this, [this](const IDocument *document) {
if (m_cmakeFiles.contains(document->filePath()))
if (m_cmakeFiles.contains(document->filePath()) || !m_parameters.isAutorun)
emit dirty();
});
}
@@ -583,7 +583,7 @@ void TeaLeafReader::cmakeFinished(int code, QProcess::ExitStatus status)
QString msg;
if (status != QProcess::NormalExit)
msg = tr("*** cmake process crashed!");
msg = tr("*** cmake process crashed.");
else if (code != 0)
msg = tr("*** cmake process exited with exit code %1.").arg(code);