PR #6438 does 2 things:
1. Add check-namespace
2. Fix verify script
This PR contains only part 2 (and does some preparations for part 1). The goal of the PR is to make CI succeed on master.
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
This adds a script `check-strings` that checks whether strings, such as file paths or class names, are valid in files outside of the source code, e.g. in translations or themes. This also adds a verify script to verify `check-strings` on a constant git commit. Both scripts are under CI.
* Update ringbuffer submodule to fix includes
* Remove cyclic includes
* Remove Qt include prefixes
* Include C++ versions of C headers
E.g.: assert.h -> cassert
* Move CLIP_BORDER_WIDTH into ClipView
This allows to remove includes to TrackView.h in ClipView cpp files.
* Elliminate useless includes
This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):
```
include-what-you-use;
-Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
-Xiwyu;--keep=*/xmmintrin.h;
-Xiwyu;--keep=*/lmmsconfig.h;
-Xiwyu;--keep=*/weak_libjack.h;
-Xiwyu;--keep=*/sys/*;
-Xiwyu;--keep=*/debug.h;
-Xiwyu;--keep=*/SDL/*;
-Xiwyu;--keep=*/alsa/*;
-Xiwyu;--keep=*/FL/x.h;
-Xiwyu;--keep=*/MidiApple.h;
-Xiwyu;--keep=*/MidiWinMM.h;
-Xiwyu;--keep=*/AudioSoundIo.h
```
* Fixup: Remove empty #if-#ifdef pairs
* Remove LMMS_HAVE_STD(LIB|INT)_H
This replaces `set(CMAKE_CXX_STANDARD 14)` by `set(CMAKE_CXX_STANDARD 17)`
wherever it is required.
Additionally:
* raise `CMAKE_MINIMUM_REQUIRED(VERSION ...)` to `3.8` (the minimum
that supports C++17)
* `stdshims.h` is now unused and thus removed
* Fix ProjectVersion handling of pre-releases
* Add workaround for old, non-standard version
* Attempt to fix versioning
* More consistent comments
* Apply suggestions from code review
- Set CompareType's underlying type to int and revert change to ProjectVersion::compare's parameters
- Add "None" and "All" as names elements of CompareType enum
- Preserve hyphens in prerelease identifiers
- Pad invalid (too short) versions to prevent crashes or nasty behavior
- Compare numeric identifiers to non-numeric ones correctly
- Don't interpret identifiers of form "-#" as numeric (where '#' is any number of digits)
- Add tests to ensure fixes in this commit work and won't regress in the future
* CMAKE fixes from code review
Co-authored-by: Tres Finocchiaro <tres.finocchiaro@gmail.com>
* Remove unnecessary changes to CMake logic
* More const, more reference
* Apply suggestions from code review
Co-authored-by: Tres Finocchiaro <tres.finocchiaro@gmail.com>
* Create PathUtils
* Replace old SampleBuffer calls
* Fix automatic track names
* Fix things
* Remove accidental duplicate file
* Add includes
* More incldues
* PhysSong's code review + style
* Fix vestige loading?
Seems more reasonable to convert from relative on load and to relative on save than vice versa.
* Typo fix
* More Bases
* Enable more bases
* Add missing semicolons in prefixes
* Nicer sample track tooltip
* Use correct directories
"userXDir" gives the default dir for ladspa, sf2, and gig. "xDir" gives the user dir.
* Make relative to both default and custom locations
Part 1
* Make relative to both default and custom locations
Part 2
* Typofix
* Typofix
* Fix upgrade function after base renaming
* Fix Tests
* Update tests/src/core/RelativePathsTest.cpp
Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>
* Choose UserXBase over DefaultXBase if identical
toShortestRelative sticks with the first base found if two bases give the same path length. By placing UserXBase Bases before DefaultXBase Bases in the relativeBases vector, toShortestRelative will prioritize them.
* Ensure baseLocation always has trailing slash
Otherwise, a user configuring a path without one will break things.
* Move loc declaration out of switch
* Semicolon
* Apply suggestions from code review...
* Include PathUtil and sort includes
* More granular includes
* Apply suggestions from code review
Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>
* Update include/PathUtil.h
* Leave empty paths alone
* Fix stupid merge
* Really fix merge. Hopefully
* Switch Base from enum to class enum
* Don't pass Base by reference
* Use QStringLiteral for static QString allocation in basePrefix method
* Make VST loading more similar to previous implementation
* Fix tests after enum change
* Attempt to fix VST loading, nicer name for sample clips
* Fix last review comment
Don't append a "/" that will be removed by cleanPath later
* Apply suggestions from code review
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Fixes regression from 75077f6200 that caused
global automation tracks to have priority in processing.
Adds a test checking for the desired behaviour.
Fixes#4268