1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Remove unused clearAllLocks function

This commit is contained in:
tux3 2015-09-03 17:25:09 +02:00
parent 30c8980d1b
commit 05fece4fab
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
2 changed files with 0 additions and 21 deletions

View File

@ -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)

View File

@ -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