forked from qt-creator/qt-creator
Fixes: File System Quick open filter not working with absolute paths.
RevBy: Found on irc Details: On windows.
This commit is contained in:
@@ -54,14 +54,7 @@ QList<FilterEntry> FileSystemFilter::matchesFor(const QString &entry)
|
|||||||
QString name = entryInfo.fileName();
|
QString name = entryInfo.fileName();
|
||||||
QString directory = entryInfo.path();
|
QString directory = entryInfo.path();
|
||||||
QString filePath = entryInfo.filePath();
|
QString filePath = entryInfo.filePath();
|
||||||
bool isDrive = false;
|
if (entryInfo.isRelative()) {
|
||||||
foreach (const QFileInfo &drive, QDir::drives()) {
|
|
||||||
if (filePath.startsWith(drive.path())) {
|
|
||||||
isDrive = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isDrive) {
|
|
||||||
if (filePath.startsWith("~/")) {
|
if (filePath.startsWith("~/")) {
|
||||||
directory.replace(0, 1, QDir::homePath());
|
directory.replace(0, 1, QDir::homePath());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user