mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 03:04:33 +02:00
Implement crash option that deletes Interface.ini
This commit is contained in:
parent
f6cf77ae68
commit
110e7a773b
2 changed files with 14 additions and 2 deletions
interface/src
|
@ -69,7 +69,7 @@ CrashHandler::Action CrashHandler::promptUserForAction() {
|
|||
|
||||
if (result == QDialog::Accepted) {
|
||||
if (option1->isChecked()) {
|
||||
return CrashHandler::DELETE_INTERFACE;
|
||||
return CrashHandler::DELETE_INTERFACE_INI;
|
||||
}
|
||||
if (option2->isChecked()) {
|
||||
return CrashHandler::RETAIN_LOGIN_AND_AVATAR_INFO;
|
||||
|
@ -81,7 +81,19 @@ CrashHandler::Action CrashHandler::promptUserForAction() {
|
|||
}
|
||||
|
||||
void CrashHandler::handleCrash(CrashHandler::Action action) {
|
||||
if (action == CrashHandler::DELETE_INTERFACE_INI) {
|
||||
QSettings settings;
|
||||
QFile settingsFile(settings.fileName());
|
||||
if (settingsFile.exists()) {
|
||||
settingsFile.remove();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
||||
// CrashHandler::DO_NOTHING or unexpected value
|
||||
return;
|
||||
}
|
||||
|
||||
void CrashHandler::writeRunningMarkerFiler() {
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
|
||||
private:
|
||||
enum Action {
|
||||
DELETE_INTERFACE,
|
||||
DELETE_INTERFACE_INI,
|
||||
RETAIN_LOGIN_AND_AVATAR_INFO,
|
||||
DO_NOTHING
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue