main.cpp Example File
bbminvitetodownload/src/main.cpp
#include <bb/cascades/Application>
#include <QLocale>
#include <QTranslator>
#include "InviteToDownload.hpp"
#include "RegistrationHandler.hpp"
using namespace bb::cascades;
Q_DECL_EXPORT int main(int argc, char **argv)
{
Application app(argc, argv);
QTranslator translator;
const QString locale_string = QLocale().name();
const QString filename = QString::fromLatin1("bbminvitetodownload_%1").arg(locale_string);
if (translator.load(filename, "app/native/qm")) {
app.installTranslator(&translator);
}
const QString uuid(QLatin1String(""));
RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app);
InviteToDownload *inviteToDownload = new InviteToDownload(registrationHandler->context(), &app);
bool ok = QObject::connect(registrationHandler, SIGNAL(registered()), inviteToDownload, SLOT(show()));
Q_ASSERT(ok);
Q_UNUSED(ok);
return Application::exec();
}