mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:56:52 +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
|
@ -69,7 +69,7 @@ CrashHandler::Action CrashHandler::promptUserForAction() {
|
||||||
|
|
||||||
if (result == QDialog::Accepted) {
|
if (result == QDialog::Accepted) {
|
||||||
if (option1->isChecked()) {
|
if (option1->isChecked()) {
|
||||||
return CrashHandler::DELETE_INTERFACE;
|
return CrashHandler::DELETE_INTERFACE_INI;
|
||||||
}
|
}
|
||||||
if (option2->isChecked()) {
|
if (option2->isChecked()) {
|
||||||
return CrashHandler::RETAIN_LOGIN_AND_AVATAR_INFO;
|
return CrashHandler::RETAIN_LOGIN_AND_AVATAR_INFO;
|
||||||
|
@ -81,7 +81,19 @@ CrashHandler::Action CrashHandler::promptUserForAction() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CrashHandler::handleCrash(CrashHandler::Action action) {
|
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
|
// TODO
|
||||||
|
|
||||||
|
// CrashHandler::DO_NOTHING or unexpected value
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CrashHandler::writeRunningMarkerFiler() {
|
void CrashHandler::writeRunningMarkerFiler() {
|
||||||
|
|
|
@ -24,7 +24,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum Action {
|
enum Action {
|
||||||
DELETE_INTERFACE,
|
DELETE_INTERFACE_INI,
|
||||||
RETAIN_LOGIN_AND_AVATAR_INFO,
|
RETAIN_LOGIN_AND_AVATAR_INFO,
|
||||||
DO_NOTHING
|
DO_NOTHING
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue