Commit Graph

174 Commits (69c4a68187d15719cb4e0277e35b2b30ba5b0f3f)

Author SHA1 Message Date
pi03k 18080a83d6 Move from qt_wrap_ui to AUTOUIC for launcher and wizard
(#7348)
2 months ago
Alexey Sokolov be15db4dfb Remove old dependency on Xt which shouldn't be needed anymore 2 months ago
Andrei Kortunov bf682d51a6 Support dark mode on Windows (feature 7985) 7 months ago
Andrei Kortunov abd4596cf8 Do not use style sheets to set font 8 months ago
Andrei Kortunov 9252879f0f UI fixes for Wizard 8 months ago
Andrei Kortunov 0873eb6e62 Use scalable icons for wizard 8 months ago
Andrei Kortunov 1bb48bcef7 Treat editor icons as scalable 8 months ago
AnyOldName3 0d547c5438 Resolve merge conflicts from https://gitlab.com/OpenMW/openmw/-/merge_requests/3893 9 months ago
AnyOldName3 7f1a6a8187 Fix file that's not used on Windows 10 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 322a378907 Load correct config files in the wizard 10 months ago
Andrei Kortunov 9a7b9572fd Deploy base Qt translations when needed 11 months ago
Andrei Kortunov 7e345436f4 Localize Launcher and Wizard 11 months ago
Andrei Kortunov 737d3b499b Use move semantics for tools 11 months ago
Yury Stepovikov 52623ddd7d Set MacOS current_path before reading configuration files [#7706] 12 months ago
Alexei Kotov 51b05647e2 Merge branch 'move_files' into 'master'
Move *.ui files for different applications to different folders

See merge request OpenMW/openmw!3659
1 year ago
Andrei Kortunov e6690bbcc7 Use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR 1 year ago
Andrei Kortunov 2e041073fc Move *.ui files for different applications to different folders 1 year ago
Andrei Kortunov 8d06a99507 Register language selector properly 1 year ago
Andrei Kortunov ca19f7006c Make hardcoded strings in Launcher and Wizard localizable 1 year ago
Andrei Kortunov c5b16d1ba2 Do not include formatting spaces to localizable strings 1 year ago
Evil Eye 9214ffb50b Replace some empty constructors and destructors with default 2 years ago
elsid 62536d5cf7
Use static QFile::exists instead of creating object 2 years ago
elsid 1857d8a68c
Use target_compile_options to add --coverage 2 years ago
elsid cc066efa11
Fix identation in CMakeLists.txt 2 years ago
Andrei Kortunov 5836bd8d87 Remove redundant include 2 years ago
Andrei Kortunov 7e2aedf637 Add an initial Qt6 support 2 years ago
psi29a aee7716c3a Merge branch 'launcher_typed_settings' into 'master'
Typed launcher settings

See merge request OpenMW/openmw!2650
2 years ago
Andrzej Głuszak 9b0a499b58 Remove strerror usages 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 0961720835
Join path components using path::operator/ instead of string::operator+ 2 years ago
psi29a 1390c7ed7c Merge branch 'wizard_encodings' into 'master'
Do not use Qt streams with legacy encodings in the Wizard code

Closes #7165

See merge request OpenMW/openmw!2634
2 years ago
Andrei Kortunov 9a7c57874d Do not use Qt streams with legacy encodings in the Wizard code 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
jvoisin c90d22f3b2 Replace usage of QRegularExpression::anchoredPattern with `^` and `$`
Using `^` and `$` is shorter than `QRegularExpression::anchoredPattern`,
and even allows us in one case to get rid of a trailing `.*`.
2 years ago
Andrei Kortunov bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2 years ago
Andrei Kortunov 307a60e87c Migrate from QRegExp to more modern QRegularExpression 2 years ago
jvoisin cd29c181cf Another pass with IWYU 2 years ago
jvoisin 3cbf1dc042 First pass with include-what-you-use 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 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
Project579 4bb07282c9 Replace all remaining occurrences of boost::filesystem with std::filesystem. 2 years ago
Mat 405a5c5d25 functor-based Qt signal-slot syntax wizard 2 years ago
Andrei Kortunov 43f552f48f Allow users to decide if they need to import bitmap fonts 2 years ago
elsid c197896765
Use unique_ptr for Wizard::InstallationPage members 2 years ago
jvoisin 8b9ed57348 Clean up Qt includes 3 years ago
psi29a 8f02cd7d17 Merge branch 'fix_6627' into 'master'
Fix #6627

Closes #6627

See merge request OpenMW/openmw!1762
3 years ago