mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Don't bother showing locked profile messages for localhost anymore
This commit is contained in:
parent
5e479f2f90
commit
3f4e1b70d0
@ -414,18 +414,7 @@ void MainWindow::OpenProfile(QString profileName)
|
|||||||
QString lockhost = prof->checkLock();
|
QString lockhost = prof->checkLock();
|
||||||
|
|
||||||
if (!lockhost.isEmpty()) {
|
if (!lockhost.isEmpty()) {
|
||||||
if (lockhost.compare(QHostInfo::localHostName()) == 0) {
|
if (lockhost.compare(QHostInfo::localHostName()) != 0) {
|
||||||
// Localhost has it locked..
|
|
||||||
if (QMessageBox::warning(nullptr, STR_MessageBox_Warning,
|
|
||||||
QObject::tr("There is a lockfile already present for profile '%1'.").arg(prof->user->userName())+"\n\n"+
|
|
||||||
QObject::tr("You can only work with one instance of an individual SleepyHead profile at a time.")+"\n\n"+
|
|
||||||
QObject::tr("Please close any other instances of SleepyHead running with this profile before proceeding.")+"\n\n"+
|
|
||||||
QObject::tr("If no other instances of SleepyHead are running, (eg, it crashed last time!), it is safe to ignore this message."),
|
|
||||||
QMessageBox::Cancel |QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (QMessageBox::warning(nullptr, STR_MessageBox_Warning,
|
if (QMessageBox::warning(nullptr, STR_MessageBox_Warning,
|
||||||
QObject::tr("There is a lockfile already present for this profile '%1', claimed on '%2'.").arg(prof->user->userName()).arg(lockhost)+"\n\n"+
|
QObject::tr("There is a lockfile already present for this profile '%1', claimed on '%2'.").arg(prof->user->userName()).arg(lockhost)+"\n\n"+
|
||||||
QObject::tr("You can only work with one instance of an individual SleepyHead profile at a time.")+"\n\n"+
|
QObject::tr("You can only work with one instance of an individual SleepyHead profile at a time.")+"\n\n"+
|
||||||
@ -433,7 +422,7 @@ void MainWindow::OpenProfile(QString profileName)
|
|||||||
QMessageBox::Cancel |QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel) {
|
QMessageBox::Cancel |QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} // not worried about localhost locks anymore, just silently drop it.
|
||||||
|
|
||||||
prof->removeLock();
|
prof->removeLock();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user