forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user