Commit cfa33eb6 authored by Lukas Appelhans's avatar Lukas Appelhans

-Qp works for everything where we need it

parent 7c84942f
......@@ -40,9 +40,13 @@ void QueryOperation::start(QList<APM::Operation> operations, QStringList args)
if (operations.contains(APM::ShowInformation)) {
if (args.isEmpty())
return;
connect(Akabei::Backend::instance(), SIGNAL(queryPackagesCompleted(QUuid,QList<Akabei::Package*>)),
SLOT(showInformation(QUuid,QList<Akabei::Package*>)));
Akabei::Backend::instance()->searchPackages(args.first());
if (operations.contains(APM::QueryPackageFile)) {
showInformation(QUuid(), QList<Akabei::Package*>() << Akabei::Backend::instance()->loadPackageFromFile(args.first()));
} else {
connect(Akabei::Backend::instance(), SIGNAL(queryPackagesCompleted(QUuid,QList<Akabei::Package*>)),
SLOT(showInformation(QUuid,QList<Akabei::Package*>)));
Akabei::Backend::instance()->searchPackages(args.first());
}
} else if (operations.contains(APM::ShowPackagesOfGroup)) {
if (args.isEmpty())
return;
......@@ -52,9 +56,13 @@ void QueryOperation::start(QList<APM::Operation> operations, QStringList args)
} else if (operations.contains(APM::ShowChangelog)) {
if (args.isEmpty())
return;
connect(Akabei::Backend::instance(), SIGNAL(queryPackagesCompleted(QUuid,QList<Akabei::Package*>)),
SLOT(showChangelog(QUuid,QList<Akabei::Package*>)));
Akabei::Backend::instance()->searchPackages(args.first());
if (operations.contains(APM::QueryPackageFile)) {
showChangelog(QUuid(), QList<Akabei::Package*>() << Akabei::Backend::instance()->loadPackageFromFile(args.first()));
} else {
connect(Akabei::Backend::instance(), SIGNAL(queryPackagesCompleted(QUuid,QList<Akabei::Package*>)),
SLOT(showChangelog(QUuid,QList<Akabei::Package*>)));
Akabei::Backend::instance()->searchPackages(args.first());
}
} else if (operations.contains(APM::ShowInstalledAsDeps) || operations.contains(APM::ShowInstalledExplicitely)) {
QString query = "SELECT * FROM packages WHERE";
if (!args.isEmpty())
......@@ -67,9 +75,13 @@ void QueryOperation::start(QList<APM::Operation> operations, QStringList args)
} else if (operations.contains(APM::CheckFiles)) {
if (args.isEmpty())
return;
connect(Akabei::Backend::instance(), SIGNAL(queryPackagesCompleted(QUuid,QList<Akabei::Package*>)),
if (operations.contains(APM::QueryPackageFile)) {
checkFiles(QUuid(), QList<Akabei::Package*>() << Akabei::Backend::instance()->loadPackageFromFile(args.first()));
} else {
connect(Akabei::Backend::instance(), SIGNAL(queryPackagesCompleted(QUuid,QList<Akabei::Package*>)),
SLOT(checkFiles(QUuid,QList<Akabei::Package*>)));
Akabei::Backend::instance()->searchPackages(args.first());
Akabei::Backend::instance()->searchPackages(args.first());
}
} else if (operations.contains(APM::ShowLocal)) {
if (args.isEmpty())
showLocalPackages(QString());
......
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