diff options
author | Ken Moore <ken@ixsystems.com> | 2017-05-30 08:41:37 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-05-30 08:41:37 -0400 |
commit | c3771d80e94d8baaa52ce5820abdb728cc63ea6d (patch) | |
tree | 106d56358f88558a9e0baa399e1e1840b85d6cd2 /src-qt5/desktop-utils/lumina-fm/Browser.cpp | |
parent | Quick fix for the single-instance stuff in lumina-fm - automatically raise th... (diff) | |
parent | prototype autoextract function (currently disabled) (diff) | |
download | lumina-c3771d80e94d8baaa52ce5820abdb728cc63ea6d.tar.gz lumina-c3771d80e94d8baaa52ce5820abdb728cc63ea6d.tar.bz2 lumina-c3771d80e94d8baaa52ce5820abdb728cc63ea6d.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/Browser.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp index d3e1b453..2fb7c533 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp +++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp @@ -39,7 +39,7 @@ bool Browser::showingHiddenFiles(){ } // PRIVATE -void Browser::loadItem(QString info){ +void Browser::loadItem(QString info, Browser *obj){ //qDebug() << "LoadItem:" << info; //FileItem item; //itemame = info; @@ -58,7 +58,7 @@ void Browser::loadItem(QString info){ }*/ } //qDebug() << " - done with item:" << info; - this->emit threadDone(info, bytes); + obj->emit threadDone(info, bytes); } QIcon Browser::loadIcon(QString icon){ @@ -73,14 +73,14 @@ QIcon Browser::loadIcon(QString icon){ // PRIVATE SLOTS void Browser::fileChanged(QString file){ if(file.startsWith(currentDir+"/") ){ - if(QFile::exists(file) ){ QtConcurrent::run(this, &Browser::loadItem, file ); } //file modified but not removed + if(QFile::exists(file) ){ QtConcurrent::run(this, &Browser::loadItem, file, this); } //file modified but not removed else{ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } //file removed - need to update entire dir }else if(file==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } } void Browser::dirChanged(QString dir){ if(dir==currentDir){ QTimer::singleShot(500, this, SLOT(loadDirectory()) ); } - else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir ); } + else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir, this ); } } void Browser::futureFinished(QString name, QByteArray icon){ @@ -133,11 +133,11 @@ void Browser::loadDirectory(QString dir){ if(old.contains(path)){ old.removeAll(path); } oldFiles << path; //add to list for next time if(imageFormats.contains(path.section(".",-1).toLower()) || path.endsWith(".desktop")){ - QtConcurrent::run(this, &Browser::loadItem, path ); + QtConcurrent::run(this, &Browser::loadItem, path, this); //QCoreApplication::sendPostedEvents(); }else{ //No special icon loading - do it in-line here - loadItem(path); + loadItem(path, this); } } watcher->addPath(directory.absolutePath()); |