Checkpoint. Still working on saving highlight colors.

This commit is contained in:
Ernie Pasveer
2022-01-04 19:41:01 -06:00
parent bda1ce4270
commit 78bf57fce4
8 changed files with 102 additions and 15 deletions
+18
View File
@@ -286,6 +286,7 @@ void SeerMainWindow::handleSettingsConfiguration () {
dlg.setGdbArguments(gdbWidget->gdbArguments());
dlg.setGdbAsyncMode(gdbWidget->gdbAsyncMode());
dlg.setEditorFont(gdbWidget->editorManager()->editorFont());
dlg.setEditorHighlighterSettings(gdbWidget->editorManager()->editorHighlighterSettings());
int ret = dlg.exec();
@@ -590,6 +591,23 @@ void SeerMainWindow::writeConfigSettings () {
settings.beginGroup("editor");
settings.setValue("font", gdbWidget->editorManager()->editorFont().toString());
settings.beginGroup("highlighter"); {
SeerHighlighterSettings highlighter = gdbWidget->editorManager()->editorHighlighterSettings();
QStringList keys = highlighter.keys();
for (int i=0; i<keys.size(); i++) {
settings.beginGroup(keys[i]); {
QTextCharFormat f = highlighter.get(keys[i]);
settings.setValue("fontweight", f.fontWeight());
settings.setValue("fontitalic", f.fontItalic());
settings.setValue("color", f.foreground().color());
} settings.endGroup();
}
} settings.endGroup();
settings.endGroup();
}