1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-10 09:41:35 +00:00
Commit graph

163 commits

Author SHA1 Message Date
psi29a
1fff2f0199 Merge branch 'setnew' into 'master'
Don't use item(QString) while marking new content files

See merge request OpenMW/openmw!4701
2025-06-02 07:08:05 +00:00
psi29a
65155a6e6a Merge branch 'datachangedcalls' into 'master'
Content selector: Cut down on unnecessary dataChanged calls (#8478)

See merge request OpenMW/openmw!4671
2025-06-01 10:46:45 +00:00
Alexei Kotov
3dfc3d7022 Don't use item(QString) while marking new content files 2025-06-01 03:22:18 +03:00
Alexei Kotov
2342dbe0f5 Merge branch 'fix_launcher_ui_freeze' into 'master'
Make launcher UI on content files selection more responsive (#8478)

See merge request OpenMW/openmw!4682
2025-05-22 15:37:23 +03:00
elsid
157e8c763c
Show progress dialog for setting content list 2025-05-22 07:47:58 +02:00
elsid
3955428f87
Show progress dialog on updating content selection 2025-05-22 07:47:38 +02:00
Alexei Kotov
5ffcd21eee Content selector: Cut down on unnecessary dataChanged calls (#8478)
setData shouldn't do dataChanged calls setCheckState already does
setCheckState should emit dataChanged for downstream dependencies unconditionally
setCheckState shouldn't emit dataChanged for upstream dependencies that weren't enabled
2025-05-22 01:01:41 +03:00
Alexei Kotov
2c6d11f95e Make the horrifying content model flags() game search less horrifying
Properly exit early and cache game file check result
2025-05-20 16:15:16 +03:00
Evil Eye
f32d62def8 Merge branch 'setcheckstateesmfile' into 'master'
Avoid repeated item(QString) in plugin toggling-related code

See merge request OpenMW/openmw!4678
2025-05-18 16:41:46 +00:00
Evil Eye
a7a072e3f8 Merge branch 'qfileinfo' into 'master'
Avoid unnecessary file system access in plugin toggling

See merge request OpenMW/openmw!4679
2025-05-17 10:25:02 +00:00
Alexei Kotov
f7f5665588 Avoid repeated item(QString) in plugin toggling-related code 2025-05-15 23:17:17 +03:00
Alexei Kotov
89d6408587 Avoid unnecessary file system access in plugin toggling 2025-05-15 23:00:08 +03:00
Alexei Kotov
54eea09a9e Fix out-of-bounds index dataChanged calls 2025-05-15 21:18:10 +03:00
AnyOldName3
894ea4ba62 Don't precompute load order errors after every change
It's much slower than doing it on demand as it only takes a microsecond, but for a really big load order, there are hundreds of thousands of intermediate calls before everything's set up and we can draw the GUI.
2025-04-08 01:19:24 +01:00
AnyOldName3
d6b61f1f54 Sprinkle some const&
QStringView required more fighting as loads of call sites take a const&
2025-04-08 00:34:45 +01:00
AnyOldName3
e779f115ef Exclude directories from containsDataFiles
Also include capo's microoptimisation even though it doesn't make things any faster.
2025-04-07 16:11:27 +01:00
AnyOldName3
973282e471 Optimise ContentSelectorModel::ContentModel::item
This saves about 5% of remaining launcher startup time

Not using fileProperty avoids loads of QVariant conversions.
2025-04-06 02:46:31 +01:00
AnyOldName3
1237746549 Be more careful when we tell Qt that data has changed
Unchecking files only changes whether they're checked, and doesn't completely rearrange the table and change the number of elements it has, so we only need to change the check state, not the whole layout.

It's way faster to just query all the data once after setting a content list than it is to query the data for all files between the old and new location of a file when we change any file's location in the load order.
2025-04-06 01:31:05 +01:00
Andrei Kortunov
bd59247270 Avoid trailing line breaks 2024-11-20 09:04:22 +04:00
AnyOldName3
f1795a4698 c a p i t u l a t e 2024-07-31 00:08:29 +01:00
AnyOldName3
cd7941dc9f Some launcher fixes
I tried to fix https://gitlab.com/OpenMW/openmw/-/issues/8080 by making it so that instead of crashing, we showed an error.

In doing so, I discovered some problems with plugin sorting and the refresh button, like:
* it forgetting the non-user content files somewhere
* nothing guaranteeing that built-in content files stay at the top of the list and them only being there because the first data directory that provides them is usually the first data directory
* it forgetting the non-user content files somewhere else
* it looking like it'd forget any kind of non-user setting under certain circumstances

I fixed those problems too
2024-07-31 00:04:38 +01:00
Dave Corley
d03f25437b CLEANUP(contentmodel): Use auto for insertPosition declaration to
avoid possible narrowing
2024-06-23 20:06:23 -05:00
Dave Corley
fbdc4f4881 CLEANUP(contentmodel): Use ranges::find_if instead of a loop 2024-06-23 18:15:27 -05:00
Dave Corley
40aee53831 CLEANUP(contentmodel): Actually, no, I hate while loops 2024-06-23 06:07:16 -05:00
Dave Corley
b43743212e FIX: check we're not going out of range while listing content files, fix #8029 2024-06-23 06:07:12 -05:00
Alexei Kotov
eca30f7921 Don't force Tribunal to be enabled to load Bloodmoon (#7993)
Sort Bloodmoon to be after Tribunal and warn the user if Bloodmoon is loaded before enabled Tribunal
2024-06-04 02:44:29 +03:00
AnyOldName3
b55a0fd32a || and && have different binding precedence 2024-04-30 13:50:50 +01:00
AnyOldName3
d148bd1cde Add bounds check 2024-04-30 13:41:48 +01:00
psi29a
99a0755094 Merge branch 'remove_natural_sort' into 'master'
Remove dead code

See merge request OpenMW/openmw!4047
2024-04-24 08:38:26 +00:00
Andrei Kortunov
6390fdee7a Remove dead code 2024-04-22 20:41:58 +04:00
Andrei Kortunov
1bb48bcef7 Treat editor icons as scalable 2024-04-21 20:56:06 +04:00
AnyOldName3
48f1f08537 Hide things that depend on present-but-inactive game files
https://gitlab.com/OpenMW/openmw/-/merge_requests/3925#note_1843962919
2024-04-07 22:12:39 +01:00
AnyOldName3
1ae2cc82a1 I do not know how this escaped formatting locally. 2024-03-06 00:46:01 +00:00
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.
2024-03-06 00:36:13 +00:00
AnyOldName3
d111b4bbd9 Handle built-in content files in content model
There's also handling for files declared as originating from a lower-priority openmw.cfg, e.g. anything in the local config or any intermediate ones, as they can't be disabled or reordered.
There's no way to mark such files yet, but the logic's the same as built-in files, so everything will be fine once that's set up.
2024-02-28 00:58:30 +00:00
AnyOldName3
626f438dcc Make builtin.omwscripts actually mandatory
Previously it was quasi-mandatory - lots of things would add it, e.g. when running openmw through the CS, but it could technically be disabled.

Now it's treated like the resources/vfs directory and implicitly added by the engine etc.
2024-02-27 01:09:46 +00:00
Andrei Kortunov
43307bee28 Make ContentSelector errors localizable 2024-01-28 11:25:46 +04:00
Evil Eye
0db8026356 Stop adding and deleting rows 2024-01-09 17:45:48 +01:00
Evil Eye
672cefd594 Track checked EsmFile pointers instead of full paths 2024-01-09 17:40:14 +01:00
Evil Eye
521394d67b Override launcher file info with higher priority info 2024-01-09 17:40:14 +01:00
Alexei Kotov
327fafe739 Contect selector: fix ESM date and version data encoding/decoding (#7764) 2024-01-07 07:16:42 +03:00
Andrei Kortunov
93e50cc7aa Improve format version in content selector 2024-01-01 18:16:58 +04:00
AnyOldName3
4567374e1f Merge branch 'localize_tooltip' into 'master'
Make content selector tooltip localizable

See merge request OpenMW/openmw!3687
2023-12-26 18:38:35 +00:00
Andrei Kortunov
f2c284688b Make content selector tooltip localizable 2023-12-25 11:29:36 +04:00
Andrei Kortunov
1ca2a0ef66 Store generated UI by pointer to avoid redundant processing 2023-12-24 20:35:19 +04:00
Andrei Kortunov
2e041073fc Move *.ui files for different applications to different folders 2023-12-19 15:21:08 +04:00
Andrei Kortunov
ca19f7006c Make hardcoded strings in Launcher and Wizard localizable 2023-12-11 12:02:43 +04:00
Andrei Kortunov
5e96825e6b Highlight new items in launcher by text formatting, not by color 2023-11-29 11:14:44 +04:00
psi29a
3151452e25 Merge branch 'pandorasbox' into 'master'
Launcher, content selector: support ESM4 files, allow using game files as addon files

See merge request OpenMW/openmw!3219
2023-08-08 08:54:10 +00:00
Andrei Kortunov
d3d7a663c6 Move some objects instead of copying 2023-07-31 20:43:46 +04:00