Commit Graph

326 Commits

Author SHA1 Message Date
Alexei Kotov b49b048f72 Merge branch 'warn-baby-warn-warning-inferno' into 'master'
Warning inferno - fix warnings, then fix warnings

Closes #8674

See merge request OpenMW/openmw!4927
2025-11-23 15:01:53 +03:00
jvoisin c09cb5c0de Merge branch 'fileview' into 'master'
Use std::string_view in file collections

See merge request OpenMW/openmw!4909
2025-11-10 21:08:05 +00:00
AnyOldName3 9d0a8eb8c4 New warning from !4980
It didn't like snake case, and then MSVC wasn't happened that it shadowed the constexpr value with the same name
2025-11-10 19:08:09 +00:00
AnyOldName3 0a9f5a3c66 Resolve merge conflicts from !4938 and !4956 2025-11-02 18:05:38 +00:00
Alexei Kotov 1f839d264d Merge branch 'fix_qt_build' into 'master'
Do not implicitly convert QByteArray to const char*

See merge request OpenMW/openmw!4941
2025-10-18 18:41:24 +03:00
Alexei Kotov b7ddc8304b Cleverer filesystem path conversion for QString/QStringView 2025-10-18 13:28:30 +03:00
elsid 801224749f
Handle errors when computing stream size for BSA 2025-10-06 00:02:32 +02:00
elsid 0bae2b14b1
Do not implicitly convert QByteArray to const char*
Operators supporting this conversion can be disabled via
QT_NO_CAST_FROM_BYTEARRAY breaking the build. For example:

https://koschei.fedoraproject.org//package/openmw
https://kojipkgs.fedoraproject.org/work/tasks/5096/137735096/build.log
2025-10-05 23:52:25 +02:00
AnyOldName3 a433114937 Rearrange extern so includes don't need to start with extern/ 2025-09-23 01:04:45 +01:00
AnyOldName3 98291f1377 First batch of warning fixes 2025-09-18 00:38:08 +01:00
Evil Eye 14e1ec6d87 Use pathhelpers to populate Collections 2025-09-01 17:57:44 +02:00
Evil Eye 2105e98d0a Use std::string_view in collections 2025-09-01 17:08:33 +02:00
elsid dea69b229c
Remove small translation units
Remove .cpp files with small amount of code which don't have additional
includes compared to corresponding .hpp files. This reduces the total
size of preprocessed code of the project and should reduce compilation
time.
2025-08-29 00:41:47 +02:00
elsid 0f36b7fc97
Fix and enforce parameter naming 2025-08-27 12:45:09 +02:00
elsid 3067294f0d
Add and fix -Wshadow 2025-08-18 21:09:06 +02:00
elsid d121b606b6
Fix and enforce local variable naming 2025-08-05 21:27:48 +02:00
elsid a2bc1569e0
Remove unused includes 2025-08-02 12:45:03 +02:00
Evil Eye b4a753812e Use empty paths instead of optionals 2025-07-26 10:23:19 +02:00
Evil Eye c0b230b742 Remove global config on Windows 2025-07-26 09:45:35 +02:00
elsid 28851411a3
Fix and enforce namespace naming 2025-07-20 21:19:16 +02:00
AnyOldName3 71d334fe79 Fix MacOS even more 2025-06-19 19:55:26 +01:00
AnyOldName3 bee9716262 Fix getLocalPath for MacOS 2025-06-19 16:32:21 +01:00
AnyOldName3 276e0e6765 Remove vestigial include 2025-06-19 00:22:58 +01:00
AnyOldName3 2ce4571c3a Handle paths passed on the command line properly
Fixes https://gitlab.com/OpenMW/openmw/-/issues/8567.

Also maybe horribly breaks lots of things because it removes some insanity from https://gitlab.com/OpenMW/openmw/-/merge_requests/86, which would set the CWD to the local directory just in case any local-relative paths were expressed relatively without the explicit base being the local path.
2025-06-17 00:26:06 +01:00
AnyOldName3 166852254f Use non-deprecated known folder API
SHGetFolderPathW was deprecated in Windows Vista nearly two decades ago. ShGetKnownFolderPath is the replacement.

