Skip to content

Commit

Permalink
GenericItems.cpp: more support for native separators
Browse files Browse the repository at this point in the history
In previous commits, I fixed some places in which I convert the display
to native separators. This slipped.

IMHO - we should always work on native separators, but I really don't
want to deal with this now. For now - it fixes rust projects on windows.
  • Loading branch information
diegoiast committed Jan 25, 2025
1 parent c15bad7 commit 5c5c53d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/ProjectManager/GenericItems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ QString DirectoryModel::displayForItem(size_t i) const {
auto fileName = fileList.at(i);
auto path = [fileName, this]() {
for (auto d : directoryList) {
if (fileName.startsWith(d)) {
if (QDir::toNativeSeparators(fileName).startsWith(d)) {
return d;
}
}
Expand Down Expand Up @@ -160,7 +160,7 @@ bool FilenameMatches(const QString &fileName, const QString &goodList, const QSt
auto options = QRegularExpression::UnanchoredWildcardConversion;
auto pattern = QRegularExpression::wildcardToRegularExpression(rule, options);
auto regex = QRegularExpression(pattern);
bool matches = regex.match(fileName).hasMatch();
auto matches = regex.match(fileName).hasMatch();
if (matches) {
return false;
}
Expand All @@ -179,7 +179,7 @@ bool FilenameMatches(const QString &fileName, const QString &goodList, const QSt
auto options = QRegularExpression::UnanchoredWildcardConversion;
auto pattern = QRegularExpression::wildcardToRegularExpression(rule, options);
auto regex = QRegularExpression(pattern);
bool matches = regex.match(fileName).hasMatch();
auto matches = regex.match(fileName).hasMatch();
if (matches) {
filterMatchFound = true;
break;
Expand Down

0 comments on commit 5c5c53d

Please sign in to comment.