// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
#include <QtCore/QCoreApplication>
#include <QtCore/QSharedPointer>
#include <QtCore/QObject>
#include <QtCore/QTimer>

#include "Main.h"

void realmain();

void Main::run()
{
    realmain();
    emit finished();
}

int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);
    QSharedPointer<Main> mp(new Main(&app));
    QObject::connect(mp.data(), SIGNAL(finished()), &app, SLOT(quit()));
    QTimer::singleShot(0, mp.data(), SLOT(run()));
    return app.exec();
}
