Browse Source

Remove unused clearAllLocks function

pull/2172/head
tux3 10 years ago
parent
commit
05fece4fab
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 17
      src/persistence/profilelocker.cpp
  2. 4
      src/persistence/profilelocker.h

17
src/persistence/profilelocker.cpp

@ -72,23 +72,6 @@ void ProfileLocker::unlock() @@ -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)

4
src/persistence/profilelocker.h

@ -48,10 +48,6 @@ public: @@ -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

Loading…
Cancel
Save