aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-archiver
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp35
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp7
2 files changed, 0 insertions, 42 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
diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
index 226da9f1..60ae9ce1 100644
--- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
@@ -30,14 +30,11 @@ void Backend::loadFile(QString path){
qDebug() << "void Backend::loadFile(QString path) has started";
qDebug() << "Loading Archive:" << path;
filepath = path;
- //qDebug () << "BACKEND LOAD- " << "path = " << path;
- //qDebug () << "BACKEND LOAD- " << "filepath = " << filepath;
tmpfilepath = filepath.section("/",0,-2)+"/"+".tmp_larchiver_"+filepath.section("/",-1);
flags.clear();
flags << "-f" << filepath; //add the actual archive path
if(QFile::exists(path)){ startList(); qDebug () << "BACKEND LOAD startList has started";}
else{ contents.clear(); emit ProcessFinished(true, ""); }
- //qDebug () << "BACKEND LOAD COMPLETE";
}
bool Backend::canModify(){
@@ -131,10 +128,6 @@ void Backend::startRemove(QStringList paths){
}
void Backend::startExtract(QString path, bool overwrite, QString file){
- qDebug () << "BACKEND startExtract -" << "void Backend::startExtract(QString path, bool overwrite, QString file) has started";
- qDebug () << "BACKEND startExtract -" << "path = " << path;
- qDebug () << "BACKEND startExtract -" << "overwrite =" << overwrite ;
- qDebug () << "BACKEND startExtract -" << "file =" << file;
startExtract(path, overwrite, QStringList() << file); //overload for multi-file function
}
bgstack15