diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 37ce206719cef..9e176ef94b931 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -551,7 +551,7 @@ int Folder::slotWipeErrorBlacklist() return _journal.wipeErrorBlacklist(); } -void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason) +void Folder::slotWatchedPathChanged(QStringView path, ChangeReason reason) { if (!path.startsWith(this->path())) { qCDebug(lcFolder) << "Changed path is not contained in folder, ignoring:" << path; @@ -576,7 +576,7 @@ void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason) // own process. Therefore nothing needs to be done here! #else // Use the path to figure out whether it was our own change - if (_engine->wasFileTouched(path)) { + if (_engine->wasFileTouched(path.toString())) { qCDebug(lcFolder) << "Changed path was touched by SyncEngine, ignoring:" << path; return; } @@ -590,7 +590,7 @@ void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason) // an attribute change (pin state) that caused the notification bool spurious = false; if (record.isValid() - && !FileSystem::fileChanged(path, record._fileSize, record._modtime)) { + && !FileSystem::fileChanged(path.toString(), record._fileSize, record._modtime)) { spurious = true; if (auto pinState = _vfs->pinState(relativePath.toString())) { @@ -607,7 +607,7 @@ void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason) } warnOnNewExcludedItem(record, relativePath); - emit watchedFileChangedExternally(path); + emit watchedFileChangedExternally(path.toString()); // Also schedule this folder for a sync, but only after some delay: // The sync will not upload files that were changed too recently. diff --git a/src/gui/folder.h b/src/gui/folder.h index 392eb474b2abf..ee66eca96968d 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -340,7 +340,7 @@ public slots: * changes. Needs to check whether this change should trigger a new * sync run to be scheduled. */ - void slotWatchedPathChanged(const QString &path, ChangeReason reason); + void slotWatchedPathChanged(QStringView path, ChangeReason reason); /** * Mark a virtual file as being requested for download, and start a sync. diff --git a/src/gui/sharemanager.cpp b/src/gui/sharemanager.cpp index 9f6c9af07c9d4..a0a090d71f031 100644 --- a/src/gui/sharemanager.cpp +++ b/src/gui/sharemanager.cpp @@ -30,7 +30,7 @@ namespace OCC { /** * When a share is modified, we need to tell the folders so they can adjust overlay icons */ -static void updateFolder(const AccountPtr &account, const QString &path) +static void updateFolder(const AccountPtr &account, QStringView path) { foreach (Folder *f, FolderMan::instance()->map()) { if (f->accountState()->account() != account) diff --git a/test/testexcludedfiles.cpp b/test/testexcludedfiles.cpp index 256cc999dc83d..35be801b23d95 100644 --- a/test/testexcludedfiles.cpp +++ b/test/testexcludedfiles.cpp @@ -591,7 +591,7 @@ private slots: auto csync_is_windows_reserved_word = [](const char *fn) { QString s = QString::fromLatin1(fn); extern bool csync_is_windows_reserved_word(const QStringView &filename); - return csync_is_windows_reserved_word(&s); + return csync_is_windows_reserved_word(s); }; QVERIFY(csync_is_windows_reserved_word("CON"));