Also log if there was an error. Someone seemed to be getting an error on Discord, despite other apps being able to get the path just fine with these functions.

Also don't pass the flags to create the folders if they don't exist. We probably don't have the right permissions and if they don't exist, then there are bigger problems. Maybe this will fix the issue the user was having.

Also add a comment about global config on Windows being fundamentally wrong.
2025-03-25 01:32:44 +00:00
Andrei Kortunov 2522fe9517 Remove dead code 2024-11-14 22:16:05 +04:00
psi29a 8037a6e765 Merge branch 'portable-launcher' into 'master'
Portable Launcher (plus a whole slew of bugs fixes for problems I found that I suspect aren't on the tracker)

Closes #6846

See merge request OpenMW/openmw!3925
2024-04-10 09:53:07 +00:00
psi29a af9f1b54da Merge branch 'lost-warnings' into 'master'
Fixes for a whole bunch of warnings

See merge request OpenMW/openmw!3950
2024-03-21 07:45:21 +00:00
AnyOldName3 28131fd62b Fixes for a whole bunch of warnings
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882.
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.

Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.

Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.

There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.

We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
2024-03-14 23:39:33 +00:00
elsid a98ce7f76a
Replace std::filesystem::path by std::string_view in Files::getHash argument 2024-03-11 22:07:37 +01:00
AnyOldName3 e0b13f0858 Ensure default config values are present
Moving builtin.omwscripts out of the root openmw.cfg means we actually might need to use the defaults, so need to have some.
2024-03-08 01:44:47 +00:00
AnyOldName3 f476301670 There's no such thing as the global data directory
That's what resources/vfs is for.
2024-02-27 14:11:48 +00:00
AnyOldName3 357bf3db61 Load all config files 2024-02-25 14:01:20 +00:00
Andrei Kortunov 7e345436f4 Localize Launcher and Wizard 2024-02-01 09:47:25 +04:00
Andrei Kortunov 87c9f395f1 Move local variables in components 2024-01-19 16:01:48 +04:00
Yury Stepovikov 52623ddd7d Set MacOS current_path before reading configuration files [#7706] 2024-01-11 00:59:27 +00:00
elsid dd54857610
Add missing array include 2023-07-29 00:29:03 +02:00
psi29a 2a534576de Merge branch 'fix-the-comments-again' into 'master'
Restore and clarify comments damaged by !2971

Closes #7350 and #7349

See merge request OpenMW/openmw!2979
2023-07-07 13:05:48 +00:00
AnyOldName3 106dbba086 Restore and clarify comments damaged by !2971 2023-07-07 13:05:48 +00:00
Evil Eye eeda48ec50 Drop support for --fs-strict 2023-06-08 21:10:09 +02:00
psi29a 957318d0b9 Merge branch 'remove_cruft' into 'master'
remove boost::locale::conv

See merge request OpenMW/openmw!2970
2023-04-25 16:06:55 +00:00
psi29a 50bd6cf263 remove boost::locale::conv 2023-04-25 16:06:55 +00:00
Bret Curtis 0db31207dc remove remaining boost::filesystem cruft 2023-04-25 16:15:04 +02:00
Alexei Kotov 536370c76d Files::Collections: prefer files from highest priority folders 2023-02-11 01:25:00 +03:00
Andrzej Głuszak 9b0a499b58 Remove strerror usages 2023-01-29 22:41:59 +01:00
elsid 0961720835
Join path components using path::operator/ instead of string::operator+ 2023-01-27 01:07:15 +01:00
Andrei Kortunov b0d687964e Make sure that local path has a trailing slash on Linux and Windows 2022-12-03 11:27:42 +04:00
clang-format-bot ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid 6ae15f08e0
Avoid chained operator() calls to prevent formatting issues 2022-09-12 16:48:15 +02:00
Project579 ca14fc00dc Added dedicated functions for conversions between QString and std::filesystem::path. 2022-09-11 14:41:21 +02:00