Hello community,

here is the log from the commit of package kaccounts-providers for 
openSUSE:Factory checked in at 2016-01-10 13:04:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kaccounts-providers (Old)
 and      /work/SRC/openSUSE:Factory/.kaccounts-providers.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kaccounts-providers"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kaccounts-providers/kaccounts-providers.changes  
2015-11-15 12:30:08.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.kaccounts-providers.new/kaccounts-providers.changes 
    2016-01-10 13:04:14.000000000 +0100
@@ -1,0 +2,9 @@
+Sun Dec 13 13:05:12 UTC 2015 - [email protected]
+
+- Update to KDE Applications 15.12.0
+   * KDE Applications 15.12.0 
+   * https://www.kde.org/announcements/announce-applications-15.12.0.php
+   * boo#958887
+
+
+-------------------------------------------------------------------

Old:
----
  kaccounts-providers-15.08.3.tar.xz

New:
----
  kaccounts-providers-15.12.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kaccounts-providers.spec ++++++
--- /var/tmp/diff_new_pack.yU7o3f/_old  2016-01-10 13:04:15.000000000 +0100
+++ /var/tmp/diff_new_pack.yU7o3f/_new  2016-01-10 13:04:15.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           kaccounts-providers
-Version:        15.08.3
+Version:        15.12.0
 Release:        0
 Summary:        KDE Accounts Providers
 License:        GPL-2.0+
@@ -32,6 +32,11 @@
 BuildRequires:  libaccounts-qt5-devel
 BuildRequires:  libsignon-qt5-devel
 BuildRequires:  pkgconfig(Qt5Widgets)
+BuildRequires:  pkgconfig(Qt5Qml)
+BuildRequires:  kio-devel
+BuildRequires:  ki18n-devel
+BuildRequires:  kdeclarative-devel
+BuildRequires:  kpackage-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -53,5 +58,7 @@
 %doc COPYING
 %{_kf5_sysconfdir}/signon-ui/
 %{_kf5_sharedir}/accounts/
+%_kf5_plugindir/kaccounts/
+%_datadir/kpackage/
 
 %changelog

++++++ kaccounts-providers-15.08.3.tar.xz -> kaccounts-providers-15.12.0.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kaccounts-providers-15.08.3/CMakeLists.txt 
new/kaccounts-providers-15.12.0/CMakeLists.txt
--- old/kaccounts-providers-15.08.3/CMakeLists.txt      2015-04-21 
14:11:27.000000000 +0200
+++ new/kaccounts-providers-15.12.0/CMakeLists.txt      2015-12-09 
13:00:36.000000000 +0100
@@ -2,20 +2,36 @@
 
 cmake_minimum_required(VERSION 2.8.12)
 
