Skip to content

Commit 084464f

Browse files
barisbasar1209mgallien
authored andcommitted
Update src/gui/tray/unifiedsearchresultslistmodel.cpp
Signed-off-by: Baris <[email protected]>
1 parent 9fea9a9 commit 084464f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/gui/tray/unifiedsearchresultslistmodel.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,14 @@ void UnifiedSearchResultsListModel::resultClicked(const QString &providerId,
331331
const QString &title) const
332332
{
333333
const QUrlQuery urlQuery{resourceUrl};
334-
QString dir = urlQuery.queryItemValue(QStringLiteral("dir"), QUrl::ComponentFormattingOption::FullyDecoded);
335-
QString fileName = urlQuery.queryItemValue(QStringLiteral("scrollto"), QUrl::ComponentFormattingOption::FullyDecoded);
334+
auto dir = urlQuery.queryItemValue(QStringLiteral("dir"), QUrl::ComponentFormattingOption::FullyDecoded);
335+
auto fileName = urlQuery.queryItemValue(QStringLiteral("scrollto"), QUrl::ComponentFormattingOption::FullyDecoded);
336336

337337
if (providerId.contains(QStringLiteral("file"), Qt::CaseInsensitive)){
338338
if (!_accountState || !_accountState->account()) {
339339
return;
340340
}
341341

342-
QString relativePath;
343342
// server version above 20
344343
if (dir.isEmpty() && fileName.isEmpty()) {
345344
// file is direct child of syncfolder
@@ -353,7 +352,7 @@ void UnifiedSearchResultsListModel::resultClicked(const QString &providerId,
353352
// server version 20
354353
fileName.prepend(QLatin1Char('/'));
355354
}
356-
relativePath = dir + fileName;
355+
const auto relativePath = dir + fileName;
357356

358357
const auto localFiles = FolderMan::instance()->findFileInLocalFolders(relativePath, _accountState->account());
359358
if (!localFiles.isEmpty()) {

0 commit comments

Comments
 (0)