Commit c99b1475 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Port to Qt 5.14 + Android

Summary: There's a series of things that should be done differently nowadays on Android.

Test Plan: Tested the application on my Android phone.

Reviewers: #android, vkrause

Reviewed By: #android, vkrause

Subscribers: vatra, vkrause, kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D27715
parent 20481014
......@@ -16,8 +16,7 @@
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
<!-- Deploy Qt libs as part of package -->
<meta-data android:name="android.app.bundle_local_qt_libs" android:value="1"/>
<meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
<meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
<meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
<!-- Run with local libs -->
<meta-data android:name="android.app.use_local_qt_libs" android:value="1"/>
<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
......
<?xml version='1.0' encoding='utf-8'?>
<resources>
<array name="qt_sources">
<item>https://download.qt-project.org/ministro/android/qt5/latest</item>
</array>
<!-- The following is handled automatically by the deployment tool. It should
not be edited manually. -->
<array name="bundled_libs">
<!-- %%INSERT_EXTRA_LIBS%% -->
</array>
<array name="qt_libs">
<!-- %%INSERT_QT_LIBS%% -->
</array>
<array name="bundled_in_lib">
<!-- %%INSERT_BUNDLED_IN_LIB%% -->
</array>
<array name="bundled_in_assets">
<!-- %%INSERT_BUNDLED_IN_ASSETS%% -->
</array>
</resources>
......@@ -66,6 +66,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
engine.rootContext()->setContextProperty(QStringLiteral("app"), &widget);
engine.addImportPath(pluginsDir);
#ifdef __ANDROID__
engine.addImportPath(QStringLiteral("assets:/qml"));
#endif
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
......
......@@ -27,7 +27,7 @@
QString PluginsModel::pluginsDirectoryPath()
{
#ifdef __ANDROID__
return "/data/data/org.kde.kalgebramobile/qt-reserved-files/share/kalgebramobile/plugins";
return QStringLiteral("assets:/share/kalgebramobile/plugins");
#else
return QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("plugins"), QStandardPaths::LocateDirectory);
#endif
......
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