+set(KDE_APPLICATIONS_VERSION_MAJOR "15")
+set(KDE_APPLICATIONS_VERSION_MINOR "12")
+set(KDE_APPLICATIONS_VERSION_MICRO "0")
+set(KACCOUNTS_VERSION 
"${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
+
+set(REQUIRED_QT_VERSION "5.2.0")
+set(REQUIRED_KF5_VERSION "5.4.0")
+
 find_package(ECM 1.0.0 REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" 
${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
 
 find_package(Intltool REQUIRED)
 find_package(KAccounts REQUIRED)
 
+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Qml)
+find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED KIO
+                                                  I18n
+                                                  Declarative
+                                                  Package)
+
 include(KDEInstallDirs)
 include(KDECMakeSettings)
 include(FeatureSummary)
 include(ECMInstallIcons)
+include(KDECompilerSettings)
 
 add_subdirectory(icons)
 add_subdirectory(services)
 add_subdirectory(providers)
 add_subdirectory(webkit-options)
+add_subdirectory(plugins)
 
 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kaccounts-providers-15.08.3/Messages.sh 
new/kaccounts-providers-15.12.0/Messages.sh
--- old/kaccounts-providers-15.08.3/Messages.sh 2015-04-21 14:11:27.000000000 
+0200
+++ new/kaccounts-providers-15.12.0/Messages.sh 2015-12-09 13:00:36.000000000 
+0100
@@ -1,5 +1,5 @@
 #! /usr/bin/env bash
 
 find . -name "*.provider.in" -o -name "*.service.in" -type f | xargs -n1 
intltool-extract -l -type="gettext/xml"
-$XGETTEXT `find . -name "*.h"` -c -a -o $podir/kaccounts-providers.pot
+$XGETTEXT `find . -name "*.h" -o -name "*.cpp"` -c -a -o 
$podir/kaccounts-providers.pot
 rm -rf ./tmp/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kaccounts-providers-15.08.3/plugins/CMakeLists.txt 
new/kaccounts-providers-15.12.0/plugins/CMakeLists.txt
--- old/kaccounts-providers-15.08.3/plugins/CMakeLists.txt      1970-01-01 
01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/plugins/CMakeLists.txt      2015-12-09 
13:00:36.000000000 +0100
@@ -0,0 +1 @@
+add_subdirectory(owncloud-ui)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/CMakeLists.txt 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/CMakeLists.txt
--- old/kaccounts-providers-15.08.3/plugins/owncloud-ui/CMakeLists.txt  
1970-01-01 01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/plugins/owncloud-ui/CMakeLists.txt  
2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,30 @@
+project (owncloud-ui-plugin)
+
+include_directories (${CMAKE_CURRENT_BUILD_DIR}
+                     ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+set (owncloud_plugin_kaccounts_SRCS
+     owncloud.cpp
+     qmlhelper.cpp
+)
+
+add_library (owncloud_plugin_kaccounts MODULE
+             ${owncloud_plugin_kaccounts_SRCS}
+)
+
+target_link_libraries (owncloud_plugin_kaccounts
+                       Qt5::Core
+                       KF5::KIOCore
+                       KF5::I18n
+                       KF5::Declarative
+                       KAccounts
+                       ${ACCOUNTSQT_LIBRARIES}
+                       ${SIGNONQT_LIBRARIES}
+)
+
+# Install:
+install (TARGETS owncloud_plugin_kaccounts
+         DESTINATION ${PLUGIN_INSTALL_DIR}/kaccounts/ui
+)
+kpackage_install_package(package org.kde.kaccounts.owncloud genericqml)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/owncloud.cpp 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/owncloud.cpp
--- old/kaccounts-providers-15.08.3/plugins/owncloud-ui/owncloud.cpp    
1970-01-01 01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/plugins/owncloud-ui/owncloud.cpp    
2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,97 @@
+/*************************************************************************************
+ *  Copyright (C) 2012 by Alejandro Fiestas Olivares <[email protected]>        
      *
+ *  Copyright (C) 2015 by Martin Klapetek <[email protected]>                  
      *
+ *                                                                             
      *
+ *  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 2             
      *
+ *  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, write to the Free Software                
      *
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA   *
+ 
*************************************************************************************/
+
+#include "owncloud.h"
+#include "qmlhelper.h"
+
+#include <KLocalizedString>
+#include <KDeclarative/QmlObject>
+
+#include <QQmlEngine>
+#include <QQmlContext>
+
+OwnCloudWizard::OwnCloudWizard(QObject *parent)
+    : KAccountsUiPlugin(parent)
+{
+}
+
+OwnCloudWizard::~OwnCloudWizard()
+{
+}
+
+void OwnCloudWizard::init(KAccountsUiPlugin::UiType type)
+{
+    if (type == KAccountsUiPlugin::NewAccountDialog) {
+
+        const QString packagePath("org.kde.kaccounts.owncloud");
+
+        m_object = new KDeclarative::QmlObject();
+        m_object->setTranslationDomain(packagePath);
+        m_object->setInitializationDelayed(true);
+        m_object->loadPackage(packagePath);
+
+        QmlHelper *helper = new QmlHelper(m_object);
+        connect(helper, &QmlHelper::wizardFinished, this, 
&OwnCloudWizard::success);
+        connect(helper, &QmlHelper::wizardFinished, [=] {
+            QWindow *window = qobject_cast<QWindow *>(m_object->rootObject());
+            if (window) {
+                window->close();
+            }
+            m_object->deleteLater();
+        });
+        m_object->engine()->rootContext()->setContextProperty("helper", 
helper);
+
+        m_object->completeInitialization();
+
+        if (!m_object->package().metadata().isValid()) {
+            return;
+        }
+
+        Q_EMIT uiReady();
+    }
+
+}
+
+void OwnCloudWizard::setProviderName(const QString &providerName)
+{
+    //TODO: unused?
+    m_providerName = providerName;
+}
+
+void OwnCloudWizard::showNewAccountDialog()
+{
+    QWindow *window = qobject_cast<QWindow *>(m_object->rootObject());
+    if (window) {
+        window->setTransientParent(transientParent());
+        window->show();
+        window->requestActivate();
+        window->setTitle(m_object->package().metadata().name());
+        
window->setIcon(QIcon::fromTheme(m_object->package().metadata().iconName()));
+    }
+}
+
+void OwnCloudWizard::showConfigureAccountDialog(const quint32 accountId)
+{
+
+}
+
+QStringList OwnCloudWizard::supportedServicesForConfig() const
+{
+    return QStringList();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/owncloud.h 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/owncloud.h
--- old/kaccounts-providers-15.08.3/plugins/owncloud-ui/owncloud.h      
1970-01-01 01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/plugins/owncloud-ui/owncloud.h      
2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,54 @@
+/*************************************************************************************
+ *  Copyright (C) 2012 by Alejandro Fiestas Olivares <[email protected]>        
      *
+ *  Copyright (C) 2015 by Martin Klapetek <[email protected]>                  
      *
+ *                                                                             
      *
+ *  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 2             
      *
+ *  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, write to the Free Software                
      *
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA   *
+ 
*************************************************************************************/
+
+#ifndef OWNCLOUD_H
+#define OWNCLOUD_H
+
+#include <QUrl>
+#include <QHash>
+
+#include <kaccountsuiplugin.h>
+
+namespace KDeclarative {
+    class QmlObject;
+}
+
+class OwnCloudWizard : public KAccountsUiPlugin
+{
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.kde.kaccounts.UiPlugin")
+    Q_INTERFACES(KAccountsUiPlugin)
+
+public:
+    explicit OwnCloudWizard(QObject *parent = 0);
+    virtual ~OwnCloudWizard();
+
+    virtual void init(KAccountsUiPlugin::UiType type) Q_DECL_OVERRIDE;
+    virtual void setProviderName(const QString &providerName) Q_DECL_OVERRIDE;
+    virtual void showNewAccountDialog() Q_DECL_OVERRIDE;
+    virtual void showConfigureAccountDialog(const quint32 accountId) 
Q_DECL_OVERRIDE;
+    virtual QStringList supportedServicesForConfig() const Q_DECL_OVERRIDE;
+
+private:
+    QString m_providerName;
+    QHash<QString, int> m_services;
+    KDeclarative::QmlObject *m_object;
+};
+
+#endif //OWNCLOUD_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/contents/ui/BasicInfo.qml
 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/contents/ui/BasicInfo.qml
--- 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/contents/ui/BasicInfo.qml
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/contents/ui/BasicInfo.qml
       2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,110 @@
+/*
+ *   Copyright 2015 (C) Martin Klapetek <[email protected]>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU Library General Public License as
+ *   published by the Free Software Foundation; either version 2 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 Library General Public License for more details
+ *
+ *   You should have received a copy of the GNU Library General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.2
+import org.kde.plasma.core 2.0 as PlasmaCore
+
+ColumnLayout {
+    id: basicInfoLayout
+    property bool canContinue: !helper.isWorking && helper.noError && 
nameText.text.length > 0 && passwordText.text.length > 0
+    property bool canRestartTimer: nameText.text.length > 0 && 
passwordText.text.length > 0 && serverText.text.length > 0
+
+    Timer {
+        id: checkServerTimer
+        interval: 1000
+        repeat: false
+        running: false
+
+        onTriggered: {
+            helper.checkServer(nameText.text, passwordText.text, 
serverText.text);
+        }
+    }
+
+    TextField {
+        id: nameText
+        Layout.fillWidth: true
+//         clearButtonShown: true
+        placeholderText: "Username"
+
+        onTextChanged: {
+            if (basicInfoLayout.canRestartTimer) {
+                checkServerTimer.restart();
+            }
+        }
+    }
+
+    TextField {
+        id: passwordText
+        Layout.fillWidth: true
+//         clearButtonShown: true
+        placeholderText: "Password"
+        echoMode: TextInput.Password
+
+        onTextChanged: {
+            if (basicInfoLayout.canRestartTimer) {
+                checkServerTimer.restart();
+            }
+        }
+    }
+
+    TextField {
+        id: serverText
+        Layout.fillWidth: true
+//         clearButtonShown: true
+        placeholderText: "Server"
+
+        onTextChanged: {
+            if (basicInfoLayout.canRestartTimer) {
+                checkServerTimer.restart();
+            }
+        }
+    }
+
+    Label {
+        id: errorLabel
+        Layout.fillWidth: true
+        visible: text.length > 0 && !checkServerTimer.running
+        text: helper.errorMessage
+        wrapMode: Text.WordWrap
+    }
+
+    Item {
+        Layout.fillWidth: true
+        Layout.fillHeight: true
+
+        BusyIndicator {
+            id: busy
+            width: parent.height > parent.width ? Math.round(parent.width/2) : 
Math.round(parent.height/2)
+            height: width
+            anchors.centerIn: parent
+            running: helper.isWorking
+            visible: running
+        }
+
+        PlasmaCore.IconItem {
+            width: busy.width
+            height: width
+            anchors.centerIn: parent
+            source: "dialog-ok"
+            visible: !helper.isWorking && helper.noError && !errorLabel.visible
+        }
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/contents/ui/Services.qml
 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/contents/ui/Services.qml
--- 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/contents/ui/Services.qml
        1970-01-01 01:00:00.000000000 +0100
+++ 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/contents/ui/Services.qml
        2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,44 @@
+/*
+ *   Copyright 2015 (C) Martin Klapetek <[email protected]>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU Library General Public License as
+ *   published by the Free Software Foundation; either version 2 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 Library General Public License for more details
+ *
+ *   You should have received a copy of the GNU Library General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.2
+
+ColumnLayout {
+    id: basicInfoLayout
+    property bool canContinue: true
+
+    //FIXME at some point this should become a list of disabled services
+    property alias contactsEnabled: contactsService.checked
+
+    Label {
+        text: i18n("Choose services to enable");
+    }
+
+    CheckBox {
+        id: contactsService
+        text: i18n("Contacts")
+    }
+
+    // Just an item padder
+    Item {
+        Layout.fillHeight: true
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/contents/ui/main.qml
 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/contents/ui/main.qml
--- 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/contents/ui/main.qml
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/contents/ui/main.qml
    2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,98 @@
+/*
+ *   Copyright 2015 (C) Martin Klapetek <[email protected]>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU Library General Public License as
+ *   published by the Free Software Foundation; either version 2 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 Library General Public License for more details
+ *
+ *   You should have received a copy of the GNU Library General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.2
+
+ApplicationWindow {
+    id: kaccountsRoot
+    objectName: "_root"
+
+    width: 400; height: 250
+
+    ColumnLayout {
+        anchors.fill: parent
+        anchors.margins: units.largeSpacing
+
+        Label {
+            text: i18n("Add new ownCloud account")
+        }
+
+        StackView {
+            id: stack
+
+            Layout.fillHeight: true
+            Layout.fillWidth: true
+
+            initialItem: BasicInfo {
+                id: basicInfoPage
+                objectName: "basicInfoPage"
+            }
+        }
+
+        Component {
+            id: servicesComponent
+
+            Services {
+                objectName: "servicesPage"
+            }
+        }
+
+        RowLayout {
+            Button {
+                id: backButton
+                Layout.fillWidth: true
+                text: i18n("Back");
+                enabled: stack.currentItem.objectName == "servicesPage"
+
+                onClicked: {
+                    if (stack.currentItem.objectName == "servicesPage") {
+                        stack.pop(servicesComponent);
+                    }
+                }
+            }
+
+            Button {
+                id: nextButton
+                Layout.fillWidth: true
+                text: i18n("Next")
+                enabled: basicInfoPage.canContinue //: false
+                visible: stack.currentItem == basicInfoPage
+
+                onClicked: {
+                    if (stack.currentItem == basicInfoPage) {
+                        stack.push(servicesComponent);
+                    }
+                }
+            }
+
+            Button {
+                id: finishButton
+                Layout.fillWidth: true
+                text: i18n("Finish")
+                visible: stack.currentItem.objectName == "servicesPage"
+
+                onClicked: {
+                    helper.finish(stack.currentItem.contactsEnabled);
+                }
+            }
+        }
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/metadata.desktop 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/metadata.desktop
--- 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/package/metadata.desktop    
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/package/metadata.desktop    
    2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,41 @@
+[Desktop Entry]
+Name=OwnCloud KAccounts QML plugin
+Name[ca]=Connector OwnCloud en QML per a KAccounts
+Name[ca@valencia]=Connector OwnCloud en QML per a KAccounts
+Name[da]=KAccounts-QML-plugin til OwnCloud
+Name[de]=KAccounts-QML-Modul für OwnCloud
+Name[en_GB]=OwnCloud KAccounts QML plugin
+Name[es]=Complemento QML de KAccounts para OwnCloud
+Name[fi]=OwnCloud KAccounts -QML-liitännäinen
+Name[gl]=Complemento QML de KAccounts de OwnCloud
+Name[it]=Estensione QML di KAccounts per OwnCloud
+Name[ko]=OwnCloud KAccounts QML 플러그인
+Name[nl]=OwnCloud KAccounts QML plug-in
+Name[pl]=Wtyczka QML OwnCloud dla KAccounts
+Name[pt]='Plugin' em QML do KAccounts para o OwnCloud
+Name[pt_BR]=Plugin em QML do KAccounts para o OwnCloud
+Name[sk]=OwnCloud KAccounts QML plugin
+Name[sl]=Vstavek QML za KAccounts za OwnCloud
+Name[sr]=КуМЛ прикључак К‑налога за Оунклауд
+Name[sr@ijekavian]=КуМЛ прикључак К‑налога за Оунклауд
+Name[sr@ijekavianlatin]=QML priključak K‑naloga za ownCloud
+Name[sr@latin]=QML priključak K‑naloga za ownCloud
+Name[sv]=OwnCloud QML-insticksprogram för konton
+Name[uk]=Додаток QML KAccounts OwnCloud
+Name[x-test]=xxOwnCloud KAccounts QML pluginxx
+Name[zh_CN]=OwnCloud KAccounts QML 插件
+
+Encoding=UTF-8
+Type=Service
+Icon=applications-internet
+X-KDE-PluginInfo-Author=Martin Klapetek
[email protected]
+X-KDE-PluginInfo-Name=owncloud_kaccounts_ui
+X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Website=http://kde.org
+X-KDE-PluginInfo-Category=Network
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
+X-KDE-FormFactors=handset,tablet,mediacenter
+X-Plasma-MainScript=ui/main.qml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/qmlhelper.cpp 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/qmlhelper.cpp
--- old/kaccounts-providers-15.08.3/plugins/owncloud-ui/qmlhelper.cpp   
1970-01-01 01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/plugins/owncloud-ui/qmlhelper.cpp   
2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,242 @@
+/*************************************************************************************
+ *  Copyright (C) 2015 by Martin Klapetek <[email protected]>                  
      *
+ *                                                                             
      *
+ *  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 2             
      *
+ *  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, write to the Free Software                
      *
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA   *
+ 
*************************************************************************************/
+
+#include "qmlhelper.h"
+
+#include <KIO/Job>
+#include <KIO/DavJob>
+#include <kio/global.h>
+#include <KLocalizedString>
+
+#include <QJsonDocument>
+#include <QJsonObject>
+#include <QDebug>
+
+QmlHelper::QmlHelper(QObject *parent)
+    : QObject(parent),
+      m_isWorking(false),
+      m_noError(false),
+      m_errorMessage(QString())
+{
+}
+
+QmlHelper::~QmlHelper()
+{
+}
+
+void QmlHelper::checkServer(const QString &username, const QString &password, 
const QString &path)
+{
+    m_errorMessage.clear();
+    Q_EMIT errorMessageChanged();
+
+    m_username = username;
+    m_password = password;
+
+    QString fixedUrl;
+    if (!path.startsWith("http://";) && !path.startsWith("https://";)) {
+        fixedUrl.append("https://";);
+        fixedUrl.append(path);
+    } else {
+        fixedUrl = path;
+    }
+
+    m_json.clear();
+
+    QUrl url(fixedUrl);
+    url = url.adjusted(QUrl::StripTrailingSlash);
+    url.setPath(url.path() + '/' + "status.php");
+
+    if (url.host().isEmpty()) {
+        return;
+    }
+
+    checkServer(url);
+}
+
+void QmlHelper::checkServer(const QUrl &url)
+{
+    qDebug() << "Checking for ownCloud instance at" << url;
+    setWorking(true);
+    KIO::TransferJob *job = KIO::get(url, KIO::NoReload, 
KIO::HideProgressInfo);
+    job->setUiDelegate(0);
+    connect(job, SIGNAL(data(KIO::Job*,QByteArray)), 
SLOT(dataReceived(KIO::Job*,QByteArray)));
+    connect(job, SIGNAL(finished(KJob*)), this, SLOT(fileChecked(KJob*)));
+}
+
+void QmlHelper::figureOutServer(const QUrl& url)
+{
+    if (/*url == QLatin1String("/") ||*/ url.isEmpty()) {
+        serverCheckResult(false);
+        return;
+    }
+
+    m_json.clear();
+
+    qDebug() << "Received url to figure out:" << url;
+    // This needs 2x up cause first it just removes the status.php
+    // and only the second call actually moves up
+    QUrl urlUp = KIO::upUrl(KIO::upUrl(url));
+    urlUp.setPath(urlUp.path() + '/' + "status.php");
+
+    if (urlUp != url) {
+        checkServer(urlUp.adjusted(QUrl::NormalizePathSegments));
+    } else {
+        serverCheckResult(false);
+    }
+}
+
+void QmlHelper::dataReceived(KIO::Job *job, const QByteArray &data)
+{
+    Q_UNUSED(job);
+    m_json.append(data);
+}
+
+void QmlHelper::fileChecked(KJob* job)
+{
+    KIO::TransferJob *kJob = qobject_cast<KIO::TransferJob *>(job);
+    if (kJob->error()) {
+        qDebug() << job->errorString();
+        qDebug() << job->errorText();
+        figureOutServer(kJob->url());
+        return;
+    }
+
+    QJsonDocument parser = QJsonDocument::fromJson(m_json);
+    QJsonObject map = parser.object();
+    if (!map.contains("version")) {
+        figureOutServer(kJob->url());
+        qDebug() << "No json";
+        return;
+    }
+
+    m_server = kJob->url().adjusted(QUrl::RemoveFilename).toString();
+    qDebug() << "ownCloud appears to be running at the specified URL";
+    serverCheckResult(true);
+}
+
+void QmlHelper::setWorking(bool start)
+{
+    if (start == m_isWorking) {
+        return;
+    }
+
+    m_isWorking = start;
+    Q_EMIT isWorkingChanged();
+}
+
+void QmlHelper::serverCheckResult(bool result)
+{
+    m_noError = result;
+    Q_EMIT noErrorChanged();
+
+    if (!result) {
+        m_errorMessage = i18n("Unable to connect to ownCloud at the given 
server URL. Please check the server URL.");
+        setWorking(false);
+    } else {
+        m_errorMessage.clear();
+
+        qDebug() << "Server URL ok, checking auth...";
+
+        m_json.clear();
+
+        QUrl url(m_server);
+
+        url.setUserName(m_username);
+        url.setPassword(m_password);
+
+        url = url.adjusted(QUrl::StripTrailingSlash);
+        url.setPath(url.path() + '/' + "remote.php/webdav");
+        // Send a basic PROPFIND command to test access
+        const QString requestStr = QStringLiteral(
+            "<d:propfind xmlns:d=\"DAV:\">"
+            "<d:prop>"
+            "<d:current-user-principal />"
+            "</d:prop>"
+            "</d:propfind>");
+
+        KIO::DavJob *job = KIO::davPropFind(url, QDomDocument(requestStr), 
"1", KIO::HideProgressInfo);
+        connect(job, SIGNAL(finished(KJob*)), this, 
SLOT(authCheckResult(KJob*)));
+        connect(job, SIGNAL(data(KIO::Job*,QByteArray)), 
SLOT(dataReceived(KIO::Job*,QByteArray)));
+
+        QVariantMap metadata{{"cookies","none"}, {"no-cache",true}};
+
+        job->setMetaData(metadata);
+        job->setUiDelegate(0);
+        job->start();
+    }
+
+    Q_EMIT errorMessageChanged();
+
+}
+
+void QmlHelper::authCheckResult(KJob *job)
+{
+    if (job->error()) {
+        qDebug() << job->errorString();
+        qDebug() << job->errorText();
+    }
+
+    KIO::DavJob *kJob = qobject_cast<KIO::DavJob*>(job);
+    qDebug() << "Auth job finished, received error page:" << 
kJob->isErrorPage();
+
+    if (kJob->isErrorPage()) {
+        m_errorMessage = i18n("Unable to authenticate using the provided 
username and password");
+    } else {
+        m_errorMessage.clear();
+    }
+
+    Q_EMIT errorMessageChanged();
+
+    m_noError = !kJob->isErrorPage();
+    Q_EMIT noErrorChanged();
+    setWorking(false);
+}
+
+bool QmlHelper::isWorking()
+{
+    return m_isWorking;
+}
+
+bool QmlHelper::noError()
+{
+    return m_noError;
+}
+
+QString QmlHelper::errorMessage() const
+{
+    return m_errorMessage;
+}
+
+void QmlHelper::finish(bool contactsEnabled)
+{
+    QVariantMap data;
+    data.insert("server", m_server);
+
+    if (!contactsEnabled) {
+        data.insert("__service/owncloud-contacts", false);
+    }
+
+    QUrl carddavUrl(m_server);
+    carddavUrl.setPath(carddavUrl.path() + 
QString("/remote.php/carddav/addressbooks/%1").arg(m_username));
+
+    data.insert("carddavUrl", carddavUrl);
+
+    Q_EMIT wizardFinished(m_username, m_password, data);
+}
+
+#include "qmlhelper.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/plugins/owncloud-ui/qmlhelper.h 
new/kaccounts-providers-15.12.0/plugins/owncloud-ui/qmlhelper.h
--- old/kaccounts-providers-15.08.3/plugins/owncloud-ui/qmlhelper.h     
1970-01-01 01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/plugins/owncloud-ui/qmlhelper.h     
2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,76 @@
+/*************************************************************************************
+ *  Copyright (C) 2015 by Martin Klapetek <[email protected]>                  
      *
+ *                                                                             
      *
+ *  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 2             
      *
+ *  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, write to the Free Software                
      *
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA   *
+ 
*************************************************************************************/
+
+#ifndef QMLHELPER_H
+#define QMLHELPER_H
+
+#include <QObject>
+#include <QStringList>
+
+namespace KIO
+{
+    class Job;
+};
+class KJob;
+
+class QmlHelper : public QObject
+{
+    Q_OBJECT
+    Q_PROPERTY(bool isWorking READ isWorking NOTIFY isWorkingChanged)
+    Q_PROPERTY(bool noError READ noError NOTIFY noErrorChanged)
+    Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY 
errorMessageChanged)
+
+public:
+    QmlHelper(QObject *parent = 0);
+    ~QmlHelper();
+
+    Q_INVOKABLE void checkServer(const QString &username, const QString 
&password, const QString &server);
+    Q_INVOKABLE void finish(bool contactsEnabled);
+    bool isWorking();
+    bool noError();
+    QString errorMessage() const;
+
+Q_SIGNALS:
+    void isWorkingChanged();
+    void noErrorChanged();
+    void errorMessageChanged();
+    void wizardFinished(const QString &username, const QString &password, 
const QVariantMap &data);
+
+private Q_SLOTS:
+    void fileChecked(KJob *job);
+    void dataReceived(KIO::Job *job, const QByteArray &data);
+    void authCheckResult(KJob *job);
+
+private:
+    void checkServer(const QUrl &url);
+    void figureOutServer(const QUrl &url);
+    void setWorking(bool start);
+    void serverCheckResult(bool result);
+
+    QByteArray m_json;
+    QString m_errorMessage;
+    QString m_server;
+    QString m_username;
+    QString m_password;
+    QStringList m_disabledServices;
+    bool m_isWorking;
+    bool m_noError;
+
+};
+
+#endif // QMLHELPER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kaccounts-providers-15.08.3/providers/owncloud.provider.in 
new/kaccounts-providers-15.12.0/providers/owncloud.provider.in
--- old/kaccounts-providers-15.08.3/providers/owncloud.provider.in      
1970-01-01 01:00:00.000000000 +0100
+++ new/kaccounts-providers-15.12.0/providers/owncloud.provider.in      
2015-12-09 13:00:36.000000000 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="owncloud">
+  <_name>ownCloud</_name>
+  <icon>owncloud</icon>
+  <!-- Tooltip text appearing over the button to create this type of account 
-->
+  <_description>ownCloud account</_description>
+  <translations>kaccounts-providers</translations>
+  <plugin>owncloud_plugin_kaccounts</plugin>
+
+    <template>
+        <group name="auth">
+            <setting name="method">password</setting>
+            <setting name="mechanism">password</setting>
+        </group>
+        <group name="dav">
+            <setting name="host"></setting>
+        </group>
+    </template>
+</provider>


Reply via email to