[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [khotkeys] /: Use nullptr
From:       Laurent Montel <null () kde ! org>
Date:       2018-09-20 5:00:35
Message-ID: E1g2r4t-0000W5-Jd () code ! kde ! org
[Download RAW message or body]

Git commit 7f5326b890684269d63646cfb225124e373ca7fa by Laurent Montel.
Committed on 20/09/2018 at 05:00.
Pushed by mlaurent into branch 'master'.

Use nullptr

M  +8    -8    app/kded.cpp
M  +1    -1    kcm_hotkeys/action_group_widget.cpp
M  +1    -1    kcm_hotkeys/action_group_widget.h
M  +1    -1    kcm_hotkeys/actions/action_widget_base.h
M  +1    -1    kcm_hotkeys/actions/command_url_action_widget.h
M  +1    -1    kcm_hotkeys/actions/dbus_action_widget.h
M  +1    -1    kcm_hotkeys/actions/keyboard_input_action_widget.h
M  +1    -1    kcm_hotkeys/actions/menuentry_action_widget.h
M  +1    -1    kcm_hotkeys/conditions/condition_type_menu.h
M  +2    -2    kcm_hotkeys/conditions/conditions_widget.cpp
M  +1    -1    kcm_hotkeys/conditions/conditions_widget.h
M  +1    -1    kcm_hotkeys/global_settings_widget.cpp
M  +1    -1    kcm_hotkeys/global_settings_widget.h
M  +1    -1    kcm_hotkeys/helper_widgets/edit_gesture_dialog.h
M  +1    -1    kcm_hotkeys/helper_widgets/gesture_drawer.h
M  +1    -1    kcm_hotkeys/helper_widgets/gesture_widget.h
M  +4    -4    kcm_hotkeys/helper_widgets/window_definition_list_widget.cpp
M  +4    -4    kcm_hotkeys/helper_widgets/window_definition_list_widget.h
M  +4    -4    kcm_hotkeys/helper_widgets/window_definition_widget.h
M  +2    -2    kcm_hotkeys/helper_widgets/window_selector.cpp
M  +2    -2    kcm_hotkeys/hotkeys_context_menu.cpp
M  +2    -2    kcm_hotkeys/hotkeys_model.cpp
M  +1    -1    kcm_hotkeys/hotkeys_tree_view.h
M  +1    -1    kcm_hotkeys/hotkeys_widget_base.h
M  +1    -1    kcm_hotkeys/hotkeys_widget_iface.h
M  +2    -2    kcm_hotkeys/kcm_hotkeys.cpp
M  +4    -4    kcm_hotkeys/simple_action_data_widget.cpp
M  +1    -1    kcm_hotkeys/simple_action_data_widget.h
M  +1    -1    kcm_hotkeys/triggers/gesture_trigger_widget.h
M  +1    -1    kcm_hotkeys/triggers/shortcut_trigger_widget.h
M  +1    -1    kcm_hotkeys/triggers/trigger_widget_base.h
M  +1    -1    kcm_hotkeys/triggers/window_trigger_widget.cpp
M  +1    -1    kcm_hotkeys/triggers/window_trigger_widget.h
M  +2    -2    libkhotkeysprivate/action_data/action_data.cpp
M  +1    -1    libkhotkeysprivate/action_data/action_data_base.h
M  +1    -1    libkhotkeysprivate/action_data/action_data_group.cpp
M  +1    -1    libkhotkeysprivate/action_data/action_data_group.h
M  +3    -3    libkhotkeysprivate/action_data/generic_action_data.h
M  +2    -2    libkhotkeysprivate/action_data/simple_action_data.cpp
M  +5    -5    libkhotkeysprivate/actions/actions.h
M  +2    -2    libkhotkeysprivate/actions/command_url_action.cpp
M  +2    -2    libkhotkeysprivate/actions/keyboard_input_action.cpp
M  +2    -2    libkhotkeysprivate/actions/menuentry_action.cpp
M  +1    -1    libkhotkeysprivate/conditions/active_window_condition.cpp
M  +1    -1    libkhotkeysprivate/conditions/active_window_condition.h
M  +3    -3    libkhotkeysprivate/conditions/condition.cpp
M  +1    -1    libkhotkeysprivate/conditions/condition.h
M  +3    -3    libkhotkeysprivate/conditions/conditions.h
M  +3    -3    libkhotkeysprivate/conditions/conditions_list.cpp
M  +1    -1    libkhotkeysprivate/conditions/conditions_list.h
M  +1    -1    libkhotkeysprivate/conditions/conditions_list_base.h
M  +1    -1    libkhotkeysprivate/conditions/existing_window_condition.cpp
M  +1    -1    libkhotkeysprivate/conditions/existing_window_condition.h
M  +2    -2    libkhotkeysprivate/khotkeysglobal.cpp
M  +12   -12   libkhotkeysprivate/settings.cpp
M  +1    -1    libkhotkeysprivate/settings.h
M  +8    -8    libkhotkeysprivate/settings_reader_v2.cpp
M  +1    -1    libkhotkeysprivate/settings_writer.cpp
M  +7    -7    libkhotkeysprivate/triggers/gestures.cpp
M  +1    -1    libkhotkeysprivate/triggers/triggers.h
M  +1    -1    libkhotkeysprivate/triggers/window_trigger.cpp
M  +1    -1    libkhotkeysprivate/windows_handler.cpp
M  +1    -1    libkhotkeysprivate/windows_helper/window_selection_interface.cpp

https://commits.kde.org/khotkeys/7f5326b890684269d63646cfb225124e373ca7fa

diff --git a/app/kded.cpp b/app/kded.cpp
index 1a70481..3010e2f 100644
--- a/app/kded.cpp
+++ b/app/kded.cpp
@@ -38,7 +38,7 @@ using namespace KHotKeys;
 
 KHotKeysModule::KHotKeysModule(QObject* parent, const QList<QVariant>&)
     : KDEDModule(parent)
-    , actions_root(NULL)
+    , actions_root(nullptr)
     , _settingsDirty(false)
     , _settings()
     ,_initialized(false)
@@ -83,7 +83,7 @@ void KHotKeysModule::initialize()
 KHotKeysModule::~KHotKeysModule()
     {
     // actions_root belongs to _settings.
-    actions_root = NULL;
+    actions_root = nullptr;
     }
 
 
@@ -92,7 +92,7 @@ void KHotKeysModule::reread_configuration()
     qDebug() << "Reloading the khotkeys configuration";
 
     // Stop listening
-    actions_root = NULL; // Disables the dbus interface effectively
+    actions_root = nullptr; // Disables the dbus interface effectively
     KHotKeys::khotkeys_set_active( false );
 
     // Load the settings
@@ -132,7 +132,7 @@ SimpleActionData* KHotKeysModule::menuentry_action(const QString \
&storageId)  }
         }
 
-    return NULL;
+    return nullptr;
     }
 
 
@@ -141,13 +141,13 @@ QString KHotKeysModule::get_menuentry_shortcut(const QString \
&storageId)  SimpleActionData* actionData = menuentry_action(storageId);
 
     // No action found
-    if (actionData == NULL) return "";
+    if (actionData == nullptr) return "";
 
     // The action must have a shortcut trigger. but don't assume to much
     ShortcutTrigger* shortcutTrigger = \
dynamic_cast<ShortcutTrigger*>(actionData->trigger());  
     Q_ASSERT(shortcutTrigger);
-    if (shortcutTrigger == NULL) return "";
+    if (shortcutTrigger == nullptr) return "";
 
     qDebug() << shortcutTrigger->primaryShortcut();
 
