Commit 45081996 authored by Lisa's avatar Lisa

Reverted previous commit which broke code style

parent 76c0acee
......@@ -158,7 +158,7 @@ CmdLine::CmdLine()
QList<AkabeiOperation *> tmp;
tmp << &removeallcache << &help << &version << &install << &remove << &database << &changelog << &installedasdeps << &installedexp;
tmp << &checkfiles << &showowner << &notrequired << &upgradeable << &cascade;
tmp << &removeold << &groups << &info << &listrepo << &groupsl << &searchl << &infol << &unneeded;
tmp << &removeold << &groups << &info << &listrepo << &groupsl << &searchl << &infol;
tmp << &search << &updatedb << &updatesys << &updatedbandsys << &upgrade;
/*
......@@ -445,7 +445,6 @@ void CmdLine::parse(int argc, char** argv)
}
secondParse(KCmdLineArgs::allArguments(), found);
/*
* Gets all the other arguments around
*/
......@@ -466,7 +465,7 @@ void CmdLine::parse(int argc, char** argv)
}
/*
* This function handles all the parsing which can't be handled by KDE classes
* This function handles all the parsing which can't be handled before
* In particular, checks
* * if the operation is repeated more than once (not accepted)
* * if there's something "out of context" in the command line (like, some meaningless command)
......@@ -522,8 +521,7 @@ void CmdLine::secondParse(QStringList args, QList<QByteArray>& foundCmds)
*/
foreach(const QByteArray & com, cmdline) {
if (!foundCmds.contains(com)) {
QString msg = "out of context operation: " + com;
throw CmdLineException(msg.toUtf8().data());
throw CmdLineException("Out of context operation");
}
}
......
......@@ -48,7 +48,7 @@ void RemoveOperation::start(APM::OperationName operation, QHash<APM::OptionName,
query = query + " OR";
}
if (operation == APM::Unneeded) {
if (operation == APM::Unneeded) { //TODO: Implement those!
removeUnneeded(Akabei::Backend::instance()->localDatabase()->packages());
} else if (operation == APM::Remove) {
if (options.contains(APM::Recursive)) {
......@@ -102,10 +102,7 @@ void RemoveOperation::removeUnneeded(QList< Akabei::Package* > packages)
foreach(Akabei::Package * pkg, packages) {
bool required = false;
foreach(Akabei::Package * p, pkg->computeRequiredBy()) {
/* FIXME: isn't this quite useless, since packages contains only the local ones? */
required = required || p->database() == Akabei::Backend::instance()->localDatabase();
if (required)
break;
}
......
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