* Add f2 as a FX mixer rename shortcut. Enter doesn't work yet.
* Add both enter keys, remove code duplication
* Fix renaming with enter/return
* Clean up
* Horizontal mouse-wheel zooming. Ensure zoom center is always on the current mouse position.
* Horizontal zoom using mouse wheel center on the mouse position. For the SongEditor too.
* Wheel center on the Automation editor too.
Moving empty destructors out of the .cpp files and into headers
allows them to be devirtualized in certain cases.
(When the compiler can't "see" a function in a header, it must largely
assume it's some black box that the linker will resolve.)
While we're at it, use C++11's `= default` to define empty virtual
desturctors for us.
For some classes (e.g., Piano), nothing is derived from it, so we can
mark the class as final and remove any explicit virtual dtor.
There are many other places where this can be done, but this is a large
enough patch as-is.
* ThreadableJob: Move from AtomicInt to std::atomic
This is the first in a series of commits that migrates away from
AtomicInt towards the C++11 standard library types.
This would allow the removal of AtomicInt and related Qt
version-specific code.
While we're at it, also make ProcessingState an `enum class` so that
it's not implicitly convertible to integers.
* LocklessAllocator: Switch from AtomicInt to std::atomic_int
If it looks like some assignments around the Compare & Swap loops went
missing, it's because compare_exchange_weak() updates the first argument
to the current value when it fails (i.e., returns false).
* BufferManager: Remove extra AtomicInt include
* MixerWorkerThread: AtomicInt to std::atomic_int
* NotePlayHandle: AtomicInt to std::atomic_int
* Remove AtomicInt.h
* Move from QAtomicPointer to std::atomic<T*>
This removes some #ifdef trickery that was being used to get
load-acquire and store-release from Qt5 and "plain" (presumably
sequentially-consistent) loads and stores from Qt4.
C++11 (and subsequent C++ standards) provide portable ways to issue
atomic hardware instructions, which allow multiple threads to load,
store, and modify integers without taking a lock. The standard also
defines a memory model that lets you express the ordering guarantees
around these atomic operations. (x86 is relatively strongly-ordered, but
many other common architectures, such as ARM, are free to reorder loads
and stores unless told not to.)
This patch removes the lock from shared_object and replaces it with the
standard thread-safe reference counting implementation used in
C++'s std::shared_ptr, Rust's std::sync::Arc, and many others.
Additional resources on the topic:
https://assets.bitbashing.io/papers/concurrency-primer.pdfhttps://www.youtube.com/watch?v=ZQFzMfHIxng
Previously lmms used themed dialogs for project saving/opening, but not
when editing settings (edit -> settings).
With this change, the settings editor also uses themed dialogs.
Instead of calling MouseMoveEvent(), the TCO's "text float" text and position are updated.
This prevents left-clicking the right edge of a resizable TCO from decreasing its size.
Also, removed an unused variable: m_oldTime
Add `PerfTime` class representing a point in CPU time and `PerfLogTimer`, used for measuring and logging a time period. Used in `ProjectRenderer::run()
* Remove DataType.
An AutomatableModel should not need to know what concrete type it is.
Use virtual methods and implement them in the derived class instead of
testing the type in the base class.
* Remove unused method
* Remove m_hasLinkedModels
We can compute it on-the-fly with very little cost, and doing so
simplifies the code.
* Remove extra 'public:'
Probably a remnant of merging master
* Use owning types when possible.
Note: the QByteArray s is detached to mimic previous behavior;
detach() guarantees that the QByteArray uniquely owns its data, since
otherwise it's COW. This may be relevant in case Plugin:instantiate
modifies s.data() -- this way the original QString is safe.
* Make m_filter a unique_ptr.
* Make m_activeRenderer a unique_ptr
* use std::string instead of strcpy + buffers
We copy the QString, so it makes sense to accept it by value and _move_
it into the collection instead. This causes the caller to move any
rvalue QString into the function, and then the QString is never actually
copied at all.
Finally remove Song's dependency to MainWindow by moving the window
title update which is triggered due to a changed project file name from
the class Song into MainWindow.
Implementation details:
Add a new signal projectFileNameChanged to Song and connect the new slot
method MainWindow::onProjectFileNameChanged to it. Update the window
title whenever the slot is triggered.
Add a new private method Song::setProjectFileName which sets the project
file name and emits the signal (only if the file name really changes).
Call setProjectFileName everywhere where m_fileName was manipulated
directly. This is done to ensure that the signal can be potentially
emitted in all relevant situations.
Remove the calls to gui->mainWindow from
Song::createNewProjectFromTemplate.
These changes finally remove the include to "MainWindow.h". The include
for "ConfigManager.h" was previously done implicitly through the include
of "MainWindow.h" and therefore had to be added explicitly after the
latter is removed.
Move the window title updates which are triggered due to a changed
modify state from Song to MainWindow.
Implementation details:
Add a new signal modified to Song and connect the new slot method
MainWindow::onSongModified to it.
Currently only the window title is updated in the slot. It is only
updated if the code is executed from the GUI main thread. This
implementation was taken over from the original implementation of
Song::setModified. The assumption here seems to be that the Song might
also be set as modified from other threads (which is a bad design).
Add a new private method Song::setModified(bool) and replace all direct
manipulations of m_modified in Song by calls to this method. This is done
to ensure that the signal can be emitted in all these cases. Make
Song::setModified() delegates to Song::setModified(bool) for the same
reason.
Other changes:
Slightly refactor MainWindow::resetWindowTitle to get rid of an
unnecessary if statement.
Add the new signal Song::stopped which is emitted when the song is
stopped. Connect the new slot method MainWindow::onSongStopped to that
signal. Remove all GUI updates from Song::stop and handle them in
MainWindow::onSongStopped.
Move the showing of save result dialogs, e.g. "The project XYZ is now
saved.", from the class Song into the class MainWindow.
Implementation details:
Add three new methods guiSaveProject, guiSaveProjectAs and
handleSaveResult to MainWindow. The first two correspond to the methods
with the same name in Song which don't do anything GUI related anymore.
The GUI related actions are instead implemented in the two new methods
in MainWindow. The method handleSaveResult shows the dialogs for
successful and failed saves, updates the list of recent files and the
title bar of the main window.
This commit also fixes a problem in Song::guiSaveProject where a failed
saved without a GUI would still have returned true, i.e. success.
Move the functionality of the method Song::importProject into the
MainWindow as it mainly consists of GUI related actions.
Add a new method Song::setLoadOnLauch to ensure that the boolean
Song::m_loadOnLaunch is still set at the end of the import.
The code to export a song and the tracks of a song mainly consisted of
GUI code. Therefore it was moved completely into MainWindow.
Add two new slots and a method that does the actual work to MainWindow.
Make both slots delegate to the worker method.
Move all GUI dependencies out of Song::exportProjectMidi and move them
into the MainWindow.
Show the GUI in the new slot method MainWindow::onExportProjectMidi and
delegate to Song::exportProjectMidi once the file name has been
determined. The file name is given as a parameter to
Song::exportProjectMidi which still contains the business logic of
exporting the data.
Build AppImage with Carla support
* Disables HiDPI support in the AppImages
* Ignores deprecated jack usage
* Fix Carla compilation warnings
* Detects carla prefix in AppRun