Clean up readSettingsState() in all three editors

- Remove dead #if QT_VERSION conditionals (both branches were identical)
- Add settings.remove() guard on restoreState() failure consistently
  across all three editors (now safe since all run after show())
This commit is contained in:
Kellermorph
2026-08-23 18:25:23 +02:00
parent 61a160fa62
commit 8f6f41ed19
3 changed files with 6 additions and 14 deletions
+3 -5
View File
@@ -967,11 +967,9 @@ void QETElementEditor::readSettingsState()
QVariant state = settings.value("elementeditor/state");
if (state.isValid()) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
restoreState(state.toByteArray());
#else
restoreState(state.toByteArray());
#endif
if (!restoreState(state.toByteArray())) {
settings.remove("elementeditor/state");
}
}
}