Commit Graph

58 Commits

Author SHA1 Message Date
Alex
e407e73e24 check-namespace: don't require comment after #else (#6513) 2022-09-19 17:45:44 +02:00
Johannes Lorenz
3cc5ec7282 Add check-namespace script (#6438)
This also fixes a lot of code files to be conforming to the script.

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-08-30 02:19:07 +02:00
Johannes Lorenz
9faa1d90c4 Fix "check-strings" verification (#6485)
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.
2022-08-13 21:29:15 +02:00
Levin Oehlmann
5904b249c0 clang-tidy: Apply modernize-use-override everywhere (#6439)
... to mark overriding functions `override` instead of `virtual`.
2022-06-19 23:03:55 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
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>
2022-06-19 20:08:46 +02:00
Johannes Lorenz
230aece217 Add check-strings (#6379)
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.
2022-05-23 20:35:06 +02:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* 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
2022-03-02 13:30:43 +01:00
Alex
dc73911391 Rename Beat/Bassline to Pattern (#6284)
- BB* -> Pattern*
- BBTrackContainer -> PatternStore
- BBTrackContainerView -> PatternEditor
- BBEditor -> PatternEditorWindow

Does not touch save files
2022-02-13 09:03:37 +01:00
Alexandre Almeida
55d361fb65 Rename TCO and related to Clip (#6226)
This PR renames

    TCO -> Clip
    Pattern -> MidiClip
    *TCO and *TCOView -> *Clip and *ClipView

The savefiles are not yet modified by this PR.
2022-01-14 05:45:21 +01:00
Yashraj Shinde
bf323d2024 Rename FxMixer to Mixer (#6239)
... as decided in #6089 and #5592.

This PR replaces every occurrence of "FX" where "Mixer Channel" is meant.
2022-01-09 08:15:23 +01:00
Johannes Lorenz
8a9a2fae62 Compile LMMS using C++17
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
2021-09-17 18:23:01 +02:00
Hyunjin Song
b4854f8bdb tests: Fix CMP0115 CMake warning 2021-06-04 10:54:29 +09:00
Hyunjin Song
9f0dc0fb1b Work around build failures for tests on macOS >= 10.14
This one should be removed once we export the include directory for lmms
to tests properly.
2020-12-01 19:36:17 +09:00
Hyunjin Song
d6b9853426 Tests: use C++14 as well as LMMS 2020-12-01 19:34:33 +09:00
Alexandre Almeida
6e081265ba Rename MidiTime to TimePos (#5684)
Fixes #4866
2020-11-29 19:46:13 +01:00
Spekular
af328003a0 Use valid Semver versions for pre-releases (#5636)
* 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>
2020-09-17 17:23:35 +02:00
Spekular
17565caf53 Improved relative paths (#5117)
* 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>
2020-07-28 17:07:35 +02:00
Hyunjin Song
d173f42fec Fix wine detection 2020-04-04 12:13:01 +09:00
Hyunjin Song
044c88c271 Merge branch 'stable-1.2'
# Conflicts:
#	.gitmodules
#	.travis.yml
#	.travis/linux..before_install.sh
#	.travis/linux..install.sh
#	CMakeLists.txt
#	cmake/linux/package_linux.sh.in
#	cmake/modules/BuildPlugin.cmake
#	include/AutomatableModel.h
#	plugins/MidiImport/MidiImport.cpp
#	plugins/carlapatchbay/CMakeLists.txt
#	plugins/carlarack/CMakeLists.txt
#	src/core/Song.cpp
#	src/core/Track.cpp
#	src/gui/editors/SongEditor.cpp
#	tests/src/core/AutomatableModelTest.cpp
2020-04-04 12:08:55 +09:00
Johannes Lorenz
47786865ef Document strange bug 2020-02-25 20:40:49 +01:00
Johannes Lorenz
a0f4e50805 Fix knobs not updating vals on link (#4904) 2020-02-25 20:40:49 +01:00
Alexandre Almeida
53e6b645c8 Use "bar" instead of "tact"
Closes #4865
2019-10-31 15:13:25 +01:00
Johannes Lorenz
777da5e391 Fix CI on windows 2019-04-27 11:11:48 +02:00
Johannes Lorenz
8d005e7565 AutomatableModelTest: Improve tests
Check whether returned pointers from the cast are equal to the original
pointers, rather than just checking wether they are not `nullptr`.
2019-04-27 10:48:37 +02:00
Johannes Lorenz
0fd5693e12 Improve dcast
* document `dcast`
* make `dcast` not only cast exact, but also upwards
* add `dcast` test
* rename `dcast` -> `dynamicCast`
2019-04-27 00:29:49 +02:00
Hyunjin Song
244b70b4c8 Fix building unit tests targetting windows
Fixes MSVC's LNK4217 warnings and MinGW errors.
2018-11-29 12:05:59 +09:00
Hyunin Song
7aeddc648a Fix unit tests for automation
Cherry-picked from 'master'.
Orignal commit: 0a6a6d1a77
2018-10-08 16:20:03 +09:00
Lukas W
2e6bb72847 Fix export errors with MinGW 2018-07-07 17:16:08 +02:00
Lukas W
a87aa7e356 Merge branch 'stable-1.2'
# Conflicts:
#	src/gui/widgets/EffectView.cpp
2018-06-17 11:51:50 +02:00
Lukas W
d3c90a81b9 Fix automation processing priority
Fixes regression from 75077f6200 that caused
global automation tracks to have priority in processing.

Adds a test checking for the desired behaviour.

Fixes #4268
2018-06-01 15:12:47 +02:00
Hyunin Song
0a5d056bdb Merge branch 'stable-1.2'
# Conflicts:
        #       .travis/osx..install.sh
        #       .travis/osx..script.sh
        #       cmake/linux/package_linux.sh.in
        #       data/locale/en.ts
        #       src/core/CMakeLists.txt
        #       src/core/ProjectRenderer.cpp
        #       src/gui/FileBrowser.cpp
2018-03-07 23:54:28 +09:00
Tres Finocchiaro
1d63bd3b4e Use Canonical Paths for Relative Paths Calculations (#4211)
Fix redundant path elements
Closes #4173
2018-03-03 22:46:07 -05:00
Hyunin Song
59cfcf41a7 Merge branch 'stable-1.2'
# Conflicts:
#	.travis/linux..before_install.sh
#	.travis/linux..install.sh
#	.travis/linux..script.sh
#	cmake/linux/package_linux.sh.in
#	include/AudioWeakJack.def
#	plugins/vst_base/CMakeLists.txt
#	plugins/zynaddsubfx/zynaddsubfx
2017-12-20 14:16:16 +09:00
Hyunjin Song
6cc118c259 Fix automation unit test for Qt4
Fixes failing Travis-CI build
2017-12-01 11:26:37 +09:00
Lukas W
d146308c02 Add more automation tests
See issue #3800 (Automations continue after the end of their TCOs) which
was fixed via #4012
2017-11-30 19:43:49 +01:00
Lukas W
03e9889605 Remove old CMake compat code 2017-11-29 17:33:18 +01:00
Lukas W
e735260d53 Merge pull request #3860 from PhysSong/unit-auto
Fix warning in automation unit test
2017-11-29 17:24:00 +01:00
Lukas W
8ed6295a7d Use CMAKE_CXX_STANDARD as a portable way of setting C++11
Fixes MSVC warnings "unknown option -std=c++11"
2017-10-16 15:01:13 +02:00
Hyunin Song
0a6a6d1a77 Fix warning in automation unit test 2017-10-07 16:15:09 +09:00
Lukas W
75077f6200 Fix automation processing in BB tracks (#3481)
Fixes #3464
2017-05-07 13:05:19 +02:00
Tres Finocchiaro
7e3ee14cf1 Make factory samples relative (#3510)
* Make factory samples relative
Fixes #3491
Related #1719
2017-05-06 10:27:18 +02:00
Lukas W
6004edae5c Include past automation patterns in processing (#3382)
Fixes #662

* Include past automation tracks in processing
* Track::getTCOsInRange: Use binary search, fix doc
* Automation refactorings
* Add automation tests
2017-03-26 12:27:15 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Javier Serrano Polo
5eb0ae2d75 Implement version major.minor.release-stage.build (#3011) 2016-09-10 02:27:59 +00:00
Lukas W
37dfa492dc ProjectVersion tests, fix mixleading comment 2016-08-29 09:04:37 +02:00
Cyrille Bollu
3f6f266a46 Rewrote ProjectVersionTest.cpp to use QVERIFY and indeed fail when it's supposed to fail,
and added 2 tests in this test suite.
2016-03-09 11:58:15 +01:00
Lukas W
4d4f0ed438 CMake proper version comparison 2015-06-16 16:55:38 +02:00
Lukas W
4953a9da60 Merge pull request #1637 from LMMS/travis-osx
Travis OSX
2015-01-16 01:15:47 +01:00
Lukas W
f492a8ab0e Detect failed tests 2015-01-16 01:15:02 +01:00
Lukas W
59513f9a49 Fix that CMake version check again 2015-01-16 00:25:10 +01:00