diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp index 43020309..4472ec18 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp @@ -75,32 +75,6 @@ void MainUI::LoadArguments(QStringList args){ for(int i=0; i<args.length(); i++){ if(args[i]=="--burn-img"){ burnIMG = true; continue; } if(args[i]=="--ax"){ autoExtract = true; continue; } - /*i++; - QFileInfo filename(args[i]); - QDir filedir = filename.canonicalPath(); - QString newdir = filename.completeBaseName(); - filedir.mkpath(newdir); - dir = newdir; - qDebug() << "MAINUI - archivefile = " << args[i]; - qDebug() << "MAINUI - filedir = " << filedir; - qDebug() << "MAINUI - newdir = " << newdir; - qDebug() << "MAINUI - dir = " << dir; - BACKEND->loadFile(args[i]); - qDebug () << "MAINUI - File should have loaded"; - //add in a delay in case i'm hitting a race condition - QTime waitTime= QTime::currentTime().addSecs(2); - while (QTime::currentTime() < waitTime) - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); - //things should have settled, now trigger extraction - if(autoExtract){ - ui->label_progress->setText(tr("Extracting...")); - autoextractFiles(); - qDebug () << "MAINUI - Extraction should have started"; - } - //now quit - //QCoreApplication::quit(); - return; - }*/ if(QFile::exists(args[i])){ ui->label_progress->setText(tr("Opening Archive...")); if(autoExtract){ @@ -143,7 +117,6 @@ QTreeWidgetItem* MainUI::findItem(QString path, QTreeWidgetItem *start){ else if(path.startsWith(start->child(i)->whatsThis(0)+"/")){ return findItem(path, start->child(i)); } } } - //qDebug() << "Could not find item:" << path; return 0; //nothing found } @@ -274,16 +247,9 @@ void MainUI::extractFiles(){ void MainUI::autoextractFiles(){ disconnect(BACKEND, SIGNAL(fileLoaded()), this, SLOT(autoextractFiles()) ); QString dir = BACKEND->currentFile().section("/",0,-2); //parent directory of the archive - //QFileDialog::getExistingDirectory(this, tr("Extract Into Directory"), QDir::homePath() ); if(dir.isEmpty()){ return; } - //add in a delay in case i'm hitting a race condition - /*qDebug() << "void MainUI::autoextractFiles() has started"; - QTime waitTime= QTime::currentTime().addSecs(2); - while (QTime::currentTime() < waitTime) - QCoreApplication::processEvents(QEventLoop::AllEvents, 100);*/ ui->label_progress->setText(tr("Extracting...")); BACKEND->startExtract(dir, true); -// QApplication::quit(); } void MainUI::extractSelection(){ @@ -312,7 +278,6 @@ void MainUI::UpdateTree(){ files.sort(); //Remove any entries for file no longer in the archive bool changed = cleanItems(files); - //qDebug() << "Found Files:" << files; for(int i=0; i<files.length(); i++){ if(0 != findItem(files[i]) ){ continue; } //already in the tree widget QString mime = LXDG::findAppMimeForFile(files[i].section("/",-1), false); //first match only |