Settings page was added
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "viewmodels/usersviewmodel.h"
|
||||
#include "services/beerservice.h"
|
||||
#include "services/settingsservice.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -16,6 +17,11 @@ int main(int argc, char *argv[])
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QTranslator translator;
|
||||
|
||||
if (!translator.load("qt_ru.qm", "qrc:/")) {
|
||||
qWarning() << "Cant load";
|
||||
}
|
||||
|
||||
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
||||
for (const QString &locale : uiLanguages) {
|
||||
const QString baseName = "beerlog_" + QLocale(locale).name();
|
||||
@@ -33,7 +39,11 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication::exit(-1);
|
||||
}, Qt::QueuedConnection);
|
||||
|
||||
engine.addImportPath("qrc:/");
|
||||
|
||||
engine.rootContext()->setContextProperty("beerService", BeerService::instance());
|
||||
engine.rootContext()->setContextProperty("settingsService", SettingsService::instance());
|
||||
|
||||
qmlRegisterType<UsersViewModel>("ru.ded.beerlog", 1, 0, "UsersViewModel");
|
||||
|
||||
engine.load(url);
|
||||
|
||||
Reference in New Issue
Block a user