Commit 5b7e8c23 authored by Lukas Appelhans's avatar Lukas Appelhans

Implement the basics

parent 094c2302
......@@ -10,6 +10,7 @@
#include "apm.h"
#include "queryoperation.h"
#include "syncoperation.h"
#include <akabeiclient/akabeiclientbackend.h>
......@@ -45,10 +46,20 @@ void APM::statusChanged(Akabei::Backend::Status status)
void APM::start()
{
if (m_operationType == QueryOperationType) {
QueryOperation * query = new QueryOperation(this);
query->start(m_operations, m_args);
}
switch (m_operationType) {
case QueryOperationType: {
QueryOperation * query = new QueryOperation(this);
query->start(m_operations, m_args);
break;
}
case SyncOperationType: {
SyncOperation * sync = new SyncOperation(this);
sync->start(m_operations, m_options, m_args);
break;
}
default:
break;
}
}
#include "apm.moc"
......@@ -35,6 +35,7 @@ QueryOperation::~QueryOperation()
void QueryOperation::start(QList<APM::Operation> operations, QStringList args)
{ //TODO: Make it all only query the local database
//TODO: Use switch statement!
if (operations.contains(APM::ShowInformation)) {
if (args.isEmpty())
return;
......
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