Commit d0e44d17 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

Finally fix the problem with Ark never quitting when not using the GUI.

We don't need startApplication; a simple correct connection to
KJob::result seems to work well.

svn path=/trunk/KDE/kdeutils/ark/; revision=982336
parent 5f7fdd08
......@@ -104,11 +104,7 @@ int main(int argc, char **argv)
// We call application.exec() only when not using batch creation/extraction
bool startApplication = true;
KApplication application;
//session restoring
......@@ -132,9 +128,8 @@ int main(int argc, char **argv)
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->isSet("add") || args->isSet("add-to")) {
startApplication = false;
AddToArchive *addToArchiveJob = new AddToArchive();
AddToArchive *addToArchiveJob = new AddToArchive;
application.connect(addToArchiveJob, SIGNAL(result(KJob*)), SLOT(quit()));
if (args->isSet("changetofirstpath")) {
......@@ -161,11 +156,10 @@ int main(int argc, char **argv)
} else if (args->isSet("batch")) {
startApplication = false;
//once the job has been started this interface can be safely
BatchExtract *batchJob = new BatchExtract();
BatchExtract *batchJob = new BatchExtract;
application.connect(batchJob, SIGNAL(result(KJob*)), SLOT(quit()));
for (int i = 0; i < args->count(); ++i) {
......@@ -217,10 +211,6 @@ int main(int argc, char **argv)
if (startApplication) {
kDebug(1601) << "Entering application loop";
return application.exec();
return 0;
kDebug(1601) << "Entering application loop";
return application.exec();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment