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

List:       kde-commits
Subject:    [krename] src: Use nullptr
From:       Friedrich W. H. Kossebau <null () kde ! org>
Date:       2018-06-21 11:35:01
Message-ID: E1fVxrh-0001ks-1o () code ! kde ! org
[Download RAW message or body]

Git commit f8759dbb143e003f6d1e87bd8aadc836b1710ffb by Friedrich W. H. Kossebau.
Committed on 21/06/2018 at 11:17.
Pushed by kossebau into branch 'master'.

Use nullptr

M  +3    -3    src/exiv2plugin.cpp
M  +2    -2    src/krenameimpl.h
M  +1    -1    src/modeltest.h
M  +5    -5    src/permissionsplugin.cpp

https://commits.kde.org/krename/f8759dbb143e003f6d1e87bd8aadc836b1710ffb

diff --git a/src/exiv2plugin.cpp b/src/exiv2plugin.cpp
index 4acf672..39ac9e7 100644
--- a/src/exiv2plugin.cpp
+++ b/src/exiv2plugin.cpp
@@ -135,7 +135,7 @@ static const char *exifTags[] = {
     "Exif.GPSInfo.GPSProcessingMethod",
     "Exif.GPSInfo.GPSAreaInformation",
     "Exif.GPSInfo.GPSDifferential",
-    NULL
+    nullptr
 };
 
 static const char *xmpTags[] = {
@@ -263,7 +263,7 @@ static const char *xmpTags[] = {
     "Xmp.dc.rights",
     "Xmp.dc.description",
     "Xmp.photoshop.CaptionWriter",
-    NULL
+    nullptr
 };
 
 static const char *iptcTags[] = {
@@ -288,7 +288,7 @@ static const char *iptcTags[] = {
     "Iptc.Application2.Copyright",
     "Iptc.Application2.Caption",
     "Iptc.Application2.Writer",
-    NULL
+    nullptr
 };
 
 Exiv2Plugin::Exiv2Plugin(PluginLoader *loader)
diff --git a/src/krenameimpl.h b/src/krenameimpl.h
index 4e4a3b3..ed28df4 100644
--- a/src/krenameimpl.h
+++ b/src/krenameimpl.h
@@ -42,7 +42,7 @@ class KRenameImpl : public QObject
 public:
     ~KRenameImpl() override;
 
-    static QWidget *launch(const QRect &rect, const KRenameFile::List &list, \
QCommandLineParser *commandLine = 0); +    static QWidget *launch(const QRect &rect, \
const KRenameFile::List &list, QCommandLineParser *commandLine = nullptr);  
 public Q_SLOTS:
     /** Updates the preview of the filenames after renaming
@@ -50,7 +50,7 @@ public Q_SLOTS:
     void slotUpdatePreview();
 
 private:
-    KRenameImpl(KRenameWindow *window, const KRenameFile::List &list , \
QCommandLineParser *commandLine = 0); +    KRenameImpl(KRenameWindow *window, const \
KRenameFile::List &list , QCommandLineParser *commandLine = nullptr);  
     /** Connect all gui components with their slots
      */
diff --git a/src/modeltest.h b/src/modeltest.h
index f928902..bd65188 100644
--- a/src/modeltest.h
+++ b/src/modeltest.h
@@ -33,7 +33,7 @@ class ModelTest : public QObject
     Q_OBJECT
 
 public:
-    explicit ModelTest(QAbstractItemModel *model, QObject *parent = 0);
+    explicit ModelTest(QAbstractItemModel *model, QObject *parent = nullptr);
 
 private Q_SLOTS:
     void nonDestructiveBasicTest();
diff --git a/src/permissionsplugin.cpp b/src/permissionsplugin.cpp
index 58b8996..211bb31 100644
--- a/src/permissionsplugin.cpp
+++ b/src/permissionsplugin.cpp
@@ -50,7 +50,7 @@ PermissionsPlugin::PermissionsPlugin(PluginLoader *loader)
     // Get all users on the system
     struct passwd *user;
     setpwent();
-    for (i = 0; ((user = getpwent()) != 0L) && (i < MAXENTRIES); ++i) {
+    for (i = 0; ((user = getpwent()) != nullptr) && (i < MAXENTRIES); ++i) {
         if (uid == 0 || uid == user->pw_uid) {
             m_users.append(QString::fromLatin1(user->pw_name));
         }
@@ -61,7 +61,7 @@ PermissionsPlugin::PermissionsPlugin(PluginLoader *loader)
     struct group *ge;
     user = getpwuid(uid);
     setgrent();
-    for (i = 0; ((ge = getgrent()) != 0L) && (i < MAXENTRIES); ++i) {
+    for (i = 0; ((ge = getgrent()) != nullptr) && (i < MAXENTRIES); ++i) {
         if (uid == 0) {
             // Add all groups if we are run as root
             m_groups.append(QString::fromLatin1(ge->gr_name));
@@ -70,7 +70,7 @@ PermissionsPlugin::PermissionsPlugin(PluginLoader *loader)
             char **members = ge->gr_mem;
             char *member;
 
-            while ((member = *members) != 0L) {
+            while ((member = *members) != nullptr) {
                 if (strcmp(user->pw_name, member) == 0) {
                     m_groups.append(QString::fromLatin1(ge->gr_name));
                     break;
@@ -293,7 +293,7 @@ int PermissionsPlugin::getGid(const QString &group) const
     int i, r = 0;
     struct group *ge;
     setgrent();
-    for (i = 0; ((ge = getgrent()) != 0L) && (i < MAXENTRIES); i++)
+    for (i = 0; ((ge = getgrent()) != nullptr) && (i < MAXENTRIES); i++)
         if (!strcmp(ge->gr_name, group.toUtf8().data())) {
             r = ge->gr_gid;
             break;
@@ -308,7 +308,7 @@ int PermissionsPlugin::getUid(const QString &owner) const
     int i, r = 0;
     struct passwd *user;
     setpwent();
-    for (i = 0; ((user = getpwent()) != 0L) && (i < MAXENTRIES); i++)
+    for (i = 0; ((user = getpwent()) != nullptr) && (i < MAXENTRIES); i++)
         if (!strcmp(user->pw_name, owner.toUtf8().data())) {
             r = user->pw_uid;
             break;


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

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