Commit be37b085 authored by Lukas Appelhans's avatar Lukas Appelhans

Processing options for remove operation as well

parent ea900b98
......@@ -31,6 +31,9 @@ RemoveOperation::~RemoveOperation()
void RemoveOperation::start(QList<APM::Operation> operations, QMultiHash<APM::Operation, QString> options, QStringList args)
{
m_operations = operations;
m_options = options;
m_args = args;
if (operations.contains(APM::DatabaseOnly)) {
} else {
QString query = "SELECT * FROM packages WHERE";
......@@ -50,6 +53,8 @@ void RemoveOperation::remove(QList<Akabei::Package*> packages)
AkabeiClient::Backend::instance()->queue()->addPackage(pkg, AkabeiClient::Remove);
}
Akabei::ProcessingOptions options;
if (m_operations.contains(APM::SkipDependencyCheck))
options |= Akabei::SkipDependencies;
connect(AkabeiClient::Backend::instance()->transactionHandler(), SIGNAL(validationFinished(bool)), SLOT(validationFinished(bool)));
connect(AkabeiClient::Backend::instance()->transactionHandler(), SIGNAL(errorsOccurred(QList<Akabei::Error*>&)), SLOT(errors(QList<Akabei::Error*>&)));
AkabeiClient::Backend::instance()->transactionHandler()->validate(options);
......
......@@ -29,6 +29,11 @@ public slots:
void errors(QList<Akabei::Error*>& errors);
void showProgress(int progress);
void finished();
private:
QList<APM::Operation> m_operations;
QMultiHash<APM::Operation, QString> m_options;
QStringList m_args;
};
#endif // REMOVEOPERATION_H
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