Commit Graph

21 Commits

Author SHA1 Message Date
Michael Gregorius
0ebc18941b More whitespace adjustments (#6711)
More whitespace adjustments as proposed in the code review.
2023-06-02 22:17:03 +02:00
Michael Gregorius
fda938fcca Code review changes (#6711)
Remove underscores and whitespace in the Model files.
2023-06-02 20:51:07 +02:00
Michael Gregorius
43319a8d79 Move implementations of Model into cpp file (#6711)
Move the implementation of the Model methods into Model.cpp so that
recompiles after changes are much quicker. Make Model::
isDefaultConstructed const.
2023-05-26 11:11:45 +02:00
Michael Gregorius
75627a15f9 Fix automation crash (#6711)
Fix a crash that occurs if the zooming or snapping model of the Song
Editor is used for automation.

The crash is caused by a failed static_cast to a Model* in
Model::parentModel(). The cast fails because in the constructor of
SongEditor the SongEditor is set as the parent of the zooming and
snapping model:
m_zoomingModel->setParent(this);
m_snappingModel->setParent(this);

This commit is rather a "band aid" fix because it only fixes the crash
by changing the static_cast to a dynamic_cast. However this means that
the name of the automation clip is initially empty.

A better solution would be to not use the Qt parent/child relationships
to implement the model hierarchies.
2023-05-26 10:52:35 +02:00
Dalton Messmer
2c6d88f799 Add GUARD_H closing comments 2023-01-05 17:58:49 -05:00
Dalton Messmer
fe6df8dbaf Add namespace prefix to include guards 2023-01-02 19:51:32 -05:00
Levin Oehlmann
28ec71f91a clang-tidy: Apply modernize-use-equals-default everywhere (#6450) 2022-06-26 08:48:24 +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
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
Hyunjin Song
4dce466873 Remove some Qt4 compatibility code 2019-03-27 07:05:38 +09:00
Hyunjin Song
231a8407e8 Merge branch 'stable-1.2'
# Conflicts:
#	.travis.yml
#	.travis/linux..script.sh
#	.travis/linux.win32.script.sh
#	.travis/linux.win64.script.sh
#	.travis/osx..install.sh
#	.travis/osx..script.sh
#	data/locale/en.ts
#	data/locale/id.ts
#	include/Graph.h
#	include/VstSyncController.h
#	include/lmms_math.h
#	plugins/vst_base/RemoteVstPlugin.cpp
#	src/core/RemotePlugin.cpp
#	src/core/Song.cpp
#	src/core/Track.cpp
#	src/gui/SubWindow.cpp
#	src/gui/widgets/Graph.cpp
2019-02-24 20:45:52 +09:00
Dominic Clark
2070ef21f5 Handle automation on processing thread (#4692) 2018-11-13 07:24:08 +09:00
Lukas W
ff1c30e35d Merge remote-tracking branch 'lukas/cleanup/qt4'
# Conflicts:
#	cmake/toolchains/common/MSYS.cmake
2018-07-17 08:52:49 +02:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Lukas W
11c693205e Remove usage of deprecated Qt API
Removes usage of the following deprecated Qt functions:
- QPixmap::grabWidget
- QString::null
- qFind
- qSort
- qGreater
- qCopy
2018-06-17 14:27:28 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Lukas W
df9d495571 Some #include cleanups 2015-01-22 16:28:41 +01:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Tobias Doerffel
729838fa08 ModelView, Model: coding style improvements 2014-03-21 10:46:42 +01:00
Tobias Doerffel
1d5cb23385 File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)
2009-08-25 01:30:41 +02:00