Commit e343ac82 authored by Lukas Appelhans's avatar Lukas Appelhans

Proper -Qe and -Qd

parent a16302fb
......@@ -64,9 +64,9 @@ void QueryOperation::start(QList<APM::Operation> operations, QMultiHash<APM::Ope
if (!args.isEmpty())
query = query + " Name LIKE \"" + args.first() + "\" AND";
if (operations.contains(APM::ShowInstalledAsDeps))
query = query + " InstallReason LIKE 0";// + QString((int)Akabei::Package::InstalledAsDependencyReason);
query = query + " InstallReason LIKE " + QString::number((int)Akabei::Package::InstalledAsDependencyReason);
else
query = query + " InstallReason LIKE 1";
query = query + " InstallReason LIKE " + QString::number((int)Akabei::Package::ExplicitlyInstalledReason);
showInstalledAsDeps(Akabei::Backend::instance()->localDatabase()->queryPackages(query));
} else if (operations.contains(APM::CheckFiles)) {
if (args.isEmpty())
......@@ -130,8 +130,10 @@ void QueryOperation::showInformation(QList<Akabei::Package*> packages)
void QueryOperation::showGroup(QUuid uuid,QList<Akabei::Group*> groups)
{
Q_UNUSED(uuid)
if (groups.isEmpty())
if (groups.isEmpty()) {
QCoreApplication::instance()->quit();
return;
}
Akabei::Group * group = groups.first();
QTextStream out(stdout);
......@@ -146,8 +148,10 @@ void QueryOperation::showGroup(QUuid uuid,QList<Akabei::Group*> groups)
void QueryOperation::showChangelog(QList< Akabei::Package* > packages)
{
if (packages.isEmpty())
if (packages.isEmpty()) {
QCoreApplication::instance()->quit();
return;
}
Akabei::Package * pkg = packages.first();
QTextStream out(stdout);
out << pkg->retrieveChangelog() << endl;
......@@ -157,8 +161,10 @@ void QueryOperation::showChangelog(QList< Akabei::Package* > packages)
void QueryOperation::showInstalledAsDeps(QList<Akabei::Package*> packages)
{
if (packages.isEmpty())
if (packages.isEmpty()) {
QCoreApplication::instance()->quit();
return;
}
QTextStream out(stdout);
QMap<QString, Akabei::Package*> sorted;
foreach (Akabei::Package * pkg, packages)
......@@ -171,8 +177,10 @@ void QueryOperation::showInstalledAsDeps(QList<Akabei::Package*> packages)
void QueryOperation::checkFiles(QList<Akabei::Package*> packages)
{
if (packages.isEmpty())
if (packages.isEmpty()) {
QCoreApplication::instance()->quit();
return;
}
Akabei::Package * pkg = packages.first();
QTextStream out(stdout);
int all = 0;
......
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