Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix crash on exit

parent 556c276b
......@@ -762,6 +762,7 @@ void MainWindow::slotReloadTheme()
MainWindow::~MainWindow()
{
pCore->prepareShutdown();
m_timelineTabs->disconnectTimeline(getMainTimeline());
delete m_audioSpectrum;
if (m_projectMonitor) {
m_projectMonitor->stop();
......
......@@ -74,3 +74,21 @@ void TimelineTabs::connectTimeline(TimelineWidget *timeline)
connect(timeline->controller(), &TimelineController::showTransitionModel, this, &TimelineTabs::showTransitionModel);
connect(timeline->controller(), &TimelineController::showItemEffectStack, this, &TimelineTabs::showItemEffectStack);
}
void TimelineTabs::disconnectTimeline(TimelineWidget *timeline)
{
disconnect(pCore->monitorManager()->projectMonitor(), &Monitor::seekTimeline, timeline->controller(), &TimelineController::setPosition);
disconnect(timeline->controller(), &TimelineController::seeked, pCore->monitorManager()->projectMonitor(), &Monitor::requestSeek);
disconnect(pCore->monitorManager()->projectMonitor(), &Monitor::seekPosition, timeline->controller(), &TimelineController::onSeeked);
disconnect(timeline, &TimelineWidget::focusProjectMonitor, pCore->monitorManager(), &MonitorManager::focusProjectMonitor);
disconnect(timeline, &TimelineWidget::zoomIn, pCore->window(), &MainWindow::slotZoomIn);
disconnect(timeline, &TimelineWidget::zoomOut, pCore->window(), &MainWindow::slotZoomOut);
disconnect(timeline->controller(), &TimelineController::durationChanged, pCore->projectManager(), &ProjectManager::adjustProjectDuration);
disconnect(this, &TimelineTabs::audioThumbFormatChanged, timeline->controller(), &TimelineController::audioThumbFormatChanged);
disconnect(this, &TimelineTabs::showThumbnailsChanged, timeline->controller(), &TimelineController::showThumbnailsChanged);
disconnect(this, &TimelineTabs::showAudioThumbnailsChanged, timeline->controller(), &TimelineController::showAudioThumbnailsChanged);
disconnect(this, &TimelineTabs::changeZoom, timeline, &TimelineWidget::slotChangeZoom);
disconnect(timeline->controller(), &TimelineController::showTransitionModel, this, &TimelineTabs::showTransitionModel);
disconnect(timeline->controller(), &TimelineController::showItemEffectStack, this, &TimelineTabs::showItemEffectStack);
}
......@@ -44,6 +44,7 @@ public:
/* @brief Returns a pointer to the current timeline */
TimelineWidget *getCurrentTimeline() const;
void disconnectTimeline(TimelineWidget *timeline);
protected:
/** @brief Helper function to connect a timeline's signals/slots*/
......
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