Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Plasma Phonebook
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KDE
Plasma Phonebook
Commits
cc96d95e
Commit
cc96d95e
authored
Sep 18, 2019
by
Nicolas Fella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Request permission for storage access
We need it to access the KPeople db and VCard files
parent
09e40d1b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
1 deletion
+15
-1
AndroidManifest.xml
AndroidManifest.xml
+3
-0
CMakeLists.txt
CMakeLists.txt
+4
-0
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/main.cpp
src/main.cpp
+7
-0
No files found.
AndroidManifest.xml
View file @
cc96d95e
...
...
@@ -4,6 +4,9 @@
android:versionName=
"0.0.1"
android:versionCode=
"1"
android:installLocation=
"auto"
>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<application
android:name=
"org.qtproject.qt5.android.bindings.QtApplication"
android:label=
"Plasma Phonebook"
android:icon=
"@drawable/phonebook"
>
<activity
android:configChanges=
"orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
android:name=
"org.qtproject.qt5.android.bindings.QtActivity"
...
...
CMakeLists.txt
View file @
cc96d95e
...
...
@@ -32,6 +32,10 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS Kirigami2 People
)
find_package
(
KF5Contacts
"5.12.2"
REQUIRED
)
if
(
ANDROID
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS AndroidExtras
)
endif
()
################# Enable C++11 features for clang and gcc #################
set
(
CMAKE_CXX_STANDARD 11
)
...
...
src/CMakeLists.txt
View file @
cc96d95e
...
...
@@ -12,7 +12,7 @@ target_link_libraries(plasma-phonebook
)
if
(
ANDROID
)
target_link_libraries
(
plasma-phonebook KF5::Kirigami2 Qt5::Svg
)
target_link_libraries
(
plasma-phonebook KF5::Kirigami2 Qt5::Svg
Qt5::AndroidExtras
)
kirigami_package_breeze_icons
(
ICONS
go-down-symbolic
...
...
src/main.cpp
View file @
cc96d95e
...
...
@@ -30,6 +30,9 @@
#include "imppmodel.h"
#include "contactimporter.h"
#ifdef Q_OS_ANDROID
#include <QtAndroid>
#endif
Q_DECL_EXPORT
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -48,6 +51,10 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
qmlRegisterUncreatableType
<
ImppModel
>
(
"org.kde.kcontacts"
,
1
,
0
,
"ImppModel"
,
"Get it from the Addressee"
);
qmlRegisterType
<
ContactImporter
>
(
"org.kde.phonebook"
,
1
,
0
,
"ContactImporter"
);
#ifdef Q_OS_ANDROID
QtAndroid
::
requestPermissionsSync
({
"android.permission.WRITE_EXTERNAL_STORAGE"
});
#endif
engine
.
load
(
QUrl
(
QStringLiteral
(
"qrc:///main.qml"
)));
if
(
engine
.
rootObjects
().
isEmpty
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment