summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-03 06:15:32 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-03 06:15:32 (GMT)
commit1e305793ecc0fb7eeb90bb093445799df06fb731 (patch)
tree1119542be60e184a3ae3379e5c7cec3f0ce37c19
parenta0ada1fecc4cc60f83ead4c0134609c716654ec9 (diff)
Use pimcommon api
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/ksieveui/CMakeLists.txt2
-rw-r--r--src/ksieveui/sievenetworkmanager.cpp43
-rw-r--r--src/ksieveui/sievenetworkmanager.h41
-rw-r--r--src/ksieveui/widgets/managesievewidget.cpp6
5 files changed, 5 insertions, 91 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7689941..21ce8b9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
-set(PIM_VERSION "5.3.46")
+set(PIM_VERSION "5.3.47")
set(LIBKSIEVE_LIB_VERSION ${PIM_VERSION})
set(QT_REQUIRED_VERSION "5.6.0")
set(KMIME_LIB_VERSION "5.3.40")
@@ -26,7 +26,7 @@ set(IDENTITYMANAGEMENT_LIB_VERSION "5.3.42")
set(KMAILTRANSPORT_LIB_VERSION "5.3.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.3.40")
set(LIBKDEPIM_LIB_VERSION "5.3.40")
-set(PIMCOMMON_LIB_VERSION "5.3.40")
+set(PIMCOMMON_LIB_VERSION "5.3.61")
set(AKONADI_VERSION "5.3.40")
option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
diff --git a/src/ksieveui/CMakeLists.txt b/src/ksieveui/CMakeLists.txt
index d87e886..037a2fa 100644
--- a/src/ksieveui/CMakeLists.txt
+++ b/src/ksieveui/CMakeLists.txt
@@ -183,7 +183,6 @@ set(ksieveui_managescriptjob_LIB_SRCS
set(ksieveui_LIB_SRCS
managesievescriptsdialog.cpp
- sievenetworkmanager.cpp
widgets/custommanagesievewidget.cpp
widgets/sievetreewidgetitem.cpp
widgets/managesievetreeview.cpp
@@ -245,7 +244,6 @@ target_include_directories(KF5KSieveUi PUBLIC "$<BUILD_INTERFACE:${libksieve_SOU
ecm_generate_headers(ksieveui_CamelCase_HEADERS
HEADER_NAMES
ManageSieveScriptsDialog
- SieveNetworkManager
REQUIRED_HEADERS ksieveui_HEADERS
PREFIX KSieveUi
)
diff --git a/src/ksieveui/sievenetworkmanager.cpp b/src/ksieveui/sievenetworkmanager.cpp
deleted file mode 100644
index a0c2045..0000000
--- a/src/ksieveui/sievenetworkmanager.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- Copyright (c) 2016 Montel Laurent <montel@kde.org>
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License, version 2, as
- published by the Free Software Foundation.
-
- 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 "sievenetworkmanager.h"
-#include <QNetworkConfigurationManager>
-using namespace KSieveUi;
-
-Q_GLOBAL_STATIC(SieveNetworkManager, s_pSieveNetworkManagerSelf)
-
-SieveNetworkManager::SieveNetworkManager(QObject *parent)
- : QObject(parent)
-{
- mNetworkConfigureManager = new QNetworkConfigurationManager();
-}
-
-SieveNetworkManager::~SieveNetworkManager()
-{
- delete mNetworkConfigureManager;
-}
-
-SieveNetworkManager *SieveNetworkManager::self()
-{
- return s_pSieveNetworkManagerSelf();
-}
-
-QNetworkConfigurationManager *SieveNetworkManager::networkConfigureManager() const
-{
- return mNetworkConfigureManager;
-}
diff --git a/src/ksieveui/sievenetworkmanager.h b/src/ksieveui/sievenetworkmanager.h
deleted file mode 100644
index 5392826..0000000
--- a/src/ksieveui/sievenetworkmanager.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Copyright (c) 2016 Montel Laurent <montel@kde.org>
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License, version 2, as
- published by the Free Software Foundation.
-
- 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 SIEVENETWORKMANAGER_H
-#define SIEVENETWORKMANAGER_H
-
-#include <QObject>
-#include "ksieveui_export.h"
-class QNetworkConfigurationManager;
-namespace KSieveUi
-{
-class KSIEVEUI_EXPORT SieveNetworkManager : public QObject
-{
- Q_OBJECT
-public:
- explicit SieveNetworkManager(QObject *parent = Q_NULLPTR);
- ~SieveNetworkManager();
- static SieveNetworkManager *self();
-
- QNetworkConfigurationManager *networkConfigureManager() const;
-
-private:
- QNetworkConfigurationManager *mNetworkConfigureManager;
-};
-}
-
-#endif // SIEVENETWORKMANAGER_H
diff --git a/src/ksieveui/widgets/managesievewidget.cpp b/src/ksieveui/widgets/managesievewidget.cpp
index 3d3589a..6429ae6 100644
--- a/src/ksieveui/widgets/managesievewidget.cpp
+++ b/src/ksieveui/widgets/managesievewidget.cpp
@@ -20,11 +20,11 @@
#include "widgets/sievetreewidgetitem.h"
#include "managescriptsjob/renamescriptjob.h"
#include "libksieve_debug.h"
-#include "sievenetworkmanager.h"
#include <kmanagesieve/sievejob.h>
#include <managescriptsjob/parseuserscriptjob.h>
#include <managescriptsjob/generateglobalscriptjob.h>
+#include <PimCommon/NetworkManager>
#include <util/util.h>
#include <QInputDialog>
@@ -78,7 +78,7 @@ ManageSieveWidget::ManageSieveWidget(QWidget *parent)
connect(d->mTreeView, &ManageSieveTreeView::itemSelectionChanged, this, &ManageSieveWidget::slotUpdateButtons);
connect(d->mTreeView, &ManageSieveTreeView::itemChanged, this, &ManageSieveWidget::slotItemChanged);
- connect(KSieveUi::SieveNetworkManager::self()->networkConfigureManager(), &QNetworkConfigurationManager::onlineStateChanged, this, &ManageSieveWidget::slotSystemNetworkOnlineStateChanged);
+ connect(PimCommon::NetworkManager::self()->networkConfigureManager(), &QNetworkConfigurationManager::onlineStateChanged, this, &ManageSieveWidget::slotSystemNetworkOnlineStateChanged);
lay->addWidget(d->mTreeView);
setLayout(lay);
@@ -93,7 +93,7 @@ ManageSieveWidget::~ManageSieveWidget()
void ManageSieveWidget::slotCheckNetworkStatus()
{
- slotSystemNetworkOnlineStateChanged(KSieveUi::SieveNetworkManager::self()->networkConfigureManager()->isOnline());
+ slotSystemNetworkOnlineStateChanged(PimCommon::NetworkManager::self()->networkConfigureManager()->isOnline());
}
void ManageSieveWidget::slotSystemNetworkOnlineStateChanged(bool state)