diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp index 5a08b797..82ce8a33 100644 --- a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp +++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp @@ -39,11 +39,17 @@ BrowserWidget::BrowserWidget(QString objID, QWidget *parent) : QWidget(parent){ } BrowserWidget::~BrowserWidget(){ + if(bThread->isRunning()){ bThread->exit(); } BROWSER->deleteLater(); - bThread->exit(); bThread->deleteLater(); } +void BrowserWidget::stop(){ + bThread->exit(); + this->setVisible(false); + this->disconnect(); +} + void BrowserWidget::changeDirectory(QString dir){ if(USE_VIDEO_LABEL){ QStringList vids = videoMap.keys(); @@ -305,8 +311,10 @@ void BrowserWidget::itemRemoved(QString item){ } void BrowserWidget::itemDataAvailable(QIcon ico, LFileInfo *info){ + if(info==0){ return; } if(listWidget!=0){ listWidget->setWhatsThis( BROWSER->currentDirectory() ); } if(treeWidget!=0){ treeWidget->setWhatsThis(BROWSER->currentDirectory() ); } + if(info->absolutePath() != BROWSER->currentDirectory()){ return; } //leftover item from a previous load //qDebug() << "Item Data Available:" << info->fileName(); int num = 0; if(listWidget!=0){ |