Commit aa3ff14c authored by Lukas Appelhans's avatar Lukas Appelhans

Quit after each command for now... later we will have to implement multicommands, but yeah later

parent cac50966
......@@ -20,6 +20,7 @@
#include <kio/global.h>
#include <akabeigroup.h>
#include <kdebug.h>
#include <QCoreApplication>
SyncOperation::SyncOperation(QObject* parent)
: QObject(parent),
......@@ -95,6 +96,7 @@ void SyncOperation::searchResult(QUuid , QList< Akabei::Package* > packages)
out << " " << p->description() << endl;
}
out.flush();
QCoreApplication::instance()->quit();
}
void SyncOperation::listRepo(const QString &repo)
......@@ -121,6 +123,7 @@ void SyncOperation::listRepo(const QString &repo)
out << endl;
}
out.flush();
QCoreApplication::instance()->quit();
}
void SyncOperation::showInformation(QUuid,QList<Akabei::Package*> packages)
......@@ -170,6 +173,7 @@ void SyncOperation::showInformation(QUuid,QList<Akabei::Package*> packages)
out << i18n("MD5 sum") << qSetFieldWidth(2) << ":" << qSetFieldWidth(20) << pkg->md5sum().data() << endl;
out << i18n("Description") << qSetFieldWidth(2) << ":" << qSetFieldWidth(20) << pkg->description() << endl;
out.flush();
QCoreApplication::instance()->quit();
}
void SyncOperation::showGroup(QUuid uuid,QList<Akabei::Group*> groups)
......@@ -186,6 +190,7 @@ void SyncOperation::showGroup(QUuid uuid,QList<Akabei::Group*> groups)
foreach (Akabei::Package * pkg, sorted.values())
out << group->name() << ' ' << pkg->name() << endl;
out.flush();
QCoreApplication::instance()->quit();
}
void SyncOperation::updateNextDatabase()
......@@ -193,6 +198,7 @@ void SyncOperation::updateNextDatabase()
if (currentDatabasePos == AkabeiClient::Backend::instance()->databases().count()) {
QTextStream out(stdout);
out << tr("Updating all databases finished") << endl;
QCoreApplication::instance()->quit();
return;
}
AkabeiClient::DatabaseHandler* db = AkabeiClient::Backend::instance()->databases().at(currentDatabasePos);
......
Markdown is supported
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