Use nullptr

parent 111ac65a
......@@ -68,7 +68,7 @@ KCMNetworkmanagement::KCMNetworkmanagement(QWidget *parent, const QVariantList &
QWidget *mainWidget = new QWidget(this);
m_ui->setupUi(mainWidget);
m_quickView = new QQuickView(0);
m_quickView = new QQuickView(nullptr);
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(m_quickView->engine());
kdeclarative.setTranslationDomain(QStringLiteral(TRANSLATION_DOMAIN));
......
......@@ -79,7 +79,7 @@ void BluetoothMonitor::addBluetoothConnection(const QString &bdAddr, const QStri
}
if (service != QLatin1String("dun") && service != QLatin1String("nap")) {
KMessageBox::sorry(0, i18n("Only 'dun' and 'nap' services are supported."));
KMessageBox::sorry(nullptr, i18n("Only 'dun' and 'nap' services are supported."));
return;
}
......
......@@ -165,7 +165,7 @@ void ModemMonitor::requestPin(MMModemLock lock)
return;
}
QDBusPendingCallWatcher *watcher = 0;
QDBusPendingCallWatcher *watcher = nullptr;
PinDialog::Type type = d->dialog.data()->type();
......@@ -201,7 +201,7 @@ void ModemMonitor::onSendPinArrived(QDBusPendingCallWatcher * watcher)
// Automatically enabling this for cell phones with expensive data plans is not a good idea.
//NetworkManager::setWwanEnabled(true);
} else {
KMessageBox::error(0, i18nc("Text in GSM PIN/PUK unlock error dialog", "Error unlocking modem: %1", reply.error().message()),
KMessageBox::error(nullptr, i18nc("Text in GSM PIN/PUK unlock error dialog", "Error unlocking modem: %1", reply.error().message()),
i18nc("Title for GSM PIN/PUK unlock error dialog", "PIN/PUK unlock error"));
}
......
......@@ -36,7 +36,7 @@ class Notification : public QObject
{
Q_OBJECT
public:
explicit Notification(QObject *parent = 0);
explicit Notification(QObject *parent = nullptr);
private Q_SLOTS:
void deviceAdded(const QString &uni);
......
......@@ -41,13 +41,13 @@ using namespace NetworkManager;
PasswordDialog::PasswordDialog(const NetworkManager::ConnectionSettings::Ptr &connectionSettings, SecretAgent::GetSecretsFlags flags,
const QString &setting_name, QWidget *parent) :
QDialog(parent),
m_ui(0),
m_ui(nullptr),
m_hasError(false),
m_settingName(setting_name),
m_connectionSettings(connectionSettings),
m_error(SecretAgent::NoSecrets),
m_flags(flags),
m_vpnWidget(0)
m_vpnWidget(nullptr)
{
setWindowIcon(QIcon::fromTheme(QStringLiteral("dialog-password")));
......
......@@ -40,7 +40,7 @@ public:
explicit PasswordDialog(const NetworkManager::ConnectionSettings::Ptr &connectionSettings,
NetworkManager::SecretAgent::GetSecretsFlags flags,
const QString &setting_name,
QWidget *parent = 0);
QWidget *parent = nullptr);
~PasswordDialog() override;
bool hasError() const;
......
......@@ -56,7 +56,7 @@ public:
};
enum ErrorCode {PinCodeTooShort, PinCodesDoNotMatch, PukCodeTooShort};
explicit PinDialog(ModemManager::Modem *modem, const Type type = SimPin, QWidget *parent=0);
explicit PinDialog(ModemManager::Modem *modem, const Type type = SimPin, QWidget *parent = nullptr);
~PinDialog() override;
Type type() const;
......
......@@ -46,8 +46,8 @@
SecretAgent::SecretAgent(QObject* parent)
: NetworkManager::SecretAgent("org.kde.plasma.networkmanagement", parent)
, m_openWalletFailed(false)
, m_wallet(0)
, m_dialog(0)
, m_wallet(nullptr)
, m_dialog(nullptr)
{
connect(NetworkManager::notifier(), &NetworkManager::Notifier::serviceDisappeared, this, &SecretAgent::killDialogs);
......@@ -142,7 +142,7 @@ void SecretAgent::CancelGetSecrets(const QDBusObjectPath &connection_path, const
SecretsRequest request = m_calls.at(i);
if (request.type == SecretsRequest::GetSecrets && callId == request.callId) {
if (m_dialog == request.dialog) {
m_dialog = 0;
m_dialog = nullptr;
}
delete request.dialog;
sendError(SecretAgent::AgentCanceled,
......@@ -256,7 +256,7 @@ void SecretAgent::dialogAccepted()
}
m_dialog->deleteLater();
m_dialog = 0;
m_dialog = nullptr;
processNext();
}
......@@ -275,7 +275,7 @@ void SecretAgent::dialogRejected()
}
m_dialog->deleteLater();
m_dialog = 0;
m_dialog = nullptr;
processNext();
}
......@@ -299,7 +299,7 @@ void SecretAgent::walletOpened(bool success)
if (!success) {
m_openWalletFailed = true;
m_wallet->deleteLater();
m_wallet = 0;
m_wallet = nullptr;
} else {
m_openWalletFailed = false;
}
......@@ -312,7 +312,7 @@ void SecretAgent::walletClosed()
if (m_wallet) {
m_wallet->deleteLater();
}
m_wallet = 0;
m_wallet = nullptr;
}
void SecretAgent::processNext()
......@@ -391,7 +391,7 @@ bool SecretAgent::processGetSecrets(SecretsRequest &request) const
m_dialog->errorMessage(),
request.message);
delete m_dialog;
m_dialog = 0;
m_dialog = nullptr;
return true;
} else {
request.dialog = m_dialog;
......@@ -525,7 +525,7 @@ bool SecretAgent::useWallet() const
}
} else if (m_wallet) {
m_wallet->deleteLater();
m_wallet = 0;
m_wallet = nullptr;
}
return false;
......
......@@ -42,7 +42,7 @@ public:
type(_type),
flags(NetworkManager::SecretAgent::None),
saveSecretsWithoutReply(false),
dialog(0)
dialog(nullptr)
{}
inline bool operator==(const QString &other) const {
return callId == other;
......@@ -69,7 +69,7 @@ class Q_DECL_EXPORT SecretAgent : public NetworkManager::SecretAgent
{
Q_OBJECT
public:
explicit SecretAgent(QObject* parent = 0);
explicit SecretAgent(QObject* parent = nullptr);
~SecretAgent() override;
public Q_SLOTS:
......
......@@ -47,7 +47,7 @@ Q_PROPERTY(bool modemDeviceAvailable READ isModemDeviceAvailable NOTIFY modemDev
Q_PROPERTY(bool bluetoothDeviceAvailable READ isBluetoothDeviceAvailable NOTIFY bluetoothDeviceAvailableChanged)
Q_OBJECT
public:
explicit AvailableDevices(QObject* parent = 0);
explicit AvailableDevices(QObject* parent = nullptr);
~AvailableDevices() override;
public Q_SLOTS:
......
......@@ -39,13 +39,13 @@
ConnectionIcon::ConnectionIcon(QObject* parent)
: QObject(parent)
, m_signal(0)
, m_wirelessNetwork(0)
, m_wirelessNetwork(nullptr)
, m_connecting(false)
, m_limited(false)
, m_vpn(false)
, m_airplaneMode(false)
#if WITH_MODEMMANAGER_SUPPORT
, m_modemNetwork(0)
, m_modemNetwork(nullptr)
#endif
{
connect(NetworkManager::notifier(), &NetworkManager::Notifier::primaryConnectionChanged, this, &ConnectionIcon::primaryConnectionChanged);
......@@ -303,12 +303,12 @@ void ConnectionIcon::setIcons()
m_signal = 0;
#if WITH_MODEMMANAGER_SUPPORT
if (m_modemNetwork) {
disconnect(m_modemNetwork.data(), 0, this, 0);
disconnect(m_modemNetwork.data(), nullptr, this, nullptr);
m_modemNetwork.clear();
}
#endif
if (m_wirelessNetwork) {
disconnect(m_wirelessNetwork.data(), 0, this, 0);
disconnect(m_wirelessNetwork.data(), nullptr, this, nullptr);
m_wirelessNetwork.clear();
}
......
......@@ -38,7 +38,7 @@ Q_PROPERTY(QString connectionTooltipIcon READ connectionTooltipIcon NOTIFY conne
Q_PROPERTY(bool airplaneMode READ airplaneMode WRITE setAirplaneMode NOTIFY airplaneModeChanged)
Q_OBJECT
public:
explicit ConnectionIcon(QObject* parent = 0);
explicit ConnectionIcon(QObject* parent = nullptr);
~ConnectionIcon() override;
bool connecting() const;
......
......@@ -49,7 +49,7 @@ Q_PROPERTY(bool wwanEnabled READ isWwanEnabled NOTIFY wwanEnabled)
Q_PROPERTY(bool wwanHwEnabled READ isWwanHwEnabled NOTIFY wwanHwEnabled)
Q_OBJECT
public:
explicit EnabledConnections(QObject* parent = 0);
explicit EnabledConnections(QObject* parent = nullptr);
~EnabledConnections() override;
bool isNetworkingEnabled() const;
......
......@@ -31,7 +31,7 @@ Q_ENUMS(ConnectionType)
Q_ENUMS(SecurityType)
public:
explicit Enums(QObject* parent = 0);
explicit Enums(QObject* parent = nullptr);
~Enums() override;
enum ConnectionStatus {
......
......@@ -52,7 +52,7 @@ public:
static SortedConnectionType connectionTypeToSortedType(NetworkManager::ConnectionSettings::ConnectionType type);
explicit NetworkStatus(QObject* parent = 0);
explicit NetworkStatus(QObject* parent = nullptr);
~NetworkStatus() override;
QString activeConnections() const;
......
......@@ -242,7 +242,7 @@ void ConnectionEditorBase::initialize()
addSettingWidget(teamWidget, i18n("Team"));
} else if (type == NetworkManager::ConnectionSettings::Vpn) { // VPN
QString error;
VpnUiPlugin *vpnPlugin = 0;
VpnUiPlugin *vpnPlugin = nullptr;
NetworkManager::VpnSetting::Ptr vpnSetting =
m_connection->setting(NetworkManager::Setting::Vpn).staticCast<NetworkManager::VpnSetting>();
if (!vpnSetting) {
......
......@@ -40,7 +40,7 @@ class Q_DECL_EXPORT BondWidget : public SettingWidget
Q_OBJECT
public:
explicit BondWidget(const QString & masterUuid, const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(),
QWidget* parent = 0, Qt::WindowFlags f = 0);
QWidget* parent = nullptr, Qt::WindowFlags f = {});
~BondWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -40,7 +40,7 @@ class Q_DECL_EXPORT BridgeWidget : public SettingWidget
Q_OBJECT
public:
explicit BridgeWidget(const QString & masterUuid, const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(),
QWidget* parent = 0, Qt::WindowFlags f = 0);
QWidget* parent = nullptr, Qt::WindowFlags f = {});
~BridgeWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -36,7 +36,7 @@ class Q_DECL_EXPORT BtWidget : public SettingWidget
{
Q_OBJECT
public:
explicit BtWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit BtWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~BtWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -36,7 +36,7 @@ class Q_DECL_EXPORT CdmaWidget : public SettingWidget
{
Q_OBJECT
public:
explicit CdmaWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget *parent = 0, Qt::WindowFlags f = 0);
explicit CdmaWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget *parent = nullptr, Qt::WindowFlags f = {});
~CdmaWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -36,7 +36,7 @@ Q_OBJECT
public:
explicit ConnectionWidget(const NetworkManager::ConnectionSettings::Ptr &settings = NetworkManager::ConnectionSettings::Ptr(),
QWidget* parent = 0, Qt::WindowFlags f = 0);
QWidget* parent = nullptr, Qt::WindowFlags f = {});
~ConnectionWidget() override;
void loadConfig(const NetworkManager::ConnectionSettings::Ptr &settings);
......
......@@ -36,7 +36,7 @@ class Q_DECL_EXPORT GsmWidget : public SettingWidget
{
Q_OBJECT
public:
explicit GsmWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget *parent = 0, Qt::WindowFlags f = 0);
explicit GsmWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget *parent = nullptr, Qt::WindowFlags f = {});
~GsmWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -36,7 +36,7 @@ class Q_DECL_EXPORT InfinibandWidget : public SettingWidget
{
Q_OBJECT
public:
explicit InfinibandWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit InfinibandWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~InfinibandWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -38,7 +38,7 @@ Q_OBJECT
public:
enum MethodIndex { Automatic = 0, AutomaticOnlyIP, LinkLocal, Manual, Shared, Disabled };
explicit IPv4Widget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit IPv4Widget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~IPv4Widget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -38,7 +38,7 @@ Q_OBJECT
public:
enum MethodIndex { Automatic = 0, AutomaticOnlyIP, AutomaticOnlyDHCP, LinkLocal, Manual, Disabled };
explicit IPv6Widget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit IPv6Widget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~IPv6Widget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -36,7 +36,7 @@ class Q_DECL_EXPORT PppoeWidget : public SettingWidget
{
Q_OBJECT
public:
explicit PppoeWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit PppoeWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~PppoeWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -36,7 +36,7 @@ class Q_DECL_EXPORT PPPWidget : public SettingWidget
{
Q_OBJECT
public:
explicit PPPWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit PPPWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~PPPWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -37,7 +37,7 @@ class Q_DECL_EXPORT Security8021x: public SettingWidget
{
Q_OBJECT
public:
Security8021x(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), bool wifiMode = true, QWidget *parent = 0, Qt::WindowFlags f = 0);
Security8021x(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), bool wifiMode = true, QWidget *parent = nullptr, Qt::WindowFlags f = {});
~Security8021x() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -40,7 +40,7 @@ class Q_DECL_EXPORT TeamWidget : public SettingWidget
Q_OBJECT
public:
explicit TeamWidget(const QString & masterUuid, const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(),
QWidget* parent = 0, Qt::WindowFlags f = 0);
QWidget* parent = nullptr, Qt::WindowFlags f = {});
~TeamWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -35,7 +35,7 @@ class Q_DECL_EXPORT VlanWidget : public SettingWidget
Q_OBJECT
public:
explicit VlanWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit VlanWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent = nullptr, Qt::WindowFlags f = {});
~VlanWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -37,7 +37,7 @@ class Q_DECL_EXPORT WifiConnectionWidget : public SettingWidget
Q_OBJECT
public:
explicit WifiConnectionWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit WifiConnectionWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~WifiConnectionWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -44,7 +44,7 @@ public:
explicit WifiSecurity(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(),
const NetworkManager::Security8021xSetting::Ptr &setting8021x = NetworkManager::Security8021xSetting::Ptr(),
QWidget *parent = 0, Qt::WindowFlags f = 0);
QWidget *parent = nullptr, Qt::WindowFlags f = {});
~WifiSecurity() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
void loadSecrets(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -35,7 +35,7 @@ class Q_DECL_EXPORT WiredConnectionWidget : public SettingWidget
Q_OBJECT
public:
explicit WiredConnectionWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit WiredConnectionWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent = nullptr, Qt::WindowFlags f = {});
~WiredConnectionWidget() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -37,7 +37,7 @@ class Q_DECL_EXPORT WiredSecurity : public SettingWidget
{
Q_OBJECT
public:
explicit WiredSecurity(const NetworkManager::Security8021xSetting::Ptr &setting8021x = NetworkManager::Security8021xSetting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit WiredSecurity(const NetworkManager::Security8021xSetting::Ptr &setting8021x = NetworkManager::Security8021xSetting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~WiredSecurity() override;
void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
void loadSecrets(const NetworkManager::Setting::Ptr &setting) override;
......
......@@ -47,7 +47,7 @@ QValidator::State SimpleIpV4AddressValidator::validate(QString &address, int &po
QValidator::State SimpleIpV4AddressValidator::checkWithInputMask(QString &value, int &pos) const
{
QRegExpValidator v(QRegExp(QLatin1String("[0-9, ]{1,3}\\.[0-9, ]{1,3}\\.[0-9, ]{1,3}\\.[0-9, ]{1,3}")), 0);
QRegExpValidator v(QRegExp(QLatin1String("[0-9, ]{1,3}\\.[0-9, ]{1,3}\\.[0-9, ]{1,3}\\.[0-9, ]{1,3}")), nullptr);
return v.validate(value, pos);
}
......
......@@ -42,7 +42,7 @@ QValidator::State SimpleIpV6AddressValidator::validate(QString &address, int &po
QValidator::State SimpleIpV6AddressValidator::checkWithInputMask(QString &value, int &pos) const
{
QRegExpValidator v(QRegExp(QLatin1String("([0-9a-fA-F]{1,4}|:)+")), 0);
QRegExpValidator v(QRegExp(QLatin1String("([0-9a-fA-F]{1,4}|:)+")), nullptr);
return v.validate(value, pos);
}
......
......@@ -41,11 +41,11 @@ class Q_DECL_EXPORT VpnUiPlugin : public QObject
public:
enum ErrorType {NoError, NotImplemented, Error};
explicit VpnUiPlugin(QObject * parent = 0, const QVariantList& = QVariantList());
explicit VpnUiPlugin(QObject * parent = nullptr, const QVariantList& = QVariantList());
~VpnUiPlugin() override;
virtual SettingWidget * widget(const NetworkManager::VpnSetting::Ptr &setting, QWidget * parent = 0) = 0;
virtual SettingWidget * askUser(const NetworkManager::VpnSetting::Ptr &setting, QWidget * parent = 0) = 0;
virtual SettingWidget * widget(const NetworkManager::VpnSetting::Ptr &setting, QWidget * parent = nullptr) = 0;
virtual SettingWidget * askUser(const NetworkManager::VpnSetting::Ptr &setting, QWidget * parent = nullptr) = 0;
/**
* Suggested file name to save the exported connection configuration.
......
......@@ -34,8 +34,8 @@ class AdvancedPermissionsWidget : public QDialog
Q_OBJECT
Q_DECLARE_PRIVATE(AdvancedPermissionsWidget)
public:
explicit AdvancedPermissionsWidget(QWidget *parent=0);
AdvancedPermissionsWidget(const QHash<QString,QString>&, QWidget *parent=0);
explicit AdvancedPermissionsWidget(QWidget *parent = nullptr);
AdvancedPermissionsWidget(const QHash<QString,QString>&, QWidget *parent = nullptr);
~AdvancedPermissionsWidget() override;
QHash<QString,QString> currentUsers() const;
......
......@@ -31,7 +31,7 @@ class Q_DECL_EXPORT BssidComboBox : public QComboBox
{
Q_OBJECT
public:
explicit BssidComboBox(QWidget *parent = 0);
explicit BssidComboBox(QWidget *parent = nullptr);
QString bssid() const;
bool isValid() const;
......
......@@ -28,7 +28,7 @@ class Delegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit Delegate(QObject * parent = 0);
explicit Delegate(QObject * parent = nullptr);
~Delegate() override;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option,
......
......@@ -29,7 +29,7 @@ class Q_DECL_EXPORT HwAddrComboBox : public QComboBox
{
Q_OBJECT
public:
explicit HwAddrComboBox(QWidget *parent = 0);
explicit HwAddrComboBox(QWidget *parent = nullptr);
void init(const NetworkManager::Device::Type &deviceType, const QString &address);
......
......@@ -31,8 +31,8 @@ class IntDelegate : public Delegate
{
Q_OBJECT
public:
explicit IntDelegate(QObject * parent = 0);
IntDelegate(int min, int max, QObject * parent = 0);
explicit IntDelegate(QObject * parent = nullptr);
IntDelegate(int min, int max, QObject * parent = nullptr);
~IntDelegate() override;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
......
......@@ -28,7 +28,7 @@ class IpV4Delegate : public Delegate
{
Q_OBJECT
public:
explicit IpV4Delegate(QObject * parent = 0);
explicit IpV4Delegate(QObject * parent = nullptr);
~IpV4Delegate() override;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
......
......@@ -33,7 +33,7 @@ class IpV4RoutesWidget : public QDialog
{
Q_OBJECT
public:
explicit IpV4RoutesWidget(QWidget * parent = 0);
explicit IpV4RoutesWidget(QWidget * parent = nullptr);
~IpV4RoutesWidget() override;
void setRoutes(const QList<NetworkManager::IpRoute> &list);
......
......@@ -30,7 +30,7 @@ class IpV6Delegate : public Delegate
{
Q_OBJECT
public:
explicit IpV6Delegate(QObject * parent = 0);
explicit IpV6Delegate(QObject * parent = nullptr);
~IpV6Delegate() override;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
......
......@@ -33,7 +33,7 @@ class IpV6RoutesWidget : public QDialog
{
Q_OBJECT
public:
explicit IpV6RoutesWidget(QWidget * parent = 0);
explicit IpV6RoutesWidget(QWidget * parent = nullptr);
~IpV6RoutesWidget() override;
void setRoutes(const QList<NetworkManager::IpRoute> &list);
......
......@@ -153,7 +153,7 @@ void MobileConnectionWizard::initializePage(int id)
lineEditProvider->setText(i18nc("Mobile Connection Wizard", "Unknown Provider"));
}
} else {
if (mProvidersList->currentItem() != 0) {
if (mProvidersList->currentItem() != nullptr) {
const QStringList mApns = mProviders->getApns(mProvidersList->currentItem()->text());
if (!mApns.isEmpty()) {
......@@ -530,7 +530,7 @@ void MobileConnectionWizard::slotEnablePlanEditBox(const QString & text)
userApn->clear();
userApn->setEnabled(true);
} else {
if (mProvidersList->currentItem() != 0) {
if (mProvidersList->currentItem() != nullptr) {
int i = mPlanComboBox->currentIndex();
if (i>0) i=i-1; // Skiping the separator (i==1)
QStringList mApns = mProviders->getApns(mProvidersList->currentItem()->text());
......
......@@ -44,7 +44,7 @@ public:
* or NetworkManager::ConnectionSettings::Cdma.
*/
explicit MobileConnectionWizard(NetworkManager::ConnectionSettings::ConnectionType connectionType = NetworkManager::ConnectionSettings::Unknown,
QWidget * parent = 0);
QWidget * parent = nullptr);
~MobileConnectionWizard() override;
/*
......
......@@ -38,7 +38,7 @@ public:
NotRequired
};
explicit PasswordField(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
explicit PasswordField(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
void setMaxLength(int maxLength);
void setPasswordModeEnabled(bool passwordMode);
......
......@@ -36,7 +36,7 @@ public:
enum PasswordStorageType {Store = 0, AlwaysAsk, NotRequired};
};
explicit SettingWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
explicit SettingWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = nullptr, Qt::WindowFlags f = {});
~SettingWidget() override;
virtual void loadConfig(const NetworkManager::Setting::Ptr &setting);
......
......@@ -30,7 +30,7 @@ class Q_DECL_EXPORT SsidComboBox : public KComboBox