aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-01-16 16:36:15 +0000
committerWeblate <noreply@weblate.org>2017-01-16 16:36:15 +0000
commit8c27ca3ce54d3df279cb9892fb84e014c613aa9f (patch)
tree494bacc2dbf5d5f73e07bb08d7c2e1948c1c3c68 /src-qt5/desktop-utils/lumina-fm
parentTranslated using Weblate (l_TERMINAL@hu (generated)) (diff)
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-8c27ca3ce54d3df279cb9892fb84e014c613aa9f.tar.gz
lumina-8c27ca3ce54d3df279cb9892fb84e014c613aa9f.tar.bz2
lumina-8c27ca3ce54d3df279cb9892fb84e014c613aa9f.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.cpp17
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()){
bgstack15