summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-02 20:29:16 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-02 20:29:32 (GMT)
commitb180f26d345e3093fa339c1e6f069007adb5abe5 (patch)
treeba53c3cedf463126bcbc1ad26069dd34a853bad1
parent2f79fe75f640e1f7e0e79c8783d4b7c92a4420ba (diff)
Use unique network manager
-rw-r--r--CMakeLists.txt2
-rw-r--r--plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.cpp5
-rw-r--r--plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.h2
3 files changed, 3 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c04dc7..d833d57 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,7 @@ find_package(KF5Declarative ${KF5_VERSION} CONFIG REQUIRED)
set(MAILCOMMON_LIB_VERSION "5.3.40")
set(GRAVATAR_LIB_VERSION "5.3.40")
-set(PIMCOMMON_LIB_VERSION "5.3.60")
+set(PIMCOMMON_LIB_VERSION "5.3.61")
set(GRANTLEETHEME_LIB_VERSION "5.3.40")
set(CALENDARSUPPORT_LIB_VERSION "5.3.40")
set(EVENTVIEW_LIB_VERSION "5.3.40")
diff --git a/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.cpp b/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.cpp
index a2407ea..bed98d3 100644
--- a/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.cpp
+++ b/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.cpp
@@ -23,6 +23,7 @@
#include "shorturlconfiguredialog.h"
#include "Libkdepim/ProgressIndicatorLabel"
#include "shorturlengineplugin/shorturlenginepluginmanager.h"
+#include <PimCommon/NetworkManager>
#include <KLineEdit>
#include <KLocalizedString>
#include <KMessageBox>
@@ -112,14 +113,12 @@ ShortUrlWidgetNg::ShortUrlWidgetNg(QWidget *parent)
mInsertShortUrl->setEnabled(false);
mOpenShortUrl->setEnabled(false);
- mNetworkConfigurationManager = new QNetworkConfigurationManager();
initializePlugins();
loadEngine();
}
ShortUrlWidgetNg::~ShortUrlWidgetNg()
{
- delete mNetworkConfigurationManager;
}
void ShortUrlWidgetNg::initializePlugins()
@@ -181,7 +180,7 @@ void ShortUrlWidgetNg::slotConvertUrl()
if (!mCurrentEngine) {
return;
}
- if (!mNetworkConfigurationManager->isOnline()) {
+ if (!PimCommon::NetworkManager::self()->networkConfigureManager()->isOnline()) {
KMessageBox::information(this, i18n("No network connection detected, we cannot shorten URL."), i18n("No network"));
return;
}
diff --git a/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.h b/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.h
index b1b9594..badd308 100644
--- a/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.h
+++ b/plugins/customtoolsplugins/shorturlplugin/shorturl/shorturlwidgetng.h
@@ -26,7 +26,6 @@ class KLineEdit;
class QPushButton;
class QLabel;
class QLineEdit;
-class QNetworkConfigurationManager;
namespace KPIM
{
class ProgressIndicatorLabel;
@@ -69,7 +68,6 @@ private:
QPushButton *mInsertShortUrl;
QPushButton *mOpenShortUrl;
KPIM::ProgressIndicatorLabel *mIndicatorLabel;
- QNetworkConfigurationManager *mNetworkConfigurationManager;
QHash<QString, ShortUrlEngineInterface *> mLstInterface;
ShortUrlEngineInterface *mCurrentEngine;
};