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:
parent
30c8980d1b
commit
05fece4fab
|
@ -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)
|
||||
|
|
|
@ -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…
Reference in New Issue
Block a user