Commit c066bfbb authored by Julius Künzel's avatar Julius Künzel
Browse files

Remove configureToolbar hack for >= KF 5.91

This is fixed upstream now with frameworks/kxmlgui!90
parent dbcd523b
Pipeline #138453 passed with stage
in 9 minutes and 53 seconds
......@@ -3951,11 +3951,13 @@ void MainWindow::slotToggleAutoPreview(bool enable)
}
}
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5,91,0)
void MainWindow::configureToolbars()
{
// Since our timeline toolbar is a non-standard toolbar (as it is docked in a custom widget, not
// in a QToolBarDockArea, we have to hack KXmlGuiWindow to avoid a crash when saving toolbar config.
// This is why we hijack the configureToolbars() and temporarily move the toolbar to a standard location
// Fixed upstream since KF 5.91.0
auto *ctnLay = static_cast<QVBoxLayout *>(m_timelineToolBarContainer->layout());
ctnLay->removeWidget(m_timelineToolBar);
addToolBar(Qt::BottomToolBarArea, m_timelineToolBar);
......@@ -3980,6 +3982,7 @@ void MainWindow::rebuildTimlineToolBar()
connect(m_timelineToolBar, &QWidget::customContextMenuRequested, this, &MainWindow::showTimelineToolbarMenu);
m_timelineToolBar->setVisible(true);
}
#endif
void MainWindow::showTimelineToolbarMenu(const QPoint &pos)
{
......
......@@ -19,6 +19,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QString>
#include <QUndoView>
#include <kxmlgui_version.h>
#include <KActionCategory>
#include <KColorSchemeManager>
#include <KSelectAction>
......@@ -319,7 +320,9 @@ public slots:
void connectDocument();
/** @brief Reload project profile in config dialog if changed. */
void slotRefreshProfiles();
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5,91,0)
void configureToolbars() override;
#endif
/** @brief Decreases the timeline zoom level by 1. */
void slotZoomIn(bool zoomOnMouse = false);
/** @brief Increases the timeline zoom level by 1. */
......@@ -517,8 +520,10 @@ private slots:
void slotCheckTabPosition();
/** @brief Toggle automatic timeline preview on/off */
void slotToggleAutoPreview(bool enable);
#if KXMLGUI_VERSION < QT_VERSION_CHECK(5,91,0)
/** @brief Rebuild/reload timeline toolbar. */
void rebuildTimlineToolBar();
#endif
void showTimelineToolbarMenu(const QPoint &pos);
/** @brief Open Cached Data management dialog. */
void slotManageCache();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment