Commit Graph

213 Commits (63b8e636f391e80388a7d7a5077c16cf9847fd64)

Author SHA1 Message Date
Andrei Kortunov fb3687e62a Set minimum width for Launch OpenMW button 7 months ago
Andrei Kortunov bf568da6de Remove redundant checks 8 months ago
Andrei Kortunov 0262b33067 Update toolbar style sheet when theme changed 8 months ago
Andrei Kortunov d97838def1 Improve launcher appearance 8 months ago
AnyOldName3 a98a824f80 Config paths to info log, not verbose 9 months ago
AnyOldName3 0e2f28156d Restore logging of openmw.cfg paths in launcher
Removed here https://gitlab.com/OpenMW/openmw/-/merge_requests/2650/diffs#be09c16519a3f26f4306b920c50e0e4215dffaee_329_328
9 months ago
AnyOldName3 0371791cce Break 9 months ago
AnyOldName3 a130ca57a4 Track source of settings
This one's a biggie.

The basic idea's that GameSettings should know:
* what the interpreted value of a setting is, so it can actually be used.
* what the original value the user put in their config was, so it can be put back when the config's saved.
* which path it's processing the openmw.cfg from so relative paths can be resolved correctly.
* whether a setting's a user setting that can be modified, or from one of the other openmw.cfg files that can't necessarily be modified.

This had fairly wide-reaching implications.

The first is that paths are resolved properly in cases where they previously wouldn't have been.
Without this commit, if the launcher saw a relative path in an openmw.cfg, it'd be resolved relative to the process' working directory (which we always set to the binary directory for reasons I won't get into).
That's not what the engine does, so is bad.
It's also not something a user's likely to suspect.
This mess is no longer a problem as paths are resolved correctly when they're loaded instead of on demand when they're used by whatever uses them.

Another problem was that if paths used slugs like ?userconfig? would be written back to openmw.cfg with the slugs replaced, which defeats the object of using the slugs.
This is also fixed.

Tracking which settings are user settings and which are in a non-editable openmw.cfg allows the launcher to grey out rows so they can't be edited (which is sensible as they can't be edited on-disk) while still being aware of content files that are provided by non-user data directories etc.
This is done in a pretty straightforward way for the data directories and fallback-archives, as those bits of UI are basic, but it's more complicated for content files as that uses a nmodel/view approach and has a lot more moving parts.
Thankfully, I'd already implemented that when dealing with builtin.omwscripts, so it just needed wiring up.

One more thing of note is that I made the SettingValue struct storable as a QVariant so it could be attached to the UI widgets as userdata, and then I could just grab the original representation and use it instead of needing any complicated mapping from display value to on-disk value.
10 months ago
AnyOldName3 357bf3db61 Load all config files 10 months ago
Andrei Kortunov 7ffb2bc3c4 Use error messages instead of unhandled exceptions 1 year ago
Andrei Kortunov c5b16d1ba2 Do not include formatting spaces to localizable strings 1 year ago
elsid dcd81d026f
Use settings values for Video settings
* Convert window mode, vsync mode into enums, screenshot type into a struct.
* Add missing doc for screenshot type.
1 year ago
Petr Mikheev f260fa006e Show OpenMW version and Lua API revision in documentation. 1 year ago
elsid 9815f930d9
Setup launcher configuration manager and logging before initializing UI 2 years ago
psi29a aee7716c3a Merge branch 'launcher_typed_settings' into 'master'
Typed launcher settings

See merge request OpenMW/openmw!2650
2 years ago
elsid c44bc5ade5
Setup logging with properly initialized configuration manager
Default constructed instance may provide different paths from initialized one.
2 years ago
elsid cf75363290
Typed launcher settings
QMultiMap is not clear about what settings exist and it's not efficient way to
access them after they are loaded.
2 years ago
elsid b1d0ee1f1b
Load only launcher.cfg from user folder
There is no other launcher.cfg.
2 years ago
elsid 0961720835
Join path components using path::operator/ instead of string::operator+ 2 years ago
elsid dd89403df0
Move ensureUtf8Encoding to named namespace
To follow https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header

Add QtGlobal include to define QT_VERSION and QT_VERSION_CHECK macroses before
they're used.
2 years ago
Andrei Kortunov 0864d997d0 Add missing includes 2 years ago
Andrei Kortunov 902c48d1bb Rework launcher UI 2 years ago
Andrei Kortunov bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 1a79f098fa Use std::filesystem::create_directories instead of std::filesystem::create_directory to recursively generate directories from the provided path. 2 years ago
Project579 ca14fc00dc Added dedicated functions for conversions between QString and std::filesystem::path. 2 years ago
Project579 c226b35f1f Fix some remaining encoding errors due to std::filesystem transition. 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
mpeco aa57d04b54 functor-based Qt signal-slot syntax launcher 2 years ago
Andrei Kortunov 4b257e496e Use static settings map for launcher and editor - the Settings::Manager has a static data anyway 3 years ago
Evil Eye 478ad07607 Only load global cfg if local wasn't found 3 years ago
Evil Eye c081b8cfa9 Don't load content entries from global and local configs 3 years ago
elsid 10fbf170a2
Reduce number of includes for boost/program_options 3 years ago
jvoisin 8b9ed57348 Clean up Qt includes 3 years ago
psi29a 4575df957e Merge branch 'issue-6685' into 'master'
issue 6685 - wizard failure if config dir does not exist

See merge request OpenMW/openmw!1735
3 years ago
Eris Caffee ba57d0651f issue 6685 - wizard failure if config dir does not exist 3 years ago
Eris Caffee db84d9e649 Issue 2766 Warn user of old MW version detected 3 years ago
Petr Mikheev a453e5c198 Reuse the same code to load settings in apps/openmw, apps/launcher, apps/opencs 3 years ago
Thomas Lowe f50cbcad81 * AA combo box no longer disables the AA alpha test checkbox.
* Updated AA alpha test description to be more accurate
3 years ago
Thomas Lowe 5f355a14cd Changed default setting for anti-alias alpha test to true.
Added checkbox in advanced page for anti-alias alpha test, connected to AA combobox in the graphics page.
3 years ago
psi29a b92c6985cd Merge branch 'auto_in_most_apps' into 'master'
Using auto keyword in most apps

See merge request OpenMW/openmw!885
3 years ago
Thunderforge ded7bd92e6 Using auto keyword in most apps
Detected by clang-tidy's modernize-use-auto
4 years ago
Thunderforge 6ba23a028c Removing unused imports in the Launcher 4 years ago
psi29a 4bc7012104 Merge branch 'pack-default-settings' into 'master'
Pack default settings

Closes #5925

See merge request OpenMW/openmw!822
4 years ago
AnyOldName3 09f39b29f0 Load defaults.bin instead of settings-default.cfg. Do not decode yet. 4 years ago
AnyOldName3 92325976e9 Update documentation to refer to defaults.bin 4 years ago
Thunderforge ead51784dc [Launcher] Replacing static method access through instances
This addresses the Clang Tidy check [readability-static-accessed-through-instance](https://clang.llvm.org/extra/clang-tidy/checks/readability-static-accessed-through-instance.html). It also simplifies the code by reducing the number of parameters we're passing around.
4 years ago
psi29a b10a817f7e Merge branch 'useuless_launcher' into 'master'
Remove some useless includes from the launcher

See merge request OpenMW/openmw!775

(cherry picked from commit a84bd643b334eb6ac715681c497184ac22212ced)

d3fff8cf Remove some useless includes from the launcher
4 years ago
fredzio dbdd397716 Remove deadcode. 4 years ago