This commit is contained in:
LubuWest 2017-11-24 22:12:03 +01:00
parent fb560b54b1
commit 13394ac62e
12 changed files with 120 additions and 14 deletions

View file

@ -17,3 +17,9 @@
# Translations #
* German, Spanish
## v0.1.1#
* FIX: Spanish translation
* FIX: Empty Newsview after deletion of first newsitem

View file

@ -1,11 +1,7 @@
<?xml version="1.0"?>
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.1" android:versionCode="1" android:installLocation="auto">
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.1.1" android:versionCode="2" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:vmSafeMode="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:icon="@drawable/friendiqa" android:logo="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
android:name="androidnative.friendiqa.FriendiqaActivity"
android:label="Friendiqa"
android:screenOrientation="unspecified"
android:launchMode="singleTop">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="androidnative.friendiqa.FriendiqaActivity" android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

View file

@ -1,4 +0,0 @@
androidBuildToolsVersion=25.0.3
androidCompileSdkVersion=25
buildDir=.build
qt5AndroidDir=/home/pankraz/Qt/5.9.1/android_armv7/src/android/java

View file

@ -1 +0,0 @@
sdk.dir=/home/pankraz/android-sdk_alt

View file

@ -0,0 +1,45 @@
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib
# Qt-es
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*
*-build-*
build-*
html
# QtCreator
*.autosave
.idea
tests/quickandroidactivitytests/tests/bin/*
tests/quickandroidactivitytests/tests/gen/*
#Android
local.properties
gradle.properties
.build
.gradle
*.iml
vendor
tests/instrument/build
build
*.swp

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,61 @@
language : android
addons:
apt:
packages:
- p7zip
- coreutils
- realpath
android:
components:
- build-tools-23.0.2
- android-19
- extra-google-google_play_services
env:
- DISPLAY=:99.0
compiler:
- gcc
before_install:
- wget -c https://services.gradle.org/distributions/gradle-2.9-bin.zip
- unzip -qq gradle-2.9-bin.zip
- export GRADLE_HOME=$PWD/gradle-2.9
- export PATH=$GRADLE_HOME/bin:$PATH
- gradle --version
- git clone https://github.com/benlau/qtci/
- source qtci/path.env
- ./ci/qt-android
script:
- export ROOT_DIR=`pwd`
- KEYSTORE=dev.keystore
- KEYPASS=123456
- BUILD_DIR=$ROOT_DIR/tests/instrument/build
- ANDROID_TARGET_SDK_VERSION=23
- mkdir -p $BUILD_DIR
- ls
- keytool -genkey -v -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 -dname "cn=localhost, ou=oss, o=Continuent, c=HK" -storepass $KEYPASS -keypass $KEYPASS -keystore $KEYSTORE
- source qt.env
- ls $ANDROID_SDK_ROOT/build-tools
- cd $BUILD_DIR
- build-android-gradle-project ${ROOT_DIR}/tests/instrument/activity/activity.pro
- sed -i "s/com.android.application/com.android.library/g" android-build/build.gradle
- cat android-build/gradle.properties
- cp ./android-build/build/outputs/apk/android-build-debug.apk output.apk
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- export ANDROID_HOME=$ANDROID_SDK_ROOT
- adb install -r output.apk
- cd $ROOT_DIR/tests/instrument/runner
- ls
- ./gradlew -q assembleDebug
- find . -name "*.apk"
- adb install -r ./build/outputs/apk/runner-debug.apk
- adb shell am instrument -w quickandroid.example.tests/android.test.InstrumentationTestRunner 2>&1 | tee instrument.log
- adb logcat -d > log.txt
- sed -i "/dalvikvm/d" log.txt
- tail -n 500 log.txt
- OK=`cat instrument.log | grep -G "^OK" | wc -l`
- echo $OK
- if [ $OK -eq 0 ]; then echo "Test failure found"; exit 1; fi

View file

@ -207,6 +207,8 @@
<file>qml/calendarqml/EventList.qml</file>
<file>translations/friendiqa-de.qm</file>
<file>translations/friendiqa-de.ts</file>
<file>translations/friendiqa-es.qm</file>
<file>translations/friendiqa-es.ts</file>
<file>qml/photoqml/ImageUploadDialog.qml</file>
<file>qml/genericqml/ImageDialog.qml</file>
<file>qml/genericqml/PermissionDialog.qml</file>

View file

@ -12,7 +12,7 @@
# The name of your application
TEMPLATE = app
TARGET = friendiqa
CONFIG += debug
CONFIG += release
QT += qml quick gui widgets androidextras
include(androidnative.pri/androidnative.pri)
@ -54,6 +54,7 @@ DISTFILES += \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
translations/*.ts \
translations/*.qm \
qml/*.qml \
qml/newsqml/*.qml \
qml/contactqml/*.qml \

View file

@ -1,5 +1,5 @@
WorkerScript.onMessage = function(msg) {
if(msg.deleteId)
if(msg.deleteId!==undefined)
{msg.model.remove(msg.deleteId);
msg.model.sync()
}

View file

@ -364,7 +364,6 @@ Item {
text: qsTr("Delete")
onTriggered: {
Newsjs.deleteNews(root.login,root.db,newsitemobject.status_id,newsitemobject.messagetype,root,function(reply){
// newsModel.remove(index)
var msg = {'deleteId': index, 'model': newsModel};
newsWorker.sendMessage(msg);
})