forked from qt-creator/qt-creator
BareMetal: Don't handle an empty SVD file selection in UVSC provider
Change-Id: Ic7fbf2c403f85d7d79f194a12f67e852ff0bdd80 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -454,12 +454,14 @@ DeviceSelection DeviceSelectionView::buildSelection(const DeviceSelectionItem *i
|
||||
}
|
||||
} while ((item->level() > 1) && (item = static_cast<const DeviceSelectionItem *>(item->parent())));
|
||||
|
||||
// Fix relative SVD file path to make it as absolute.
|
||||
// Fix relative SVD file sub-path to make it as an absolute file path.
|
||||
if (!selection.svd.isEmpty()) {
|
||||
const QFileInfo fi(selection.svd);
|
||||
if (!fi.isAbsolute()) {
|
||||
const QDir dir(QFileInfo(selection.package.file).path());
|
||||
selection.svd = QFileInfo(dir, fi.filePath()).absoluteFilePath();
|
||||
}
|
||||
}
|
||||
|
||||
return selection;
|
||||
}
|
||||
|
Reference in New Issue
Block a user