Commit b180f26d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use unique network manager

parent 2f79fe75
......@@ -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")
......
......@@ -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;
}
......
......@@ -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;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment