diff --git a/src/persistence/profilelocker.cpp b/src/persistence/profilelocker.cpp index 1a6ce7cdc..898616a4a 100644 --- a/src/persistence/profilelocker.cpp +++ b/src/persistence/profilelocker.cpp @@ -72,23 +72,6 @@ void ProfileLocker::unlock() curLockName.clear(); } -void ProfileLocker::clearAllLocks() -{ - qDebug() << "clearAllLocks: Wiping out all lock files"; - if (lockfile) - unlock(); - - QDir dir(Settings::getInstance().getSettingsDirPath()); - dir.setFilter(QDir::Files); - dir.setNameFilters({"*.lock"}); - QFileInfoList files = dir.entryInfoList(); - for (QFileInfo fileInfo : files) - { - QFile file(fileInfo.absoluteFilePath()); - file.remove(); - } -} - void ProfileLocker::assertLock() { if (!lockfile) diff --git a/src/persistence/profilelocker.h b/src/persistence/profilelocker.h index b88ca1fa7..7c24d27d4 100644 --- a/src/persistence/profilelocker.h +++ b/src/persistence/profilelocker.h @@ -48,10 +48,6 @@ public: static bool hasLock(); /// Return the name of the currently loaded profile, a null string if there is none static QString getCurLockName(); - /// Releases all locks on all profiles - /// DO NOT call unless all we're the only qTox instance - /// and we don't hold any lock yet. - static void clearAllLocks(); /// Check that we actually own the lock /// In case the file was deleted on disk, restore it /// If we can't get a lock, exit qTox immediately