mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-06 11:14:14 +02:00
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:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user