forked from lubuwest/Friendiqa
OAuth and bugfixes
This commit is contained in:
parent
e58a1f69dc
commit
d43c18bb76
65 changed files with 1681 additions and 1494 deletions
96
source-android/CMakeLists.txt
Normal file
96
source-android/CMakeLists.txt
Normal file
|
@ -0,0 +1,96 @@
|
|||
# TEMPLATE = app
|
||||
# TARGET = friendiqa
|
||||
# CONFIG += release
|
||||
# QT += qml quick gui widgets sql webview dbus webengine
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1.0)
|
||||
|
||||
project(friendiqa VERSION 0.6 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.7.0")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
endif()
|
||||
|
||||
find_package(Qt5 COMPONENTS Widgets Quick Sql DBus WebView REQUIRED)
|
||||
|
||||
#Webview Webengine
|
||||
|
||||
set(MOC_SOURCES common/uploadableimage.h
|
||||
common/xhr.h
|
||||
common/filesystem.h
|
||||
common/remoteauthasyncimageprovider.h
|
||||
common/updatenews.h
|
||||
common/alarm.h)
|
||||
|
||||
set(SOURCES common/friendiqa.cpp
|
||||
common/uploadableimage.cpp
|
||||
common/xhr.cpp
|
||||
common/filesystem.cpp
|
||||
common/remoteauthasyncimageprovider.cpp
|
||||
common/updatenews.cpp
|
||||
common/alarmandroid.cpp)
|
||||
|
||||
include_directories(common)
|
||||
|
||||
add_executable(friendiqa ${SOURCES} ${MOC_SOURCES} application.qrc)
|
||||
|
||||
target_link_libraries(friendiqa Qt::Core)
|
||||
target_link_libraries(friendiqa Qt::Widgets)
|
||||
target_link_libraries(friendiqa Qt::Quick)
|
||||
target_link_libraries(friendiqa Qt::Sql)
|
||||
target_link_libraries(friendiqa Qt::WebView)
|
||||
target_link_libraries(friendiqa Qt::DBus)
|
||||
# target_link_libraries(friendiqa Qt::Webengine)
|
||||
|
||||
# qt5_use_modules(friendiqa Core Widgets Quick Sql DBus)
|
||||
|
||||
install(TARGETS friendiqa DESTINATION bin)
|
||||
|
||||
#RESOURCES = application.qrc
|
||||
|
||||
# OTHER_FILES += qml/friendiqa.qml \
|
||||
# translations/*.ts \
|
||||
# qml/*.qml
|
||||
# qml/newsqml/*.qml
|
||||
# qml/contactqml/*.qml
|
||||
# qml/photoqml/*.qml
|
||||
# qml/configqml/*.qml
|
||||
# js/*.js
|
||||
|
||||
#TRANSLATIONS += translations/friendiqa-de.ts \
|
||||
# translations/friendiqa-es.ts \
|
||||
# translations/friendiqa-it.ts
|
||||
# HEADERS += \
|
||||
# common/uploadableimage.h \
|
||||
# common/xhr.h \
|
||||
# common/filesystem.h \
|
||||
# common/remoteauthasyncimageprovider.h \
|
||||
# common/updatenews.h \
|
||||
# common/alarm.h
|
||||
|
||||
#DISTFILES += \
|
||||
# qml/calendarqml/*.qml \
|
||||
# translations/*.ts \
|
||||
# translations/*.qm \
|
||||
# qml/*.qml \
|
||||
# qml/newsqml/*.qml \
|
||||
# qml/contactqml/*.qml \
|
||||
# qml/photoqml/*.qml \
|
||||
# qml/configqml/*.qml \
|
||||
# js/*.js \
|
||||
|
||||
|
||||
# target.path=/usr/bin
|
||||
# desktop.path = /usr/share/applications
|
||||
# desktop.files = images/de.ma-nic.Friendiqa.desktop
|
||||
# icon.path = /usr/share/icons/hicolor/scalable/apps
|
||||
# icon.files = images/Friendiqa.svg
|
||||
# INSTALLS+=target desktop icon
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.7" android:versionCode="33" android:installLocation="auto">
|
||||
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.8" android:versionCode="34" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
# androidBuildToolsVersion=25.0.3
|
||||
# androidCompileSdkVersion=26
|
||||
buildDir=.build
|
||||
# qt5AndroidDir=/home/pankraz/Qt/5.11.1/android_armv7/src/android/java
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.enforceUniquePackageName=false
|
||||
|
|
|
@ -16,7 +16,7 @@ public class FriendiqaStopService extends JobService{
|
|||
|
||||
@Override
|
||||
public boolean onStartJob(JobParameters params) {
|
||||
//Log.d(TAG,"Friendiqa JobServiceStop");
|
||||
Log.d(TAG,"Friendiqa JobServiceStop");
|
||||
Context context = this.getApplicationContext();
|
||||
AndroidNativeService fs = new AndroidNativeService();
|
||||
fs.stopQtService(context);
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "xhr.h"
|
||||
#include "updatenews.h"
|
||||
#include "filesystem.h"
|
||||
#include "oauth.h"
|
||||
#include "remoteauthasyncimageprovider.h"
|
||||
#include "AndroidNative/systemdispatcher.h"
|
||||
|
||||
|
@ -54,9 +55,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
|
|||
|
||||
|
||||
Q_DECL_EXPORT int main(int argc, char *argv[]) {
|
||||
//if (argc>1){qDebug()<< "argc Friendiqa"<< argc <<" argv1" <<argv[1];}
|
||||
if ((argc>1) && (qstrcmp(argv[1],"-service")==0)){
|
||||
//qDebug()<<"FriendiqaMain Service";
|
||||
QAndroidService app(argc, argv);
|
||||
UPDATENEWS* updatenews= UPDATENEWS::instance();
|
||||
updatenews->setDatabase();
|
||||
|
@ -69,7 +68,6 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
|
|||
else{
|
||||
QApplication app(argc, argv);
|
||||
QQmlApplicationEngine view;
|
||||
//qDebug()<<"FriendiqaMain started";
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
@ -84,6 +82,8 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
|
|||
view.rootContext()->setContextProperty("alarm", alarm);
|
||||
UPDATENEWS* updatenews = UPDATENEWS::instance();
|
||||
view.rootContext()->setContextProperty("updatenews", updatenews);
|
||||
OAuthWrapper* oauth2 = OAuthWrapper::instance();
|
||||
view.rootContext()->setContextProperty("oauth2", oauth2);
|
||||
view.load(QUrl("qrc:/qml/friendiqa.qml"));
|
||||
view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit()));
|
||||
|
||||
|
|
1
source-android/common/oauth.cpp
Symbolic link
1
source-android/common/oauth.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/pankraz/ownCloud/clientsync/Friendiqa/v0.6/source-linux/common/oauth.cpp
|
1
source-android/common/oauth.h
Symbolic link
1
source-android/common/oauth.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/pankraz/ownCloud/clientsync/Friendiqa/v0.6/source-linux/common/oauth.h
|
|
@ -13,7 +13,7 @@
|
|||
TEMPLATE = app
|
||||
TARGET = friendiqa
|
||||
CONFIG += release
|
||||
QT += core core-private qml quick gui widgets sql androidextras #webengine webview
|
||||
QT += core core-private qml quick gui widgets sql androidextras network networkauth #webengine webview
|
||||
|
||||
include(androidnative.pri/androidnative.pri)
|
||||
|
||||
|
@ -23,7 +23,8 @@ SOURCES += common/friendiqa.cpp \
|
|||
common/filesystemandroid.cpp \
|
||||
common/remoteauthasyncimageprovider.cpp \
|
||||
common/updatenews.cpp \
|
||||
common/alarmandroid.cpp
|
||||
common/alarmandroid.cpp \
|
||||
common/oauth.cpp
|
||||
lupdate_only{
|
||||
SOURCES = qml/friendiqa.qml \
|
||||
qml/*.qml
|
||||
|
@ -38,7 +39,6 @@ SOURCES += common/friendiqa.cpp \
|
|||
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
|
||||
|
||||
RESOURCES = application.qrc
|
||||
|
||||
OTHER_FILES += qml/friendiqa.qml \
|
||||
|
@ -53,7 +53,8 @@ OTHER_FILES += qml/friendiqa.qml \
|
|||
TRANSLATIONS += translations/friendiqa-de.ts \
|
||||
translations/friendiqa-es.ts \
|
||||
translations/friendiqa-it.ts \
|
||||
translations/friendiqa-hu.ts
|
||||
translations/friendiqa-hu.ts \
|
||||
translations/friendiqa-nl.ts
|
||||
|
||||
HEADERS += \
|
||||
common/uploadableimage.h \
|
||||
|
@ -61,7 +62,8 @@ HEADERS += \
|
|||
common/filesystem.h \
|
||||
common/remoteauthasyncimageprovider.h \
|
||||
common/updatenews.h \
|
||||
common/alarm.h
|
||||
common/alarm.h \
|
||||
common/oauth.h
|
||||
|
||||
DISTFILES += \
|
||||
android/gradle.properties \
|
||||
|
|
|
@ -78,7 +78,6 @@ ApplicationWindow{
|
|||
function onLoginChanged(login){
|
||||
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
|
||||
else{
|
||||
if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;}
|
||||
Newsjs.getCurrentContacts(login,db,function(contacts){
|
||||
contactlist=contacts})}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue