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

Use nullptr

parent 46521a2a
......@@ -336,7 +336,7 @@ void SwitcherBackend::showActivitySwitcherIfNeeded()
if (isPlatformX11()) {
if (!x11_areModKeysDepressed(m_actionShortcut[actionName])) {
m_lastInvokedAction = Q_NULLPTR;
m_lastInvokedAction = nullptr;
setShouldShowSwitcher(false);
return;
}
......
......@@ -34,7 +34,7 @@ class BlacklistedApplicationsModel : public QAbstractListModel {
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
public:
BlacklistedApplicationsModel(QObject *parent = Q_NULLPTR);
BlacklistedApplicationsModel(QObject *parent = nullptr);
~BlacklistedApplicationsModel();
enum Roles {
......
......@@ -32,7 +32,7 @@ class ExtraActivitiesInterface : public QObject {
Q_OBJECT
public:
ExtraActivitiesInterface(QObject *parent = Q_NULLPTR);
ExtraActivitiesInterface(QObject *parent = nullptr);
~ExtraActivitiesInterface();
public Q_SLOTS:
......
......@@ -53,8 +53,8 @@ public:
std::unique_ptr<QQuickView> viewBlacklistedApplications;
Private()
: viewBlacklistedApplicationsRoot(Q_NULLPTR)
, viewBlacklistedApplications(Q_NULLPTR)
: viewBlacklistedApplicationsRoot(nullptr)
, viewBlacklistedApplications(nullptr)
{
}
};
......
......@@ -47,7 +47,7 @@ public:
}
Private()
: mainActionCollection(Q_NULLPTR)
: mainActionCollection(nullptr)
{
}
};
......
......@@ -46,7 +46,7 @@
KAMD_DBUS_OBJECT_PATH(OBJECT_PATH), \
KAMD_DBUS_OBJECT(OBJECT), \
QDBusConnection::sessionBus(), \
Q_NULLPTR)
nullptr)
#define KAMD_DBUS_CLASS_INTERFACE(OBJECT_PATH, OBJECT, PARENT) \
org::kde::ActivityManager::OBJECT( \
......
......@@ -60,7 +60,7 @@ void ActivitySettings::deleteActivity(const QString &id)
{
KActivities::Info info(id);
if (QMessageBox::question(Q_NULLPTR, i18nc("@title:window", "Delete Activity"),
if (QMessageBox::question(nullptr, i18nc("@title:window", "Delete Activity"),
i18n("Are you sure you want to delete '%1'?",
info.name())) == QMessageBox::Yes) {
KActivities::Controller().removeActivity(id);
......
......@@ -29,7 +29,7 @@ class ActivitySettings: public QObject {
Q_PROPERTY(bool newActivityAuthorized READ newActivityAuthorized CONSTANT)
public:
ActivitySettings(QObject *parent = Q_NULLPTR);
explicit ActivitySettings(QObject *parent = nullptr);
~ActivitySettings();
bool newActivityAuthorized() const;
......
......@@ -291,7 +291,7 @@ void Dialog::saveChanges(const QString &activityId)
d->activities.setActivityIcon(activityId, activityIcon());
// setting the key shortcut
QAction action(Q_NULLPTR);
QAction action(nullptr);
action.setProperty("isConfigurationAction", true);
action.setProperty("componentName", "ActivityManager");
action.setObjectName("switch-to-activity-" + activityId);
......
......@@ -66,7 +66,7 @@ protected:
void showEvent(QShowEvent *event) override;
private:
Dialog(QObject *parent = Q_NULLPTR);
Dialog(QObject *parent = nullptr);
D_PTR;
......
......@@ -28,7 +28,7 @@ class ActivitiesSettingsPlugin : public QQmlExtensionPlugin {
Q_PLUGIN_METADATA(IID "org.kde.activities.settings")
public:
ActivitiesSettingsPlugin(QObject *parent = Q_NULLPTR);
ActivitiesSettingsPlugin(QObject *parent = nullptr);
void registerTypes(const char *uri) override;
};
......
......@@ -39,7 +39,7 @@ class DBusCallFutureInterface : public QObject,
public:
DBusCallFutureInterface(QDBusPendingReply<_Result> reply)
: reply(reply),
replyWatcher(Q_NULLPTR)
replyWatcher(nullptr)
{
}
......
......@@ -42,13 +42,13 @@ public:
}
optional_view(const none_t &)
: m_value(Q_NULLPTR)
: m_value(nullptr)
{
}
bool is_initialized() const
{
return m_value != Q_NULLPTR;
return m_value != nullptr;
}
const T &get() const
......
......@@ -36,7 +36,7 @@ class SchemeEditorColors : public QWidget, public Ui::ScmEditorColors
Q_OBJECT
public:
SchemeEditorColors(KSharedConfigPtr config, QWidget *parent = Q_NULLPTR);
SchemeEditorColors(KSharedConfigPtr config, QWidget *parent = nullptr);
void updateValues();
void updateFromColorSchemes();
......
......@@ -39,8 +39,8 @@ class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog
Q_OBJECT
public:
SchemeEditorDialog(const QString &path, KColorCm *parent = Q_NULLPTR);
SchemeEditorDialog(KSharedConfigPtr config, KColorCm *parent = Q_NULLPTR);
SchemeEditorDialog(const QString &path, KColorCm *parent = nullptr);
SchemeEditorDialog(KSharedConfigPtr config, KColorCm *parent = nullptr);
Q_SIGNALS:
void changed(bool);
......
......@@ -35,7 +35,7 @@ class SchemeEditorEffects : public QWidget, public Ui::ScmEditorEffects
Q_OBJECT
public:
SchemeEditorEffects(KSharedConfigPtr config, QPalette::ColorGroup palette, QWidget *parent = Q_NULLPTR);
SchemeEditorEffects(KSharedConfigPtr config, QPalette::ColorGroup palette, QWidget *parent = nullptr);
void updateValues();
void updateFromEffectsPage();
......
......@@ -34,7 +34,7 @@ class SchemeEditorOptions : public QWidget, public Ui::ScmEditorOptions
Q_OBJECT
public:
SchemeEditorOptions(KSharedConfigPtr config, QWidget *parent = Q_NULLPTR);
SchemeEditorOptions(KSharedConfigPtr config, QWidget *parent = nullptr);
void updateValues();
Q_SIGNALS:
......
......@@ -31,8 +31,8 @@
UdevDeviceNotifier::UdevDeviceNotifier(QObject *parent)
: QObject(parent)
, m_udev(Q_NULLPTR)
, m_monitor(Q_NULLPTR)
, m_udev(nullptr)
, m_monitor(nullptr)
{
init();
}
......
......@@ -26,7 +26,7 @@ class UdevDeviceNotifier : public QObject
Q_OBJECT
public:
explicit UdevDeviceNotifier(QObject *parent = Q_NULLPTR);
explicit UdevDeviceNotifier(QObject *parent = nullptr);
~UdevDeviceNotifier();
Q_SIGNALS:
......
......@@ -56,7 +56,7 @@ static const int DEVICE_POINTER = 2;
XInputEventNotifier::XInputEventNotifier(QWidget* parent):
XEventNotifier(), //TODO: destruct properly?
xinputEventType(-1),
udevNotifier(Q_NULLPTR)
udevNotifier(nullptr)
{
Q_UNUSED(parent)
}
......
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