Commit 41ddf217 authored by Lukas Appelhans's avatar Lukas Appelhans

More small changes, nothing big yet

parent da13da89
......@@ -12,16 +12,14 @@
#include <kdebug.h>
#include <QStringList>
#include <QTextStream>
#include <QCoreApplication>
#include <QTimer>
APM::APM(QObject * parent)
: QObject(parent)
{
}
APM::~APM()
{}
void APM::start(OperationType type, QList<Operation> operations, QStringList args)
APM::APM(OperationType type, QList<Operation> operations, QStringList args, QObject * parent)
: QObject(parent),
m_operationType(type),
m_operations(operations),
m_args(args)
{
QTextStream out(stdout);
//out << endl;
......@@ -31,6 +29,12 @@ void APM::start(OperationType type, QList<Operation> operations, QStringList arg
kDebug() << "Start";
printf("Start\n");
kDebug() << "Type" << type << "Operations" << operations << "Args" << args;
//QTimer::singleShot(0, AkabeiClient::Backend::instance(), SLOT(initialize()));
//QCoreApplication::instance()->quit();
QTimer::singleShot(0, QCoreApplication::instance(), SLOT(quit()));
}
APM::~APM()
{}
#include "apm.moc"
......@@ -11,6 +11,7 @@
#define APM_H
#include <QtCore/QObject>
#include <QStringList>
class APM : public QObject
{
......@@ -29,10 +30,13 @@ public:
UpdateDatabases = 1,
UpdateSystem = 2
};
explicit APM(QObject* parent = 0);
explicit APM(OperationType type, QList<Operation> operations, QStringList args, QObject* parent = 0);
virtual ~APM();
void start(OperationType type, QList<Operation> operations, QStringList args);
private:
OperationType m_operationType;
QList<Operation> m_operations;
QStringList m_args;
};
#endif //APM:H
......@@ -84,8 +84,7 @@ int main(int argc, char** argv)
args->clear(); // Free up some memory
APM apm;
apm.start(type, list, rest);
APM apm(type, list, rest);
/* // A binary option (on / off)
if (args->isSet("some-option"))
......
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