Commit c55b96aa authored by Nicolas Fella's avatar Nicolas Fella

Fix i18n on Android

parent 01483fa5
......@@ -2,7 +2,7 @@ qt5_add_resources(RESOURCES resources.qrc)
add_executable(plasma-phonebook main.cpp phonesmodel.cpp declarativeaddressee.cpp contactimporter.cpp ${RESOURCES})
target_link_libraries(plasma-phonebook
Qt5::Core Qt5::Qml Qt5::Quick Qt5::Svg
KF5::Contacts KF5::People
KF5::Contacts KF5::People KF5::I18n
)
if(ANDROID)
......
......@@ -23,6 +23,8 @@
#include <QtQml>
#include <QUrl>
#include <KLocalizedContext>
#include "declarativeaddressee.h"
#include "phonesmodel.h"
#include "contactimporter.h"
......@@ -38,6 +40,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
// back-end
QQmlApplicationEngine engine;
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
qmlRegisterType<Addressee>("org.kde.kcontacts", 1, 0, "Addressee");
qmlRegisterUncreatableType<PhonesModel>("org.kde.kcontacts", 1, 0, "PhonesModel", "Get it from the Addressee");
......
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