Debugger: Allow {target,remote}:/* sysroot settings

They are valid,

Also downgrade some debugger errors to warnings in anticipation
of future "unusual" uses.

Change-Id: I80896b37e03fe39091d08319e71e11d64db183e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-10-04 18:18:50 +02:00
parent b268abb100
commit 4d3ea43dbc

View File

@@ -74,16 +74,19 @@ QList<Task> SysRootKitInformation::validate(const Kit *k) const
if (dir.isEmpty())
return result;
if (dir.toString().startsWith("target:") || dir.toString().startsWith("remote:"))
return result;
const QFileInfo fi = dir.toFileInfo();
if (!fi.exists()) {
result << Task(Task::Error, tr("Sys Root \"%1\" does not exist in the file system.").arg(dir.toUserOutput()),
result << Task(Task::Warning, tr("Sys Root \"%1\" does not exist in the file system.").arg(dir.toUserOutput()),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
} else if (!fi.isDir()) {
result << Task(Task::Error, tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
result << Task(Task::Warning, tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
} else if (QDir(dir.toString()).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()) {
result << Task(Task::Error, tr("Sys Root \"%1\" is empty.").arg(dir.toUserOutput()),
result << Task(Task::Warning, tr("Sys Root \"%1\" is empty.").arg(dir.toUserOutput()),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
return result;