From: Jean-Baptiste Mardelle Date: Sun, 30 Dec 2012 15:00:15 +0000 (+0100) Subject: Limit the use of qApp->processEvents that might cause concurrency issues: http:/... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5ed1c89abce62e3babf51749b554d17b05727ac1;p=kdenlive Limit the use of qApp->processEvents that might cause concurrency issues: http://www.kdenlive.org/mantis/view.php?id=2885 --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a3084394..95b00560 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2168,7 +2168,6 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) progressDialog.progressBar()->setMaximum(4); progressDialog.show(); progressDialog.progressBar()->setValue(0); - qApp->processEvents(); bool openBackup; KdenliveDoc *doc = new KdenliveDoc(stale ? KUrl(stale->fileName()) : url, KdenliveSettings::defaultprojectfolder(), m_commandStack, KdenliveSettings::default_profile(), QMap (), QMap (), QPoint(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks()), m_projectMonitor->render, m_notesWidget, &openBackup, this, &progressDialog); @@ -2176,7 +2175,7 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) progressDialog.progressBar()->setValue(1); progressDialog.progressBar()->setMaximum(4); progressDialog.setLabelText(i18n("Loading project")); - qApp->processEvents(); + progressDialog.repaint(); if (stale == NULL) { QByteArray hash = QCryptographicHash::hash(url.encodedPath(), QCryptographicHash::Md5).toHex(); @@ -2191,13 +2190,13 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale) connectDocumentInfo(doc); progressDialog.progressBar()->setValue(2); - qApp->processEvents(); + progressDialog.repaint(); bool ok; TrackView *trackView = new TrackView(doc, m_tracksActionCollection->actions(), &ok, this); connectDocument(trackView, doc); progressDialog.progressBar()->setValue(3); - qApp->processEvents(); + progressDialog.repaint(); m_timelineArea->setCurrentIndex(m_timelineArea->addTab(trackView, KIcon("kdenlive"), doc->description())); if (!ok) {