@@ -174,7 +174,7 @@ QString KHotKeysModule::register_menuentry_shortcut(
     SimpleActionData* actionData = menuentry_action(storageId);
 
     // No action found. Create on if sequence is != ""
-    if (actionData == NULL)
+    if (actionData == nullptr)
         {
         qDebug() << "No action found";
 
@@ -219,7 +219,7 @@ QString KHotKeysModule::register_menuentry_shortcut(
             ShortcutTrigger* shortcutTrigger =
                     dynamic_cast<ShortcutTrigger*>(actionData->trigger());
             Q_ASSERT(shortcutTrigger);
-            if (shortcutTrigger == NULL) return "";
+            if (shortcutTrigger == nullptr) return "";
 
             // Change the actionData
             shortcutTrigger->set_key_sequence(sequence);
diff --git a/kcm_hotkeys/action_group_widget.cpp \
b/kcm_hotkeys/action_group_widget.cpp index cf68c3b..a0bce7a 100644
--- a/kcm_hotkeys/action_group_widget.cpp
+++ b/kcm_hotkeys/action_group_widget.cpp
@@ -35,7 +35,7 @@ ActionGroupWidget::ActionGroupWidget( QWidget *parent )
 
 ActionGroupWidget::~ActionGroupWidget()
     {
-    _conditions = NULL;
+    _conditions = nullptr;
     }
 
 
diff --git a/kcm_hotkeys/action_group_widget.h b/kcm_hotkeys/action_group_widget.h
index 8c5f3a8..9f7ecc3 100644
--- a/kcm_hotkeys/action_group_widget.h
+++ b/kcm_hotkeys/action_group_widget.h
@@ -39,7 +39,7 @@ public:
     /**
      * Default constructor
      */
-    ActionGroupWidget( QWidget *parent = 0 );
+    ActionGroupWidget( QWidget *parent = nullptr );
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/actions/action_widget_base.h \
b/kcm_hotkeys/actions/action_widget_base.h index 65b4709..6b18787 100644
--- a/kcm_hotkeys/actions/action_widget_base.h
+++ b/kcm_hotkeys/actions/action_widget_base.h
@@ -44,7 +44,7 @@ public:
 
 protected:
 
-    ActionWidgetBase( KHotKeys::Action *action, QWidget *parent = 0 );
+    ActionWidgetBase( KHotKeys::Action *action, QWidget *parent = nullptr );
 
     KHotKeys::Action *_action;
 
diff --git a/kcm_hotkeys/actions/command_url_action_widget.h \
b/kcm_hotkeys/actions/command_url_action_widget.h index 0b70bdd..76b2b93 100644
--- a/kcm_hotkeys/actions/command_url_action_widget.h
+++ b/kcm_hotkeys/actions/command_url_action_widget.h
@@ -37,7 +37,7 @@ public:
     /**
      * Default constructor
      */
-    CommandUrlActionWidget( KHotKeys::CommandUrlAction *action, QWidget *parent = 0 \
); +    CommandUrlActionWidget( KHotKeys::CommandUrlAction *action, QWidget *parent = \
nullptr );  
     /**
      * Destructor
diff --git a/kcm_hotkeys/actions/dbus_action_widget.h \
b/kcm_hotkeys/actions/dbus_action_widget.h index b2a0f98..8d5983b 100644
--- a/kcm_hotkeys/actions/dbus_action_widget.h
+++ b/kcm_hotkeys/actions/dbus_action_widget.h
@@ -39,7 +39,7 @@ public:
     /**
      * Default constructor
      */
-    DbusActionWidget( KHotKeys::DBusAction *action, QWidget *parent = 0 );
+    DbusActionWidget( KHotKeys::DBusAction *action, QWidget *parent = nullptr );
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/actions/keyboard_input_action_widget.h \
b/kcm_hotkeys/actions/keyboard_input_action_widget.h index 8b34ef7..94611c6 100644
--- a/kcm_hotkeys/actions/keyboard_input_action_widget.h
+++ b/kcm_hotkeys/actions/keyboard_input_action_widget.h
@@ -39,7 +39,7 @@ public:
      */
     KeyboardInputActionWidget(
             KHotKeys::KeyboardInputAction *action,
-            QWidget *parent = NULL);
+            QWidget *parent = nullptr);
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/actions/menuentry_action_widget.h \
b/kcm_hotkeys/actions/menuentry_action_widget.h index 2379e9c..43984ce 100644
--- a/kcm_hotkeys/actions/menuentry_action_widget.h
+++ b/kcm_hotkeys/actions/menuentry_action_widget.h
@@ -39,7 +39,7 @@ public:
     /**
      * Default constructor
      */
-    MenuentryActionWidget( KHotKeys::MenuEntryAction *action, QWidget *parent = 0 );
+    MenuentryActionWidget( KHotKeys::MenuEntryAction *action, QWidget *parent = \
nullptr );  
     /**
      * Destructor
diff --git a/kcm_hotkeys/conditions/condition_type_menu.h \
b/kcm_hotkeys/conditions/condition_type_menu.h index eee7c71..f8a8fee 100644
--- a/kcm_hotkeys/conditions/condition_type_menu.h
+++ b/kcm_hotkeys/conditions/condition_type_menu.h
@@ -34,7 +34,7 @@ public:
     /**
      * Default constructor
      */
-    ConditionTypeMenu(QWidget *parent = NULL);
+    ConditionTypeMenu(QWidget *parent = nullptr);
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/conditions/conditions_widget.cpp \
b/kcm_hotkeys/conditions/conditions_widget.cpp index 1478da4..3c2adf3 100644
--- a/kcm_hotkeys/conditions/conditions_widget.cpp
+++ b/kcm_hotkeys/conditions/conditions_widget.cpp
@@ -117,7 +117,7 @@ void \
BuildTree::visitConditionsListBase(KHotKeys::Condition_list_base *list)  
 ConditionsWidget::ConditionsWidget(QWidget *parent)
     :   QWidget(parent)
-        ,_working(NULL)
+        ,_working(nullptr)
         ,_changed(false)
     {
     ui.setupUi(this);
@@ -136,7 +136,7 @@ ConditionsWidget::ConditionsWidget(QWidget *parent)
 
 ConditionsWidget::~ConditionsWidget()
     {
-    delete _working; _working = NULL;
+    delete _working; _working = nullptr;
     }
 
 
diff --git a/kcm_hotkeys/conditions/conditions_widget.h \
b/kcm_hotkeys/conditions/conditions_widget.h index 4ca11f7..12c81e7 100644
--- a/kcm_hotkeys/conditions/conditions_widget.h
+++ b/kcm_hotkeys/conditions/conditions_widget.h
@@ -45,7 +45,7 @@ public:
     /**
      * Default constructor
      */
-    ConditionsWidget(QWidget *parent = NULL);
+    ConditionsWidget(QWidget *parent = nullptr);
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/global_settings_widget.cpp \
b/kcm_hotkeys/global_settings_widget.cpp index d299885..554fa4b 100644
--- a/kcm_hotkeys/global_settings_widget.cpp
+++ b/kcm_hotkeys/global_settings_widget.cpp
@@ -33,7 +33,7 @@
 
 GlobalSettingsWidget::GlobalSettingsWidget( QWidget *parent )
     :   HotkeysWidgetIFace( parent )
-        ,_model(NULL)
+        ,_model(nullptr)
     {
     ui.setupUi(this);
 
diff --git a/kcm_hotkeys/global_settings_widget.h \
b/kcm_hotkeys/global_settings_widget.h index 81ba9a5..f7eb66c 100644
--- a/kcm_hotkeys/global_settings_widget.h
+++ b/kcm_hotkeys/global_settings_widget.h
@@ -41,7 +41,7 @@ public:
     /**
      * Default constructor
      */
-    GlobalSettingsWidget(QWidget *parent = NULL);
+    GlobalSettingsWidget(QWidget *parent = nullptr);
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/helper_widgets/edit_gesture_dialog.h \
b/kcm_hotkeys/helper_widgets/edit_gesture_dialog.h index 41844bd..8bc8ff9 100644
--- a/kcm_hotkeys/helper_widgets/edit_gesture_dialog.h
+++ b/kcm_hotkeys/helper_widgets/edit_gesture_dialog.h
@@ -40,7 +40,7 @@ public:
     /**
      * Default constructor
      */
-    EditGestureDialog(const KHotKeys::StrokePoints &pointData, QWidget \
*parent=NULL); +    EditGestureDialog(const KHotKeys::StrokePoints &pointData, \
QWidget *parent=nullptr);  
     /**
      * Destructor
diff --git a/kcm_hotkeys/helper_widgets/gesture_drawer.h \
b/kcm_hotkeys/helper_widgets/gesture_drawer.h index f2c3655..7f811ec 100644
--- a/kcm_hotkeys/helper_widgets/gesture_drawer.h
+++ b/kcm_hotkeys/helper_widgets/gesture_drawer.h
@@ -33,7 +33,7 @@ class GestureDrawer : public QFrame
 
     public:
 
-        GestureDrawer(QWidget *parent, const char *name = 0);
+        GestureDrawer(QWidget *parent, const char *name = nullptr);
         ~GestureDrawer();
 
         void setPointData(const KHotKeys::StrokePoints &data);
diff --git a/kcm_hotkeys/helper_widgets/gesture_widget.h \
b/kcm_hotkeys/helper_widgets/gesture_widget.h index ab68f15..ac0c201 100644
--- a/kcm_hotkeys/helper_widgets/gesture_widget.h
+++ b/kcm_hotkeys/helper_widgets/gesture_widget.h
@@ -38,7 +38,7 @@ public:
     /**
      * Default constructor
      */
-    GestureWidget(QWidget *parent = NULL);
+    GestureWidget(QWidget *parent = nullptr);
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/helper_widgets/window_definition_list_widget.cpp \
b/kcm_hotkeys/helper_widgets/window_definition_list_widget.cpp index b25e0d7..e12ec47 \
                100644
--- a/kcm_hotkeys/helper_widgets/window_definition_list_widget.cpp
+++ b/kcm_hotkeys/helper_widgets/window_definition_list_widget.cpp
@@ -24,8 +24,8 @@
 
 WindowDefinitionListWidget::WindowDefinitionListWidget(QWidget *parent)
     :   HotkeysWidgetIFace(parent)
-        ,_windowdefs(NULL)
-        ,_working(NULL)
+        ,_windowdefs(nullptr)
+        ,_working(nullptr)
         ,_changed(false)
     {
     ui.setupUi(this);
@@ -50,8 +50,8 @@ WindowDefinitionListWidget::WindowDefinitionListWidget(QWidget \
*parent)  
 WindowDefinitionListWidget::WindowDefinitionListWidget(KHotKeys::Windowdef_list \
*windowdef, QWidget *parent)  :   HotkeysWidgetIFace(parent)
-        ,_windowdefs(NULL)
-        ,_working(NULL)
+        ,_windowdefs(nullptr)
+        ,_working(nullptr)
         ,_changed(false)
     {
     ui.setupUi(this);
diff --git a/kcm_hotkeys/helper_widgets/window_definition_list_widget.h \
b/kcm_hotkeys/helper_widgets/window_definition_list_widget.h index 8da4931..4f34fc2 \
                100644
--- a/kcm_hotkeys/helper_widgets/window_definition_list_widget.h
+++ b/kcm_hotkeys/helper_widgets/window_definition_list_widget.h
@@ -41,7 +41,7 @@ public:
      */
     WindowDefinitionListWidget(
             KHotKeys::Windowdef_list *windowdef_list,
-            QWidget *parent = NULL);
+            QWidget *parent = nullptr);
 
     WindowDefinitionListWidget(QWidget *parent);
 
@@ -92,9 +92,9 @@ public:
 
     WindowDefinitionListDialog(
             KHotKeys::Windowdef_list *list,
-            QWidget *parent=NULL)
+            QWidget *parent=nullptr)
         :   KDialog(parent)
-            ,def(NULL)
+            ,def(nullptr)
         {
         def = new WindowDefinitionListWidget(list, this);
         setMainWidget(def);
@@ -104,7 +104,7 @@ public:
 
     ~WindowDefinitionListDialog()
         {
-        def = NULL;
+        def = nullptr;
         }
 
 
diff --git a/kcm_hotkeys/helper_widgets/window_definition_widget.h \
b/kcm_hotkeys/helper_widgets/window_definition_widget.h index 35da0f9..a2ab57c 100644
--- a/kcm_hotkeys/helper_widgets/window_definition_widget.h
+++ b/kcm_hotkeys/helper_widgets/window_definition_widget.h
@@ -46,7 +46,7 @@ public:
     /**
      * Default constructor
      */
-    WindowDefinitionWidget(KHotKeys::Windowdef_simple *windowdef, QWidget *parent = \
NULL); +    WindowDefinitionWidget(KHotKeys::Windowdef_simple *windowdef, QWidget \
*parent = nullptr);  
     /**
      * Destructor
@@ -83,9 +83,9 @@ class WindowDefinitionDialog : public KDialog
 
 public:
 
-    WindowDefinitionDialog( KHotKeys::Windowdef_simple *windowdef, QWidget \
*parent=NULL) +    WindowDefinitionDialog( KHotKeys::Windowdef_simple *windowdef, \
QWidget *parent=nullptr)  :   KDialog(parent)
-            ,def(NULL)
+            ,def(nullptr)
         {
         def = new WindowDefinitionWidget(windowdef, this);
         setMainWidget(def);
@@ -95,7 +95,7 @@ public:
 
     ~WindowDefinitionDialog()
         {
-        def = NULL;
+        def = nullptr;
         }
 
 
diff --git a/kcm_hotkeys/helper_widgets/window_selector.cpp \
b/kcm_hotkeys/helper_widgets/window_selector.cpp index 1bd994f..4ca6006 100644
--- a/kcm_hotkeys/helper_widgets/window_selector.cpp
+++ b/kcm_hotkeys/helper_widgets/window_selector.cpp
@@ -74,7 +74,7 @@ WId WindowSelector::findRealWindow( WId w, int depth )
     if( XGetWindowProperty( QX11Info::display(), w, wm_state, 0, 0, False, \
AnyPropertyType,  &type, &format, &nitems, &after, &prop ) == Success )
         {
-        if( prop != NULL )
+        if( prop != nullptr )
             XFree( prop );
         if( type != None )
             return w;
@@ -89,7 +89,7 @@ WId WindowSelector::findRealWindow( WId w, int depth )
              i < nchildren && ret == None;
              ++i )
             ret = findRealWindow( children[ i ], depth + 1 );
-        if( children != NULL )
+        if( children != nullptr )
             XFree( children );
         }
     return ret;
diff --git a/kcm_hotkeys/hotkeys_context_menu.cpp \
b/kcm_hotkeys/hotkeys_context_menu.cpp index f0bde74..9743163 100644
--- a/kcm_hotkeys/hotkeys_context_menu.cpp
+++ b/kcm_hotkeys/hotkeys_context_menu.cpp
@@ -69,7 +69,7 @@ HotkeysTreeViewContextMenu::createActionFromType(
         KHotKeys::SimpleActionData* data
         ) const
     {
-    KHotKeys::Action *action = NULL;
+    KHotKeys::Action *action = nullptr;
     switch (actionType)
         {
         case KHotKeys::Action::CommandUrlActionType:
@@ -90,7 +90,7 @@ HotkeysTreeViewContextMenu::createActionFromType(
 
         default:
             Q_ASSERT(false);
-            return NULL;
+            return nullptr;
         }
 
     data->set_action(action);
diff --git a/kcm_hotkeys/hotkeys_model.cpp b/kcm_hotkeys/hotkeys_model.cpp
index daeb068..52f10f4 100644
--- a/kcm_hotkeys/hotkeys_model.cpp
+++ b/kcm_hotkeys/hotkeys_model.cpp
@@ -36,9 +36,9 @@ static KHotKeys::ActionDataBase *findElement(
         ,KHotKeys::ActionDataGroup *root)
     {
     Q_ASSERT(root);
-    if (!root) return NULL;
+    if (!root) return nullptr;
 
-    KHotKeys::ActionDataBase *match = NULL;
+    KHotKeys::ActionDataBase *match = nullptr;
 
     Q_FOREACH( KHotKeys::ActionDataBase *element, root->children())
         {
diff --git a/kcm_hotkeys/hotkeys_tree_view.h b/kcm_hotkeys/hotkeys_tree_view.h
index a550109..0e01aab 100644
--- a/kcm_hotkeys/hotkeys_tree_view.h
+++ b/kcm_hotkeys/hotkeys_tree_view.h
@@ -44,7 +44,7 @@ public:
     /**
      * Default constructor
      */
-    HotkeysTreeView( QWidget *parent = 0 );
+    HotkeysTreeView( QWidget *parent = nullptr );
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/hotkeys_widget_base.h b/kcm_hotkeys/hotkeys_widget_base.h
index c97e2d0..f0269a9 100644
--- a/kcm_hotkeys/hotkeys_widget_base.h
+++ b/kcm_hotkeys/hotkeys_widget_base.h
@@ -41,7 +41,7 @@ public:
     /**
      * Default constructor
      */
-    HotkeysWidgetBase( QWidget *parent = 0 );
+    HotkeysWidgetBase( QWidget *parent = nullptr );
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/hotkeys_widget_iface.h b/kcm_hotkeys/hotkeys_widget_iface.h
index b63bcb1..542e46b 100644
--- a/kcm_hotkeys/hotkeys_widget_iface.h
+++ b/kcm_hotkeys/hotkeys_widget_iface.h
@@ -38,7 +38,7 @@ public:
     /**
      * Default constructor
      */
-    HotkeysWidgetIFace( QWidget *parent = 0 );
+    HotkeysWidgetIFace( QWidget *parent = nullptr );
 
     /**
      * Destructor
diff --git a/kcm_hotkeys/kcm_hotkeys.cpp b/kcm_hotkeys/kcm_hotkeys.cpp
index 8016a1e..28d6469 100644
--- a/kcm_hotkeys/kcm_hotkeys.cpp
+++ b/kcm_hotkeys/kcm_hotkeys.cpp
@@ -265,9 +265,9 @@ void KCMHotkeys::save()
 
 KCMHotkeysPrivate::KCMHotkeysPrivate( KCMHotkeys *host )
     : Ui::KCMHotkeysWidget()
-     ,model(NULL)
+     ,model(nullptr)
      ,q(host)
-     ,current(NULL)
+     ,current(nullptr)
     {
     setupUi(q);
 
diff --git a/kcm_hotkeys/simple_action_data_widget.cpp \
b/kcm_hotkeys/simple_action_data_widget.cpp index 0cd6c70..bd6241b 100644
--- a/kcm_hotkeys/simple_action_data_widget.cpp
+++ b/kcm_hotkeys/simple_action_data_widget.cpp
@@ -32,8 +32,8 @@
 
 SimpleActionDataWidget::SimpleActionDataWidget( QWidget *parent )
         : HotkeysWidgetBase( parent )
-         ,currentTrigger(NULL)
-         ,currentAction(NULL)
+         ,currentTrigger(nullptr)
+         ,currentAction(nullptr)
     {}
 
 
@@ -90,7 +90,7 @@ void SimpleActionDataWidget::setActionData( \
KHotKeys::SimpleActionData* pData )  _data = pData;
 
     // Now go and work on the trigger
-    delete currentTrigger; currentTrigger = NULL;
+    delete currentTrigger; currentTrigger = nullptr;
 
     if ( KHotKeys::Trigger *trg = data()->trigger() )
         {
@@ -125,7 +125,7 @@ void SimpleActionDataWidget::setActionData( \
KHotKeys::SimpleActionData* pData )  }
 
     // Now go and work on the action
-    delete currentAction; currentAction = NULL;
+    delete currentAction; currentAction = nullptr;
 
     if ( KHotKeys::Action *act = data()->action() )
         {
diff --git a/kcm_hotkeys/simple_action_data_widget.h \
b/kcm_hotkeys/simple_action_data_widget.h index b0ee417..7db8176 100644
--- a/kcm_hotkeys/simple_action_data_widget.h
+++ b/kcm_hotkeys/simple_action_data_widget.h
@@ -40,7 +40,7 @@ public:
     /**
      * Default constructor
      */
-    SimpleActionDataWidget( QWidget *parent = 0 );
+    SimpleActionDataWidget( QWidget *parent = nullptr );
 
 
     /**
diff --git a/kcm_hotkeys/triggers/gesture_trigger_widget.h \
b/kcm_hotkeys/triggers/gesture_trigger_widget.h index 31332fb..85acc6b 100644
--- a/kcm_hotkeys/triggers/gesture_trigger_widget.h
+++ b/kcm_hotkeys/triggers/gesture_trigger_widget.h
@@ -41,7 +41,7 @@ public:
     /**
      * Default constructor
      */
-    GestureTriggerWidget(KHotKeys::GestureTrigger *trigger, QWidget *parent = NULL);
+    GestureTriggerWidget(KHotKeys::GestureTrigger *trigger, QWidget *parent = \
nullptr);  
     /**
      * Destructor
diff --git a/kcm_hotkeys/triggers/shortcut_trigger_widget.h \
b/kcm_hotkeys/triggers/shortcut_trigger_widget.h index 6825129..88d824b 100644
--- a/kcm_hotkeys/triggers/shortcut_trigger_widget.h
+++ b/kcm_hotkeys/triggers/shortcut_trigger_widget.h
@@ -38,7 +38,7 @@ public:
     /**
      * Default constructor
      */
-    ShortcutTriggerWidget(KHotKeys::ShortcutTrigger *trigger, QWidget *parent = \
NULL); +    ShortcutTriggerWidget(KHotKeys::ShortcutTrigger *trigger, QWidget *parent \
= nullptr);  
     /**
      * Destructor
diff --git a/kcm_hotkeys/triggers/trigger_widget_base.h \
b/kcm_hotkeys/triggers/trigger_widget_base.h index 47af24d..1e86184 100644
--- a/kcm_hotkeys/triggers/trigger_widget_base.h
+++ b/kcm_hotkeys/triggers/trigger_widget_base.h
@@ -48,7 +48,7 @@ public:
 
 protected:
 
-    TriggerWidgetBase( KHotKeys::Trigger *trigger, QWidget *parent = 0 );
+    TriggerWidgetBase( KHotKeys::Trigger *trigger, QWidget *parent = nullptr );
 
     KHotKeys::Trigger *_trigger;
 
diff --git a/kcm_hotkeys/triggers/window_trigger_widget.cpp \
b/kcm_hotkeys/triggers/window_trigger_widget.cpp index 63fde25..91e6fac 100644
--- a/kcm_hotkeys/triggers/window_trigger_widget.cpp
+++ b/kcm_hotkeys/triggers/window_trigger_widget.cpp
@@ -29,7 +29,7 @@
 
 WindowTriggerWidget::WindowTriggerWidget( KHotKeys::WindowTrigger *trigger, QWidget \
*parent )  :   TriggerWidgetBase(trigger, parent)
-        ,_windowdef_widget(NULL)
+        ,_windowdef_widget(nullptr)
     {
     window_trigger_ui.setupUi(this);
 
diff --git a/kcm_hotkeys/triggers/window_trigger_widget.h \
b/kcm_hotkeys/triggers/window_trigger_widget.h index 0681d41..8c056b5 100644
--- a/kcm_hotkeys/triggers/window_trigger_widget.h
+++ b/kcm_hotkeys/triggers/window_trigger_widget.h
@@ -40,7 +40,7 @@ public:
     /**
      * Default constructor
      */
-    WindowTriggerWidget( KHotKeys::WindowTrigger *trigger, QWidget *parent = 0 );
+    WindowTriggerWidget( KHotKeys::WindowTrigger *trigger, QWidget *parent = nullptr \
);  
     /**
      * Destructor
diff --git a/libkhotkeysprivate/action_data/action_data.cpp \
b/libkhotkeysprivate/action_data/action_data.cpp index cfecf52..8c3ad12 100644
--- a/libkhotkeysprivate/action_data/action_data.cpp
+++ b/libkhotkeysprivate/action_data/action_data.cpp
@@ -49,8 +49,8 @@ void ActionData::accept(ActionDataConstVisitor *visitor) const
 
 ActionData::~ActionData()
     {
-    delete _triggers; _triggers = NULL;
-    delete _actions; _actions = NULL;
+    delete _triggers; _triggers = nullptr;
+    delete _actions; _actions = nullptr;
     }
 
 
diff --git a/libkhotkeysprivate/action_data/action_data_base.h \
b/libkhotkeysprivate/action_data/action_data_base.h index 8f43b6a..69c7a56 100644
--- a/libkhotkeysprivate/action_data/action_data_base.h
+++ b/libkhotkeysprivate/action_data/action_data_base.h
@@ -161,7 +161,7 @@ class Q_DECL_EXPORT ActionDataBase : public QObject
 
         friend class ActionDataGroup;
 
-        //! The parent or NULL
+        //! The parent or nullptr
         ActionDataGroup* _parent;
 
         //! List of conditions for this element
diff --git a/libkhotkeysprivate/action_data/action_data_group.cpp \
b/libkhotkeysprivate/action_data/action_data_group.cpp index f80f775..688e3bd 100644
--- a/libkhotkeysprivate/action_data/action_data_group.cpp
+++ b/libkhotkeysprivate/action_data/action_data_group.cpp
@@ -169,7 +169,7 @@ void ActionDataGroup::doEnable()
 
 void ActionDataGroup::remove_child( ActionDataBase* child_P )
     {
-    child_P->_parent = NULL;
+    child_P->_parent = nullptr;
     _list.removeAll( child_P ); // is not auto-delete
     }
 
diff --git a/libkhotkeysprivate/action_data/action_data_group.h \
b/libkhotkeysprivate/action_data/action_data_group.h index 084cad7..4dc4a6e 100644
--- a/libkhotkeysprivate/action_data/action_data_group.h
+++ b/libkhotkeysprivate/action_data/action_data_group.h
@@ -60,7 +60,7 @@ class Q_DECL_EXPORT ActionDataGroup
             ActionDataGroup* parent_P,
             const QString& name_P = QString(),
             const QString& comment_P = QString(),
-            Condition_list* conditions_P = NULL,
+            Condition_list* conditions_P = nullptr,
             system_group_t system_group_P = SYSTEM_NONE);
 
         virtual ~ActionDataGroup();
diff --git a/libkhotkeysprivate/action_data/generic_action_data.h \
b/libkhotkeysprivate/action_data/generic_action_data.h index 394c1de..68e35bd 100644
--- a/libkhotkeysprivate/action_data/generic_action_data.h
+++ b/libkhotkeysprivate/action_data/generic_action_data.h
@@ -29,9 +29,9 @@ class Q_DECL_EXPORT Generic_action_data
                 ActionDataGroup* parent_P,
                 const QString& name_P = QString(),
                 const QString& comment_P = QString(),
-                Trigger_list* triggers_P = NULL,
-                Condition_list* conditions_P = NULL,
-                ActionList* actions_P = NULL);
+                Trigger_list* triggers_P = nullptr,
+                Condition_list* conditions_P = nullptr,
+                ActionList* actions_P = nullptr);
 
         ~Generic_action_data();
 
diff --git a/libkhotkeysprivate/action_data/simple_action_data.cpp \
b/libkhotkeysprivate/action_data/simple_action_data.cpp index 8b82ec1..6afe9bc 100644
--- a/libkhotkeysprivate/action_data/simple_action_data.cpp
+++ b/libkhotkeysprivate/action_data/simple_action_data.cpp
@@ -110,7 +110,7 @@ Action* SimpleActionData::action()
 const Trigger* SimpleActionData::trigger() const
     {
     if( triggers() == 0 || triggers()->isEmpty() )
-        return NULL;
+        return nullptr;
 
     return triggers()->first();
     }
@@ -119,7 +119,7 @@ const Trigger* SimpleActionData::trigger() const
 Trigger* SimpleActionData::trigger()
     {
     if( triggers() == 0 || triggers()->isEmpty() )
-        return NULL;
+        return nullptr;
 
     return triggers()->first();
     }
diff --git a/libkhotkeysprivate/actions/actions.h \
b/libkhotkeysprivate/actions/actions.h index fb80d94..08d2d44 100644
--- a/libkhotkeysprivate/actions/actions.h
+++ b/libkhotkeysprivate/actions/actions.h
@@ -296,7 +296,7 @@ class Q_DECL_EXPORT KeyboardInputAction
         KeyboardInputAction(
                 ActionData* data_P,
                 const QString& input_P = QString(),
-                Windowdef_list* dest_window_P = NULL,
+                Windowdef_list* dest_window_P = nullptr,
                 bool active_window_P = true);
 
         virtual ~KeyboardInputAction();
@@ -307,9 +307,9 @@ class Q_DECL_EXPORT KeyboardInputAction
         const QString& input() const;
         void setInput(const QString &input);
 
-        // send to specific window: dest_window != NULL
-        // send to active window: dest_window == NULL && activeWindow() == true
-        // send to action window: dest_window == NULL && activeWindow() == false
+        // send to specific window: dest_window != nullptr
+        // send to active window: dest_window == nullptr && activeWindow() == true
+        // send to action window: dest_window == nullptr && activeWindow() == false
         //
 
         DestinationWindow destination() const;
@@ -354,7 +354,7 @@ class Q_DECL_EXPORT ActivateWindowAction
     public:
         ActivateWindowAction(
                 ActionData* data_P,
-                const Windowdef_list* window = NULL);
+                const Windowdef_list* window = nullptr);
 
         virtual ~ActivateWindowAction();
         void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
diff --git a/libkhotkeysprivate/actions/command_url_action.cpp \
b/libkhotkeysprivate/actions/command_url_action.cpp index f107826..445d653 100644
--- a/libkhotkeysprivate/actions/command_url_action.cpp
+++ b/libkhotkeysprivate/actions/command_url_action.cpp
@@ -123,7 +123,7 @@ void CommandUrlAction::execute()
                 KService::Ptr service = KService::serviceByDesktopName( cmd );
                 if( service )
                     {
-                    KRun::run( *service, KUrl::List(), NULL );
+                    KRun::run( *service, KUrl::List(), nullptr );
                   break;
                     }
                 }
@@ -135,7 +135,7 @@ void CommandUrlAction::execute()
                 return;
             if( !KRun::runCommand(
                 cmd + ( uri.hasArgsAndOptions() ? uri.argsAndOptions() : "" ),
-                cmd, uri.iconName(), NULL )) {
+                cmd, uri.iconName(), nullptr )) {
                 // CHECKME ?
              }
           break;
diff --git a/libkhotkeysprivate/actions/keyboard_input_action.cpp \
b/libkhotkeysprivate/actions/keyboard_input_action.cpp index 82884a4..20f7165 100644
--- a/libkhotkeysprivate/actions/keyboard_input_action.cpp
+++ b/libkhotkeysprivate/actions/keyboard_input_action.cpp
@@ -130,7 +130,7 @@ void KeyboardInputAction::cfg_write( KConfigGroup& cfg_P ) const
 
     cfg_P.writeEntry( "DestinationWindow", int(_destination) );
 
-    if( _destination == SpecificWindow && dest_window() != NULL )
+    if( _destination == SpecificWindow && dest_window() != nullptr )
         {
         KConfigGroup windowGroup( cfg_P.config(), cfg_P.name() + "DestinationWindow" \
);  dest_window()->cfg_write( windowGroup );
@@ -199,7 +199,7 @@ Action* KeyboardInputAction::copy( ActionData* data_P ) const
     return new KeyboardInputAction(
             data_P,
             input(),
-            dest_window() ? dest_window()->copy() : NULL,
+            dest_window() ? dest_window()->copy() : nullptr,
             _destination == ActiveWindow);
     }
 
diff --git a/libkhotkeysprivate/actions/menuentry_action.cpp \
b/libkhotkeysprivate/actions/menuentry_action.cpp index a625e49..f125c8e 100644
--- a/libkhotkeysprivate/actions/menuentry_action.cpp
+++ b/libkhotkeysprivate/actions/menuentry_action.cpp
@@ -87,7 +87,7 @@ void MenuEntryAction::execute()
     if (!service())
         {
         KMessageBox::sorry(
-                NULL,
+                nullptr,
                 i18n("No service configured."),
                 i18n("Input Action: %1", data->comment()));
         return;
@@ -96,7 +96,7 @@ void MenuEntryAction::execute()
     if (!KRun::run( *service(), KUrl::List(), 0 ))
         {
         KMessageBox::sorry(
-                NULL,
+                nullptr,
                 i18n("Failed to start service '%1'.", service()->name()),
                 i18n("Input Action: %1", data->comment()));
         return;
diff --git a/libkhotkeysprivate/conditions/active_window_condition.cpp \
b/libkhotkeysprivate/conditions/active_window_condition.cpp index 4310e6d..e36c9a4 \
                100644
--- a/libkhotkeysprivate/conditions/active_window_condition.cpp
+++ b/libkhotkeysprivate/conditions/active_window_condition.cpp
@@ -50,7 +50,7 @@ Active_window_condition::Active_window_condition( Windowdef_list* \
window_P,  
 Active_window_condition::~Active_window_condition()
     {
-    disconnect( windows_handler, NULL, this, NULL );
+    disconnect( windows_handler, nullptr, this, nullptr );
     delete _window;
     }
 
diff --git a/libkhotkeysprivate/conditions/active_window_condition.h \
b/libkhotkeysprivate/conditions/active_window_condition.h index f61b9ca..0a2a9a8 \
                100644
--- a/libkhotkeysprivate/conditions/active_window_condition.h
+++ b/libkhotkeysprivate/conditions/active_window_condition.h
@@ -41,7 +41,7 @@ class Q_DECL_EXPORT Active_window_condition
     Q_OBJECT
     typedef Condition base;
     public:
-        Active_window_condition(Windowdef_list* window_P, Condition_list_base* \
parent_P = NULL); +        Active_window_condition(Windowdef_list* window_P, \
                Condition_list_base* parent_P = nullptr);
         Active_window_condition(KConfigGroup& cfg_P, Condition_list_base* parent_P);
         virtual ~Active_window_condition();
         bool match() const Q_DECL_OVERRIDE;
diff --git a/libkhotkeysprivate/conditions/condition.cpp \
b/libkhotkeysprivate/conditions/condition.cpp index 3366635..d17b3cb 100644
--- a/libkhotkeysprivate/conditions/condition.cpp
+++ b/libkhotkeysprivate/conditions/condition.cpp
@@ -29,7 +29,7 @@
 namespace KHotKeys {
 
 Condition::Condition( Condition_list_base* parent )
-    : _parent(NULL)
+    : _parent(nullptr)
     {
     if (parent)
         {
@@ -40,7 +40,7 @@ Condition::Condition( Condition_list_base* parent )
 
 
 Condition::Condition( KConfigGroup&, Condition_list_base* parent )
-    : _parent(NULL)
+    : _parent(nullptr)
     {
     if (parent)
         {
@@ -76,7 +76,7 @@ Condition* Condition::create_cfg_read( KConfigGroup& cfg_P, \
Condition_list_base*  if( type == "OR" )
         return new Or_condition( cfg_P, parent_P );
     qWarning() << "Unknown Condition type read from cfg file\n";
-    return NULL;
+    return nullptr;
     }
 
 
diff --git a/libkhotkeysprivate/conditions/condition.h \
b/libkhotkeysprivate/conditions/condition.h index e142359..8a74909 100644
--- a/libkhotkeysprivate/conditions/condition.h
+++ b/libkhotkeysprivate/conditions/condition.h
@@ -39,7 +39,7 @@ class Q_DECL_EXPORT Condition
     Q_DISABLE_COPY( Condition )
 
     public:
-        Condition( Condition_list_base* parent_P = NULL );
+        Condition( Condition_list_base* parent_P = nullptr );
         Condition( KConfigGroup& cfg_P, Condition_list_base* parent_P );
         virtual ~Condition();
         virtual bool match() const = 0;
diff --git a/libkhotkeysprivate/conditions/conditions.h \
b/libkhotkeysprivate/conditions/conditions.h index fe96653..f39d9d7 100644
--- a/libkhotkeysprivate/conditions/conditions.h
+++ b/libkhotkeysprivate/conditions/conditions.h
@@ -28,7 +28,7 @@ class Q_DECL_EXPORT Not_condition
     {
     typedef Condition_list_base base;
     public:
-        Not_condition( Condition_list_base* parent = NULL );
+        Not_condition( Condition_list_base* parent = nullptr );
         Not_condition( KConfigGroup& cfg_P, Condition_list_base* parent_P );
         bool match() const Q_DECL_OVERRIDE;
         void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
@@ -43,7 +43,7 @@ class Q_DECL_EXPORT And_condition
     {
     typedef Condition_list_base base;
     public:
-        And_condition( Condition_list_base* parent = NULL );
+        And_condition( Condition_list_base* parent = nullptr );
         And_condition( KConfigGroup& cfg_P, Condition_list_base* parent_P );
         bool match() const Q_DECL_OVERRIDE;
         void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
@@ -56,7 +56,7 @@ class Q_DECL_EXPORT Or_condition
     {
     typedef Condition_list_base base;
     public:
-        Or_condition( Condition_list_base* parent = NULL );
+        Or_condition( Condition_list_base* parent = nullptr );
         Or_condition( KConfigGroup& cfg_P, Condition_list_base* parent_P );
         bool match() const Q_DECL_OVERRIDE;
         void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
diff --git a/libkhotkeysprivate/conditions/conditions_list.cpp \
b/libkhotkeysprivate/conditions/conditions_list.cpp index 4e81a0b..2bf2083 100644
--- a/libkhotkeysprivate/conditions/conditions_list.cpp
+++ b/libkhotkeysprivate/conditions/conditions_list.cpp
@@ -29,14 +29,14 @@
 namespace KHotKeys {
 
 Condition_list::Condition_list( KConfigGroup& cfg_P, ActionDataBase* data_P )
-    : Condition_list_base( cfg_P, NULL ), data( data_P )
+    : Condition_list_base( cfg_P, nullptr ), data( data_P )
     {
     _comment = cfg_P.readEntry( "Comment" );
     }
 
 
 Condition_list::Condition_list( const QString& comment_P, ActionDataBase* data_P )
-    : Condition_list_base( NULL ), _comment( comment_P ), data( data_P )
+    : Condition_list_base( nullptr ), _comment( comment_P ), data( data_P )
     {
     }
 
@@ -90,7 +90,7 @@ bool Condition_list::match() const
 
 void Condition_list::set_data( ActionDataBase* data_P )
     {
-    Q_ASSERT( data == NULL || data == data_P );
+    Q_ASSERT( data == nullptr || data == data_P );
     data = data_P;
     }
 
diff --git a/libkhotkeysprivate/conditions/conditions_list.h \
b/libkhotkeysprivate/conditions/conditions_list.h index e89ae2b..4ce7463 100644
--- a/libkhotkeysprivate/conditions/conditions_list.h
+++ b/libkhotkeysprivate/conditions/conditions_list.h
@@ -37,7 +37,7 @@ class Q_DECL_EXPORT Condition_list
     {
     typedef Condition_list_base base;
     public:
-        Condition_list( const QString& comment_P, ActionDataBase* parent = NULL );
+        Condition_list( const QString& comment_P, ActionDataBase* parent = nullptr \
);  Condition_list( KConfigGroup& cfg_P, ActionDataBase* data_P );
         void cfg_write( KConfigGroup& cfg_P ) const Q_DECL_OVERRIDE;
         Condition_list* copy() const Q_DECL_OVERRIDE;
diff --git a/libkhotkeysprivate/conditions/conditions_list_base.h \
b/libkhotkeysprivate/conditions/conditions_list_base.h index 93655c0..3501363 100644
--- a/libkhotkeysprivate/conditions/conditions_list_base.h
+++ b/libkhotkeysprivate/conditions/conditions_list_base.h
@@ -41,7 +41,7 @@ class Q_DECL_EXPORT Condition_list_base : public Condition, private \
QList < Cond  
     public:
 
-        Condition_list_base( Condition_list_base* parent = NULL );
+        Condition_list_base( Condition_list_base* parent = nullptr );
 
         Condition_list_base(
                 const QList< Condition* >& children_P,
diff --git a/libkhotkeysprivate/conditions/existing_window_condition.cpp \
b/libkhotkeysprivate/conditions/existing_window_condition.cpp index a41a1ec..c64c480 \
                100644
--- a/libkhotkeysprivate/conditions/existing_window_condition.cpp
+++ b/libkhotkeysprivate/conditions/existing_window_condition.cpp
@@ -47,7 +47,7 @@ Existing_window_condition::Existing_window_condition( \
Windowdef_list* window_P,  
 Existing_window_condition::~Existing_window_condition()
     {
-    disconnect( windows_handler, NULL, this, NULL );
+    disconnect( windows_handler, nullptr, this, nullptr );
     delete _window;
     }
 
diff --git a/libkhotkeysprivate/conditions/existing_window_condition.h \
b/libkhotkeysprivate/conditions/existing_window_condition.h index 00c3686..1b5bedb \
                100644
--- a/libkhotkeysprivate/conditions/existing_window_condition.h
+++ b/libkhotkeysprivate/conditions/existing_window_condition.h
@@ -52,7 +52,7 @@ class Q_DECL_EXPORT Existing_window_condition
     Q_OBJECT
     typedef Condition base;
     public:
-        Existing_window_condition( Windowdef_list* window_P, Condition_list_base* \
parent = NULL ); +        Existing_window_condition( Windowdef_list* window_P, \
                Condition_list_base* parent = nullptr );
         Existing_window_condition( KConfigGroup& cfg_P, Condition_list_base* \
parent_P );  virtual ~Existing_window_condition();
         bool match() const Q_DECL_OVERRIDE;
diff --git a/libkhotkeysprivate/khotkeysglobal.cpp \
b/libkhotkeysprivate/khotkeysglobal.cpp index 7424400..a4d98c4 100644
--- a/libkhotkeysprivate/khotkeysglobal.cpp
+++ b/libkhotkeysprivate/khotkeysglobal.cpp
@@ -29,8 +29,8 @@
 namespace KHotKeys
 {
 
-QPointer<ShortcutsHandler> keyboard_handler = NULL;
-QPointer<WindowsHandler> windows_handler = NULL;
+QPointer<ShortcutsHandler> keyboard_handler = nullptr;
+QPointer<WindowsHandler> windows_handler = nullptr;
 
 static bool _khotkeys_active = false;
 
diff --git a/libkhotkeysprivate/settings.cpp b/libkhotkeysprivate/settings.cpp
index a944c72..781a1f0 100644
--- a/libkhotkeysprivate/settings.cpp
+++ b/libkhotkeysprivate/settings.cpp
@@ -39,8 +39,8 @@ namespace KHotKeys
 bool Settings::isOutdated = false;
 
 Settings::Settings()
-    : m_actions( NULL ),
-      gestures_exclude(NULL)
+    : m_actions( nullptr ),
+      gestures_exclude(nullptr)
     {
     reinitialize();
     }
@@ -162,12 +162,12 @@ bool Settings::loadDefaults()
 void Settings::reinitialize()
     {
     // Rereading settings. First delete what we have
-    setActions(NULL);
+    setActions(nullptr);
 
     gestures_disabled = true;
     gesture_mouse_button = 2;
     gesture_timeout = 300;
-    gestures_exclude = NULL,
+    gestures_exclude = nullptr,
 
     daemon_disabled = false;
 
@@ -185,10 +185,10 @@ void Settings::setActions( ActionDataGroup *actions )
     m_actions = actions
         ? actions
         : new ActionDataGroup(
-                NULL,
+                nullptr,
                 "should never see",
                 "should never see",
-                NULL,
+                nullptr,
                 ActionDataGroup::SYSTEM_ROOT);
     m_actions->enable();
     }
@@ -316,7 +316,7 @@ bool Settings::importFrom(ActionDataGroup *element, KConfigBase \
const &config, I  // Ask the user?
                     if( ask == ImportSilent
                             || ( ask == ImportAsk && \
                KMessageBox::warningContinueCancel(
-                                    NULL,
+                                    nullptr,
                                     i18n( "This \"actions\" file has already been \
                imported before. "
                                           "Are you sure you want to import it \
again?" )) != KMessageBox::Continue ) )  {
@@ -344,7 +344,7 @@ bool Settings::importFrom(ActionDataGroup *element, KConfigBase \
const &config, I  {
             case ImportAsk:
                 if (KMessageBox::warningContinueCancel(
-                                NULL,
+                                nullptr,
                                 i18n( "This \"actions\" file has no ImportId field \
                and therefore it cannot be determined "
                                       "whether or not it has been imported already. \
Are you sure you want to import it?" ))  == KMessageBox::Cancel )
@@ -380,7 +380,7 @@ ActionDataGroup \
*Settings::get_system_group(ActionDataGroup::system_group_t grou  \
Q_ASSERT(m_actions);  
     // Search for the menuentries system group.
-    ActionDataGroup *system_group = NULL;
+    ActionDataGroup *system_group = nullptr;
 
     Q_FOREACH(KHotKeys::ActionDataBase* element, m_actions->children())
         {
@@ -394,7 +394,7 @@ ActionDataGroup \
*Settings::get_system_group(ActionDataGroup::system_group_t grou  }
 
     // Check if we found the group
-    if (system_group==NULL)
+    if (system_group==nullptr)
         {
         switch (group_id)
             {
@@ -403,14 +403,14 @@ ActionDataGroup \
*Settings::get_system_group(ActionDataGroup::system_group_t grou  m_actions,
                         "KMenuEdit",
                         "KMenuEdit Global Shortcuts",
-                        NULL,
+                        nullptr,
                         ActionDataGroup::SYSTEM_MENUENTRIES);
                 system_group->enable();
                 break;
 
             default:
                 Q_ASSERT(false);
-                return NULL;
+                return nullptr;
             }
         }
 
diff --git a/libkhotkeysprivate/settings.h b/libkhotkeysprivate/settings.h
index 6e36c00..8c8c569 100644
--- a/libkhotkeysprivate/settings.h
+++ b/libkhotkeysprivate/settings.h
@@ -120,7 +120,7 @@ public:
      * Set the actions. 
      *
      * \note Ownership is taken. The current action list will be deleted. If
-     * \@a actions is NULL the method will create a new ActionDataGroup
+     * \@a actions is nullptr the method will create a new ActionDataGroup
      */
     void setActions( ActionDataGroup *actions );
 
diff --git a/libkhotkeysprivate/settings_reader_v2.cpp \
b/libkhotkeysprivate/settings_reader_v2.cpp index 17e5733..e30d06d 100644
--- a/libkhotkeysprivate/settings_reader_v2.cpp
+++ b/libkhotkeysprivate/settings_reader_v2.cpp
@@ -86,7 +86,7 @@ KHotKeys::ActionDataGroup *SettingsReaderV2::readGroup(
 #ifdef KHOTKEYS_TRACE
     qDebug() << "Reading group" << config.readEntry( "Name" );
 #endif
-    KHotKeys::ActionDataGroup *group = NULL;
+    KHotKeys::ActionDataGroup *group = nullptr;
 
     // Check if it is allowed to merge the group. If yes check for a group
     // with the desired name
@@ -174,7 +174,7 @@ KHotKeys::ActionDataBase *SettingsReaderV2::readActionData(
         return readGroup(config, parent);
         }
 
-    KHotKeys::ActionData *newObject = NULL;
+    KHotKeys::ActionData *newObject = nullptr;
 
     if (type == "GENERIC_ACTION_DATA")
         {
@@ -198,7 +198,7 @@ KHotKeys::ActionDataBase *SettingsReaderV2::readActionData(
     else
         {
         qWarning() << "Unknown ActionDataBase type read from cfg file\n";
-        return NULL;
+        return nullptr;
         }
 
     _config = &config;
@@ -269,7 +269,7 @@ KHotKeys::ActionList *SettingsReaderV2::readActionList(
         else
             {
             qWarning() << "Unknown Action type read from cfg file\n";
-            return NULL;
+            return nullptr;
             }
 
         _config = &group;
@@ -278,7 +278,7 @@ KHotKeys::ActionList *SettingsReaderV2::readActionList(
         parent->add_action( action );
         }
 
-    return NULL;
+    return nullptr;
     }
 
 
@@ -294,7 +294,7 @@ KHotKeys::Trigger_list *SettingsReaderV2::readTriggerList(
 
     list->set_comment(triggersGroup.readEntry("Comment"));
 
-    KHotKeys::Trigger *trigger = NULL;
+    KHotKeys::Trigger *trigger = nullptr;
 
     int cnt = triggersGroup.readEntry( "TriggersCount", 0 );
     for (int i = 0; i < cnt; ++i)
@@ -314,7 +314,7 @@ KHotKeys::Trigger_list *SettingsReaderV2::readTriggerList(
         else
             {
             qWarning() << "khotkeys: Unknown trigger type" << type;
-            return NULL;
+            return nullptr;
             }
 
         _config = & triggerConfig;
@@ -362,7 +362,7 @@ void SettingsReaderV2::visit(KHotKeys::KeyboardInputAction& \
action)  {
     action.setInput(_config->readEntry("Input"));
 
-    KHotKeys::Windowdef_list *window_list = NULL;
+    KHotKeys::Windowdef_list *window_list = nullptr;
     KHotKeys::KeyboardInputAction::DestinationWindow destWindow;
 
     // Try the new format with DestinationWindow
diff --git a/libkhotkeysprivate/settings_writer.cpp \
b/libkhotkeysprivate/settings_writer.cpp index 4d1d0a6..7a66609 100644
--- a/libkhotkeysprivate/settings_writer.cpp
+++ b/libkhotkeysprivate/settings_writer.cpp
@@ -260,7 +260,7 @@ void SettingsWriter::writeTo(KConfigBase &config)
     gesturesConfig.writeEntry( "Disabled", _settings->areGesturesDisabled() );
     gesturesConfig.writeEntry( "MouseButton", _settings->gestureMouseButton() );
     gesturesConfig.writeEntry( "Timeout", _settings->gestureTimeOut() );
-    if( _settings->gesturesExclude() != NULL )
+    if( _settings->gesturesExclude() != nullptr )
         {
         KConfigGroup gesturesExcludeConfig( &config, "GesturesExclude" );
         _settings->gesturesExclude()->cfg_write( gesturesExcludeConfig );
diff --git a/libkhotkeysprivate/triggers/gestures.cpp \
b/libkhotkeysprivate/triggers/gestures.cpp index 9d828cc..5ee3165 100644
--- a/libkhotkeysprivate/triggers/gestures.cpp
+++ b/libkhotkeysprivate/triggers/gestures.cpp
@@ -38,14 +38,14 @@
 namespace KHotKeys
 {
 
-QPointer<Gesture> gesture_handler = NULL;
+QPointer<Gesture> gesture_handler = nullptr;
 
 Gesture::Gesture( bool enabled_P, QObject* parent_P )
         : QObject(parent_P)
         , _enabled( false )
         , recording( false )
         , button( 0 )
-        , exclude( NULL )
+        , exclude( nullptr )
     {
     //qDebug() << enabled_P;
     nostroke_timer.setSingleShot( true );
@@ -75,10 +75,10 @@ void Gesture::set_exclude( Windowdef_list* windows_P )
     delete exclude;
     // check for count() > 0 - empty exclude list means no window is excluded,
     // but empty Windowdef_list matches everything
-    if( windows_P != NULL && windows_P->count() > 0 )
+    if( windows_P != nullptr && windows_P->count() > 0 )
         exclude = windows_P->copy();
     else
-        exclude = NULL;
+        exclude = nullptr;
     update_grab();
     }
 
@@ -93,7 +93,7 @@ void Gesture::update_grab()
     }
 
     if( _enabled && handlers.count() > 0
-        && ( exclude == NULL || !exclude->match( Window_data( \
windows_handler->active_window())))) +        && ( exclude == nullptr || \
!exclude->match( Window_data( windows_handler->active_window()))))  {
         kapp->removeNativeEventFilter( this ); // avoid being installed twice
         kapp->installNativeEventFilter( this );
@@ -208,14 +208,14 @@ bool Gesture::nativeEventFilter( const QByteArray & eventType, \
void * message, l  
         // prepare for the incoming scores from different triggers
         maxScore = 0.0;
-        bestFit = NULL;
+        bestFit = nullptr;
 
         emit handle_gesture( gesture );
         // the signal is emitted directly, so we get all trigger scores before
         // the next lines are executed. bestFit should now contain
         // a pointer to the ActionData with the best-matching gesture.
 
-        if( bestFit != NULL )
+        if( bestFit != nullptr )
             {
             // set up the windows_handler
             WId window = windows_handler->window_at_position( start_x, start_y );
diff --git a/libkhotkeysprivate/triggers/triggers.h \
b/libkhotkeysprivate/triggers/triggers.h index 482dc1f..9f3c1d4 100644
--- a/libkhotkeysprivate/triggers/triggers.h
+++ b/libkhotkeysprivate/triggers/triggers.h
@@ -244,7 +244,7 @@ class Q_DECL_EXPORT WindowTrigger : public QObject, public \
Trigger  
         WindowTrigger(
                 ActionData* data,
-                Windowdef_list* windowslist = NULL,
+                Windowdef_list* windowslist = nullptr,
                 WindowEvents window_actions = 0 );
 
         void setOnWindowEvents(WindowEvents events);
diff --git a/libkhotkeysprivate/triggers/window_trigger.cpp \
b/libkhotkeysprivate/triggers/window_trigger.cpp index b9b1097..cae7cca 100644
--- a/libkhotkeysprivate/triggers/window_trigger.cpp
+++ b/libkhotkeysprivate/triggers/window_trigger.cpp
@@ -58,7 +58,7 @@ WindowTrigger::WindowTrigger(
 WindowTrigger::~WindowTrigger()
     {
 //    qDebug() << "~WindowTrigger :" << this;
-    disconnect( windows_handler, NULL, this, NULL );
+    disconnect( windows_handler, nullptr, this, nullptr );
     delete _windows;
     }
 
diff --git a/libkhotkeysprivate/windows_handler.cpp \
b/libkhotkeysprivate/windows_handler.cpp index 603a9da..2f80b4a 100644
--- a/libkhotkeysprivate/windows_handler.cpp
+++ b/libkhotkeysprivate/windows_handler.cpp
@@ -166,7 +166,7 @@ WId WindowsHandler::window_at_position( int x, int y )
         if( XGetWindowProperty( QX11Info::display(), child, wm_state, 0, 0, False, \
AnyPropertyType,  &type, &format, &nitems, &after, &prop ) == Success )
             {
-	    if( prop != NULL )
+	    if( prop != nullptr )
 	        XFree( prop );
 	    if( type != None )
 	        return child;
diff --git a/libkhotkeysprivate/windows_helper/window_selection_interface.cpp \
b/libkhotkeysprivate/windows_helper/window_selection_interface.cpp index \
                200d877..b127567 100644
--- a/libkhotkeysprivate/windows_helper/window_selection_interface.cpp
+++ b/libkhotkeysprivate/windows_helper/window_selection_interface.cpp
@@ -58,7 +58,7 @@ Windowdef* Windowdef::create_cfg_read( KConfigGroup& cfg_P )
     if( type == "SIMPLE" )
         return new Windowdef_simple( cfg_P );
     qWarning() << "Unknown Windowdef type read from cfg file\n";
-    return NULL;
+    return nullptr;
     }
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic