-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings interface #830
Merged
Merged
Settings interface #830
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
added necessary member functions in Settings
removed most of storeSettings() from OrganizerCore: QSettings handles saving by itself, no need for that removed topLevelSplitter from ui, unused since the log widget is in a dock removed QSettings from MainWindow::readSettings() replaced return values for some of the new getters in Settings to std::optional
separator colors to settings
… now saved and restored directly
fixed dialogs not having a parent
use global cache variable instead of an instance inside a function
removed widget-specific functions in GeometrySettings, now using generic functions in Settings removed some unused member variables in MainWindow
added centerOnMainWindowMonitor(), now also used by validation dialog added overloads for splitter, used by main splitter fixed saveState() for QMainWindow calling the wrong function
changed reset button in settings to restart immediately
merged settings into saveVisibility() and restoreVisibility() call MainWindow::storeSettings() earlier so widget visibility is still valid
added combobox index to settings
finished moving endorsement to settings
…rectly fixed selected executable being empty after closing the edit dialog put backup_install inside Settings
SettingsDialog now uses GeometrySaver
…Widget removed directInterface() from mod info conflicts
added ColorSettings settings dialog general and diag tabs don't use qsettings anymore removed logging of setting changes, will be added back to Settings class
settings tab remembered
moved server functions together in Settings
changed preferred to an int moved all server settings to Settings
moved cleanup to ServerList
existing servers now merged when retrieving the download links download manager doesn't store the servers any more, queries the settings every time
added scoped classes for QSettings groups and arrays servers logged on startup
use dedicated functions to set, get or remove settings, allows for logging
removed "get" from the getters that had it
…s when nothing actually changed changed back section names that were originally lowercase, arrays end up in two different sections
fixed mod info dialog tab order using different settings for read and write mod info dialog now doesn't complain when no tab order exists in the settings only remove section when the array is larger, prevents logging changes when nothing actually changed
renamed some PluginSettings members and moved them around
removed unused automaticLoginEnabled()
statusbar_visible is not used anymore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes all access to
QSettings
andSettings::directInterface()
from anywhere in MO. From now on, settings are all managed within theSettings
class.This required moving all the manual
QSettings
stuff into theSettings
class and adding member functions for whatever was missing. Once I ended up with hundreds of functions, I splitSettings
into various subclasses, likeNexusSettings
andPathSettings
.The file
mainwindow.ui
looks completely changed, but it's not. I removed the top levelQSplitter
that held the content on top and the log widget at the button, because the log has been a dock window since my previous PR, and so was unnecessary. The other change is to make the statusbar aStatusBar
instead of aQStatusBar
so I can inherit from it.One major problem I had was with the nexus server information. There was a simple
struct ServerInfo
, which I turned into a class. The way it was handled was buggy: the "preferred" setting was read as abool
, but it was written as anint
that corresponded to its index in the list in the settings.It also kept a running total of the speed for each download and showed the average in the settings. I changed it to only remember the last 5 download speeds so unusual speeds eventually disappear.
There are a few consequences to all this:
QByteArray
s, like all the other settings (except for Qt geometries). I have upgrade code to transform the servers into the new format, but it's not forwards compatible: downgrading back to 2.2.1 will reset the servers to a list with one entry namedsize
.Other stuff I did along the way:
MainWindow
, moved all the code that initializes the mod list intosetupModList()
'MainWindow::processUpdates()
toSettings
;MainWindow::on_bossButton_clicked()
that would display the integrated browser for the loot report;