diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-02 10:56:42 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-02 10:56:42 -0500 |
commit | b335f8c9b3657852d25e0e3bc7db0b03772d07df (patch) | |
tree | b5eb86951098d023dd2d983c7bc7a55cfdc7edaf /lumina-fm | |
parent | Disable the shutdown/restart buttons on PC-BSD systems if the system is in th... (diff) | |
download | lumina-b335f8c9b3657852d25e0e3bc7db0b03772d07df.tar.gz lumina-b335f8c9b3657852d25e0e3bc7db0b03772d07df.tar.bz2 lumina-b335f8c9b3657852d25e0e3bc7db0b03772d07df.zip |
Enable a bunch of debugging in the lumina-fm background worker. Something in ther is crashing on occasion - still not sure what yet.
Diffstat (limited to 'lumina-fm')
-rw-r--r-- | lumina-fm/BackgroundWorker.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp index bbba8749..7b7829d7 100644 --- a/lumina-fm/BackgroundWorker.cpp +++ b/lumina-fm/BackgroundWorker.cpp @@ -3,6 +3,8 @@ #include <LuminaXDG.h> #include <QMediaServiceSupportedFormatsInterface> #include <QImageReader> +#include <QDir> +#include <QFileInfo> BackgroundWorker::BackgroundWorker() : QObject(){ @@ -14,6 +16,7 @@ BackgroundWorker::~BackgroundWorker(){ void BackgroundWorker::startDirChecks(QString path){ QDir dir(path); + qDebug() << "Starting Dir Checks:" << path; //First check for image files if(imgFilter.isEmpty()){ //Initial Run - load supported image extensions @@ -34,13 +37,14 @@ void BackgroundWorker::startDirChecks(QString path){ } QStringList files = dir.entryList(multiFilter, QDir::Files | QDir::NoDotAndDotDot, QDir::Name | QDir::IgnoreCase); if(!files.isEmpty() && !multiFilter.isEmpty()){ emit MultimediaAvailable(files); } - + qDebug() << " - done with audio/multimedia checks"; //Now check for ZFS snapshots of the directory if(!QFileInfo(path).isWritable() ){ return; } //skip ZFS checks if can't restore to this dir cdir = path; QStringList snapDirs; QString baseSnapDir; bool found = false; + qDebug() << " - start searching for base snapshot directory"; if(cdir == path && QFile::exists(csnapdir) ){ //no need to re-search for it - just found it recently baseSnapDir= csnapdir; found=true; @@ -52,9 +56,11 @@ void BackgroundWorker::startDirChecks(QString path){ }else{ dir.cdUp(); } } } + qDebug() << " - done with base snapshot directory"; cdir = path; csnapdir = baseSnapDir; //Now find the snapshots that contain this directory and save them if(found){ + qDebug() << " - start fetching snapshots"; QString reldir = path; reldir.remove(baseSnapDir.section("/.zfs/snapshot",0,0)); //convert to a relative path dir.cd(baseSnapDir); @@ -68,12 +74,13 @@ void BackgroundWorker::startDirChecks(QString path){ snapDirs[i] = QFileInfo(dir, snapDirs[i]+"/"+reldir).created().toString("yyyyMMddhhmmsszzz")+"::::"+snapDirs[i]; } } + qDebug() << " - done fetching snapshots"; snapDirs.sort(); //Sort the snapshots by time (newest last) and format them for(int i=0; i<snapDirs.length(); i++){ snapDirs[i] = dir.absolutePath()+"/"+snapDirs[i].section("::::",1,50)+"/"+reldir; } if(!snapDirs.isEmpty()){ emit SnapshotsAvailable(baseSnapDir, snapDirs); } - //qDebug() << "Found snapshots:" << snapDirs; + qDebug() << "Found snapshots:" << snapDirs; } }
\ No newline at end of file |