diff --git a/CMakeLists.txt b/CMakeLists.txt index f0bfceb..60e0c5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,37 +1,37 @@ project(kde-account-providers) cmake_minimum_required(VERSION 2.8.12) set(KDE_APPLICATIONS_VERSION_MAJOR "19") set(KDE_APPLICATIONS_VERSION_MINOR "11") -set(KDE_APPLICATIONS_VERSION_MICRO "70") +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 NO_POLICY_SCOPE) 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 --git a/plugins/owncloud-ui/owncloud.cpp b/plugins/owncloud-ui/owncloud.cpp index 4330871..423faad 100644 --- a/plugins/owncloud-ui/owncloud.cpp +++ b/plugins/owncloud-ui/owncloud.cpp @@ -1,97 +1,98 @@ /************************************************************************************* * Copyright (C) 2012 by Alejandro Fiestas Olivares * * Copyright (C) 2015 by Martin Klapetek * * * * 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 #include #include #include +#include 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(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(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(); }