From 2d267dd458c0a6f947d5e9bcb26deacde64e5f29 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Oct 2015 15:45:49 -0400 Subject: Make sure that when loading thumbnails, it only runs processEvents every 3 items (speeds things up quite a bit). --- lumina-fm/widgets/DirWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lumina-fm/widgets') diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp index 728adc96..5b994a85 100644 --- a/lumina-fm/widgets/DirWidget.cpp +++ b/lumina-fm/widgets/DirWidget.cpp @@ -606,7 +606,7 @@ void DirWidget::startLoadThumbs(){ QListWidgetItem *it = listWidget->findItems(needThumbs[i], Qt::MatchExactly).first(); it->setIcon(QIcon( QPixmap(it->whatsThis().section("::::",1,100)).scaled(listWidget->iconSize(),Qt::IgnoreAspectRatio, Qt::FastTransformation) ) ); } - QApplication::processEvents(); + if(i%3==0){ QApplication::processEvents(); } // do 3 at a time } } -- cgit