diff options
author | Weblate <noreply@weblate.org> | 2017-01-16 16:36:11 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-01-16 16:36:11 +0000 |
commit | d1626d6e590fa68e0fbe67b245970ff905eda842 (patch) | |
tree | 12bd8845b79fd66d2f8b377b58404bba34c064db /src-qt5/desktop-utils/lumina-fm | |
parent | Translated using Weblate (lumina_CONFIG@af (generated)) (diff) | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-d1626d6e590fa68e0fbe67b245970ff905eda842.tar.gz lumina-d1626d6e590fa68e0fbe67b245970ff905eda842.tar.bz2 lumina-d1626d6e590fa68e0fbe67b245970ff905eda842.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp index 5b84e2e7..9aeb70ac 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp +++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp @@ -41,7 +41,7 @@ bool Browser::showingHiddenFiles(){ // PRIVATE void Browser::loadItem(QString info){ //qDebug() << "LoadItem:" << info; - ////FileItem item; + //FileItem item; //itemame = info; QByteArray bytes; if(imageFormats.contains(info.section(".",-1).toLower()) ){ @@ -61,8 +61,7 @@ void Browser::loadItem(QString info){ } if(item.icon.isNull()){ item.icon = LXDG::findIcon(item.info.mimetype(), "unknown"); }*/ //qDebug() << " - done with item:" << info; - emit threadDone(info, bytes); - //return item; + this->emit threadDone(info, bytes); } // PRIVATE SLOTS @@ -117,15 +116,21 @@ void Browser::loadDirectory(QString dir){ if(showHidden){ files = directory.entryList( QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot, QDir::NoSort); } else{ files = directory.entryList( QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort); } emit itemsLoading(files.length()); - QCoreApplication::processEvents(); + //QCoreApplication::processEvents(); + //QCoreApplication::sendPostedEvents(); for(int i=0; i<files.length(); i++){ watcher->addPath(directory.absoluteFilePath(files[i])); //qDebug() << "Future Starting:" << files[i]; QString path = directory.absoluteFilePath(files[i]); if(old.contains(path)){ old.removeAll(path); } oldFiles << path; //add to list for next time - QtConcurrent::run(this, &Browser::loadItem, path ); - QCoreApplication::sendPostedEvents(); + if(imageFormats.contains(path.section(".",-1).toLower()) || path.endsWith(".desktop")){ + QtConcurrent::run(this, &Browser::loadItem, path ); + //QCoreApplication::sendPostedEvents(); + }else{ + //No special icon loading - do it in-line here + loadItem(path); + } } watcher->addPath(directory.absolutePath()); if(!old.isEmpty()){ |