Skip to content

Commit

Permalink
Fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Feb 18, 2025
1 parent 953b6dc commit 8db07be
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 40 deletions.
12 changes: 4 additions & 8 deletions cmake/install/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
SET(PLUGIN_FILES "")
IF(LMMS_BUILD_WIN32)
<<<<<<< HEAD
INSTALL(FILES $<TARGET_FILE:Qt5::QWindowsIntegrationPlugin> DESTINATION platforms)
INSTALL(FILES $<TARGET_FILE:Qt5::QSvgIconPlugin> DESTINATION iconengines)
INSTALL(FILES $<TARGET_FILE:Qt5::QSvgPlugin> DESTINATION imageformats)
INSTALL(FILES $<TARGET_FILE:Qt5::Svg> DESTINATION .)
=======
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin> DESTINATION platforms)
>>>>>>> 2b679ebc4 (Add experimental Qt 6 support flags. (#7182))
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin> DESTINATION platforms)
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QSvgIconPlugin> DESTINATION iconengines)
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QSvgPlugin> DESTINATION imageformats)
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::Svg> DESTINATION .)
ENDIF()

IF(LMMS_BUILD_WIN32 OR LMMS_INSTALL_DEPENDENCIES)
Expand Down
1 change: 1 addition & 0 deletions include/DeprecationHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ template<typename... Args, std::enable_if_t<(detail::IsKeyOrModifier<Args> && ..
constexpr int combine(Args... args)
{
return (0 | ... | static_cast<int>(args));
}

/**
* @brief position is a backwards-compatible adapter for
Expand Down
2 changes: 0 additions & 2 deletions include/TrackContainerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ public slots:
protected:
static const int DEFAULT_PIXELS_PER_BAR = 128;

void resizeEvent( QResizeEvent * ) override;

TimePos m_currentPosition;


Expand Down
26 changes: 13 additions & 13 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ void MainWindow::finalize()
project_menu->addAction( embed::getIconPixmap( "project_save" ),
tr( "Save &As..." ),
this, SLOT(saveProjectAs()),
QKeySequence(combine(Qt::CTRL | Qt::SHIFT | Qt::Key_S));
QKeySequence(combine(Qt::CTRL, Qt::SHIFT, Qt::Key_S)));
project_menu->addAction( embed::getIconPixmap( "project_save" ),
tr( "Save as New &Version" ),
this, SLOT(saveProjectAsNewVersion()),
QKeySequence(combine(Qt::CTRL | Qt::ALT | Qt::Key_S));
QKeySequence(combine(Qt::CTRL, Qt::ALT, Qt::Key_S)));

project_menu->addAction( embed::getIconPixmap( "project_save" ),
tr( "Save as default template" ),
Expand All @@ -313,23 +313,23 @@ void MainWindow::finalize()
tr( "E&xport..." ),
this,
SLOT(onExportProject()),
QKeySequence(combine(Qt::CTRL | Qt::Key_E));
QKeySequence(combine(Qt::CTRL, Qt::Key_E)));
project_menu->addAction( embed::getIconPixmap( "project_export" ),
tr( "E&xport Tracks..." ),
this,
SLOT(onExportProjectTracks()),
QKeySequence(combine(Qt::CTRL | Qt::SHIFT | Qt::Key_E)));
QKeySequence(combine(Qt::CTRL, Qt::SHIFT, Qt::Key_E)));

project_menu->addAction( embed::getIconPixmap( "midi_file" ),
tr( "Export &MIDI..." ),
this,
SLOT(onExportProjectMidi()),
QKeySequence(combine(Qt::CTRL | Qt::Key_M)));
QKeySequence(combine(Qt::CTRL, Qt::Key_M)));

project_menu->addSeparator();
project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ),
qApp, SLOT(closeAllWindows()),
QKeySequence(combine(Qt::CTRL | Qt::Key_Q)));
QKeySequence(combine(Qt::CTRL, Qt::Key_Q)));

auto edit_menu = new QMenu(this);
menuBar()->addMenu( edit_menu )->setText( tr( "&Edit" ) );
Expand Down Expand Up @@ -447,31 +447,31 @@ void MainWindow::finalize()
// window-toolbar
auto song_editor_window = new ToolButton(embed::getIconPixmap("songeditor"), tr("Song Editor") + " (Ctrl+1)", this,
SLOT(toggleSongEditorWin()), m_toolBar);
song_editor_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_1)));
song_editor_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_1)));

auto pattern_editor_window = new ToolButton(embed::getIconPixmap("pattern_track_btn"),
tr("Pattern Editor") + " (Ctrl+2)", this, SLOT(togglePatternEditorWin()), m_toolBar);
pattern_editor_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_2)));
pattern_editor_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_2)));

auto piano_roll_window = new ToolButton(
embed::getIconPixmap("piano"), tr("Piano Roll") + " (Ctrl+3)", this, SLOT(togglePianoRollWin()), m_toolBar);
piano_roll_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_3)));
piano_roll_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_3)));

auto automation_editor_window = new ToolButton(embed::getIconPixmap("automation"),
tr("Automation Editor") + " (Ctrl+4)", this, SLOT(toggleAutomationEditorWin()), m_toolBar);
automation_editor_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_4)));
automation_editor_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_4)));

auto mixer_window = new ToolButton(
embed::getIconPixmap("mixer"), tr("Mixer") + " (Ctrl+5)", this, SLOT(toggleMixerWin()), m_toolBar);
mixer_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_5)));
mixer_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_5)));

auto controllers_window = new ToolButton(embed::getIconPixmap("controller"),
tr("Show/hide controller rack") + " (Ctrl+6)", this, SLOT(toggleControllerRack()), m_toolBar);
controllers_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_6)));
controllers_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_6)));

auto project_notes_window = new ToolButton(embed::getIconPixmap("project_notes"),
tr("Show/hide project notes") + " (Ctrl+7)", this, SLOT(toggleProjectNotesWin()), m_toolBar);
project_notes_window->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_7)));
project_notes_window->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_7)));

m_toolBarLayout->addWidget( song_editor_window, 1, 1 );
m_toolBarLayout->addWidget( pattern_editor_window, 1, 2 );
Expand Down
8 changes: 4 additions & 4 deletions src/gui/editors/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2049,17 +2049,17 @@ AutomationEditorWindow::AutomationEditorWindow() :
auto editModeGroup = new ActionGroup(this);
m_drawAction = editModeGroup->addAction(embed::getIconPixmap("edit_draw"), tr("Draw mode (Shift+D)"));

m_drawAction->setShortcut(combine(QKeySequence(Qt::SHIFT | Qt::Key_D)));
m_drawAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_D)));
m_drawAction->setChecked(true);

m_eraseAction = editModeGroup->addAction(embed::getIconPixmap("edit_erase"), tr("Erase mode (Shift+E)"));
m_eraseAction->setShortcut(combine(QKeySequence(Qt::SHIFT | Qt::Key_E)));
m_eraseAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_E)));

m_drawOutAction = editModeGroup->addAction(embed::getIconPixmap("edit_draw_outvalue"), tr("Draw outValues mode (Shift+C)"));
m_drawOutAction->setShortcut(combine(QKeySequence(Qt::SHIFT | Qt::Key_C)));
m_drawOutAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_C)));

m_editTanAction = editModeGroup->addAction(embed::getIconPixmap("edit_tangent"), tr("Edit tangents mode (Shift+T)"));
m_editTanAction->setShortcut(combine(QKeySequence(Qt::SHIFT | Qt::Key_T)));
m_editTanAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_T)));
m_editTanAction->setEnabled(false);

m_flipYAction = new QAction(embed::getIconPixmap("flip_y"), tr("Flip vertically"), this);
Expand Down
4 changes: 2 additions & 2 deletions src/gui/editors/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ Editor::Editor(bool record, bool stepRecord) :
connect(m_toggleStepRecordingAction, SIGNAL(triggered()), this, SLOT(toggleStepRecording()));
connect(m_stopAction, SIGNAL(triggered()), this, SLOT(stop()));
new QShortcut(Qt::Key_Space, this, SLOT(togglePlayStop()));
new QShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_Space)), this, SLOT(togglePause()));
new QShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_F11)), this, SLOT(toggleMaximize()));
new QShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_Space)), this, SLOT(togglePause()));
new QShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_F11)), this, SLOT(toggleMaximize()));

// Add actions to toolbar
addButton(m_playAction, "playButton");
Expand Down
22 changes: 11 additions & 11 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4775,10 +4775,10 @@ PianoRollWindow::PianoRollWindow() :

drawAction->setChecked( true );

drawAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_D )));
eraseAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_E)));
selectAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_S)));
pitchBendAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_T)));
drawAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_D )));
eraseAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_E)));
selectAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_S)));
pitchBendAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_T)));

connect( editModeGroup, SIGNAL(triggered(int)), m_editor, SLOT(setEditMode(int)));

Expand Down Expand Up @@ -4837,9 +4837,9 @@ PianoRollWindow::PianoRollWindow() :

auto pasteAction = new QAction(embed::getIconPixmap("edit_paste"), tr("Paste (%1+V)").arg(UI_CTRL_KEY), this);

cutAction->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_X)));
copyAction->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_C)));
pasteAction->setShortcut(QKeySequence(combine(Qt::CTRL | Qt::Key_V)));
cutAction->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_X)));
copyAction->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_C)));
pasteAction->setShortcut(QKeySequence(combine(Qt::CTRL, Qt::Key_V)));

connect( cutAction, SIGNAL(triggered()), m_editor, SLOT(cutSelectedNotes()));
connect( copyAction, SIGNAL(triggered()), m_editor, SLOT(copySelectedNotes()));
Expand All @@ -4861,19 +4861,19 @@ PianoRollWindow::PianoRollWindow() :
auto glueAction = new QAction(embed::getIconPixmap("glue"), tr("Glue"), noteToolsButton);
connect(glueAction, SIGNAL(triggered()), m_editor, SLOT(glueNotes()));

glueAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_G)));
glueAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_G)));

auto knifeAction = new QAction(embed::getIconPixmap("edit_knife"), tr("Knife"), noteToolsButton);
connect(knifeAction, &QAction::triggered, m_editor, &PianoRoll::setKnifeAction);
knifeAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_K)));
knifeAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_K)));

auto fillAction = new QAction(embed::getIconPixmap("fill"), tr("Fill"), noteToolsButton);
connect(fillAction, &QAction::triggered, [this](){ m_editor->fitNoteLengths(true); });
fillAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_F)));
fillAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_F)));

auto cutOverlapsAction = new QAction(embed::getIconPixmap("cut_overlaps"), tr("Cut overlaps"), noteToolsButton);
connect(cutOverlapsAction, &QAction::triggered, [this](){ m_editor->fitNoteLengths(false); });
cutOverlapsAction->setShortcut(QKeySequence(combine(Qt::SHIFT | Qt::Key_C)));
cutOverlapsAction->setShortcut(QKeySequence(combine(Qt::SHIFT, Qt::Key_C)));

auto minLengthAction = new QAction(embed::getIconPixmap("min_length"), tr("Min length as last"), noteToolsButton);
connect(minLengthAction, &QAction::triggered, [this](){ m_editor->constrainNoteLengths(false); });
Expand Down

0 comments on commit 8db07be

Please sign in to comment.