Commit b0f0fc0e authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Android improvements

* ship im-* icons
* fix reading files
parent e89b35d3
......@@ -23,6 +23,7 @@ if(ANDROID)
view-pim-contacts
dialog-ok-apply
dialog-cancel
list-add
list-remove
list-add_executable
contact-new-symbolic
......@@ -31,6 +32,21 @@ if(ANDROID)
call-start
document-edit
delete
# im-* icons used by KContacts::Impp::serviceIcon
im-google
im-gadugadu
im-twitter
im-irc
im-google-talk
im-yahoo
im-jabber
im skype
im-icq
im-qq
im-facebook
im-aim
im-identi.ca
im-youtube
)
endif()
......
......@@ -12,7 +12,11 @@ ContactImporter::ContactImporter(QObject *parent) : QObject(parent)
void ContactImporter::importVCards(const QUrl &path)
{
#ifdef Q_OS_ANDROID
QFile inputFile(path.toString());
#else
QFile inputFile(path.toLocalFile());
#endif
if (!inputFile.open(QIODevice::ReadOnly)) {
qWarning() << "Couldn't read vCard to import: Couldn't open file for reading";
......
......@@ -82,7 +82,6 @@ Kirigami.ScrollablePage {
Kirigami.FormLayout {
id: form
wideMode: true
Controls.Button {
Kirigami.FormData.label: i18n("Photo")
......
......@@ -71,7 +71,11 @@ QImage Addressee::photo() {
}
Q_SCRIPTABLE void Addressee::addPhotoFromFile(const QString &path) {
#ifdef Q_OS_ANDROID
QImage image(path);
#else
QImage image(QUrl(path).toLocalFile());
#endif
setPhoto(image);
}
......
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