Compare commits

..

1 commit

352 changed files with 8549 additions and 15058 deletions

View file

@ -1,11 +0,0 @@
--- src/common/alarmlinux.cpp
+++ src/common/alarmlinux.cpp
@@ -67,7 +67,7 @@
stream << "Description=Run friendiqa background sync" << Qt::endl << Qt::endl;
stream << "[Service]" << Qt::endl;
stream << "Type=oneshot" << Qt::endl;
- stream << "ExecStart=/usr/bin/friendiqa -service" << Qt::endl;
+ stream << "ExecStart=flatpak run de.manic.friendiqa -service" << Qt::endl;
}
QString nameTimer ="friendiqa-sync.timer";

View file

@ -1,9 +1,3 @@
## v0.6.9
* Separate window for new messages with more formatting options
* Replaced all Fontawesome icons with system icons
* Switch between OAuth2 and Basic Auth
* Background sync with systemd-timer and removal of system tray
## v0.6.8

11
Linuxmobile.patch Normal file
View file

@ -0,0 +1,11 @@
--- source-linux/qml/friendiqa.qml
+++ source-linux/qml/friendiqa.qml
@@ -193,7 +193,7 @@
color: Material.backgroundColor
}
- header: ToolBar{
+ footer: ToolBar{
background: Rectangle{
anchors.fill: parent
color: Material.backgroundDimColor

View file

@ -5,4 +5,5 @@ You have probably selected Friendica as your preferred social network because yo
Storing some pieces of user data on the device is necessary for some app features, other apps on your device may not access this data (keeping apps own database storage protected from other apps is guaranteed by Android). The app has been programmed so that stored information contain any personal data (only login data and id number of last seen post will be transferred to servers). Photos from the albums and contact images are stored in a public directory on the device. Other apps may access these files and the Friendiqa needs access to this directory.
To send images from the Android gallery the app needs access to picture databases on the device.
This app doesnt collect any usage statistics. In addition, no information is sent from your smartphone to me as a developer or to a website associated with me.
This app dont collect any usage statistics. In addition, no information is sent from your Smartphone to me as a developer or to a website associated with me.
On first start, the website https://dir.friendica.social/servers/surprise is contacted and the selected server shown in the app.

View file

@ -30,7 +30,7 @@ Currently supported:
* Attending for event posts
* Update fetches new posts (up to last 50) since last in local DB
* More shows older posts from local DB
* Create new Message with images or direct messages, smileys in new window
* Create new Message with images or direct messages,smileys
* Send image(s) from Android gallery
* Send text or urls from other apps to Friendiqa
* Native Android image dialog
@ -101,14 +101,14 @@ Currently supported:
* Dark Mode
* View mode for news (conversation tree or timeline)
* Maximum news (deleted after use of Quit button)
* Set default news tabs
* Sync home timeline, replies, DM, Events, friend requests; Notify yes/no
* Hide #nsfw
* OAuth2 as authorization method
# Other
* on Linux: syncs in background via systemd-timer
* on Linux: App stays in systemtray and syncs in background
* Autostart minimized in systray possible
ToDo

View file

@ -13,7 +13,7 @@ if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
find_package(Qt6 REQUIRED COMPONENTS Core Quick QuickControls2 Widgets Sql DBus NetworkAuth Multimedia REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Quick QuickControls2 Sql DBus NetworkAuth REQUIRED)
qt_standard_project_setup()
@ -45,8 +45,7 @@ target_link_libraries(friendiqa PRIVATE Qt6::QuickControls2)
target_link_libraries(friendiqa PRIVATE Qt6::Sql)
target_link_libraries(friendiqa PRIVATE Qt6::DBus)
target_link_libraries(friendiqa PRIVATE Qt6::NetworkAuth)
target_link_libraries(friendiqa PRIVATE Qt6::Multimedia)
install(TARGETS friendiqa DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES assets/de.manic.Friendiqa.desktop DESTINATION share/applications)
install(FILES assets/de.manic.Friendiqa.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES images/de.manic.Friendiqa.desktop DESTINATION share/applications)
install(FILES images/de.manic.Friendiqa.svg DESTINATION share/icons/hicolor/scalable/apps)

View file

@ -0,0 +1,262 @@
<RCC>
<qresource prefix="/">
<file>qtquickcontrols2.conf</file>
<file>qml/friendiqa.qml</file>
<file>qml/newsqml/NewsStack.qml</file>
<file>qml/newsqml/NewsTab.qml</file>
<file>qml/newsqml/Newsitem.qml</file>
<file>qml/newsqml/MessageSend.qml</file>
<file>qml/newsqml/Conversation.qml</file>
<file>qml/newsqml/FriendicaActivities.qml</file>
<file>qml/newsqml/Hashtag.qml</file>
<file>qml/newsqml/NewsImage.qml</file>
<file>qml/newsqml/NewsVideo.qml</file>
<file>qml/newsqml/ContactPage.qml</file>
<file>qml/newsqml/NewsVideoLarge.qml</file>
<file>qml/newsqml/SmileyDialog.qml</file>
<file>qml/contactqml/FriendsTab.qml</file>
<file>qml/contactqml/GroupComponent.qml</file>
<file>qml/contactqml/ProfileComponent.qml</file>
<file>qml/contactqml/Contactlist.qml</file>
<file>qml/photoqml/PhotoComponent.qml</file>
<file>qml/photoqml/PhotogroupComponent.qml</file>
<file>qml/photoqml/PhotoTab.qml</file>
<file>qml/photoqml/ImageUploadDialog.qml</file>
<file>qml/genericqml/CloseButton.qml</file>
<file>qml/genericqml/ImagePicker.qml</file>
<file>qml/genericqml/ImagePickerLinux.qml</file>
<file>qml/genericqml/Search.qml</file>
<file>qml/genericqml/IntentReceiver.qml</file>
<file>qml/genericqml/LinuxSync.qml</file>
<file>qml/genericqml/BlueButton.qml</file>
<file>qml/genericqml/ContactComponent.qml</file>
<file>qml/genericqml/PermissionDialog.qml</file>
<file>qml/calendarqml/CalendarTab.qml</file>
<file>qml/calendarqml/CalendarDay.qml</file>
<file>qml/calendarqml/EventList.qml</file>
<file>qml/configqml/AccountPage.qml</file>
<file>qml/configqml/SyncConfig.qml</file>
<file>qml/configqml/SyncComponent.qml</file>
<file>qml/configqml/InfoBox.qml</file>
<file>qml/configqml/ConfigPage.qml</file>
<file>qml/configqml/OSSettingsAndroid.qml</file>
<file>qml/configqml/OSSettingsLinux.qml</file>
<file>js/image.js</file>
<file>js/photoworker.js</file>
<file>js/service.js</file>
<file>js/news.js</file>
<file>js/newsworker.js</file>
<file>js/helper.js</file>
<file>js/smiley.js</file>
<file>translations/friendiqa-it.ts</file>
<file>translations/friendiqa-it.qm</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>images/defaultcontact.jpg</file>
<file>images/fontawesome-webfont.ttf</file>
<file>images/folder-blue.png</file>
<file>images/smileys/animals/bee.gif</file>
<file>images/smileys/animals/bigspider.gif</file>
<file>images/smileys/animals/bunny.gif</file>
<file>images/smileys/animals/bunnyflowers.gif</file>
<file>images/smileys/animals/cat.gif</file>
<file>images/smileys/animals/chick.gif</file>
<file>images/smileys/animals/cow.gif</file>
<file>images/smileys/animals/crab.gif</file>
<file>images/smileys/animals/dog.gif</file>
<file>images/smileys/animals/dolphin.gif</file>
<file>images/smileys/animals/dragonfly.gif</file>
<file>images/smileys/animals/elephant.gif</file>
<file>images/smileys/animals/fish.gif</file>
<file>images/smileys/animals/frog.gif</file>
<file>images/smileys/animals/giraffe.gif</file>
<file>images/smileys/animals/hamster.gif</file>
<file>images/smileys/animals/horse.gif</file>
<file>images/smileys/animals/ladybird.gif</file>
<file>images/smileys/animals/monkey.gif</file>
<file>images/smileys/animals/parrot.gif</file>
<file>images/smileys/animals/pig.gif</file>
<file>images/smileys/animals/sheep.gif</file>
<file>images/smileys/animals/snail.gif</file>
<file>images/smileys/animals/tux.gif</file>
<file>images/smileys/babies/baby.gif</file>
<file>images/smileys/babies/babycot.gif</file>
<file>images/smileys/babies/pregnant.gif</file>
<file>images/smileys/babies/stork.gif</file>
<file>images/smileys/confused/confused.gif</file>
<file>images/smileys/confused/dazed.gif</file>
<file>images/smileys/confused/shrug.gif</file>
<file>images/smileys/confused/stupid.gif</file>
<file>images/smileys/cool/affro.gif</file>
<file>images/smileys/cool/cool.gif</file>
<file>images/smileys/devilangel/angel.gif</file>
<file>images/smileys/devilangel/blondedevil.gif</file>
<file>images/smileys/devilangel/catdevil.gif</file>
<file>images/smileys/devilangel/cherub.gif</file>
<file>images/smileys/devilangel/daseesaw.gif</file>
<file>images/smileys/devilangel/devil.gif</file>
<file>images/smileys/devilangel/graveside.gif</file>
<file>images/smileys/devilangel/saint.gif</file>
<file>images/smileys/devilangel/turnevil.gif</file>
<file>images/smileys/disgust/fartblush.gif</file>
<file>images/smileys/disgust/fartinbed.gif</file>
<file>images/smileys/disgust/toilet.gif</file>
<file>images/smileys/disgust/vomit.gif</file>
<file>images/smileys/drink/tea.gif</file>
<file>images/smileys/drool/drool.gif</file>
<file>images/smileys/fantasy/alienmonster.gif</file>
<file>images/smileys/fantasy/barbarian.gif</file>
<file>images/smileys/fantasy/dinosaur.gif</file>
<file>images/smileys/fantasy/dragon.gif</file>
<file>images/smileys/fantasy/dragonwhelp.gif</file>
<file>images/smileys/fantasy/ghost.gif</file>
<file>images/smileys/fantasy/mummy.gif</file>
<file>images/smileys/fight/2guns.gif</file>
<file>images/smileys/fight/acid.gif</file>
<file>images/smileys/fight/alienfight.gif</file>
<file>images/smileys/fight/alpha.png</file>
<file>images/smileys/fight/army.gif</file>
<file>images/smileys/fight/arrowhead.gif</file>
<file>images/smileys/fight/bfg.gif</file>
<file>images/smileys/fight/bowman.gif</file>
<file>images/smileys/fight/chainsaw.gif</file>
<file>images/smileys/fight/crossbow.gif</file>
<file>images/smileys/fight/crusader.gif</file>
<file>images/smileys/fight/dead.gif</file>
<file>images/smileys/fight/gangs.gif</file>
<file>images/smileys/fight/hammersplat.gif</file>
<file>images/smileys/fight/lasergun.gif</file>
<file>images/smileys/fight/machinegun.gif</file>
<file>images/smileys/fight/marine.gif</file>
<file>images/smileys/fight/sabre.gif</file>
<file>images/smileys/fight/samurai.gif</file>
<file>images/smileys/fight/tank.gif</file>
<file>images/smileys/fight/viking.gif</file>
<file>images/smileys/food/apple.gif</file>
<file>images/smileys/food/banana.gif</file>
<file>images/smileys/food/birthdaycake.gif</file>
<file>images/smileys/food/broccoli.gif</file>
<file>images/smileys/food/cake.gif</file>
<file>images/smileys/food/carrot.gif</file>
<file>images/smileys/food/cooking.gif</file>
<file>images/smileys/food/fryegg.gif</file>
<file>images/smileys/food/popcorn.gif</file>
<file>images/smileys/food/tomato.gif</file>
<file>images/smileys/happy/cloud9.gif</file>
<file>images/smileys/happy/tearsofjoy.gif</file>
<file>images/smileys/laugh/hahaha.gif</file>
<file>images/smileys/laugh/loltv.gif</file>
<file>images/smileys/laugh/rofl.gif</file>
<file>images/smileys/love/iloveyou.gif</file>
<file>images/smileys/love/inlove.gif</file>
<file>images/smileys/love/love.gif</file>
<file>images/smileys/love/lovebear.gif</file>
<file>images/smileys/love/lovebed.gif</file>
<file>images/smileys/love/loveheart.gif</file>
<file>images/smileys/music/dj.gif</file>
<file>images/smileys/music/drums.gif</file>
<file>images/smileys/music/elvis.gif</file>
<file>images/smileys/music/guitar.gif</file>
<file>images/smileys/music/trumpet.gif</file>
<file>images/smileys/music/violin.gif</file>
<file>images/smileys/oldcore/beard.png</file>
<file>images/smileys/oldcore/headbang.gif</file>
<file>images/smileys/oldcore/laughing.gif</file>
<file>images/smileys/oldcore/shaka.gif</file>
<file>images/smileys/oldcore/surprised.gif</file>
<file>images/smileys/oldcore/whitebeard.png</file>
<file>images/smileys/respect/bow.gif</file>
<file>images/smileys/respect/bravo.gif</file>
<file>images/smileys/respect/hailking.gif</file>
<file>images/smileys/respect/number1.gif</file>
<file>images/smileys/sad/crying.png</file>
<file>images/smileys/sad/prisoner.gif</file>
<file>images/smileys/sad/sigh.gif</file>
<file>images/smileys/smoking/smoking.gif</file>
<file>images/smileys/sport/archery.gif</file>
<file>images/smileys/sport/basketball.gif</file>
<file>images/smileys/sport/bowling.gif</file>
<file>images/smileys/sport/cycling.gif</file>
<file>images/smileys/sport/darts.gif</file>
<file>images/smileys/sport/fencing.gif</file>
<file>images/smileys/sport/football.gif</file>
<file>images/smileys/sport/golf.gif</file>
<file>images/smileys/sport/horseriding.gif</file>
<file>images/smileys/sport/juggling.gif</file>
<file>images/smileys/sport/skipping.gif</file>
<file>images/smileys/sport/snooker.gif</file>
<file>images/smileys/sport/surfing.gif</file>
<file>images/smileys/sport/tennis.gif</file>
<file>images/smileys/tired/countsheep.gif</file>
<file>images/smileys/tired/hammock.gif</file>
<file>images/smileys/tired/pillow.gif</file>
<file>images/smileys/tired/yawn.gif</file>
<file>images/smileys/core/beer_mug.gif</file>
<file>images/smileys/core/coffee.gif</file>
<file>images/smileys/core/dislike.gif</file>
<file>images/smileys/core/friendica-16.png</file>
<file>images/smileys/core/like.gif</file>
<file>images/smileys/core/rm-16.png</file>
<file>images/smileys/core/smiley-bangheaddesk.gif</file>
<file>images/smileys/core/smiley-brokenheart.gif</file>
<file>images/smileys/core/smiley-cool.gif</file>
<file>images/smileys/core/smiley-cry.gif</file>
<file>images/smileys/core/smiley-embarassed.gif</file>
<file>images/smileys/core/smiley-facepalm.gif</file>
<file>images/smileys/core/smiley-foot-in-mouth.gif</file>
<file>images/smileys/core/smiley-heart.gif</file>
<file>images/smileys/core/smiley-kiss.gif</file>
<file>images/smileys/core/smiley-laughing.gif</file>
<file>images/smileys/core/smiley-Oo.gif</file>
<file>images/smileys/core/smiley-smile.gif</file>
<file>images/smileys/core/smiley-surprised.gif</file>
<file>images/smileys/core/smiley-thumbsup.gif</file>
<file>images/smileys/core/smiley-tongue-out.gif</file>
<file>images/smileys/core/smiley-undecided.gif</file>
<file>images/smileys/core/smiley-wink.gif</file>
<file>images/smileys/core/smiley-frown.gif</file>
<file>images/smileys/adult/bong.gif</file>
<file>images/smileys/adult/drunk.gif</file>
<file>images/smileys/adult/finger.gif</file>
<file>images/smileys/adult/sperm.gif</file>
<file>images/smileys/adult/tits.gif</file>
<file>images/addImage.png</file>
<file>common/filesystem.cpp</file>
<file>common/filesystem.h</file>
<file>common/friendiqa.cpp</file>
<file>common/uploadableimage.cpp</file>
<file>common/uploadableimage.h</file>
<file>common/xhr.cpp</file>
<file>common/xhr.h</file>
<file>qml/newsqml/MoreComments.qml</file>
<file>qml/newsqml/NewsPhotolist.qml</file>
<file>qml/genericqml/DrawerAccountComponent.qml</file>
<file>qml/configqml/LeftDrawerScrollview.qml</file>
<file>qml/genericqml/LeftDrawerLinux.qml</file>
<file>qml/genericqml/LeftDrawerAndroid.qml</file>
<file>qml/genericqml/DrawerAccountComponentContacts.qml</file>
<file>qml/contactqml/ProfileTab.qml</file>
<file>qml/contactqml/FriendsListTab.qml</file>
<file>qml/contactqml/GroupsListTab.qml</file>
<file>qml/calendarqml/EventListItem.qml</file>
<file>translations/friendiqa-hu.qm</file>
<file>translations/friendiqa-hu.ts</file>
<file>images/Friendiqa.png</file>
<file>images/Friendica_monochrome.png</file>
<file>qml/configqml/ConfigAppearancePage.qml</file>
<file>qml/configqml/ConfigStartPage.qml</file>
<file>qml/contactqml/ContactsSearchPage.qml</file>
<file>images/Friendiqa.ico</file>
<file>qml/calendarqml/EventCreate.qml</file>
<file>qml/newsqml/BlockUser.qml</file>
<file>qml/newsqml/ReportUser.qml</file>
<file>qml/newsqml/MessageImageUploadDialog.qml</file>
<file>qml/configqml/AcceptRules.qml</file>
<file>translations/friendiqa-nl.qm</file>
<file>translations/friendiqa-nl.ts</file>
<file>qml/genericqml/SearchDialog.qml</file>
<file>qml/newsqml/NewsTabbutton.qml</file>
</qresource>
</RCC>

View file

@ -0,0 +1,70 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2017 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "alarm.h"
#include <QtCore/QDebug>
#include <QtDBus/QtDBus>
#include <QJsonArray>
ALARM *ALARM::instance()
{
static ALARM alarm;
return &alarm;
}
ALARM::ALARM(QObject *parent) : QObject(parent){}
void ALARM::setAlarm(int interval)
{
//qDebug() << interval;
QVariantMap message;
message["value"] = interval;
}
void ALARM::notify(QString title, QString text, int id)
{
//qDebug() << title << text;
// QVariantMap message;
// message["title"] = title;
// message["message"] = text;
QStringList actionlist;
QMap<QString,QVariant> hint;
QDBusConnection bus = QDBusConnection::sessionBus();
QDBusInterface dbus_iface("org.freedesktop.Notifications", "/org/freedesktop/Notifications",
"org.freedesktop.Notifications", bus);
QString appname="Friendiqa";
uint v=12321;
if (dbus_iface.isValid()){
dbus_iface.call("Notify",appname,v,"",title,text,actionlist,hint,10000);
//qDebug() << "Qdebug error " << dbus_iface.lastError();
}
}

View file

@ -46,7 +46,7 @@ class FILESYSTEM : public QObject//, public QAndroidActivityResultReceiver
Q_PROPERTY(bool Visibility READ Visibility WRITE setVisibility NOTIFY visibilityChanged)
//Q_PROPERTY(bool direxist READ direxist)
Q_PROPERTY(QString homePath READ homePath)
Q_PROPERTY(bool isAutostart READ isAutostart NOTIFY isAutostartChanged)
Q_PROPERTY(bool isAutostart READ isAutostart)
Q_PROPERTY(QString osType READ osType CONSTANT)
Q_PROPERTY(QString hostname READ hostname CONSTANT)
//Q_PROPERTY(QString cameraPath READ cameraPath)
@ -72,7 +72,6 @@ signals:
//void imageselected(QString);
void directoryChanged();
void visibilityChanged();
void isAutostartChanged();
//void fileListContent(QList data);
void success(QString data);
void error(QString data, int code);

View file

@ -71,11 +71,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
int main(int argc, char *argv[]) {
//qDebug()<< "argv Friendiqa"<< (qstrcmp(argv[1],"-service")==0) <<" argv2" <<argv[1];
QCoreApplication::setApplicationName("Friendiqa");
//QCoreApplication::setOrganizationName("Friendiqa");
QApplication app(argc, argv);
//qDebug()<< "argv Friendiqa"<< argv[0] <<" argv2" <<argv[1];
if (qstrcmp(argv[1],"-service")==0){
//qDebug()<<"FriendiqaMain Service";
//QAndroidService app(argc, argv);
@ -84,17 +80,22 @@ int main(int argc, char *argv[]) {
updatenews->login();
updatenews->setSyncAll(true);
updatenews->startsync();
app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
//app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
//QtAndroid::androidService().callMethod<void>("stopSelf");
return app.exec();
//return app.exec();
}
else{
//QtWebEngine::initialize();
QGuiApplication::setApplicationName("Friendiqa");
QGuiApplication::setOrganizationName("Friendiqa");
QApplication app(argc, argv);
QQmlApplicationEngine view;
//view.setResizeMode(QQuickView::SizeRootObjectToView);
app.setWindowIcon(QIcon("qrc:/assets/Friendiqa.ico"));
app.setWindowIcon(QIcon(":/images/Friendiqa.ico"));
QTranslator qtTranslator;
if(qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"))
{app.installTranslator(&qtTranslator);}
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
app.installTranslator(&qtTranslator);
// RemoteAuthAsyncImageProvider *imageProvider = new RemoteAuthAsyncImageProvider;
// view.addImageProvider("remoteauthimage",imageProvider);
// view.rootContext()->setContextProperty("remoteauth", imageProvider);
@ -116,8 +117,8 @@ int main(int argc, char *argv[]) {
qmlRegisterType<DocumentHandler>("io.qt.examples.texteditor", 1, 0, "DocumentHandler");
qmlRegisterType<QSystemTrayIcon>("QSystemTrayIcon", 1, 0, "QSystemTrayIcon");
qRegisterMetaType<QSystemTrayIcon::ActivationReason>("ActivationReason");
view.rootContext()->setContextProperty("iconTrayBlack", QIcon(QPixmap(":/assets/friendica-tray-black.svg")));
view.rootContext()->setContextProperty("iconTrayWhite", QIcon(QPixmap(":/assets/friendica-tray-white.svg")));
view.rootContext()->setContextProperty("iconTrayBlack", QIcon(QPixmap(":/images/friendica-tray-black.svg")));
view.rootContext()->setContextProperty("iconTrayWhite", QIcon(QPixmap(":/images/friendica-tray-white.svg")));
view.rootContext()->setContextProperty("iconTrayAvailable", QSystemTrayIcon::isSystemTrayAvailable());
if(updatenews->getStyle() != 0){

View file

@ -91,12 +91,10 @@ void UPDATENEWS::setDatabase()
int UPDATENEWS::getStyle()
{
if (m_db.open()){
QSqlQuery syncquery("SELECT * FROM globaloptions",m_db);
while (syncquery.next()){
if (syncquery.value(0).toString()=="view_darkmode"){
return syncquery.value(1).toInt();
}
QSqlQuery syncquery("SELECT * FROM globaloptions",m_db);
while (syncquery.next()){
if (syncquery.value(0).toString()=="view_darkmode"){
return syncquery.value(1).toInt();
}
}
return 0;
@ -113,28 +111,28 @@ QJsonArray UPDATENEWS::getAccounts(QString filtername, QString filtervalue){
filterstring=" WHERE " + filtername + " = " + filtervalue;
}
else{
filterstring=" WHERE " + filtername + " = '" + filtervalue +"'";
filterstring=" WHERE " + filtername + " = '" + filtervalue +"'";
}
}
QSqlQuery query("SELECT * FROM config" + filterstring + " ORDER BY isActive ASC, username ASC",m_db);
QJsonArray accountlist;
while(query.next()){
{
QJsonObject accountData;
accountData.insert("server",query.value(0).toString());
accountData.insert("username",query.value(1).toString());
accountData.insert("password",query.value(2).toString());
accountData.insert("imagestore",query.value(3).toString());
accountData.insert("isActive",query.value(7).toString());
QJsonArray m_permissions=query.value(7).toJsonArray();
accountData.insert("permissions",m_permissions);
accountData.insert("token",QString(QByteArray::fromBase64(query.value(10).toByteArray())));
QJsonDocument m_client;
if(query.value(12).toByteArray()!=""){
m_client=QJsonDocument::fromJson(QByteArray::fromBase64(query.value(12).toByteArray()));
}
accountData.insert("client",m_client.object());
accountlist.append(accountData);
QJsonObject accountData;
accountData.insert("server",query.value(0).toString());
accountData.insert("username",query.value(1).toString());
accountData.insert("password",query.value(2).toString());
accountData.insert("imagestore",query.value(3).toString());
accountData.insert("isActive",query.value(7).toString());
QJsonArray m_permissions=query.value(7).toJsonArray();
accountData.insert("permissions",m_permissions);
accountData.insert("token",QString(QByteArray::fromBase64(query.value(10).toByteArray())));
QJsonDocument m_client;
if(query.value(12).toByteArray()!=""){
m_client=QJsonDocument::fromJson(QByteArray::fromBase64(query.value(12).toByteArray()));
}
accountData.insert("client",m_client.object());
accountlist.append(accountData);
}
}
query.clear();
@ -180,39 +178,39 @@ void UPDATENEWS::login()
void UPDATENEWS::startsync()
{
if (syncindex<synclist.length()){
if (synclist[syncindex]=="sync_Timeline"){
timeline();
} else if (synclist[syncindex]=="sync_Replies") {
replies();
} else if (synclist[syncindex]=="sync_DirectMessages") {
directmessages();
} else if (synclist[syncindex]=="sync_Notifications") {
notifications();
} else if (synclist[syncindex]=="sync_FriendRequests") {
friendrequests();
}else if (synclist[syncindex]=="sync_Events") {
events();
}
} else if ((syncindex==synclist.length())&&(!(usernameindex<usernamelength-1))) {
m_api="";
if(m_updateInterval!=0){
syncindex=0;
usernameindex=0;
synclist.clear();
m_db.close();
m_db.removeDatabase(m_db.connectionName());
QObject::disconnect(&xhr,SIGNAL(error(QString,QString,QString,int)),this,SLOT(showError(QString,QString,QString,int)));
emit quitapp();
//alarm.setAlarm(m_updateInterval);
m_updateInterval=0;
}
}
else{
usernameindex+=1;
login();
startsync();
}
if (syncindex<synclist.length()){
if (synclist[syncindex]=="sync_Timeline"){
timeline();
} else if (synclist[syncindex]=="sync_Replies") {
replies();
} else if (synclist[syncindex]=="sync_DirectMessages") {
directmessages();
} else if (synclist[syncindex]=="sync_Notifications") {
notifications();
} else if (synclist[syncindex]=="sync_FriendRequests") {
friendrequests();
}else if (synclist[syncindex]=="sync_Events") {
events();
}
} else if ((syncindex==synclist.length())&&(!(usernameindex<usernamelength-1))) {
m_api="";
if(m_updateInterval!=0){
syncindex=0;
usernameindex=0;
synclist.clear();
m_db.close();
m_db.removeDatabase(m_db.connectionName());
QObject::disconnect(&xhr,SIGNAL(error(QString,QString,QString,int)),this,SLOT(showError(QString,QString,QString,int)));
emit quitapp();
alarm.setAlarm(m_updateInterval);
m_updateInterval=0;
}
}
else{
usernameindex+=1;
login();
startsync();
}
}

View file

@ -233,11 +233,11 @@ void XHR::download()
void XHR::get()
{
QUrlQuery query;
//qDebug() << "get";
qDebug() << "get";
QHashIterator<QString, QString> i(params);
while(i.hasNext()) {
i.next();
//qDebug() << i.key() << "value" << i.value();
qDebug() << "value" << i.value();
query.addQueryItem(i.key(), i.value());
}
QUrl requrl(m_url+m_api);
@ -355,14 +355,12 @@ void XHR::onReplyError(QNetworkReply::NetworkError code)
void XHR::onReplySuccess()
{
qDebug() << "!";
//QHashIterator<QString, QString> i(params);
// while(i.hasNext()) {
// i.next();
// //qDebug() << i.key()<< " " << i.value();
// }
//emit this->success(buffer, m_api);
emit success(buffer, m_api);
//emit this->error(m_downloadtype,m_url,m_api,1);
QHashIterator<QString, QString> i(params);
while(i.hasNext()) {
i.next();
qDebug() << i.key()<< " " << i.value();
}
emit this->success(buffer, m_api);
buffer.clear();
// reply->deleteLater();
}

View file

@ -0,0 +1,65 @@
# NOTICE:
#
# Application name defined in TARGET has a corresponding QML filename.
# If name defined in TARGET is changed, the following needs to be done
# to match new name:
# - corresponding QML filename must be changed
# - desktop icon filename must be changed
# - desktop filename must be changed
# - icon definition filename in desktop file must be changed
# - translation filenames have to be changed
# The name of your application
TEMPLATE = app
TARGET = friendiqa
CONFIG += release
QT += qml quick gui widgets sql webview dbus webengine networkauth quickcontrols2
SOURCES += common/friendiqa.cpp \
common/uploadableimage.cpp \
common/xhr.cpp \
common/filesystem.cpp \
common/remoteauthasyncimageprovider.cpp \
common/updatenews.cpp \
common/alarmlinux.cpp
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

View file

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 722 B

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

View file

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View file

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Some files were not shown because too many files have changed in this diff Show more