diff options
| -rw-r--r-- | autotests/kconfig_compiler/kconfigcompiler_test.cpp | 4 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp | 2 | ||||
| -rw-r--r-- | autotests/kconfigloadertest.cpp | 4 | ||||
| -rw-r--r-- | src/core/bufferfragment_p.h | 2 | ||||
| -rw-r--r-- | src/core/kconfig.cpp | 2 | ||||
| -rw-r--r-- | src/core/kconfig.h | 2 | ||||
| -rw-r--r-- | src/core/kconfigbackend.cpp | 4 | ||||
| -rw-r--r-- | src/core/kconfigdata.h | 2 | ||||
| -rw-r--r-- | src/core/kconfiggroup.cpp | 4 | ||||
| -rw-r--r-- | src/core/kconfiggroup.h | 4 | ||||
| -rw-r--r-- | src/core/kconfigini.cpp | 4 | ||||
| -rw-r--r-- | src/core/kcoreconfigskeleton.h | 4 | ||||
| -rw-r--r-- | src/core/kemailsettings.cpp | 2 | ||||
| -rw-r--r-- | src/core/ksharedconfig.cpp | 2 | ||||
| -rw-r--r-- | src/gui/kconfiggui.cpp | 6 | ||||
| -rw-r--r-- | src/gui/kconfigloader.cpp | 2 | ||||
| -rw-r--r-- | src/gui/kconfigloader.h | 6 | ||||
| -rw-r--r-- | src/gui/kconfigskeleton.h | 4 | ||||
| -rw-r--r-- | src/kconf_update/kconf_update.cpp | 16 | 
19 files changed, 38 insertions, 38 deletions
| diff --git a/autotests/kconfig_compiler/kconfigcompiler_test.cpp b/autotests/kconfig_compiler/kconfigcompiler_test.cpp index 01efd602..74bb7288 100644 --- a/autotests/kconfig_compiler/kconfigcompiler_test.cpp +++ b/autotests/kconfig_compiler/kconfigcompiler_test.cpp @@ -51,7 +51,7 @@ static CompilerTestSet testCases = {      "test_translation_kde.cpp", "test_translation_kde.h",      "test_translation_kde_domain.cpp", "test_translation_kde_domain.h",      "test_translation_qt.cpp", "test_translation_qt.h", -    Q_NULLPTR +    nullptr  };  static CompilerTestSet testCasesToRun = { @@ -75,7 +75,7 @@ static CompilerTestSet testCasesToRun = {      "test_translation_kde",      "test_translation_kde_domain",      "test_translation_qt", -    Q_NULLPTR +    nullptr  };  #if 0 diff --git a/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp b/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp index b0c545fc..2a26c155 100644 --- a/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp +++ b/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp @@ -79,7 +79,7 @@ void KConfigCompiler_Test_Signals::cleanupTestCase()  struct TestSettersArg {      // default constructor required for Q_DECLARE_METATYPE -    TestSettersArg() : obj(Q_NULLPTR) {} +    TestSettersArg() : obj(nullptr) {}      template<typename T>      TestSettersArg(T* object) : obj(object) {          // we can also call static methods using object->foo() so this works for all four cases diff --git a/autotests/kconfigloadertest.cpp b/autotests/kconfigloadertest.cpp index d52f5cbf..ef3ac30e 100644 --- a/autotests/kconfigloadertest.cpp +++ b/autotests/kconfigloadertest.cpp @@ -30,11 +30,11 @@ Q_DECLARE_METATYPE(QList<int>)  #define GET_CONFIG_ITEM_VALUE(type, configName) \      KConfigSkeletonItem* item = cl->findItem(TEST_NAME, configName); \      /* Check if we got back a valid item. */ \ -    QVERIFY(item != Q_NULLPTR); \ +    QVERIFY(item != nullptr); \      /* Cast the item to the given type. */ \      type typeItem = dynamic_cast<type>(item); \      /* Make sure the cast was successful. */ \ -    QVERIFY(typeItem != Q_NULLPTR); +    QVERIFY(typeItem != nullptr);  void ConfigLoaderTest::init()  { diff --git a/src/core/bufferfragment_p.h b/src/core/bufferfragment_p.h index a86e2922..bbc09a2b 100644 --- a/src/core/bufferfragment_p.h +++ b/src/core/bufferfragment_p.h @@ -40,7 +40,7 @@ class KConfigIniBackend::BufferFragment  public: -    BufferFragment() : d(Q_NULLPTR), len(0) +    BufferFragment() : d(nullptr), len(0)      {      } diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index e0e73b8b..acc7a761 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -68,7 +68,7 @@ static const Qt::CaseSensitivity sPathCaseSensitivity = Qt::CaseInsensitive;  KConfigPrivate::KConfigPrivate(KConfig::OpenFlags flags,                                 QStandardPaths::StandardLocation resourceType) -    : openFlags(flags), resourceType(resourceType), mBackend(Q_NULLPTR), +    : openFlags(flags), resourceType(resourceType), mBackend(nullptr),        bDynamicBackend(true),  bDirty(false), bReadDefaults(false),        bFileImmutable(false), bForceGlobal(false), bSuppressGlobal(false),        configState(KConfigBase::NoAccess) diff --git a/src/core/kconfig.h b/src/core/kconfig.h index 6cc73235..ab148b3e 100644 --- a/src/core/kconfig.h +++ b/src/core/kconfig.h @@ -216,7 +216,7 @@ public:       *       * @return @p config if it was set, otherwise a new KConfig object       */ -    KConfig *copyTo(const QString &file, KConfig *config = Q_NULLPTR) const; +    KConfig *copyTo(const QString &file, KConfig *config = nullptr) const;      /**       * Ensures that the configuration file contains a certain update. diff --git a/src/core/kconfigbackend.cpp b/src/core/kconfigbackend.cpp index 9befdf36..32b43194 100644 --- a/src/core/kconfigbackend.cpp +++ b/src/core/kconfigbackend.cpp @@ -55,7 +55,7 @@ void KConfigBackend::registerMappings(const KEntryMap & /*entryMap*/)  BackendPtr KConfigBackend::create(const QString &file, const QString &sys)  {      //qDebug() << "creating a backend for file" << file << "with system" << sys; -    KConfigBackend *backend = Q_NULLPTR; +    KConfigBackend *backend = nullptr;  #if 0 // TODO port to Qt5 plugin loading      const QString system = (sys.isEmpty() ? KConfigBackendPrivate::whatSystem(file) : sys); @@ -65,7 +65,7 @@ BackendPtr KConfigBackend::create(const QString &file, const QString &sys)          //qDebug() << "found" << offers.count() << "offers for KConfigBackend plugins with name" << system;          foreach (const KService::Ptr &offer, offers) { -            backend = offer->createInstance<KConfigBackend>(Q_NULLPTR); +            backend = offer->createInstance<KConfigBackend>(nullptr);              if (backend) {                  //qDebug() << "successfully created a backend for" << system;                  backend->setFilePath(file); diff --git a/src/core/kconfigdata.h b/src/core/kconfigdata.h index 4dd2fa77..5839dfd4 100644 --- a/src/core/kconfigdata.h +++ b/src/core/kconfigdata.h @@ -203,7 +203,7 @@ public:      QString getEntry(const QByteArray &group, const QByteArray &key,                       const QString &defaultValue = QString(),                       SearchFlags flags = SearchFlags(), -                     bool *expand = Q_NULLPTR) const; +                     bool *expand = nullptr) const;      bool hasEntry(const QByteArray &group, const QByteArray &key = QByteArray(),                    SearchFlags flags = SearchFlags()) const; diff --git a/src/core/kconfiggroup.cpp b/src/core/kconfiggroup.cpp index 8cee2474..2959692e 100644 --- a/src/core/kconfiggroup.cpp +++ b/src/core/kconfiggroup.cpp @@ -1243,7 +1243,7 @@ bool KConfigGroup::isGroupImmutableImpl(const QByteArray &b) const  void KConfigGroup::copyTo(KConfigBase *other, WriteConfigFlags pFlags) const  {      Q_ASSERT_X(isValid(), "KConfigGroup::copyTo", "accessing an invalid group"); -    Q_ASSERT(other != Q_NULLPTR); +    Q_ASSERT(other != nullptr);      if (KConfigGroup *otherGroup = dynamic_cast<KConfigGroup *>(other)) {          config()->d_func()->copyGroup(d->fullName(), otherGroup->d->fullName(), otherGroup, pFlags); @@ -1260,7 +1260,7 @@ void KConfigGroup::reparent(KConfigBase *parent, WriteConfigFlags pFlags)      Q_ASSERT_X(isValid(), "KConfigGroup::reparent", "accessing an invalid group");      Q_ASSERT_X(!d->bConst, "KConfigGroup::reparent", "reparenting a read-only group");      Q_ASSERT_X(!d->bImmutable, "KConfigGroup::reparent", "reparenting an immutable group"); -    Q_ASSERT(parent != Q_NULLPTR); +    Q_ASSERT(parent != nullptr);      KConfigGroup oldGroup(*this); diff --git a/src/core/kconfiggroup.h b/src/core/kconfiggroup.h index 57dd5ad9..ed350566 100644 --- a/src/core/kconfiggroup.h +++ b/src/core/kconfiggroup.h @@ -280,9 +280,9 @@ public:      QString readEntry(const char *key, const QString &aDefault) const;      /** Overload for readEntry(const QString&, const QString&) */ -    QString readEntry(const QString &key, const char *aDefault = Q_NULLPTR) const; +    QString readEntry(const QString &key, const char *aDefault = nullptr) const;      /** Overload for readEntry(const QString&, const QString&) */ -    QString readEntry(const char *key, const char *aDefault = Q_NULLPTR) const; +    QString readEntry(const char *key, const char *aDefault = nullptr) const;      /**       * @copydoc readEntry(const char*, const QStringList&) const diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index d4262778..6ae6345a 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -61,7 +61,7 @@ QString KConfigIniBackend::warningProlog(const QFile &file, int line)  }  KConfigIniBackend::KConfigIniBackend() -    : KConfigBackend(), lockFile(Q_NULLPTR) +    : KConfigBackend(), lockFile(nullptr)  {  } @@ -640,7 +640,7 @@ void KConfigIniBackend::unlock()  {      lockFile->unlock();      delete lockFile; -    lockFile = Q_NULLPTR; +    lockFile = nullptr;  }  bool KConfigIniBackend::isLocked() const diff --git a/src/core/kcoreconfigskeleton.h b/src/core/kcoreconfigskeleton.h index ea17c7cc..b428708e 100644 --- a/src/core/kcoreconfigskeleton.h +++ b/src/core/kcoreconfigskeleton.h @@ -1006,7 +1006,7 @@ public:       *                   config file as returned by KSharedConfig::openConfig() is used       * @param parent the parent object (see QObject documentation)       */ -    explicit KCoreConfigSkeleton(const QString &configname = QString(), QObject *parent = Q_NULLPTR); +    explicit KCoreConfigSkeleton(const QString &configname = QString(), QObject *parent = nullptr);      /**       * Constructor. @@ -1014,7 +1014,7 @@ public:       * @param config configuration object to use       * @param parent the parent object (see QObject documentation)       */ -    explicit KCoreConfigSkeleton(KSharedConfig::Ptr config, QObject *parent = Q_NULLPTR); +    explicit KCoreConfigSkeleton(KSharedConfig::Ptr config, QObject *parent = nullptr);      /**       * Destructor diff --git a/src/core/kemailsettings.cpp b/src/core/kemailsettings.cpp index 527ef16c..64a060c5 100644 --- a/src/core/kemailsettings.cpp +++ b/src/core/kemailsettings.cpp @@ -32,7 +32,7 @@  class KEMailSettingsPrivate  {  public: -    KEMailSettingsPrivate() : m_pConfig(Q_NULLPTR) {} +    KEMailSettingsPrivate() : m_pConfig(nullptr) {}      ~KEMailSettingsPrivate()      {          delete m_pConfig; diff --git a/src/core/ksharedconfig.cpp b/src/core/ksharedconfig.cpp index c2997e9d..8c9cad8d 100644 --- a/src/core/ksharedconfig.cpp +++ b/src/core/ksharedconfig.cpp @@ -87,7 +87,7 @@ KSharedConfigPtr KSharedConfig::openConfig(const QString &_fileName,      if (!list->wasTestModeEnabled && QStandardPaths::isTestModeEnabled()) {          list->wasTestModeEnabled = true;          list->clear(); -        list->mainConfig = Q_NULLPTR; +        list->mainConfig = nullptr;      }      foreach (auto cfg, *static_cast<const GlobalSharedConfigList*>(list)) { diff --git a/src/gui/kconfiggui.cpp b/src/gui/kconfiggui.cpp index 67b6009a..6948b968 100644 --- a/src/gui/kconfiggui.cpp +++ b/src/gui/kconfiggui.cpp @@ -32,7 +32,7 @@ static QString configName(const QString &id, const QString &key)             QLatin1Char('_')          + key);  } -static KConfig *s_sessionConfig = Q_NULLPTR; +static KConfig *s_sessionConfig = nullptr;  KConfig *KConfigGui::sessionConfig()  { @@ -54,7 +54,7 @@ void KConfigGui::setSessionConfig(const QString &id, const QString &key)  {      if (hasSessionConfig()) {          delete s_sessionConfig; -        s_sessionConfig = Q_NULLPTR; +        s_sessionConfig = nullptr;      }      // create a new instance specific config object from supplied id & key @@ -64,7 +64,7 @@ void KConfigGui::setSessionConfig(const QString &id, const QString &key)  bool KConfigGui::hasSessionConfig()  { -    return s_sessionConfig != Q_NULLPTR; +    return s_sessionConfig != nullptr;  }  #ifndef KDE_NO_DEPRECATED diff --git a/src/gui/kconfigloader.cpp b/src/gui/kconfigloader.cpp index 3121c3b7..e73b161b 100644 --- a/src/gui/kconfigloader.cpp +++ b/src/gui/kconfigloader.cpp @@ -196,7 +196,7 @@ void ConfigLoaderHandler::addItem()      m_name.remove(QLatin1Char(' ')); -    KConfigSkeletonItem *item = Q_NULLPTR; +    KConfigSkeletonItem *item = nullptr;      if (m_type == QStringLiteral("bool")) {          bool defaultValue = m_default.toLower() == QStringLiteral("true"); diff --git a/src/gui/kconfigloader.h b/src/gui/kconfigloader.h index 341bdc4f..ffbd8e9b 100644 --- a/src/gui/kconfigloader.h +++ b/src/gui/kconfigloader.h @@ -109,7 +109,7 @@ public:       * @param xml the xml data; must be valid KConfigXT data       * @param parent optional QObject parent       **/ -    KConfigLoader(const QString &configFile, QIODevice *xml, QObject *parent = Q_NULLPTR); +    KConfigLoader(const QString &configFile, QIODevice *xml, QObject *parent = nullptr);      /**       * Creates a KConfigSkeleton populated using the definition found in @@ -119,7 +119,7 @@ public:       * @param xml the xml data; must be valid KConfigXT data       * @param parent optional QObject parent       **/ -    KConfigLoader(KSharedConfigPtr config, QIODevice *xml, QObject *parent = Q_NULLPTR); +    KConfigLoader(KSharedConfigPtr config, QIODevice *xml, QObject *parent = nullptr);      /**       * Creates a KConfigSkeleton populated using the definition found in @@ -129,7 +129,7 @@ public:       * @param xml the xml data; must be valid KConfigXT data       * @param parent optional QObject parent       **/ -    KConfigLoader(const KConfigGroup &config, QIODevice *xml, QObject *parent = Q_NULLPTR); +    KConfigLoader(const KConfigGroup &config, QIODevice *xml, QObject *parent = nullptr);      ~KConfigLoader(); diff --git a/src/gui/kconfigskeleton.h b/src/gui/kconfigskeleton.h index 6990a870..054f51f9 100644 --- a/src/gui/kconfigskeleton.h +++ b/src/gui/kconfigskeleton.h @@ -95,14 +95,14 @@ public:       * @param configname name of config file. If no name is given, the default       * config file as returned by KSharedConfig::openConfig() is used.       */ -    explicit KConfigSkeleton(const QString &configname = QString(), QObject *parent = Q_NULLPTR); +    explicit KConfigSkeleton(const QString &configname = QString(), QObject *parent = nullptr);      /**       * Constructor.       *       * @param config configuration object to use.       */ -    explicit KConfigSkeleton(KSharedConfig::Ptr config, QObject *parent = Q_NULLPTR); +    explicit KConfigSkeleton(KSharedConfig::Ptr config, QObject *parent = nullptr);      /**       * Register an item of type QColor. diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp index 2acd720d..ab7d9469 100644 --- a/src/kconf_update/kconf_update.cpp +++ b/src/kconf_update/kconf_update.cpp @@ -105,9 +105,9 @@ protected:  };  KonfUpdate::KonfUpdate(QCommandLineParser *parser) -    : m_oldConfig1(Q_NULLPTR), m_oldConfig2(Q_NULLPTR), m_newConfig(Q_NULLPTR), -      m_bCopy(false), m_bOverwrite(false), m_textStream(Q_NULLPTR), -      m_file(Q_NULLPTR), m_lineCount(-1) +    : m_oldConfig1(nullptr), m_oldConfig2(nullptr), m_newConfig(nullptr), +      m_bCopy(false), m_bOverwrite(false), m_textStream(nullptr), +      m_file(nullptr), m_lineCount(-1)  {      bool updateAll = false; @@ -435,7 +435,7 @@ void KonfUpdate::gotFile(const QString &_file)      if (!m_oldFile.isEmpty()) {          // Close old file.          delete m_oldConfig1; -        m_oldConfig1 = Q_NULLPTR; +        m_oldConfig1 = nullptr;          KConfigGroup cg(m_oldConfig2, "$Version");          QStringList ids = cg.readEntry("update_info", QStringList()); @@ -446,7 +446,7 @@ void KonfUpdate::gotFile(const QString &_file)          }          cg.sync();          delete m_oldConfig2; -        m_oldConfig2 = Q_NULLPTR; +        m_oldConfig2 = nullptr;          QString file = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + m_oldFile;          QFileInfo info(file); @@ -468,11 +468,11 @@ void KonfUpdate::gotFile(const QString &_file)          }          m_newConfig->sync();          delete m_newConfig; -        m_newConfig = Q_NULLPTR; +        m_newConfig = nullptr;          m_newFile.clear();      } -    m_newConfig = Q_NULLPTR; +    m_newConfig = nullptr;      int i = _file.indexOf(',');      if (i == -1) { @@ -519,7 +519,7 @@ void KonfUpdate::gotFile(const QString &_file)      m_skipFile = false;      if (!m_oldFile.isEmpty()) { // if File= is specified, it doesn't exist, is empty or contains only kconf_update's [$Version] group, skip -        if (m_oldConfig1 != Q_NULLPTR +        if (m_oldConfig1 != nullptr                  && (m_oldConfig1->groupList().isEmpty()                      || (m_oldConfig1->groupList().count() == 1 && m_oldConfig1->groupList().at(0) == QLatin1String("$Version")))) {              log() << m_currentFilename << ": File '" << m_oldFile << "' does not exist or empty, skipping" << endl; | 
