summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Preinstorfer2016-05-08 19:05:47 +0200
committerFlorian Preinstorfer2016-05-08 19:05:47 +0200
commit0937d5c7f5736f3ae18c333a56623c856b0f998a (patch)
tree82726d5313f570da3e04e10702da075c5b93be2c
parent1571f984e1d37033a8785d062bd9e6ad8498e155 (diff)
downloadaur-0937d5c7f5736f3ae18c333a56623c856b0f998a.tar.gz
Release 0.16.0507
-rw-r--r--.SRCINFO20
-rw-r--r--0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch171
-rw-r--r--0002-Remove-autoupdater.patch2737
-rw-r--r--PKGBUILD29
4 files changed, 15 insertions, 2942 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e06069c9c40f..fb7b88390e14 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue May 3 18:04:29 UTC 2016
+# Sun May 8 17:05:25 UTC 2016
pkgbase = qrk
- pkgdesc = A cash register for small companies (mainly for Austrian companies)
- pkgver = 0.16.0502
- pkgrel = 2
+ pkgdesc = A graphical cash register for small companies
+ pkgver = 0.16.0507
+ pkgrel = 1
url = http://www.ckvsoft.at/
arch = i686
arch = x86_64
@@ -11,18 +11,12 @@ pkgbase = qrk
makedepends = qt5-declarative
depends = qrencode
depends = crypto++
- source = http://downloads.sourceforge.net/project/qrk-registrier-kasse/source/QRK_0.16.0502.source.tar.gz
+ source = http://downloads.sourceforge.net/project/qrk-registrier-kasse/source/QRK_0.16.0507.source.tar.gz
source = qrk.desktop
- source = 0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch
- source = 0002-Remove-autoupdater.patch
- md5sums = a784fe919008cd3dd2da61e3210c82ed
+ md5sums = d6431e4df9367227694790996ea181bb
md5sums = 52c990903894fdecd440e2e2914c2f09
- md5sums = 509dcbe51869181b8dfd9f3b5a754930
- md5sums = 94e130452ec5bbec65e04abe60a77c64
- sha256sums = b7874437ed3ce655c0b548b484e28026acf5cb3ab5701553f3a598f99a37d459
+ sha256sums = 5e37c91b115dc246a1a60438ceebee2f67b8720dc1a2d2a097bd2a669fb3ea96
sha256sums = f71882aea62bd7c07e4806f0223d1699170ac89d59036f5fd5add1004eb93cd0
- sha256sums = f75d427a6d1969599a26a37e53b3c51a6fa43debf2eac135cc5e4dd71284aae3
- sha256sums = 9297a91e210349d92559efc8f74189542bb63773824252e6aee53be2eb3101f9
pkgname = qrk
diff --git a/0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch b/0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch
deleted file mode 100644
index d8dbd0852654..000000000000
--- a/0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-From 3067930c16c28e5c3fd0e966990e5cfe92b16028 Mon Sep 17 00:00:00 2001
-From: Florian Preinstorfer <nblock@archlinux.us>
-Date: Mon, 2 May 2016 22:18:17 +0200
-Subject: [PATCH 1/2] Use QStandardPaths::AppDataLocation as base path
-
----
- src/backup.cpp | 9 +++++----
- src/database.cpp | 3 ++-
- src/main.cpp | 12 +++++++++++-
- src/qrkhome.cpp | 9 +++++----
- src/settingsdialog.cpp | 5 ++---
- 5 files changed, 25 insertions(+), 13 deletions(-)
-
-diff --git a/src/backup.cpp b/src/backup.cpp
-index 3e41406..0e2ef01 100644
---- a/src/backup.cpp
-+++ b/src/backup.cpp
-@@ -25,14 +25,15 @@
-
- #include <QSettings>
- #include <QApplication>
-+#include <QStandardPaths>
- #include <QDebug>
-
- void Backup::create()
- {
-
- QSettings settings(QSettings::IniFormat, QSettings::UserScope, "QRK", "QRK");
-- QString backupDir = settings.value("backupDirectory", qApp->applicationDirPath()).toString();
-- QString dataDir = qApp->applicationDirPath() + "/data";
-+ QString backupDir = settings.value("backupDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).toString();
-+ QString dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/data";
-
- QString infile = QString("%1/%2-QRK.db").arg(dataDir).arg(QDate::currentDate().year());
-
-@@ -51,9 +52,9 @@ void Backup::pakLogFile()
- {
-
- QSettings settings(QSettings::IniFormat, QSettings::UserScope, "QRK", "QRK");
-- QString backupDir = settings.value("backupDirectory", qApp->applicationDirPath()).toString();
-+ QString backupDir = settings.value("backupDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).toString();
-
-- QString infile = QString("%1/%2-QRK.db").arg(qApp->applicationDirPath() + "/qrk.log");
-+ QString infile = QString("%1/%2-QRK.db").arg(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/qrk.log");
-
- QString outfile = QString("%1/qrk_log_%2.zip").arg(backupDir).arg(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss"));
-
-diff --git a/src/database.cpp b/src/database.cpp
-index b5d324e..bc2bde0 100644
---- a/src/database.cpp
-+++ b/src/database.cpp
-@@ -31,6 +31,7 @@
- #include <QSqlError>
- #include <QDir>
- #include <QDate>
-+#include <QStandardPaths>
-
- Database::Database(QObject *parent)
- : QObject(parent)
-@@ -492,7 +493,7 @@ bool Database::open(bool dbSelect)
-
- QDate date = QDate::currentDate();
-
-- QString dataDir = qApp->applicationDirPath() + "/data";
-+ QString dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/data";
- QDir dir(dataDir);
- if (!dir.exists()) {
- dir.mkpath(".");
-diff --git a/src/main.cpp b/src/main.cpp
-index ac5228c..aa21ddd 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -31,6 +31,7 @@
- #include "stdio.h"
- #include "signal.h"
-
-+#include <QDir>
- #include <QTranslator>
- #include <QLibraryInfo>
- #include <QApplication>
-@@ -38,12 +39,19 @@
- #include <QSharedMemory>
- #include <QStyleFactory>
- #include <QtPlugin>
-+#include <QStandardPaths>
-
- //--------------------------------------------------------------------------------
- #include <QFile>
- #include <QTextStream>
- #include <QDebug>
-
-+void createAppDataLocation()
-+{
-+ QDir dir;
-+ dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
-+}
-+
- void QRKMessageHandler(QtMsgType type, const QMessageLogContext &, const QString & str)
- {
- QString txt;
-@@ -61,7 +69,8 @@ void QRKMessageHandler(QtMsgType type, const QMessageLogContext &, const QString
- txt = QString("%1 %2 Fatal: %3").arg(QDateTime::currentDateTime().toString("yyyy.MM.dd hh:mm:ss.zzz")).arg(type).arg(str);
- break;
- }
-- QFile outFile(qApp->applicationDirPath() + "/qrk.log");
-+ QFile outFile(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/qrk.log");
-+
- if (outFile.size() > 20000000) /*20 Mega*/
- Backup::pakLogFile();
-
-@@ -90,6 +99,7 @@ int main(int argc, char *argv[])
- {
- QApplication app(argc, argv);
- QApplication::setStyle(QStyleFactory::create("Fusion"));
-+ createAppDataLocation();
-
- qInstallMessageHandler(QRKMessageHandler);
-
-diff --git a/src/qrkhome.cpp b/src/qrkhome.cpp
-index 9e00cf6..3635d8c 100644
---- a/src/qrkhome.cpp
-+++ b/src/qrkhome.cpp
-@@ -27,6 +27,7 @@
- #include <QMessageBox>
- #include <QDesktopWidget>
- #include <QSettings>
-+#include <QStandardPaths>
-
- #include <QDebug>
-
-@@ -126,17 +127,17 @@ void QRKHome::init()
- ui->backupDirIconLabel->setPixmap(pixmap);
- ui->backupDirLabel->setText(tr("n/a"));
- } else {
-- ui->backupDirLabel->setText(settings.value("backupDirectory", qApp->applicationDirPath()).toString());
-+ ui->backupDirLabel->setText(settings.value("backupDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).toString());
- }
-
-- ui->dataDirlabel->setText(qApp->applicationDirPath() + "/data");
-+ ui->dataDirlabel->setText(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/data");
-
- ui->lcdNumberDay->display(Database::getDayCounter());
- ui->lcdNumberMonth->display(Database::getMonthCounter());
- ui->lcdNumberYear->display(Database::getYearCounter());
-- ui->serverModeCheckBox->setText(tr("Server Modus (Importverzeichnis: %1)").arg(settings.value("importDirectory", qApp->applicationDirPath() + "/import").toString()));
-+ ui->serverModeCheckBox->setText(tr("Server Modus (Importverzeichnis: %1)").arg(settings.value("importDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/import").toString()));
-
-- watcherpath = settings.value("importDirectory", qApp->applicationDirPath() + "/import" ).toString();
-+ watcherpath = settings.value("importDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/import" ).toString();
-
- watcher.removePaths(watcher.directories());
- if (ui->serverModeCheckBox->isChecked()) {
-diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
-index 5c9dbc7..42a77a5 100644
---- a/src/settingsdialog.cpp
-+++ b/src/settingsdialog.cpp
-@@ -319,9 +319,8 @@ GeneralTab::GeneralTab(QSettings &settings, QWidget *parent)
-
- useLogo->setChecked(settings.value("useLogo", false).toBool());
- logoEdit->setText(settings.value("logo", "./logo.png").toString());
-- importDirectoryEdit->setText(settings.value("importDirectory", qApp->applicationDirPath() + "/import").toString());
-- backupDirectoryEdit->setText(settings.value("backupDirectory", qApp->applicationDirPath()).toString());
--
-+ importDirectoryEdit->setText(settings.value("importDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/import").toString());
-+ backupDirectoryEdit->setText(settings.value("backupDirectory", QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).toString());
- }
-
- void GeneralTab::useLogoCheck_toggled(bool toggled)
---
-2.8.2
-
diff --git a/0002-Remove-autoupdater.patch b/0002-Remove-autoupdater.patch
deleted file mode 100644
index e2ce784e85d7..000000000000
--- a/0002-Remove-autoupdater.patch
+++ /dev/null
@@ -1,2737 +0,0 @@
-From 5c08272894f604d7c6ebc653fa2aac8de140635c Mon Sep 17 00:00:00 2001
-From: Florian Preinstorfer <nblock@archlinux.us>
-Date: Tue, 3 May 2016 19:28:21 +0200
-Subject: [PATCH 2/2] Remove autoupdater
-
----
- src/3rdparty/fervor-autoupdate/Fervor.pri | 57 --
- .../fervor-autoupdate/fvavailableupdate.cpp | 119 ---
- src/3rdparty/fervor-autoupdate/fvavailableupdate.h | 73 --
- .../fervor-autoupdate/fvignoredversions.cpp | 96 ---
- src/3rdparty/fervor-autoupdate/fvignoredversions.h | 41 -
- src/3rdparty/fervor-autoupdate/fvplatform.cpp | 232 -----
- src/3rdparty/fervor-autoupdate/fvplatform.h | 40 -
- .../fervor-autoupdate/fvupdatedownloadprogress.cpp | 48 --
- .../fervor-autoupdate/fvupdatedownloadprogress.h | 45 -
- .../fervor-autoupdate/fvupdatedownloadprogress.ui | 103 ---
- src/3rdparty/fervor-autoupdate/fvupdater.cpp | 929 ---------------------
- src/3rdparty/fervor-autoupdate/fvupdater.h | 205 -----
- src/3rdparty/fervor-autoupdate/fvupdatewindow.cpp | 112 ---
- src/3rdparty/fervor-autoupdate/fvupdatewindow.h | 59 --
- src/3rdparty/fervor-autoupdate/fvupdatewindow.ui | 137 ---
- .../fervor-autoupdate/fvversioncomparator.cpp | 186 -----
- .../fervor-autoupdate/fvversioncomparator.h | 58 --
- src/main.cpp | 13 -
- src/src.pro | 6 -
- 19 files changed, 2559 deletions(-)
- delete mode 100644 src/3rdparty/fervor-autoupdate/Fervor.pri
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvavailableupdate.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvavailableupdate.h
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvignoredversions.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvignoredversions.h
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvplatform.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvplatform.h
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.h
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.ui
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdater.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdater.h
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdatewindow.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdatewindow.h
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvupdatewindow.ui
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvversioncomparator.cpp
- delete mode 100644 src/3rdparty/fervor-autoupdate/fvversioncomparator.h
-
-diff --git a/src/3rdparty/fervor-autoupdate/Fervor.pri b/src/3rdparty/fervor-autoupdate/Fervor.pri
-deleted file mode 100644
-index 9bbf7bb..0000000
---- a/src/3rdparty/fervor-autoupdate/Fervor.pri
-+++ /dev/null
-@@ -1,57 +0,0 @@
--#
--# This file is part of QRK - Qt Registrier Kasse
--#
--# Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
--#
--# 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.
--#
--# 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/>.
--#
--# Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
--#
--#
--
--QT += core widgets network
--QT += gui
--DEFINES += FV_GUI
--
--win32:INCLUDEPATH += $$[QT_INSTALL_PREFIX]/include/QtZlib
--
--DEFINES += FV_APP_NAME=\\\"$$TARGET\\\"
--DEFINES += FV_APP_VERSION=\\\"$$VERSION\\\"
--
--DEPENDPATH += "$$PWD"
--INCLUDEPATH += "$$PWD"
--SOURCES += $$PWD/fvupdater.cpp \
-- $$PWD/fvversioncomparator.cpp \
-- $$PWD/fvplatform.cpp \
-- $$PWD/fvignoredversions.cpp \
-- $$PWD/fvavailableupdate.cpp
--
--HEADERS += $$PWD/fvupdater.h \
-- $$PWD/fvversioncomparator.h \
-- $$PWD/fvplatform.h \
-- $$PWD/fvignoredversions.h \
-- $$PWD/fvavailableupdate.h
--
-- SOURCES += $$PWD/fvupdatewindow.cpp \
-- $$PWD/fvupdatedownloadprogress.cpp
--
-- HEADERS += $$PWD/fvupdatewindow.h \
-- $$PWD/fvupdatedownloadprogress.h
--
-- FORMS += $$PWD/fvupdatewindow.ui \
-- $$PWD/fvupdatedownloadprogress.ui
--
--
--TRANSLATIONS += fervor_lt.ts
--CODECFORTR = UTF-8
-diff --git a/src/3rdparty/fervor-autoupdate/fvavailableupdate.cpp b/src/3rdparty/fervor-autoupdate/fvavailableupdate.cpp
-deleted file mode 100644
-index 201be91..0000000
---- a/src/3rdparty/fervor-autoupdate/fvavailableupdate.cpp
-+++ /dev/null
-@@ -1,119 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvavailableupdate.h"
--
--FvAvailableUpdate::FvAvailableUpdate(QObject *parent) :
-- QObject(parent)
--{
-- // noop
--}
--
--QString FvAvailableUpdate::GetTitle()
--{
-- return m_title;
--}
--
--void FvAvailableUpdate::SetTitle(QString title)
--{
-- m_title = title;
--}
--
--QUrl FvAvailableUpdate::GetReleaseNotesLink()
--{
-- return m_releaseNotesLink;
--}
--
--void FvAvailableUpdate::SetReleaseNotesLink(QUrl releaseNotesLink)
--{
-- m_releaseNotesLink = releaseNotesLink;
--}
--
--void FvAvailableUpdate::SetReleaseNotesLink(QString releaseNotesLink)
--{
-- SetReleaseNotesLink(QUrl(releaseNotesLink));
--}
--
--QString FvAvailableUpdate::GetPubDate()
--{
-- return m_pubDate;
--}
--
--void FvAvailableUpdate::SetPubDate(QString pubDate)
--{
-- m_pubDate = pubDate;
--}
--
--QUrl FvAvailableUpdate::GetEnclosureUrl()
--{
-- return m_enclosureUrl;
--}
--
--void FvAvailableUpdate::SetEnclosureUrl(QUrl enclosureUrl)
--{
-- m_enclosureUrl = enclosureUrl;
--}
--
--void FvAvailableUpdate::SetEnclosureUrl(QString enclosureUrl)
--{
-- SetEnclosureUrl(QUrl(enclosureUrl));
--}
--
--QString FvAvailableUpdate::GetEnclosureVersion()
--{
-- return m_enclosureVersion;
--}
--
--void FvAvailableUpdate::SetEnclosureVersion(QString enclosureVersion)
--{
-- m_enclosureVersion = enclosureVersion;
--}
--
--QString FvAvailableUpdate::GetEnclosurePlatform()
--{
-- return m_enclosurePlatform;
--}
--
--void FvAvailableUpdate::SetEnclosurePlatform(QString enclosurePlatform)
--{
-- m_enclosurePlatform = enclosurePlatform;
--}
--
--unsigned long FvAvailableUpdate::GetEnclosureLength()
--{
-- return m_enclosureLength;
--}
--
--void FvAvailableUpdate::SetEnclosureLength(unsigned long enclosureLength)
--{
-- m_enclosureLength = enclosureLength;
--}
--
--QString FvAvailableUpdate::GetEnclosureType()
--{
-- return m_enclosureType;
--}
--
--void FvAvailableUpdate::SetEnclosureType(QString enclosureType)
--{
-- m_enclosureType = enclosureType;
--}
-diff --git a/src/3rdparty/fervor-autoupdate/fvavailableupdate.h b/src/3rdparty/fervor-autoupdate/fvavailableupdate.h
-deleted file mode 100644
-index abdcc90..0000000
---- a/src/3rdparty/fervor-autoupdate/fvavailableupdate.h
-+++ /dev/null
-@@ -1,73 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVAVAILABLEUPDATE_H
--#define FVAVAILABLEUPDATE_H
--
--#include <QObject>
--#include <QUrl>
--
--class FvAvailableUpdate : public QObject
--{
-- Q_OBJECT
--public:
-- explicit FvAvailableUpdate(QObject *parent = 0);
--
-- QString GetTitle();
-- void SetTitle(QString title);
--
-- QUrl GetReleaseNotesLink();
-- void SetReleaseNotesLink(QUrl releaseNotesLink);
-- void SetReleaseNotesLink(QString releaseNotesLink);
--
-- QString GetPubDate();
-- void SetPubDate(QString pubDate);
--
-- QUrl GetEnclosureUrl();
-- void SetEnclosureUrl(QUrl enclosureUrl);
-- void SetEnclosureUrl(QString enclosureUrl);
--
-- QString GetEnclosureVersion();
-- void SetEnclosureVersion(QString enclosureVersion);
--
-- QString GetEnclosurePlatform();
-- void SetEnclosurePlatform(QString enclosurePlatform);
--
-- unsigned long GetEnclosureLength();
-- void SetEnclosureLength(unsigned long enclosureLength);
--
-- QString GetEnclosureType();
-- void SetEnclosureType(QString enclosureType);
--
--private:
-- QString m_title;
-- QUrl m_releaseNotesLink;
-- QString m_pubDate;
-- QUrl m_enclosureUrl;
-- QString m_enclosureVersion;
-- QString m_enclosurePlatform;
-- unsigned long m_enclosureLength;
-- QString m_enclosureType;
--
--};
--
--#endif // FVAVAILABLEUPDATE_H
-diff --git a/src/3rdparty/fervor-autoupdate/fvignoredversions.cpp b/src/3rdparty/fervor-autoupdate/fvignoredversions.cpp
-deleted file mode 100644
-index 0219a0e..0000000
---- a/src/3rdparty/fervor-autoupdate/fvignoredversions.cpp
-+++ /dev/null
-@@ -1,96 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvignoredversions.h"
--#include "fvversioncomparator.h"
--#include <QSettings>
--#include <QCoreApplication>
--#include <string>
--
--// QSettings key for the latest skipped version
--#define FV_IGNORED_VERSIONS_LATEST_SKIPPED_VERSION_KEY "FVLatestSkippedVersion"
--
--
--FVIgnoredVersions::FVIgnoredVersions(QObject *parent) :
--QObject(parent)
--{
-- // noop
--}
--
--bool FVIgnoredVersions::VersionIsIgnored(QString version)
--{
-- // We assume that variable 'version' contains either:
-- // 1) The current version of the application (ignore)
-- // 2) The version that was skipped before and thus stored in QSettings (ignore)
-- // 3) A newer version (don't ignore)
-- // 'version' is not likely to contain an older version in any case.
--
-- if (version == QCoreApplication::applicationVersion()) {
-- return true;
-- }
--
-- QSettings settings(QSettings::NativeFormat,
-- QSettings::UserScope,
-- QCoreApplication::organizationDomain(),
-- QCoreApplication::applicationName());
--
-- //QSettings settings;
-- if (settings.contains(FV_IGNORED_VERSIONS_LATEST_SKIPPED_VERSION_KEY)) {
-- QString lastSkippedVersion = settings.value(FV_IGNORED_VERSIONS_LATEST_SKIPPED_VERSION_KEY).toString();
-- if (version == lastSkippedVersion) {
-- // Implicitly skipped version - skip
-- return true;
-- }
-- }
--
-- std::string currentAppVersion = QCoreApplication::applicationVersion().toStdString();
-- std::string suggestedVersion = std::string(version.toStdString());
-- if (FvVersionComparator::CompareVersions(currentAppVersion, suggestedVersion) == FvVersionComparator::kAscending) {
-- // Newer version - do not skip
-- return false;
-- }
--
-- // Fallback - skip
-- return true;
--}
--
--void FVIgnoredVersions::IgnoreVersion(QString version)
--{
-- if (version == QCoreApplication::applicationVersion()) {
-- // Don't ignore the current version
-- return;
-- }
--
-- if (version.isEmpty()) {
-- return;
-- }
--
-- QSettings settings(QSettings::NativeFormat,
-- QSettings::UserScope,
-- QCoreApplication::organizationDomain(),
-- QCoreApplication::applicationName());
--
--
-- settings.setValue(FV_IGNORED_VERSIONS_LATEST_SKIPPED_VERSION_KEY, version);
--
-- return;
--}
-diff --git a/src/3rdparty/fervor-autoupdate/fvignoredversions.h b/src/3rdparty/fervor-autoupdate/fvignoredversions.h
-deleted file mode 100644
-index e7c37a8..0000000
---- a/src/3rdparty/fervor-autoupdate/fvignoredversions.h
-+++ /dev/null
-@@ -1,41 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVIGNOREDVERSIONS_H
--#define FVIGNOREDVERSIONS_H
--
--#include <QObject>
--
--class FVIgnoredVersions : public QObject
--{
-- Q_OBJECT
--
--public:
-- static bool VersionIsIgnored(QString version);
-- static void IgnoreVersion(QString version);
--
--private:
-- explicit FVIgnoredVersions(QObject *parent = 0);
--
--};
--
--#endif // FVIGNOREDVERSIONS_H
-diff --git a/src/3rdparty/fervor-autoupdate/fvplatform.cpp b/src/3rdparty/fervor-autoupdate/fvplatform.cpp
-deleted file mode 100644
-index cb383e5..0000000
---- a/src/3rdparty/fervor-autoupdate/fvplatform.cpp
-+++ /dev/null
-@@ -1,232 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvplatform.h"
--#include <QtGlobal>
--#include <QDebug>
--
--FvPlatform::FvPlatform(QObject *parent) :
-- QObject(parent)
--{
-- // noop
--}
--
--bool FvPlatform::CurrentlyRunningOnPlatform(QString platform)
--{
-- platform = platform.toUpper().trimmed();
-- if (platform.isEmpty()) {
-- return false;
-- }
--
-- // Defined on AIX.
--#ifdef Q_OS_AIX
-- if (platform == "Q_OS_AIX") {
-- return true;
-- }
--#endif
--
-- // Q_OS_BSD4 ("Defined on Any BSD 4.4 system") intentionally skipped.
--
-- // Defined on BSD/OS.
--#ifdef Q_OS_BSDI
-- if (platform == "Q_OS_BSDI") {
-- return true;
-- }
--#endif
--
-- // Defined on Cygwin.
--#ifdef Q_OS_CYGWIN
-- if (platform == "Q_OS_CYGWIN") {
-- return true;
-- }
--#endif
--
-- // Q_OS_DARWIN ("Defined on Darwin OS (synonym for Q_OS_MAC)") intentionally skipped.
--
-- // Defined on DG/UX.
--#ifdef Q_OS_DGUX
-- if (platform == "Q_OS_DGUX") {
-- return true;
-- }
--#endif
--
-- // Defined on DYNIX/ptx.
--#ifdef Q_OS_DYNIX
-- if (platform == "Q_OS_DYNIX") {
-- return true;
-- }
--#endif
--
-- // Defined on FreeBSD.
--#ifdef Q_OS_FREEBSD
-- if (platform == "Q_OS_FREEBSD") {
-- return true;
-- }
--#endif
--
-- // Defined on HP-UX.
--#ifdef Q_OS_HPUX
-- if (platform == "Q_OS_HPUX") {
-- return true;
-- }
--#endif
--
-- // Defined on GNU Hurd.
--#ifdef Q_OS_HURD
-- if (platform == "Q_OS_HURD") {
-- return true;
-- }
--#endif
--
-- // Defined on SGI Irix.
--#ifdef Q_OS_IRIX
-- if (platform == "Q_OS_IRIX") {
-- return true;
-- }
--#endif
--
-- // Defined on Linux.
--#ifdef Q_OS_LINUX
-- if (platform == "Q_OS_LINUX") {
-- return true;
-- }
--#endif
--
-- // Defined on LynxOS.
--#ifdef Q_OS_LYNX
-- if (platform == "Q_OS_LYNX") {
-- return true;
-- }
--#endif
--
-- // Defined on MAC OS (synonym for Darwin).
--#ifdef Q_OS_MAC
-- if (platform == "Q_OS_MAC") {
-- return true;
-- }
--#endif
--
-- // Q_OS_MSDOS ("Defined on MS-DOS and Windows") intentionally skipped.
--
-- // Defined on NetBSD.
--#ifdef Q_OS_NETBSD
-- if (platform == "Q_OS_NETBSD") {
-- return true;
-- }
--#endif
--
-- // Defined on OS/2.
--#ifdef Q_OS_OS2
-- if (platform == "Q_OS_OS2") {
-- return true;
-- }
--#endif
--
-- // Defined on OpenBSD.
--#ifdef Q_OS_OPENBSD
-- if (platform == "Q_OS_OPENBSD") {
-- return true;
-- }
--#endif
--
-- // Defined on XFree86 on OS/2 (not PM).
--#ifdef Q_OS_OS2EMX
-- if (platform == "Q_OS_OS2EMX") {
-- return true;
-- }
--#endif
--
-- // Defined on HP Tru64 UNIX.
--#ifdef Q_OS_OSF
-- if (platform == "Q_OS_OSF") {
-- return true;
-- }
--#endif
--
-- // Defined on QNX Neutrino.
--#ifdef Q_OS_QNX
-- if (platform == "Q_OS_QNX") {
-- return true;
-- }
--#endif
--
-- // Defined on Reliant UNIX.
--#ifdef Q_OS_RELIANT
-- if (platform == "Q_OS_RELIANT") {
-- return true;
-- }
--#endif
--
-- // Defined on SCO OpenServer 5.
--#ifdef Q_OS_SCO
-- if (platform == "Q_OS_SCO") {
-- return true;
-- }
--#endif
--
-- // Defined on Sun Solaris.
--#ifdef Q_OS_SOLARIS
-- if (platform == "Q_OS_SOLARIS") {
-- return true;
-- }
--#endif
--
-- // Defined on Symbian.
--#ifdef Q_OS_SYMBIAN
-- if (platform == "Q_OS_SYMBIAN") {
-- return true;
-- }
--#endif
--
-- // Defined on DEC Ultrix.
--#ifdef Q_OS_ULTRIX
-- if (platform == "Q_OS_ULTRIX") {
-- return true;
-- }
--#endif
--
-- // Q_OS_UNIX ("Defined on Any UNIX BSD/SYSV system") intentionally skipped.
--
-- // Defined on UnixWare 7, Open UNIX 8.
--#ifdef Q_OS_UNIXWARE
-- if (platform == "Q_OS_UNIXWARE") {
-- return true;
-- }
--#endif
--
-- // Defined on Windows CE (note: goes before Q_OS_WIN32)
--#ifdef Q_OS_WINCE
-- if (platform == "Q_OS_WINCE") {
-- return true;
-- }
--#endif
--
-- // Defined on all supported versions of Windows.
--#ifdef Q_OS_WIN32
-- if (platform == "Q_OS_WIN32") {
-- return true;
-- }
--#endif
--
-- // Fallback
-- return false;
--}
-diff --git a/src/3rdparty/fervor-autoupdate/fvplatform.h b/src/3rdparty/fervor-autoupdate/fvplatform.h
-deleted file mode 100644
-index ab1b878..0000000
---- a/src/3rdparty/fervor-autoupdate/fvplatform.h
-+++ /dev/null
-@@ -1,40 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVPLATFORM_H
--#define FVPLATFORM_H
--
--#include <QObject>
--
--class FvPlatform : public QObject
--{
-- Q_OBJECT
--
--public:
-- static bool CurrentlyRunningOnPlatform(QString platform);
--
--private:
-- explicit FvPlatform(QObject *parent = 0);
--
--};
--
--#endif // FVPLATFORM_H
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.cpp b/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.cpp
-deleted file mode 100644
-index 92dead0..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.cpp
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvupdatedownloadprogress.h"
--
--FvUpdateDownloadProgress::FvUpdateDownloadProgress(QWidget *parent)
-- : QWidget(parent, Qt::SplashScreen)
--{
-- ui.setupUi(this);
--
-- ui.progress->setValue(0);
--
--}
--
--FvUpdateDownloadProgress::~FvUpdateDownloadProgress()
--{
--
--}
--
--void FvUpdateDownloadProgress::downloadProgress ( qint64 bytesReceived, qint64 bytesTotal )
--{
-- ui.progress->setValue( ((float)bytesReceived / (float)bytesTotal) * 100 );
--}
--
--void FvUpdateDownloadProgress::close()
--{
-- this->deleteLater();
-- QWidget::close();
--}
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.h b/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.h
-deleted file mode 100644
-index 061e268..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.h
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVUPDATEDOWNLOADPROGRESS_H
--#define FVUPDATEDOWNLOADPROGRESS_H
--
--#include <QWidget>
--#include "ui_fvupdatedownloadprogress.h"
--
--class FvUpdateDownloadProgress : public QWidget
--{
-- Q_OBJECT
--
--public:
-- FvUpdateDownloadProgress(QWidget *parent = 0);
-- ~FvUpdateDownloadProgress();
--
--public slots:
-- void downloadProgress ( qint64 bytesReceived, qint64 bytesTotal );
-- void close();
--
--private:
-- Ui::FvUpdateDownloadProgress ui;
--};
--
--#endif // FVUPDATEDOWNLOADPROGRESS_H
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.ui b/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.ui
-deleted file mode 100644
-index c84af0a..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdatedownloadprogress.ui
-+++ /dev/null
-@@ -1,103 +0,0 @@
--<?xml version="1.0" encoding="UTF-8"?>
--<ui version="4.0">
-- <class>FvUpdateDownloadProgress</class>
-- <widget class="QWidget" name="FvUpdateDownloadProgress">
-- <property name="windowModality">
-- <enum>Qt::ApplicationModal</enum>
-- </property>
-- <property name="geometry">
-- <rect>
-- <x>0</x>
-- <y>0</y>
-- <width>558</width>
-- <height>70</height>
-- </rect>
-- </property>
-- <property name="sizePolicy">
-- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-- <horstretch>0</horstretch>
-- <verstretch>0</verstretch>
-- </sizepolicy>
-- </property>
-- <property name="windowTitle">
-- <string>FvUpdateDownloadProgress</string>
-- </property>
-- <layout class="QGridLayout" name="gridLayout">
-- <property name="leftMargin">
-- <number>0</number>
-- </property>
-- <property name="topMargin">
-- <number>0</number>
-- </property>
-- <property name="rightMargin">
-- <number>0</number>
-- </property>
-- <property name="bottomMargin">
-- <number>0</number>
-- </property>
-- <property name="spacing">
-- <number>0</number>
-- </property>
-- <item row="0" column="0">
-- <widget class="QFrame" name="frame">
-- <property name="frameShape">
-- <enum>QFrame::WinPanel</enum>
-- </property>
-- <property name="frameShadow">
-- <enum>QFrame::Raised</enum>
-- </property>
-- <layout class="QVBoxLayout" name="verticalLayout">
-- <property name="spacing">
-- <number>8</number>
-- </property>
-- <item>
-- <widget class="QLabel" name="label">
-- <property name="font">
-- <font>
-- <pointsize>12</pointsize>
-- </font>
-- </property>
-- <property name="layoutDirection">
-- <enum>Qt::LeftToRight</enum>
-- </property>
-- <property name="frameShape">
-- <enum>QFrame::NoFrame</enum>
-- </property>
-- <property name="frameShadow">
-- <enum>QFrame::Plain</enum>
-- </property>
-- <property name="text">
-- <string>Download der Update-Datei...</string>
-- </property>
-- <property name="alignment">
-- <set>Qt::AlignCenter</set>
-- </property>
-- </widget>
-- </item>
-- <item>
-- <widget class="QProgressBar" name="progress">
-- <property name="font">
-- <font>
-- <pointsize>8</pointsize>
-- </font>
-- </property>
-- <property name="value">
-- <number>24</number>
-- </property>
-- <property name="textVisible">
-- <bool>false</bool>
-- </property>
-- <property name="invertedAppearance">
-- <bool>false</bool>
-- </property>
-- </widget>
-- </item>
-- </layout>
-- </widget>
-- </item>
-- </layout>
-- </widget>
-- <layoutdefault spacing="6" margin="11"/>
-- <resources/>
-- <connections/>
--</ui>
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdater.cpp b/src/3rdparty/fervor-autoupdate/fvupdater.cpp
-deleted file mode 100644
-index 319c825..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdater.cpp
-+++ /dev/null
-@@ -1,929 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvupdater.h"
--#include "fvplatform.h"
--#include "fvignoredversions.h"
--#include "fvavailableupdate.h"
--#include <QApplication>
--#include <QtNetwork>
--#include <QDebug>
--#include <QSettings>
--#include "quazip.h"
--#include "quazipfile.h"
--
--#ifdef Q_WS_MAC
--#include "CoreFoundation/CoreFoundation.h"
--#endif
--
--#ifdef FV_GUI
--#include "fvupdatewindow.h"
--#include "fvupdatedownloadprogress.h"
--#include <QMessageBox>
--#include <QDesktopServices>
--#else
--// QSettings key for automatic update installation
--#define FV_NEW_VERSION_POLICY_KEY "FVNewVersionPolicy"
--#endif
--
--
--#ifdef FV_DEBUG
--// Unit tests
--# include "fvversioncomparatortest.h"
--#endif
--
--extern QSettings* settings;
--
--FvUpdater* FvUpdater::m_Instance = 0;
--
--FvUpdater* FvUpdater::sharedUpdater()
--{
-- static QMutex mutex;
-- if (! m_Instance) {
-- mutex.lock();
--
-- if (! m_Instance) {
-- m_Instance = new FvUpdater;
-- }
--
-- mutex.unlock();
-- }
--
-- return m_Instance;
--}
--
--void FvUpdater::drop()
--{
-- static QMutex mutex;
-- mutex.lock();
-- delete m_Instance;
-- m_Instance = 0;
-- mutex.unlock();
--}
--
--FvUpdater::FvUpdater() : QObject(0)
--{
-- m_reply = 0;
--#ifdef FV_GUI
-- m_updaterWindow = 0;
--#endif
-- m_proposedUpdate = 0;
-- m_requiredSslFingerprint = "";
-- htAuthUsername = "";
-- htAuthPassword = "";
-- skipVersionAllowed = true;
-- remindLaterAllowed = true;
--
-- connect(&m_qnam, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
--
-- // Translation mechanism
-- installTranslator();
--
--#ifdef FV_DEBUG
-- // Unit tests
-- FvVersionComparatorTest* test = new FvVersionComparatorTest();
-- test->runAll();
-- delete test;
--#endif
--
--}
--
--FvUpdater::~FvUpdater()
--{
-- if (m_proposedUpdate) {
-- delete m_proposedUpdate;
-- m_proposedUpdate = 0;
-- }
--
--#ifdef FV_GUI
-- hideUpdaterWindow();
--#endif
--}
--
--void FvUpdater::installTranslator()
--{
-- QTranslator translator;
-- QString locale = QLocale::system().name();
-- translator.load(QString("fervor_") + locale);
--
--#if QT_VERSION < 0x050000
-- QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
--#endif
--
-- qApp->installTranslator(&translator);
--}
--
--#ifdef FV_GUI
--void FvUpdater::showUpdaterWindowUpdatedWithCurrentUpdateProposal()
--{
-- // Destroy window if already exists
-- hideUpdaterWindow();
--
-- // Create a new window
-- m_updaterWindow = new FvUpdateWindow(NULL, skipVersionAllowed, remindLaterAllowed);
-- m_updaterWindow->UpdateWindowWithCurrentProposedUpdate();
-- m_updaterWindow->show();
--}
--
--void FvUpdater::hideUpdaterWindow()
--{
-- if (m_updaterWindow) {
-- if (! m_updaterWindow->close()) {
-- qWarning() << "Update window didn't close, leaking memory from now on";
-- }
--
-- // not deleting because of Qt::WA_DeleteOnClose
--
-- m_updaterWindow = 0;
-- }
--}
--
--void FvUpdater::updaterWindowWasClosed()
--{
-- // (Re-)nullify a pointer to a destroyed QWidget or you're going to have a bad time.
-- m_updaterWindow = 0;
--}
--#endif
--
--void FvUpdater::SetFeedURL(QUrl feedURL)
--{
-- m_feedURL = feedURL;
--}
--
--void FvUpdater::SetFeedURL(QString feedURL)
--{
-- SetFeedURL(QUrl(feedURL));
--}
--
--QString FvUpdater::GetFeedURL()
--{
-- return m_feedURL.toString();
--}
--
--FvAvailableUpdate* FvUpdater::GetProposedUpdate()
--{
-- return m_proposedUpdate;
--}
--
--
--void FvUpdater::InstallUpdate()
--{
-- if(m_proposedUpdate==NULL)
-- {
-- qWarning() << "Abort Update: No update prososed! This should not happen.";
-- return;
-- }
--
-- // Prepare download
-- QUrl url = m_proposedUpdate->GetEnclosureUrl();
--
-- // Check SSL Fingerprint if required
-- if(url.scheme()=="https" && !m_requiredSslFingerprint.isEmpty())
-- if( !checkSslFingerPrint(url) ) // check failed
-- {
-- qWarning() << "Update aborted.";
-- return;
-- }
--
-- // Start Download
-- QNetworkReply* reply = m_qnam.get(QNetworkRequest(url));
-- connect(reply, SIGNAL(finished()), this, SLOT(httpUpdateDownloadFinished()));
--
-- // Maybe Check request 's return value
-- if (reply->error() != QNetworkReply::NoError)
-- {
-- qDebug()<<"Unable to download the update: "<<reply->errorString();
-- return;
-- }
-- else
-- qDebug()<<"OK";
--
-- // Show download Window
--#ifdef FV_GUI
-- FvUpdateDownloadProgress* dlwindow = new FvUpdateDownloadProgress(NULL);
-- connect(reply, SIGNAL(downloadProgress(qint64, qint64)), dlwindow, SLOT(downloadProgress(qint64, qint64) ));
-- connect(&m_qnam, SIGNAL(finished(QNetworkReply*)), dlwindow, SLOT(close()));
-- dlwindow->show();
--#endif
--
-- emit (updatedFinishedSuccessfully());
--
--#ifdef FV_GUI
-- hideUpdaterWindow();
--#endif
--}
--
--void FvUpdater::httpUpdateDownloadFinished()
--{
-- QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
-- if(reply==NULL)
-- {
-- qWarning()<<"The slot httpUpdateDownloadFinished() should only be invoked by S&S.";
-- return;
-- }
--
-- if(reply->error() == QNetworkReply::NoError)
-- {
-- int httpstatuscode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toUInt();
--
-- // no error received?
-- if (reply->error() == QNetworkReply::NoError)
-- {
-- if (reply->isReadable())
-- {
--#ifdef Q_WS_MAC
-- CFURLRef appURLRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
-- char path[PATH_MAX];
-- if (!CFURLGetFileSystemRepresentation(appURLRef, TRUE, (UInt8 *)path, PATH_MAX)) {
-- // error!
-- }
--
-- CFRelease(appURLRef);
-- QString filePath = QString(path);
-- QString rootDirectory = filePath.left(filePath.lastIndexOf("/"));
--#else
-- QString rootDirectory = QCoreApplication::applicationDirPath() + "/";
--#endif
--
-- // Write download into File
-- QFileInfo fileInfo=reply->url().path();
-- QString fileName = rootDirectory + fileInfo.fileName();
-- //qDebug()<<"Writing downloaded file into "<<fileName;
--
-- QFile file(fileName);
-- file.open(QIODevice::WriteOnly);
-- file.write(reply->readAll());
-- file.close();
--
-- // Retrieve List of updated files (Placed in an extra scope to avoid QuaZIP handles the archive permanently and thus avoids the deletion.)
-- {
-- QuaZip zip(fileName);
-- if (!zip.open(QuaZip::mdUnzip)) {
-- qWarning("testRead(): zip.open(): %d", zip.getZipError());
-- return;
-- }
-- zip.setFileNameCodec("IBM866");
-- QList<QuaZipFileInfo> updateFiles = zip.getFileInfoList();
--
-- // Rename all current files with available update.
-- for (int i=0;i<updateFiles.size();i++)
-- {
-- QString sourceFilePath = rootDirectory + "\\" + updateFiles[i].name;
-- QDir appDir( QCoreApplication::applicationDirPath() );
--
-- QFileInfo file( sourceFilePath );
-- if(file.exists())
-- {
-- //qDebug()<<tr("Moving file %1 to %2").arg(sourceFilePath).arg(sourceFilePath+".oldversion");
-- appDir.rename( sourceFilePath, sourceFilePath+".oldversion" );
-- }
-- }
-- }
--
-- // Install updated Files
-- unzipUpdate(fileName, rootDirectory);
--
-- // Delete update archive
-- while(QFile::remove(fileName) )
-- {
-- };
--
-- // Restart ap to clean up and start usual business
-- restartApplication();
--
-- }
-- else qDebug()<<"Error: QNetworkReply is not readable!";
-- }
-- else
-- {
-- qDebug()<<"Download errors ocurred! HTTP Error Code:"<<httpstatuscode;
-- }
--
-- reply->deleteLater();
-- } // If !reply->error END
--} // httpUpdateDownloadFinished END
--
--bool FvUpdater::unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName )
--{
-- QuaZip zip(filePath);
--
-- if (!zip.open(QuaZip::mdUnzip)) {
-- qWarning()<<tr("Error: Unable to open zip archive %1 for unzipping: %2").arg(filePath).arg(zip.getZipError());
-- return false;
-- }
--
-- zip.setFileNameCodec("IBM866");
--
-- //qWarning("Update contains %d files\n", zip.getEntriesCount());
--
-- QuaZipFileInfo info;
-- QuaZipFile file(&zip);
-- QFile out;
-- QString name;
-- QDir appDir(extDirPath);
-- for (bool more = zip.goToFirstFile(); more; more = zip.goToNextFile())
-- {
-- if (!zip.getCurrentFileInfo(&info)) {
-- qWarning()<<tr("Error: Unable to retrieve fileInfo about the file to extract: %2").arg(zip.getZipError());
-- return false;
-- }
--
-- if (!singleFileName.isEmpty())
-- if (!info.name.contains(singleFileName))
-- continue;
--
-- if (!file.open(QIODevice::ReadOnly)) {
-- qWarning()<<tr("Error: Unable to open file %1 for unzipping: %2").arg(filePath).arg(file.getZipError());
-- return false;
-- }
--
-- name = QString("%1/%2").arg(extDirPath).arg(file.getActualFileName());
--
-- if (file.getZipError() != UNZ_OK) {
-- qWarning()<<tr("Error: Unable to retrieve zipped filename to unzip from %1: %2").arg(filePath).arg(file.getZipError());
-- return false;
-- }
--
-- QFileInfo fi(name);
-- appDir.mkpath(fi.absolutePath() ); // Ensure that subdirectories - if required - exist
-- out.setFileName(name);
-- out.open(QIODevice::WriteOnly);
-- out.write( file.readAll() );
-- out.close();
--
-- if (file.getZipError() != UNZ_OK) {
-- qWarning()<<tr("Error: Unable to unzip file %1: %2").arg(name).arg(file.getZipError());
-- return false;
-- }
--
-- if (!file.atEnd()) {
-- qWarning()<<tr("Error: Have read all available bytes, but pointer still does not show EOF: %1").arg(file.getZipError());
-- return false;
-- }
--
-- file.close();
--
-- if (file.getZipError() != UNZ_OK) {
-- qWarning()<<tr("Error: Unable to close zipped file %1: %2").arg(name).arg(file.getZipError());
-- return false;
-- }
-- }
--
-- zip.close();
--
-- if (zip.getZipError() != UNZ_OK) {
-- qWarning()<<tr("Error: Unable to close zip archive file %1: %2").arg(filePath).arg(file.getZipError());
-- return false;
-- }
--
-- return true;
--}
--
--
--void FvUpdater::SkipUpdate()
--{
-- qDebug() << "Skip update";
--
-- FvAvailableUpdate* proposedUpdate = GetProposedUpdate();
-- if (! proposedUpdate) {
-- qWarning() << "Proposed update is NULL (shouldn't be at this point)";
-- return;
-- }
--
-- // Start ignoring this particular version
-- FVIgnoredVersions::IgnoreVersion(proposedUpdate->GetEnclosureVersion());
--
--#ifdef FV_GUI
-- hideUpdaterWindow();
--#endif
--}
--
--void FvUpdater::RemindMeLater()
--{
-- //qDebug() << "Remind me later";
--
--#ifdef FV_GUI
-- hideUpdaterWindow();
--#endif
--}
--
--bool FvUpdater::CheckForUpdates(bool silentAsMuchAsItCouldGet)
--{
-- if (m_feedURL.isEmpty()) {
-- qCritical() << "Please set feed URL via setFeedURL() before calling CheckForUpdates().";
-- return false;
-- }
--
-- m_silentAsMuchAsItCouldGet = silentAsMuchAsItCouldGet;
--
-- // Check if application's organization name and domain are set, fail otherwise
-- // (nowhere to store QSettings to)
-- if (QCoreApplication::organizationName().isEmpty()) {
-- qCritical() << "QCoreApplication::organizationName is not set. Please do that.";
-- return false;
-- }
-- if (QCoreApplication::organizationDomain().isEmpty()) {
-- qCritical() << "QCoreApplication::organizationDomain is not set. Please do that.";
-- return false;
-- }
--
-- if(QCoreApplication::applicationName().isEmpty()) {
-- qCritical() << "QCoreApplication::applicationName is not set. Please do that.";
-- return false;
-- }
--
-- // Set application version is not set yet
-- if (QCoreApplication::applicationVersion().isEmpty()) {
-- qCritical() << "QCoreApplication::applicationVersion is not set. Please do that.";
-- return false;
-- }
--
-- cancelDownloadFeed();
-- m_httpRequestAborted = false;
-- startDownloadFeed(m_feedURL);
--
-- return true;
--}
--
--bool FvUpdater::CheckForUpdatesSilent()
--{
-- return CheckForUpdates(true);
--}
--
--bool FvUpdater::CheckForUpdatesNotSilent()
--{
-- return CheckForUpdates(false);
--}
--
--
--void FvUpdater::startDownloadFeed(QUrl url)
--{
-- m_xml.clear();
--
-- // Check SSL Fingerprint if required
-- if(url.scheme()=="https" && !m_requiredSslFingerprint.isEmpty())
-- if( !checkSslFingerPrint(url) ) // check failed
-- {
-- qWarning() << "Update aborted.";
-- return;
-- }
--
--
-- m_reply = m_qnam.get(QNetworkRequest(url));
--
-- connect(m_reply, SIGNAL(readyRead()), this, SLOT(httpFeedReadyRead()));
-- connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(httpFeedUpdateDataReadProgress(qint64, qint64)));
-- connect(m_reply, SIGNAL(finished()), this, SLOT(httpFeedDownloadFinished()));
--}
--
--void FvUpdater::cancelDownloadFeed()
--{
-- if (m_reply) {
-- m_httpRequestAborted = true;
-- m_reply->abort();
-- }
--}
--
--void FvUpdater::httpFeedReadyRead()
--{
-- // this slot gets called every time the QNetworkReply has new data.
-- // We read all of its new data and write it into the file.
-- // That way we use less RAM than when reading it at the finished()
-- // signal of the QNetworkReply
-- m_xml.addData(m_reply->readAll());
--}
--
--void FvUpdater::httpFeedUpdateDataReadProgress(qint64 bytesRead,
-- qint64 totalBytes)
--{
-- Q_UNUSED(bytesRead);
-- Q_UNUSED(totalBytes);
--
-- if (m_httpRequestAborted) {
-- return;
-- }
--}
--
--void FvUpdater::httpFeedDownloadFinished()
--{
-- if (m_httpRequestAborted) {
-- m_reply->deleteLater();
-- return;
-- }
--
-- QVariant redirectionTarget = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
-- if (m_reply->error()) {
--
-- // Error.
-- showErrorDialog(tr("Feed download failed: %1.").arg(m_reply->errorString()), false);
--
-- } else if (! redirectionTarget.isNull()) {
-- QUrl newUrl = m_feedURL.resolved(redirectionTarget.toUrl());
--
-- m_feedURL = newUrl;
-- m_reply->deleteLater();
--
-- startDownloadFeed(m_feedURL);
-- return;
--
-- } else {
--
-- // Done.
-- xmlParseFeed();
--
-- }
--
-- m_reply->deleteLater();
-- m_reply = 0;
--}
--
--bool FvUpdater::xmlParseFeed()
--{
-- QString currentTag, currentQualifiedTag;
--
-- QString xmlTitle, xmlLink, xmlReleaseNotesLink, xmlPubDate, xmlEnclosureUrl,
-- xmlEnclosureVersion, xmlEnclosurePlatform, xmlEnclosureType;
-- unsigned long xmlEnclosureLength;
--
-- // Parse
-- while (! m_xml.atEnd()) {
--
-- m_xml.readNext();
--
-- if (m_xml.isStartElement()) {
--
-- currentTag = m_xml.name().toString();
-- currentQualifiedTag = m_xml.qualifiedName().toString();
--
-- if (m_xml.name() == "item") {
--
-- xmlTitle.clear();
-- xmlLink.clear();
-- xmlReleaseNotesLink.clear();
-- xmlPubDate.clear();
-- xmlEnclosureUrl.clear();
-- xmlEnclosureVersion.clear();
-- xmlEnclosurePlatform.clear();
-- xmlEnclosureLength = 0;
-- xmlEnclosureType.clear();
--
-- } else if (m_xml.name() == "enclosure") {
--
-- QXmlStreamAttributes attribs = m_xml.attributes();
--
-- if (attribs.hasAttribute("fervor:platform"))
-- {
-- xmlEnclosurePlatform = attribs.value("fervor:platform").toString().trimmed();
--
-- if (FvPlatform::CurrentlyRunningOnPlatform(xmlEnclosurePlatform))
-- {
-- xmlEnclosureUrl = attribs.hasAttribute("url") ? attribs.value("url").toString().trimmed() : "";
--
-- xmlEnclosureVersion = "";
-- if (attribs.hasAttribute("fervor:version"))
-- xmlEnclosureVersion = attribs.value("fervor:version").toString().trimmed();
-- if (attribs.hasAttribute("sparkle:version"))
-- xmlEnclosureVersion = attribs.value("sparkle:version").toString().trimmed();
--
-- xmlEnclosureLength = attribs.hasAttribute("length") ? attribs.value("length").toString().toLong() : 0;
--
-- xmlEnclosureType = attribs.hasAttribute("type") ? attribs.value("type").toString().trimmed() : "";
-- }
--
-- } // if hasAttribute flevor:platform END
--
-- } // IF encosure END
--
-- } else if (m_xml.isEndElement()) {
--
-- if (m_xml.name() == "item") {
--
-- // That's it - we have analyzed a single <item> and we'll stop
-- // here (because the topmost is the most recent one, and thus
-- // the newest version.
--
-- return searchDownloadedFeedForUpdates(xmlTitle,
-- xmlLink,
-- xmlReleaseNotesLink,
-- xmlPubDate,
-- xmlEnclosureUrl,
-- xmlEnclosureVersion,
-- xmlEnclosurePlatform,
-- xmlEnclosureLength,
-- xmlEnclosureType);
--
-- }
--
-- } else if (m_xml.isCharacters() && ! m_xml.isWhitespace()) {
--
-- if (currentTag == "title") {
-- xmlTitle += m_xml.text().toString().trimmed();
--
-- } else if (currentTag == "link") {
-- xmlLink += m_xml.text().toString().trimmed();
--
-- } else if (currentQualifiedTag == "sparkle:releaseNotesLink") {
-- xmlReleaseNotesLink += m_xml.text().toString().trimmed();
--
-- } else if (currentTag == "pubDate") {
-- xmlPubDate += m_xml.text().toString().trimmed();
--
-- }
--
-- }
--
-- if (m_xml.error() && m_xml.error() != QXmlStreamReader::PrematureEndOfDocumentError) {
--
-- showErrorDialog(tr("Feed parsing failed: %1 %2.").arg(QString::number(m_xml.lineNumber()), m_xml.errorString()), false);
-- return false;
--
-- }
-- }
--
-- return false;
--}
--
--
--bool FvUpdater::searchDownloadedFeedForUpdates(QString xmlTitle,
-- QString xmlLink,
-- QString xmlReleaseNotesLink,
-- QString xmlPubDate,
-- QString xmlEnclosureUrl,
-- QString xmlEnclosureVersion,
-- QString xmlEnclosurePlatform,
-- unsigned long xmlEnclosureLength,
-- QString xmlEnclosureType)
--{
-- Q_UNUSED(xmlTitle);
-- Q_UNUSED(xmlPubDate);
-- Q_UNUSED(xmlEnclosureLength);
-- Q_UNUSED(xmlEnclosureType);
--
-- // Validate
-- if (xmlReleaseNotesLink.isEmpty()) {
-- if (xmlLink.isEmpty()) {
-- showErrorDialog(tr("Feed error: \"release notes\" link is empty"), false);
-- return false;
-- } else {
-- xmlReleaseNotesLink = xmlLink;
-- }
-- } else {
-- xmlLink = xmlReleaseNotesLink;
-- }
-- if (! (xmlLink.startsWith("http://") || xmlLink.startsWith("https://"))) {
-- showErrorDialog(tr("Feed error: invalid \"release notes\" link"), false);
-- return false;
-- }
-- if (xmlEnclosureUrl.isEmpty() || xmlEnclosureVersion.isEmpty() || xmlEnclosurePlatform.isEmpty()) {
-- showErrorDialog(tr("Feed error: invalid \"enclosure\" with the download link"), false);
-- return false;
-- }
--
-- // Relevant version?
-- if (FVIgnoredVersions::VersionIsIgnored(xmlEnclosureVersion)) {
-- qDebug() << "Version '" << xmlEnclosureVersion << "' is ignored, too old or something like that.";
--
-- showInformationDialog(tr("No updates were found."), false);
--
-- return true; // Things have succeeded when you think of it.
-- }
--
--
-- //
-- // Success! At this point, we have found an update that can be proposed
-- // to the user.
-- //
--
-- if (m_proposedUpdate) {
-- delete m_proposedUpdate; m_proposedUpdate = 0;
-- }
-- m_proposedUpdate = new FvAvailableUpdate();
-- m_proposedUpdate->SetTitle(xmlTitle);
-- m_proposedUpdate->SetReleaseNotesLink(xmlReleaseNotesLink);
-- m_proposedUpdate->SetPubDate(xmlPubDate);
-- m_proposedUpdate->SetEnclosureUrl(xmlEnclosureUrl);
-- m_proposedUpdate->SetEnclosureVersion(xmlEnclosureVersion);
-- m_proposedUpdate->SetEnclosurePlatform(xmlEnclosurePlatform);
-- m_proposedUpdate->SetEnclosureLength(xmlEnclosureLength);
-- m_proposedUpdate->SetEnclosureType(xmlEnclosureType);
--
--#ifdef FV_GUI
-- // Show "look, there's an update" window
-- showUpdaterWindowUpdatedWithCurrentUpdateProposal();
--#else
-- // Decide ourselves what to do
-- decideWhatToDoWithCurrentUpdateProposal();
--#endif
--
-- return true;
--}
--
--
--void FvUpdater::showErrorDialog(QString message, bool showEvenInSilentMode)
--{
-- if (m_silentAsMuchAsItCouldGet) {
-- if (! showEvenInSilentMode) {
-- // Don't show errors in the silent mode
-- return;
-- }
-- }
--
--#ifdef FV_GUI
-- QMessageBox dlFailedMsgBox;
-- dlFailedMsgBox.setIcon(QMessageBox::Critical);
-- dlFailedMsgBox.setText(tr("Error"));
-- dlFailedMsgBox.setInformativeText(message);
-- dlFailedMsgBox.exec();
--#else
-- qCritical() << message;
--#endif
--}
--
--void FvUpdater::showInformationDialog(QString message, bool showEvenInSilentMode)
--{
-- if (m_silentAsMuchAsItCouldGet) {
-- if (! showEvenInSilentMode) {
-- // Don't show information dialogs in the silent mode
-- return;
-- }
-- }
--
--#ifdef FV_GUI
-- QMessageBox dlInformationMsgBox;
-- dlInformationMsgBox.setIcon(QMessageBox::Information);
-- dlInformationMsgBox.setText(tr("Information"));
-- dlInformationMsgBox.setInformativeText(message);
-- dlInformationMsgBox.exec();
--#else
-- qDebug() << message;
--#endif
--}
--
--void FvUpdater::finishUpdate(QString pathToFinish)
--{
-- pathToFinish = pathToFinish.isEmpty() ? QCoreApplication::applicationDirPath() : pathToFinish;
-- QDir appDir(pathToFinish);
-- appDir.setFilter( QDir::Files | QDir::Dirs );
--
-- QFileInfoList dirEntries = appDir.entryInfoList();
-- foreach (QFileInfo fi, dirEntries)
-- {
-- if ( fi.isDir() )
-- {
-- QString dirname = fi.fileName();
-- if ((dirname==".") || (dirname == ".."))
-- continue;
--
-- // recursive clean up subdirectory
-- finishUpdate(fi.filePath());
-- }
-- else
-- {
-- if(fi.suffix()=="oldversion")
-- if( !appDir.remove( fi.absoluteFilePath() ) )
-- qDebug()<<"Error: Unable to clean up file: "<<fi.absoluteFilePath();
--
-- }
-- } // For each dir entry END
--}
--
--void FvUpdater::restartApplication()
--{
-- // Spawn a new instance of myApplication:
-- QString app = QApplication::applicationFilePath();
-- QStringList arguments = QApplication::arguments();
-- QString wd = QDir::currentPath();
-- qDebug() << app << arguments << wd;
-- QProcess::startDetached(app, arguments, wd);
-- QApplication::exit();
--}
--
--void FvUpdater::setRequiredSslFingerPrint(QString md5)
--{
-- m_requiredSslFingerprint = md5.remove(":");
--}
--
--QString FvUpdater::getRequiredSslFingerPrint()
--{
-- return m_requiredSslFingerprint;
--}
--
--bool FvUpdater::checkSslFingerPrint(QUrl urltoCheck)
--{
-- if(urltoCheck.scheme()!="https")
-- {
-- qWarning()<<tr("SSL fingerprint check: The url %1 is not a ssl connection!").arg(urltoCheck.toString());
-- return false;
-- }
--
-- QSslSocket *socket = new QSslSocket(this);
-- socket->connectToHostEncrypted(urltoCheck.host(), 443);
-- if( !socket->waitForEncrypted(1000)) // waits until ssl emits encrypted(), max 1000msecs
-- {
-- qWarning()<<"SSL fingerprint check: Unable to connect SSL server: "<<socket->sslErrors();
-- return false;
-- }
--
-- QSslCertificate cert = socket->peerCertificate();
--
-- if(cert.isNull())
-- {
-- qWarning()<<"SSL fingerprint check: Unable to retrieve SSL server certificate.";
-- return false;
-- }
--
-- // COmpare digests
-- if(cert.digest().toHex() != m_requiredSslFingerprint)
-- {
-- qWarning()<<"SSL fingerprint check: FINGERPRINT MISMATCH! Server digest="<<cert.digest().toHex()<<", requiered ssl digest="<<m_requiredSslFingerprint;
-- return false;
-- }
--
-- return true;
--}
--
--void FvUpdater::authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator )
--{
-- if(reply==NULL || authenticator==NULL)
-- return;
--
-- if(!authenticator->user().isEmpty()) // If there is already a login user set but an authentication is still required: credentials must be wrong -> abort
-- {
-- reply->abort();
-- qWarning()<<"Http authentication: Wrong credentials!";
-- return;
-- }
--
-- authenticator->setUser(htAuthUsername);
-- authenticator->setPassword(htAuthPassword);
--}
--
--void FvUpdater::setHtAuthCredentials(QString user, QString pass)
--{
-- htAuthUsername = user;
-- htAuthPassword = pass;
--}
--
--void FvUpdater::setHtAuthUsername(QString user)
--{
-- htAuthUsername = user;
--}
--
--void FvUpdater::setHtAuthPassword(QString pass)
--{
-- htAuthPassword = pass;
--}
--
--void FvUpdater::setSkipVersionAllowed(bool allowed)
--{
-- skipVersionAllowed = allowed;
--}
--
--void FvUpdater::setRemindLaterAllowed(bool allowed)
--{
-- remindLaterAllowed = allowed;
--}
--
--bool FvUpdater::getSkipVersionAllowed()
--{
-- return skipVersionAllowed;
--}
--
--bool FvUpdater::getRemindLaterAllowed()
--{
-- return remindLaterAllowed;
--}
--
--#ifndef FV_GUI
--
--void FvUpdater::decideWhatToDoWithCurrentUpdateProposal()
--{
-- QString policy = settings->value(FV_NEW_VERSION_POLICY_KEY).toString();
-- if(policy == "install")
-- InstallUpdate();
-- else if(policy == "skip")
-- SkipUpdate();
-- else
-- RemindMeLater();
--}
--
--#endif
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdater.h b/src/3rdparty/fervor-autoupdate/fvupdater.h
-deleted file mode 100644
-index 158ecdc..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdater.h
-+++ /dev/null
-@@ -1,205 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVUPDATER_H
--#define FVUPDATER_H
--
--#include <QObject>
--#include <QMutex>
--#include <QNetworkAccessManager>
--#include <QUrl>
--#include <QXmlStreamReader>
--class QNetworkReply;
--class FvUpdateWindow;
--class FvUpdateConfirmDialog;
--class FvAvailableUpdate;
--
--
--class FvUpdater : public QObject
--{
-- Q_OBJECT
--
--public:
--
-- // Singleton
-- static FvUpdater* sharedUpdater();
-- static void drop();
--
-- // Set / get feed URL
-- void SetFeedURL(QUrl feedURL);
-- void SetFeedURL(QString feedURL);
-- QString GetFeedURL();
-- void finishUpdate(QString pathToFinish = "");
-- void setRequiredSslFingerPrint(QString md5);
-- QString getRequiredSslFingerPrint(); // returns md5!
-- // HTTP Authentuication - for security reasons no getters are provided, only a setter
-- void setHtAuthCredentials(QString user, QString pass);
-- void setHtAuthUsername(QString user);
-- void setHtAuthPassword(QString pass);
-- void setSkipVersionAllowed(bool allowed);
-- void setRemindLaterAllowed(bool allowed);
-- bool getSkipVersionAllowed();
-- bool getRemindLaterAllowed();
--
--
--public slots:
--
-- // Check for updates
-- bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);
--
-- // Aliases
-- bool CheckForUpdatesSilent();
-- bool CheckForUpdatesNotSilent();
--
--
-- //
-- // ---------------------------------------------------
-- // ---------------------------------------------------
-- // ---------------------------------------------------
-- // ---------------------------------------------------
-- //
--
--protected:
--
-- friend class FvUpdateWindow; // Uses GetProposedUpdate() and others
-- friend class FvUpdateConfirmDialog; // Uses GetProposedUpdate() and others
-- FvAvailableUpdate* GetProposedUpdate();
--
--
--protected slots:
--
-- // Update window button slots
-- void InstallUpdate();
-- void SkipUpdate();
-- void RemindMeLater();
--
--private:
--
-- //
-- // Singleton business
-- //
-- // (we leave just the declarations, so the compiler will warn us if we try
-- // to use those two functions by accident)
-- FvUpdater(); // Hide main constructor
-- ~FvUpdater(); // Hide main destructor
-- FvUpdater(const FvUpdater&); // Hide copy constructor
-- FvUpdater& operator=(const FvUpdater&); // Hide assign op
--
-- static FvUpdater* m_Instance; // Singleton instance
--
--
-- //
-- // Windows / dialogs
-- //
--#ifdef FV_GUI
-- FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown)
-- void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window
-- void hideUpdaterWindow(); // Hide + destroy m_updaterWindow
-- void updaterWindowWasClosed(); // Sent by the updater window when it gets closed
--#else
-- void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings
--#endif
--
-- // Available update (NULL if not fetched)
-- FvAvailableUpdate* m_proposedUpdate;
--
-- // If true, don't show the error dialogs and the "no updates." dialog
-- // (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)
-- // Useful for automatic update checking upon application startup.
-- bool m_silentAsMuchAsItCouldGet;
--
-- // Dialogs (notifications)
-- bool skipVersionAllowed;
-- bool remindLaterAllowed;
--
-- void showErrorDialog(QString message, bool showEvenInSilentMode = false); // Show an error message
-- void showInformationDialog(QString message, bool showEvenInSilentMode = false); // Show an informational message
--
--
-- //
-- // HTTP feed fetcher infrastructure
-- //
-- QUrl m_feedURL; // Feed URL that will be fetched
-- QNetworkAccessManager m_qnam;
-- QNetworkReply* m_reply;
-- int m_httpGetId;
-- bool m_httpRequestAborted;
--
-- void startDownloadFeed(QUrl url); // Start downloading feed
-- void cancelDownloadFeed(); // Stop downloading the current feed
--
-- //
-- // SSL Fingerprint Check infrastructure
-- //
-- QString m_requiredSslFingerprint;
--
-- bool checkSslFingerPrint(QUrl urltoCheck); // true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted
--
-- //
-- // Htauth-Infrastructure
-- //
-- QString htAuthUsername;
-- QString htAuthPassword;
--
--
-- //
-- // XML parser
-- //
-- QXmlStreamReader m_xml; // XML data collector and parser
-- bool xmlParseFeed(); // Parse feed in m_xml
-- bool searchDownloadedFeedForUpdates(QString xmlTitle,
-- QString xmlLink,
-- QString xmlReleaseNotesLink,
-- QString xmlPubDate,
-- QString xmlEnclosureUrl,
-- QString xmlEnclosureVersion,
-- QString xmlEnclosurePlatform,
-- unsigned long xmlEnclosureLength,
-- QString xmlEnclosureType);
--
--
-- //
-- // Helpers
-- //
-- void installTranslator(); // Initialize translation mechanism
-- void restartApplication(); // Restarts application after update
--
--private slots:
--
-- void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );
-- void httpFeedReadyRead();
-- void httpFeedUpdateDataReadProgress(qint64 bytesRead,
-- qint64 totalBytes);
-- void httpFeedDownloadFinished();
--
-- //
-- // Download and install Update infrastructure
-- //
-- void httpUpdateDownloadFinished();
-- bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")); // returns true on success
--
--signals:
-- void updatedFinishedSuccessfully();
--
--};
--
--#endif // FVUPDATER_H
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdatewindow.cpp b/src/3rdparty/fervor-autoupdate/fvupdatewindow.cpp
-deleted file mode 100644
-index f8fa92a..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdatewindow.cpp
-+++ /dev/null
-@@ -1,112 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvupdatewindow.h"
--#include "ui_fvupdatewindow.h"
--#include "fvupdater.h"
--#include "fvavailableupdate.h"
--#include <QApplication>
--#include <QCloseEvent>
--#include <QtNetwork/QNetworkAccessManager>
--#include <QtNetwork/QNetworkRequest>
--#include <QtNetwork/QNetworkReply>
--
--#include <QDebug>
--
--
--FvUpdateWindow::FvUpdateWindow(QWidget *parent, bool skipVersionAllowed, bool remindLaterAllowed) :
-- QWidget(parent, Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint | Qt::WindowTitleHint),
-- m_ui(new Ui::FvUpdateWindow)
--{
-- m_ui->setupUi(this);
--
-- m_appIconScene = 0;
--
-- if(!skipVersionAllowed)
-- m_ui->skipThisVersionButton->hide();
-- if(!remindLaterAllowed)
-- m_ui->remindMeLaterButton->hide();
--
-- // Delete on close
-- setAttribute(Qt::WA_DeleteOnClose, true);
--
-- // Set the "new version is available" string
-- QString newVersString = m_ui->newVersionIsAvailableLabel->text().arg(QApplication::applicationName());
-- m_ui->newVersionIsAvailableLabel->setText(newVersString);
--
-- // Connect buttons
-- connect(m_ui->installUpdateButton, SIGNAL(clicked()),
-- FvUpdater::sharedUpdater(), SLOT(InstallUpdate()));
-- connect(m_ui->skipThisVersionButton, SIGNAL(clicked()),
-- FvUpdater::sharedUpdater(), SLOT(SkipUpdate()));
-- connect(m_ui->remindMeLaterButton, SIGNAL(clicked()),
-- FvUpdater::sharedUpdater(), SLOT(RemindMeLater()));
--}
--
--FvUpdateWindow::~FvUpdateWindow()
--{
-- // m_ui->releaseNotesWebView->stop();
-- delete m_ui;
--}
--
--bool FvUpdateWindow::UpdateWindowWithCurrentProposedUpdate()
--{
-- FvAvailableUpdate* proposedUpdate = FvUpdater::sharedUpdater()->GetProposedUpdate();
-- if (! proposedUpdate) {
-- return false;
-- }
--
-- QString downloadString = m_ui->wouldYouLikeToDownloadLabel->text()
-- .arg(QApplication::applicationName(), proposedUpdate->GetEnclosureVersion(), QApplication::applicationVersion());
-- m_ui->wouldYouLikeToDownloadLabel->setText(downloadString);
--
-- QEventLoop eventLoop;
--
-- // "quit()" the event-loop, when the network request "finished()"
-- QNetworkAccessManager mgr;
-- QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), &eventLoop, SLOT(quit()));
--
-- // the HTTP request
-- QNetworkRequest req( proposedUpdate->GetReleaseNotesLink() );
-- QNetworkReply *reply = mgr.get(req);
-- eventLoop.exec(); // blocks stack until "finished()" has been called
--
-- if (reply->error() == QNetworkReply::NoError) {
-- //success
--// qDebug() << "Success" <<reply->readAll();
-- m_ui->releaseNotesWebView->setHtml(reply->readAll());
-- delete reply;
-- }
-- else {
-- //failure
-- qDebug() << "Failure" <<reply->errorString();
-- delete reply;
-- }
--
-- return true;
--}
--
--void FvUpdateWindow::closeEvent(QCloseEvent* event)
--{
-- FvUpdater::sharedUpdater()->updaterWindowWasClosed();
-- event->accept();
--}
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdatewindow.h b/src/3rdparty/fervor-autoupdate/fvupdatewindow.h
-deleted file mode 100644
-index 9bed7fd..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdatewindow.h
-+++ /dev/null
-@@ -1,59 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVUPDATEWINDOW_H
--#define FVUPDATEWINDOW_H
--
--#if QT_VERSION >= 0x050000
-- #include <QtWidgets/QWidget>
--#else
-- #include <QWidget>
--#endif
--
--class QGraphicsScene;
--
--namespace Ui {
--class FvUpdateWindow;
--}
--
--class FvUpdateWindow : public QWidget
--{
-- Q_OBJECT
--
--public:
-- explicit FvUpdateWindow(QWidget *parent, bool skipVersionAllowed, bool remindLaterAllowed);
-- ~FvUpdateWindow();
--
-- // Update the current update proposal from FvUpdater
-- bool UpdateWindowWithCurrentProposedUpdate();
--
-- void closeEvent(QCloseEvent* event);
--
--private:
-- Ui::FvUpdateWindow* m_ui;
-- QGraphicsScene* m_appIconScene;
--
--};
--
--#endif // FVUPDATEWINDOW_H
--
--
-diff --git a/src/3rdparty/fervor-autoupdate/fvupdatewindow.ui b/src/3rdparty/fervor-autoupdate/fvupdatewindow.ui
-deleted file mode 100644
-index fa56cf0..0000000
---- a/src/3rdparty/fervor-autoupdate/fvupdatewindow.ui
-+++ /dev/null
-@@ -1,137 +0,0 @@
--<?xml version="1.0" encoding="UTF-8"?>
--<ui version="4.0">
-- <class>FvUpdateWindow</class>
-- <widget class="QWidget" name="FvUpdateWindow">
-- <property name="windowModality">
-- <enum>Qt::ApplicationModal</enum>
-- </property>
-- <property name="geometry">
-- <rect>
-- <x>0</x>
-- <y>0</y>
-- <width>655</width>
-- <height>481</height>
-- </rect>
-- </property>
-- <property name="contextMenuPolicy">
-- <enum>Qt::PreventContextMenu</enum>
-- </property>
-- <property name="windowTitle">
-- <string>Software Update</string>
-- </property>
-- <property name="windowOpacity">
-- <double>1.000000000000000</double>
-- </property>
-- <layout class="QHBoxLayout" name="horizontalLayout_6">
-- <property name="sizeConstraint">
-- <enum>QLayout::SetFixedSize</enum>
-- </property>
-- <item>
-- <layout class="QVBoxLayout" name="verticalLayout">
-- <item>
-- <widget class="QLabel" name="newVersionIsAvailableLabel">
-- <property name="font">
-- <font>
-- <weight>75</weight>
-- <bold>true</bold>
-- </font>
-- </property>
-- <property name="text">
-- <string>Eine neue Version von %1 steht zum Download bereit!</string>
-- </property>
-- </widget>
-- </item>
-- <item>
-- <widget class="QLabel" name="wouldYouLikeToDownloadLabel">
-- <property name="text">
-- <string>%1 %2 ist verfügbar - Sie verwenden %3. Möchten Sie diese Version jetzt downloaden?</string>
-- </property>
-- </widget>
-- </item>
-- <item>
-- <widget class="QGroupBox" name="groupBox">
-- <property name="font">
-- <font>
-- <weight>75</weight>
-- <bold>true</bold>
-- </font>
-- </property>
-- <property name="title">
-- <string>Versionshinweise</string>
-- </property>
-- <layout class="QHBoxLayout" name="horizontalLayout_7">
-- <item>
-- <widget class="QTextBrowser" name="releaseNotesWebView"/>
-- </item>
-- </layout>
-- </widget>
-- </item>
-- <item>
-- <layout class="QHBoxLayout" name="horizontalLayout_3">
-- <item>
-- <widget class="QPushButton" name="skipThisVersionButton">
-- <property name="minimumSize">
-- <size>
-- <width>0</width>
-- <height>60</height>
-- </size>
-- </property>
-- <property name="text">
-- <string>Diese Version überspringen</string>
-- </property>
-- </widget>
-- </item>
-- <item>
-- <spacer name="horizontalSpacer">
-- <property name="orientation">
-- <enum>Qt::Horizontal</enum>
-- </property>
-- <property name="sizeHint" stdset="0">
-- <size>
-- <width>40</width>
-- <height>20</height>
-- </size>
-- </property>
-- </spacer>
-- </item>
-- <item>
-- <widget class="QPushButton" name="remindMeLaterButton">
-- <property name="minimumSize">
-- <size>
-- <width>0</width>
-- <height>60</height>
-- </size>
-- </property>
-- <property name="text">
-- <string>Später erinnern</string>
-- </property>
-- </widget>
-- </item>
-- <item>
-- <widget class="QPushButton" name="installUpdateButton">
-- <property name="minimumSize">
-- <size>
-- <width>0</width>
-- <height>60</height>
-- </size>
-- </property>
-- <property name="text">
-- <string>Update installieren</string>
-- </property>
-- <property name="autoDefault">
-- <bool>true</bool>
-- </property>
-- <property name="default">
-- <bool>true</bool>
-- </property>
-- </widget>
-- </item>
-- </layout>
-- </item>
-- </layout>
-- </item>
-- </layout>
-- </widget>
-- <resources/>
-- <connections/>
--</ui>
-diff --git a/src/3rdparty/fervor-autoupdate/fvversioncomparator.cpp b/src/3rdparty/fervor-autoupdate/fvversioncomparator.cpp
-deleted file mode 100644
-index 29ff493..0000000
---- a/src/3rdparty/fervor-autoupdate/fvversioncomparator.cpp
-+++ /dev/null
-@@ -1,186 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#include "fvversioncomparator.h"
--#include <string>
--#include <algorithm>
--#include <cctype>
--
--//
--// Clone of Sparkle's SUStandardVersionComparator.m, so here's original author's
--// copyright too:
--//
--// Copyright 2007 Andy Matuschak. All rights reserved.
--//
--// Everything's the same except for TypeOfCharacter()
--// (because who knows how Foundation does isdigit() and such.)
--//
--
--
--FvVersionComparator::FvVersionComparator()
--{
-- // noop
--}
--
--FvVersionComparator::CharacterType FvVersionComparator::TypeOfCharacter(std::string character)
--{
-- if (character == ".") {
-- return kSeparatorType;
-- } else if (isdigit(character[0])) {
-- return kNumberType;
-- } else if (isspace(character[0])) {
-- return kSeparatorType;
-- } else if (ispunct(character[0])) {
-- return kSeparatorType;
-- } else {
-- return kStringType;
-- }
--
--}
--
--std::vector<std::string> FvVersionComparator::SplitVersionString(std::string version)
--{
-- std::string character;
-- std::string s;
-- unsigned long i = 0, n = 0;
-- CharacterType oldType, newType;
-- std::vector<std::string> parts;
--
-- if (version.length() == 0) {
-- // Nothing to do here
-- return parts;
-- }
--
-- s = version.substr(0, 1);
-- oldType = TypeOfCharacter(s);
-- n = version.length() - 1;
-- for (i = 1; i <= n; ++i) {
-- character = version.substr(i, 1)[0];
-- newType = TypeOfCharacter(character);
-- if (oldType != newType || oldType == kSeparatorType) {
-- // We've reached a new segment
-- std::string aPart = s;
-- parts.push_back(aPart);
-- s = character;
-- } else {
-- // Add character to string and continue
-- s.append(character);
-- }
-- oldType = newType;
-- }
--
-- // Add the last part onto the array
-- parts.push_back(s);
-- return parts;
--}
--
--
--FvVersionComparator::ComparatorResult FvVersionComparator::CompareVersions(std::string versionA,
-- std::string versionB)
--{
-- std::vector<std::string> partsA = SplitVersionString(versionA);
-- std::vector<std::string> partsB = SplitVersionString(versionB);
--
-- std::string partA = std::string(""), partB = std::string("");
-- unsigned long i = 0, n = 0;
-- int intA, intB;
-- CharacterType typeA, typeB;
--
-- n = std::min(partsA.size(), partsB.size());
-- for (i = 0; i < n; ++i) {
-- partA = partsA.at(i);
-- partB = partsB.at(i);
--
-- typeA = TypeOfCharacter(partA);
-- typeB = TypeOfCharacter(partB);
--
-- // Compare types
-- if (typeA == typeB) {
-- // Same type; we can compare
-- if (typeA == kNumberType) {
-- intA = atoi(partA.c_str());
-- intB = atoi(partB.c_str());
--
-- if (intA > intB) {
-- return kDescending;
-- } else if (intA < intB) {
-- return kAscending;
-- }
-- } else if (typeA == kStringType) {
-- short result = partA.compare(partB);
-- switch (result) {
-- case -1: return kAscending; break;
-- case 1: return kDescending; break;
-- case 0: /* do nothing */ break;
-- };
-- }
-- } else {
-- // Not the same type? Now we have to do some validity checking
-- if (typeA != kStringType && typeB == kStringType) {
-- // typeA wins
-- return kDescending;
-- } else if (typeA == kStringType && typeB != kStringType) {
-- // typeB wins
-- return kAscending;
-- } else {
-- // One is a number and the other is a period. The period is invalid
-- if (typeA == kNumberType) {
-- return kDescending;
-- } else {
-- return kAscending;
-- }
-- }
-- }
-- }
-- // The versions are equal up to the point where they both still have parts
-- // Lets check to see if one is larger than the other
-- if (partsA.size() != partsB.size()) {
-- // Yep. Lets get the next part of the larger
-- // n holds the index of the part we want.
-- std::string missingPart = std::string("");
-- CharacterType missingType;
-- ComparatorResult shorterResult, largerResult;
--
-- if (partsA.size() > partsB.size()) {
-- missingPart = partsA.at(n);
-- shorterResult = kAscending;
-- largerResult = kDescending;
-- } else {
-- missingPart = partsB.at(n);
-- shorterResult = kDescending;
-- largerResult = kAscending;
-- }
--
-- missingType = TypeOfCharacter(missingPart);
-- // Check the type
-- if (missingType == kStringType) {
-- // It's a string. Shorter version wins
-- return shorterResult;
-- } else {
-- // It's a number/period. Larger version wins
-- return largerResult;
-- }
-- }
--
-- // The 2 strings are identical
-- return kSame;
--}
-diff --git a/src/3rdparty/fervor-autoupdate/fvversioncomparator.h b/src/3rdparty/fervor-autoupdate/fvversioncomparator.h
-deleted file mode 100644
-index 04ce6f2..0000000
---- a/src/3rdparty/fervor-autoupdate/fvversioncomparator.h
-+++ /dev/null
-@@ -1,58 +0,0 @@
--/*
-- * This file is part of QRK - Qt Registrier Kasse
-- *
-- * Copyright (C) 2015-2016 Christian Kvasny <chris@ckvsoft.at>
-- *
-- * 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.
-- *
-- * 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/>.
-- *
-- * Button Design, and Idea for the Layout are lean out from LillePOS, Copyright 2010, Martin Koller, kollix@aon.at
-- *
--*/
--
--#ifndef FVVERSIONCOMPARATOR_H
--#define FVVERSIONCOMPARATOR_H
--
--#include <iosfwd>
--#include <vector>
--
--
--class FvVersionComparator
--{
--public:
--
-- typedef enum {
-- kSame = 0,
-- kDescending = 1,
-- kAscending = -1
-- } ComparatorResult;
--
-- static ComparatorResult CompareVersions(std::string versionA,
-- std::string versionB);
--
--private:
--
-- FvVersionComparator();
--
-- typedef enum {
-- kNumberType,
-- kStringType,
-- kSeparatorType
-- } CharacterType;
--
-- static CharacterType TypeOfCharacter(std::string character);
-- static std::vector<std::string> SplitVersionString(std::string version);
--
--};
--
--#endif // FVVERSIONCOMPARATOR_H
-diff --git a/src/main.cpp b/src/main.cpp
-index aa21ddd..da21087 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -22,7 +22,6 @@
-
- #include "qrk.h"
- #include "settingsdialog.h"
--#include "fvupdater.h"
- #include "utils/demomode.h"
- #include "backup.h"
-
-@@ -109,18 +108,6 @@ int main(int argc, char *argv[])
- QApplication::setApplicationName("QRK");
- QApplication::setApplicationVersion(QString("%1.%2").arg(QRK_VERSION_MAJOR).arg(QRK_VERSION_MINOR));
-
-- // Set feed URL before doing anything else
-- FvUpdater::sharedUpdater()->SetFeedURL("http://service.ckvsoft.at/swupdates/Appcast.xml");
-- FvUpdater::sharedUpdater()->setRequiredSslFingerPrint("c3b038cb348c7d06328579fb950a48eb"); // Optional
-- FvUpdater::sharedUpdater()->setHtAuthCredentials("swupdates", "updatepw"); // Optional
-- FvUpdater::sharedUpdater()->setSkipVersionAllowed(true); // Optional
-- FvUpdater::sharedUpdater()->setRemindLaterAllowed(true); // Optional
-- // Finish Up old Updates
-- FvUpdater::sharedUpdater()->finishUpdate();
--
-- // Check for updates automatically
-- FvUpdater::sharedUpdater()->CheckForUpdatesSilent();
--
- /*
- QSharedMemory mem("QRK");
- if(!mem.create(1))
-diff --git a/src/src.pro b/src/src.pro
-index 3ddc028..dab248b 100644
---- a/src/src.pro
-+++ b/src/src.pro
-@@ -134,12 +134,6 @@ TRANSLATIONS += tr/QRK_en.ts \
- <------>error("Unable to include quazip.")
- }
-
--# Fervor autoupdater
--# (set TARGET and VERSION of your app before including Fervor.pri)
--!include("3rdparty/fervor-autoupdate/Fervor.pri") {
--<------>error("Unable to include Fervor autoupdater.")
--}
--
- # LIBS += -lqrencode
- # LIBS += -lpthread
-
---
-2.8.2
-
diff --git a/PKGBUILD b/PKGBUILD
index 244a6fd3b11f..de61712171c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=qrk
_pkgname=QRK
-pkgver=0.16.0502
-pkgrel=2
+pkgver=0.16.0507
+pkgrel=1
pkgdesc="A graphical cash register for small companies"
arch=('i686' 'x86_64')
url="http://www.ckvsoft.at/"
@@ -12,25 +12,12 @@ makedepends=('qt5-declarative')
depends=('qrencode'
'crypto++')
source=("http://downloads.sourceforge.net/project/qrk-registrier-kasse/source/${_pkgname}_${pkgver}.source.tar.gz"
- "${pkgname}.desktop"
- "0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch"
- "0002-Remove-autoupdater.patch")
+ "${pkgname}.desktop")
-md5sums=('a784fe919008cd3dd2da61e3210c82ed'
- '52c990903894fdecd440e2e2914c2f09'
- '509dcbe51869181b8dfd9f3b5a754930'
- '94e130452ec5bbec65e04abe60a77c64')
-sha256sums=('b7874437ed3ce655c0b548b484e28026acf5cb3ab5701553f3a598f99a37d459'
- 'f71882aea62bd7c07e4806f0223d1699170ac89d59036f5fd5add1004eb93cd0'
- 'f75d427a6d1969599a26a37e53b3c51a6fa43debf2eac135cc5e4dd71284aae3'
- '9297a91e210349d92559efc8f74189542bb63773824252e6aee53be2eb3101f9')
-
-prepare() {
- cd "${srcdir}/${_pkgname}_${pkgver}_source"
-
- patch -Np1 < "${srcdir}/0001-Use-QStandardPaths-AppDataLocation-as-base-path.patch"
- patch -Np1 < "${srcdir}/0002-Remove-autoupdater.patch"
-}
+md5sums=('d6431e4df9367227694790996ea181bb'
+ '52c990903894fdecd440e2e2914c2f09')
+sha256sums=('5e37c91b115dc246a1a60438ceebee2f67b8720dc1a2d2a097bd2a669fb3ea96'
+ 'f71882aea62bd7c07e4806f0223d1699170ac89d59036f5fd5add1004eb93cd0')
build() {
cd "${srcdir}/${_pkgname}_${pkgver}_source"
@@ -43,7 +30,7 @@ package() {
cd "${srcdir}/${_pkgname}_${pkgver}_source"
mkdir -p ${pkgdir}/usr/{bin,share/applications}
- install -D -m755 "bin/$_pkgname" "$pkgdir"/usr/bin/$pkgname
+ install -D -m755 "bin/$pkgname" "$pkgdir"/usr/bin/$pkgname
install -D -m644 "src/icons/logo.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
install -D -m644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
}