From b066d8ef6cacfaee746d90efd7ed2257f77c100c Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Wed, 26 Oct 2011 13:10:05 +0200 Subject: Remove possible race condition Reviewed-by: owolff --- src/ui/docgalleryui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/docgalleryui.cpp b/src/ui/docgalleryui.cpp index 8e45ef3..9cec1b7 100644 --- a/src/ui/docgalleryui.cpp +++ b/src/ui/docgalleryui.cpp @@ -81,8 +81,8 @@ void DocGalleryUi::addStandardItems() // Add some images QString modelPath = qApp->applicationDirPath() + "/models"; - mImageReaderWatcher.setFuture(QtConcurrent::run(this, &DocGalleryUi::readImages, modelPath)); connect(&mImageReaderWatcher, SIGNAL(finished()), this, SLOT(finishReadingImages())); + mImageReaderWatcher.setFuture(QtConcurrent::run(this, &DocGalleryUi::readImages, modelPath)); } void DocGalleryUi::openItem(QTreeWidgetItem *widgetItem, int) -- cgit v1.2.3