]> jfr.im git - irc/kvirc/KVIrc.git/commitdiff
Convert 0s and NULLs to nullptr
authorIceN9ne <redacted>
Tue, 4 Dec 2018 01:26:31 +0000 (20:26 -0500)
committerIceN9ne <redacted>
Tue, 4 Dec 2018 01:26:31 +0000 (20:26 -0500)
102 files changed:
src/kvilib/core/KviCString.cpp
src/kvilib/core/KviCString.h
src/kvilib/core/KviMemory.cpp
src/kvilib/core/KviPointerHashTable.h
src/kvilib/core/KviPointerList.h
src/kvilib/core/KviShortcut.h
src/kvilib/ext/KviDataBuffer.h
src/kvilib/ext/KviOggTheoraDecoder.cpp
src/kvilib/ext/KviOggTheoraEncoder.cpp
src/kvilib/ext/KviRuntimeInfo.cpp
src/kvilib/net/KviDnsResolver.cpp
src/kvilib/net/KviHttpRequest.cpp
src/kvilib/net/KviNetworkAccessManager.h
src/kvilib/system/KviEnvironment.h
src/kvilib/system/KviSignalHandler.h
src/kvilib/system/KviThread.h
src/kvilib/tal/KviTalFileDialog.h
src/kvilib/tal/KviTalGroupBox.h
src/kvilib/tal/KviTalHBox.h
src/kvilib/tal/KviTalIconAndRichTextItemDelegate.h
src/kvilib/tal/KviTalTabDialog.h
src/kvilib/tal/KviTalVBox.h
src/kvirc/kernel/KviApplication_setup.cpp
src/kvirc/kernel/KviIrcConnection.h
src/kvirc/kernel/KviIrcSocket.cpp
src/kvirc/kernel/KviSSLMaster.h
src/kvirc/kvs/KviKvsAction.h
src/kvirc/kvs/KviKvsAsyncDnsOperation.h
src/kvirc/kvs/KviKvsCallbackObject.h
src/kvirc/kvs/KviKvsCoreSimpleCommands_mr.cpp
src/kvirc/kvs/KviKvsDnsManager.h
src/kvirc/kvs/KviKvsModuleInterface.h
src/kvirc/kvs/KviKvsParameterProcessor.h
src/kvirc/kvs/KviKvsProcessManager.cpp
src/kvirc/kvs/KviKvsRunTimeContext.h
src/kvirc/kvs/KviKvsScript.h
src/kvirc/kvs/object/KviKvsObject.h
src/kvirc/kvs/parser/KviKvsParser.cpp
src/kvirc/kvs/parser/KviKvsParser.h
src/kvirc/kvs/parser/KviKvsParser_command.cpp
src/kvirc/kvs/parser/KviKvsParser_lside.cpp
src/kvirc/kvs/parser/KviKvsParser_specialCommands.cpp
src/kvirc/module/KviModuleExtension.h
src/kvirc/module/KviModuleManager.cpp
src/kvirc/sparser/KviIrcNumericCodes.h
src/kvirc/ui/KviConsoleWindow.h
src/kvirc/ui/KviDynamicToolTip.h
src/kvirc/ui/KviFileDialog.h
src/kvirc/ui/KviInput.h
src/kvirc/ui/KviIrcToolBar.h
src/kvirc/ui/KviIrcView.h
src/kvirc/ui/KviMainWindow.h
src/kvirc/ui/KviMaskEditor.h
src/kvirc/ui/KviOptionsWidget.h
src/kvirc/ui/KviSelectors.h
src/kvirc/ui/KviTopicWidget.h
src/kvirc/ui/KviTreeWindowList.h
src/kvirc/ui/KviUserListView.h
src/kvirc/ui/KviWebPackageManagementDialog.h
src/kvirc/ui/KviWindow.h
src/kvirc/ui/KviWindowListBase.h
src/modules/addon/AddonFunctions.h
src/modules/context/libkvicontext.cpp
src/modules/dcc/DccCanvasWindow.cpp
src/modules/dcc/DccVideoWindow.cpp
src/modules/dcc/DccVoiceCodec.cpp
src/modules/dcc/DccVoiceGsmCodec.cpp
src/modules/dcc/DccVoiceWindow.h
src/modules/dcc/DccWindow.h
src/modules/dcc/canvaswidget.cpp
src/modules/editor/ScriptEditorImplementation.h
src/modules/file/libkvifile.cpp
src/modules/filetransferwindow/FileTransferWindow.cpp
src/modules/filetransferwindow/FileTransferWindow.h
src/modules/ident/libkviident.h
src/modules/list/ListWindow.h
src/modules/mediaplayer/MpAmipInterface.cpp
src/modules/mediaplayer/MpInterface.h
src/modules/mediaplayer/MpWinampInterface.cpp
src/modules/mediaplayer/winamp.cpp
src/modules/my/libkvimy.cpp
src/modules/objects/KvsObject_painter.cpp
src/modules/objects/KvsObject_pixmap.h
src/modules/objects/KvsObject_tableWidget.h
src/modules/objects/object_macros.h
src/modules/options/OptionsInstanceManager.cpp
src/modules/options/OptionsWidget_message.h
src/modules/options/mkcreateinstanceproc.sh
src/modules/popupeditor/PopupEditorWindow.h
src/modules/reguser/RegisteredUsersDialog.h
src/modules/reguser/RegistrationWizard.h
src/modules/rijndael/Rijndael.h
src/modules/setup/SetupWizard.cpp
src/modules/sharedfileswindow/SharedFilesWindow.h
src/modules/snd/libkvisnd.cpp
src/modules/term/TermWidget.cpp
src/modules/term/TermWindow.cpp
src/modules/theme/ThemeFunctions.h
src/modules/theme/WebThemeInterfaceDialog.h
src/modules/torrent/TorrentInterface.h
src/modules/url/libkviurl.h
src/modules/window/UserWindow.h

index f7e3f301410a4debaec54948fe891ea91dd8fd97..b4c8b4f0750f84e86a6ead33cf8fd84b86dc5b89 100644 (file)
@@ -360,7 +360,7 @@ bool kvi_matchWildExpr(const char * m1, const char * m2)
 bool kvi_matchWildExprCS(const char *m1,const char *m2)
 {
        if(!(m1 && m2 && (*m1)))return false;
-       const char * savePos1 = 0;
+       const char * savePos1 = nullptr;
        const char * savePos2 = m2;
        while(*m1){ //loop managed by m1 (initially first mask)
                if(*m1=='*'){
index 1a9d3ac742f3ba1b25c78e7d18dac315ce5e0ce4..43fb25b2f2f8c54ac7b30e689f6412f0e7be2740 100644 (file)
@@ -243,7 +243,7 @@ public:
 
        // Assignment
        KviCString & operator=(const KviCString & str); // deep copy
-       KviCString & operator=(const char * str);       // str can be NULL here
+       KviCString & operator=(const char * str);       // str can be nullptr here
        KviCString & operator=(char c);                 // 2 bytes allocated,m_len = 1
        KviCString & operator=(const QString & str);
        KviCString & operator=(const QByteArray & str);
@@ -366,7 +366,7 @@ public:
        // if sep is not 0, it is inserted between the strings
        // if bLastSep is true and sep is non 0, then sep is also appended at the end
        // of the buffer (after the last string)
-       void joinFromArray(KviCString ** strings, const char * sep = 0, bool bLastSep = false);
+       void joinFromArray(KviCString ** strings, const char * sep = nullptr, bool bLastSep = false);
 
        // Utils
        // encodes chars that have nonzero in the jumptable
@@ -410,16 +410,16 @@ public:
 
        // Numbers
        // everything in base 10.... no overflow checks here
-       long toLong(bool * bOk = 0) const;
-       unsigned long toULong(bool * bOk = 0) const;
-       long long toLongLong(bool * bOk = 0) const;
-       unsigned long long toULongLong(bool * bOk = 0) const;
-       char toChar(bool * bOk = 0) const { return (char)toLong(bOk); };
-       unsigned char toUChar(bool * bOk = 0) const { return (unsigned char)toULong(bOk); };
-       int toInt(bool * bOk = 0) const { return (int)toLong(bOk); };
-       unsigned int toUInt(bool * bOk = 0) const { return (unsigned int)toULong(bOk); };
-       short toShort(bool * bOk = 0) const { return (short)toLong(bOk); };
-       unsigned short toUShort(bool * bOk = 0) const { return (unsigned short)toLong(bOk); };
+       long toLong(bool * bOk = nullptr) const;
+       unsigned long toULong(bool * bOk = nullptr) const;
+       long long toLongLong(bool * bOk = nullptr) const;
+       unsigned long long toULongLong(bool * bOk = nullptr) const;
+       char toChar(bool * bOk = nullptr) const { return (char)toLong(bOk); };
+       unsigned char toUChar(bool * bOk = nullptr) const { return (unsigned char)toULong(bOk); };
+       int toInt(bool * bOk = nullptr) const { return (int)toLong(bOk); };
+       unsigned int toUInt(bool * bOk = nullptr) const { return (unsigned int)toULong(bOk); };
+       short toShort(bool * bOk = nullptr) const { return (short)toLong(bOk); };
+       unsigned short toUShort(bool * bOk = nullptr) const { return (unsigned short)toLong(bOk); };
 
        KviCString & setNum(long num);
        KviCString & setNum(unsigned long num);
@@ -439,8 +439,8 @@ public:
        bool isUnsignedNum() const;
 
        // special functions for multiple bases
-       long toLongExt(bool * bOk = 0, int base = 0);
-       // unsigned long toULongExt(bool *bOk = 0,int base = 0); //never used
+       long toLongExt(bool * bOk = nullptr, int base = 0);
+       // unsigned long toULongExt(bool *bOk = nullptr,int base = 0); //never used
 
        // returns an empty string...
        // this if often useful!
@@ -450,7 +450,7 @@ public:
 
        // Transform a pointer to a string with all 0 and 1
        // void pointerToBitString(const void * ptr);
-       // Get a pointer from a string all of 0 and 1 : return 0 if invalid
+       // Get a pointer from a string all of 0 and 1 : return nullptr if invalid
        // void * bitStringToPointer();
 
        // "External string" helper functions
index e95eef8bbb5edc4a763620e2254159a12575325b..6d3a2f2b2abe590b7aecfa297010236d4ed749f5 100644 (file)
@@ -58,14 +58,14 @@ namespace KviMemory
        };
 
        int g_iMaxRequestSize = 0;
-       void * g_pMaxRequestReturnAddress1 = 0;
-       void * g_pMaxRequestReturnAddress2 = 0;
+       void * g_pMaxRequestReturnAddress1 = nullptr;
+       void * g_pMaxRequestReturnAddress2 = nullptr;
        unsigned int g_iMallocCalls = 0;
        unsigned int g_iReallocCalls = 0;
        unsigned int g_iFreeCalls = 0;
        unsigned int g_iTotalMemAllocated = 0;
        unsigned int g_uAllocationPeak = 0;
-       KviMallocEntry * g_pEntries = 0;
+       KviMallocEntry * g_pEntries = nullptr;
 
        void * allocate(int size)
        {
@@ -85,7 +85,7 @@ namespace KviMemory
                e->return_addr1 = __builtin_return_address(1);
                e->return_addr2 = __builtin_return_address(2);
                e->next = g_pEntries;
-               e->prev = 0;
+               e->prev = nullptr;
                if(g_pEntries)
                        g_pEntries->prev = e;
                g_pEntries = e;
@@ -151,7 +151,7 @@ namespace KviMemory
                                        if(e != g_pEntries)
                                                fprintf(stderr, "Mem profiling internal error!\n");
                                        if(e->next)
-                                               e->next->prev = 0;
+                                               e->next->prev = nullptr;
                                        g_pEntries = e->next;
                                }
                                free(e);
index 844aa57f8455107ac8323f88ded21884a5f50e7c..fa55be62fdfd5ab15b045d22a6d157b95615287a 100644 (file)
@@ -137,7 +137,7 @@ inline void kvi_hash_key_destroy(const char *& szKey, bool bDeepCopy)
 */
 inline const char *& kvi_hash_key_default(const char **)
 {
-       static const char * static_null = NULL;
+       static const char * static_null = nullptr;
        return static_null;
 }
 
@@ -322,7 +322,7 @@ inline void kvi_hash_key_destroy(void *, bool)
 */
 inline void *& kvi_hash_key_default(void *)
 {
-       static void * static_default = NULL;
+       static void * static_default = nullptr;
        return static_default;
 }
 
@@ -463,7 +463,7 @@ public:
        /**
        * \brief Returns the item associated to the key
        *
-       * Returns NULL if no such item exists in the hash table.
+       * Returns nullptr if no such item exists in the hash table.
        * Places the hash table iterator at the position of the item found.
        * \param hKey The key to find
        * \return T *
@@ -472,19 +472,19 @@ public:
        {
                m_uIteratorIdx = kvi_hash_hash(hKey, m_bCaseSensitive) % m_uSize;
                if(!m_pDataArray[m_uIteratorIdx])
-                       return 0;
+                       return nullptr;
                for(KviPointerHashTableEntry<Key, T> * e = m_pDataArray[m_uIteratorIdx]->first(); e; e = m_pDataArray[m_uIteratorIdx]->next())
                {
                        if(kvi_hash_key_equal(e->hKey, hKey, m_bCaseSensitive))
                                return (T *)e->pData;
                }
-               return 0;
+               return nullptr;
        }
 
        /**
        * \brief Returns the item associated to the key hKey
        *
-       * Returns NULL if no such item exists in the hash table.
+       * Returns nullptr if no such item exists in the hash table.
        * Places the hash table iterator at the position of the item found.
        * This is an alias to find().
        * \param hKey The key to find
@@ -594,7 +594,7 @@ public:
                                if(m_pDataArray[uEntry]->isEmpty())
                                {
                                        delete m_pDataArray[uEntry];
-                                       m_pDataArray[uEntry] = 0;
+                                       m_pDataArray[uEntry] = nullptr;
                                }
                                m_uCount--;
                                return true;
@@ -629,7 +629,7 @@ public:
                                                if(m_pDataArray[i]->isEmpty())
                                                {
                                                        delete m_pDataArray[i];
-                                                       m_pDataArray[i] = 0;
+                                                       m_pDataArray[i] = nullptr;
                                                }
                                                m_uCount--;
                                                return true;
@@ -670,7 +670,7 @@ public:
                        if(m_pDataArray[i])
                        {
                                delete m_pDataArray[i];
-                               m_pDataArray[i] = 0;
+                               m_pDataArray[i] = nullptr;
                        }
                }
                m_uCount = 0;
@@ -679,7 +679,7 @@ public:
        /**
        * \brief Searches for the item pointer pRef
        *
-       * Returns its hash table entry, if found, and NULL otherwise.
+       * Returns its hash table entry, if found, and nullptr otherwise.
        * The hash table iterator is placed at the item found.
        * \param pRef The pointer to search
        * \return KviPointerHashTableEntry<Key,T> *
@@ -697,7 +697,7 @@ public:
                                }
                        }
                }
-               return 0;
+               return nullptr;
        }
 
        /**
@@ -710,10 +710,10 @@ public:
        KviPointerHashTableEntry<Key, T> * currentEntry()
        {
                if(m_uIteratorIdx >= m_uSize)
-                       return 0;
+                       return nullptr;
                if(m_pDataArray[m_uIteratorIdx])
                        return m_pDataArray[m_uIteratorIdx]->current();
-               return 0;
+               return nullptr;
        }
 
        /**
@@ -728,7 +728,7 @@ public:
                        m_uIteratorIdx++;
                }
                if(m_uIteratorIdx == m_uSize)
-                       return 0;
+                       return nullptr;
                return m_pDataArray[m_uIteratorIdx]->first();
        }
 
@@ -742,7 +742,7 @@ public:
        KviPointerHashTableEntry<Key, T> * nextEntry()
        {
                if(m_uIteratorIdx >= m_uSize)
-                       return 0;
+                       return nullptr;
 
                if(m_uIteratorIdx < m_uSize)
                {
@@ -759,7 +759,7 @@ public:
                }
 
                if(m_uIteratorIdx == m_uSize)
-                       return 0;
+                       return nullptr;
 
                return m_pDataArray[m_uIteratorIdx]->first();
        }
@@ -774,15 +774,15 @@ public:
        T * current()
        {
                if(m_uIteratorIdx >= m_uSize)
-                       return 0;
+                       return nullptr;
                if(m_pDataArray[m_uIteratorIdx])
                {
                        KviPointerHashTableEntry<Key, T> * e = m_pDataArray[m_uIteratorIdx]->current();
                        if(!e)
-                               return 0;
+                               return nullptr;
                        return e->data();
                }
-               return 0;
+               return nullptr;
        }
 
        /**
@@ -795,15 +795,15 @@ public:
        const Key & currentKey()
        {
                if(m_uIteratorIdx >= m_uSize)
-                       return kvi_hash_key_default(((Key *)NULL));
+                       return kvi_hash_key_default(((Key *)nullptr));
                if(m_pDataArray[m_uIteratorIdx])
                {
                        KviPointerHashTableEntry<Key, T> * e = m_pDataArray[m_uIteratorIdx]->current();
                        if(!e)
-                               return kvi_hash_key_default(((Key *)NULL));
+                               return kvi_hash_key_default(((Key *)nullptr));
                        return e->key();
                }
-               return kvi_hash_key_default(((Key *)NULL));
+               return kvi_hash_key_default(((Key *)nullptr));
        }
 
        /** \brief Places the hash table iterator at the first entry
@@ -819,10 +819,10 @@ public:
                        m_uIteratorIdx++;
                }
                if(m_uIteratorIdx == m_uSize)
-                       return 0;
+                       return nullptr;
                KviPointerHashTableEntry<Key, T> * e = m_pDataArray[m_uIteratorIdx]->first();
                if(!e)
-                       return 0;
+                       return nullptr;
                return e->data();
        }
 
@@ -836,7 +836,7 @@ public:
        T * next()
        {
                if(m_uIteratorIdx >= m_uSize)
-                       return 0;
+                       return nullptr;
 
                if(m_uIteratorIdx < m_uSize)
                {
@@ -855,11 +855,11 @@ public:
                }
 
                if(m_uIteratorIdx == m_uSize)
-                       return 0;
+                       return nullptr;
 
                KviPointerHashTableEntry<Key, T> * e = m_pDataArray[m_uIteratorIdx]->first();
                if(!e)
-                       return 0;
+                       return nullptr;
                return e->data();
        }
 
@@ -923,7 +923,7 @@ public:
                m_uSize = uSize > 0 ? uSize : 32;
                m_pDataArray = new KviPointerList<KviPointerHashTableEntry<Key, T>> *[m_uSize];
                for(unsigned int i = 0; i < m_uSize; i++)
-                       m_pDataArray[i] = NULL;
+                       m_pDataArray[i] = nullptr;
        }
 
        /**
@@ -942,7 +942,7 @@ public:
                m_uSize = t.m_uSize;
                m_pDataArray = new KviPointerList<KviPointerHashTableEntry<Key, T>> *[m_uSize];
                for(unsigned int i = 0; i < m_uSize; i++)
-                       m_pDataArray[i] = NULL;
+                       m_pDataArray[i] = nullptr;
                copyFrom(t);
        }
 
@@ -985,7 +985,7 @@ public:
                if(src.m_pIterator)
                        m_pIterator = new KviPointerListIterator<KviPointerHashTableEntry<Key, T>>(*(src.m_pIterator));
                else
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
        }
 
        /**
@@ -999,7 +999,7 @@ public:
                if(m_pIterator)
                {
                        delete m_pIterator;
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
                }
 
                m_uEntryIndex = 0;
@@ -1016,7 +1016,7 @@ public:
                if(!bRet)
                {
                        delete m_pIterator;
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
                }
                return bRet;
        }
@@ -1032,7 +1032,7 @@ public:
                if(m_pIterator)
                {
                        delete m_pIterator;
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
                }
 
                m_uEntryIndex = m_pHashTable->m_uSize;
@@ -1046,7 +1046,7 @@ public:
                                if(!bRet)
                                {
                                        delete m_pIterator;
-                                       m_pIterator = NULL;
+                                       m_pIterator = nullptr;
                                }
                                return bRet;
                        }
@@ -1070,7 +1070,7 @@ public:
                if(m_pIterator)
                {
                        delete m_pIterator;
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
                }
                m_uEntryIndex++;
                while((m_uEntryIndex < m_pHashTable->m_uSize) && (!(m_pHashTable->m_pDataArray[m_uEntryIndex])))
@@ -1084,7 +1084,7 @@ public:
                if(!bRet)
                {
                        delete m_pIterator;
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
                }
                return bRet;
        }
@@ -1119,7 +1119,7 @@ public:
                if(m_pIterator)
                {
                        delete m_pIterator;
-                       m_pIterator = NULL;
+                       m_pIterator = nullptr;
                }
                if(m_uEntryIndex >= m_pHashTable->m_uSize)
                        return false;
@@ -1133,7 +1133,7 @@ public:
                                if(!bRet)
                                {
                                        delete m_pIterator;
-                                       m_pIterator = NULL;
+                                       m_pIterator = nullptr;
                                }
                                return bRet;
                        }
@@ -1164,7 +1164,7 @@ public:
        */
        T * current() const
        {
-               return m_pIterator ? m_pIterator->current()->data() : NULL;
+               return m_pIterator ? m_pIterator->current()->data() : nullptr;
        }
 
        /**
@@ -1176,7 +1176,7 @@ public:
        */
        T * operator*() const
        {
-               return m_pIterator ? m_pIterator->current()->data() : NULL;
+               return m_pIterator ? m_pIterator->current()->data() : nullptr;
        }
 
        /**
@@ -1189,19 +1189,19 @@ public:
        {
                if(m_pIterator)
                        return m_pIterator->current()->key();
-               return kvi_hash_key_default(((Key *)NULL));
+               return kvi_hash_key_default(((Key *)nullptr));
        }
 
        /**
        * \brief Moves the iterator to the first element of the hash table.
        *
-       * Returns the first item found or NULL if the hash table is empty.
+       * Returns the first item found or nullptr if the hash table is empty.
        * \return T *
        */
        T * toFirst()
        {
                if(!moveFirst())
-                       return NULL;
+                       return nullptr;
                return current();
        }
 
@@ -1215,7 +1215,7 @@ public:
        {
                m_pHashTable = &hTable;
                m_uEntryIndex = 0;
-               m_pIterator = NULL;
+               m_pIterator = nullptr;
                moveFirst();
        }
 
index 5eff4d07c5a56b56802c1f7beec4d2384cd7c295..0f8d12b7d3748fda09f7c3efb52a2f62c1f3ee1a 100644 (file)
@@ -45,7 +45,6 @@
 * been removed from Qt4 in favor of the value based non-autodeleting
 * lists... anyway: here we go :)
 *
-* \def NULL Define NULL type to 0
 * \def KviPointerListBase Defines KviPointerListBase as KviPointerList
 */
 
@@ -56,10 +55,6 @@ class KviPointerList;
 template <typename T>
 class KviPointerListIterator;
 
-#ifndef NULL
-#define NULL 0
-#endif
-
 /**
 * \class KviPointerListNode
 * \brief A KviPointerList node pointers.
@@ -213,7 +208,7 @@ public:
        bool moveFirst()
        {
                m_pNode = m_pList->m_pHead;
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 
        /**
@@ -225,7 +220,7 @@ public:
        bool moveLast()
        {
                m_pNode = m_pList->m_pTail;
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 
        /**
@@ -240,7 +235,7 @@ public:
                if(!m_pNode)
                        return false;
                m_pNode = m_pNode->m_pNext;
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 
        /**
@@ -256,7 +251,7 @@ public:
                if(!m_pNode)
                        return false;
                m_pNode = m_pNode->m_pNext;
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 
        /**
@@ -272,7 +267,7 @@ public:
                if(!m_pNode)
                        return false;
                m_pNode = m_pNode->m_pPrev;
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 
        /**
@@ -289,30 +284,30 @@ public:
                if(!m_pNode)
                        return false;
                m_pNode = m_pNode->m_pPrev;
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 
        /**
        * \brief Returns the value pointed by the iterator.
        *
-       * If the iterator is not valid, returns NULL.
+       * If the iterator is not valid, returns nullptr.
        * \return T *
        */
        T * current()
        {
-               return m_pNode ? (T *)(m_pNode->m_pData) : NULL;
+               return m_pNode ? (T *)(m_pNode->m_pData) : nullptr;
        }
 
        /**
        * \brief Returns the value pointed by the iterator.
        *
-       * If the iterator is not valid, returns NULL.
+       * If the iterator is not valid, returns nullptr.
        * This is just an alias to current().
        * \return T *
        */
        T * operator*()
        {
-               return m_pNode ? (T *)(m_pNode->m_pData) : NULL;
+               return m_pNode ? (T *)(m_pNode->m_pData) : nullptr;
        }
 
        /**
@@ -323,7 +318,7 @@ public:
        */
        bool isValid()
        {
-               return m_pNode != NULL;
+               return m_pNode != nullptr;
        }
 };
 
@@ -379,7 +374,7 @@ class KviPointerList
 protected:
        bool m_bAutoDelete; //< do we automatically delete items when they are removed ?
 
-       KviPointerListNode * m_pHead; //< our list head pointer (NULL if there are no items in the list)
+       KviPointerListNode * m_pHead; //< our list head pointer (nullptr if there are no items in the list)
        KviPointerListNode * m_pTail; //< our list tail
        KviPointerListNode * m_pAux;  //< our iteration pointer
 
@@ -428,12 +423,12 @@ protected:
                if(pNewHead->m_pNext)
                {
                        src->m_pHead = pNewHead->m_pNext;
-                       src->m_pHead->m_pPrev = NULL;
+                       src->m_pHead->m_pPrev = nullptr;
                }
                else
                {
-                       src->m_pHead = NULL;
-                       src->m_pTail = NULL;
+                       src->m_pHead = nullptr;
+                       src->m_pTail = nullptr;
                }
 
                if(m_pHead)
@@ -446,7 +441,7 @@ protected:
                {
                        m_pHead = pNewHead;
                        m_pTail = pNewHead;
-                       m_pHead->m_pNext = NULL;
+                       m_pHead->m_pNext = nullptr;
                }
                m_uCount++;
                src->m_uCount--;
@@ -468,7 +463,7 @@ protected:
                        m_pTail = m_pAux->m_pPrev;
                const T * pAuxData = (const T *)(m_pAux->m_pData);
                delete m_pAux;
-               m_pAux = NULL;
+               m_pAux = nullptr;
                m_uCount--;
                if(m_bAutoDelete)
                        delete pAuxData; // this can cause recursion, so do it at the end
@@ -521,13 +516,13 @@ public:
                        {
                                m_pHead = n;
                                m_pTail = n;
-                               n->m_pPrev = NULL;
+                               n->m_pPrev = nullptr;
                        }
                        m_pTail = src->m_pTail;
                }
 
-               src->m_pHead = NULL;
-               src->m_pTail = NULL;
+               src->m_pHead = nullptr;
+               src->m_pTail = nullptr;
                src->m_uCount = 0;
        }
 
@@ -615,7 +610,7 @@ public:
        */
        bool isEmpty() const
        {
-               return (m_pHead == NULL);
+               return (m_pHead == nullptr);
        }
 
        /**
@@ -638,8 +633,8 @@ public:
        {
                if(!m_pHead)
                {
-                       m_pAux = NULL;
-                       return NULL;
+                       m_pAux = nullptr;
+                       return nullptr;
                }
                m_pAux = m_pHead;
                return (T *)(m_pAux->m_pData);
@@ -655,21 +650,21 @@ public:
        T * takeFirst()
        {
                if(!m_pHead)
-                       return NULL;
+                       return nullptr;
                T * pData = (T *)m_pHead->m_pData;
                if(m_pHead->m_pNext)
                {
                        m_pHead = m_pHead->m_pNext;
                        delete m_pHead->m_pPrev;
-                       m_pHead->m_pPrev = NULL;
+                       m_pHead->m_pPrev = nullptr;
                }
                else
                {
                        delete m_pHead;
-                       m_pHead = NULL;
-                       m_pTail = NULL;
+                       m_pHead = nullptr;
+                       m_pTail = nullptr;
                }
-               m_pAux = NULL;
+               m_pAux = nullptr;
                m_uCount--;
                return pData;
        }
@@ -681,21 +676,21 @@ public:
        T * takeLast()
        {
                if(!m_pTail)
-                       return NULL;
+                       return nullptr;
                T * pData = (T *)m_pTail->m_pData;
                if(m_pTail->m_pPrev)
                {
                        m_pTail = m_pTail->m_pPrev;
                        delete m_pTail->m_pNext;
-                       m_pTail->m_pNext = NULL;
+                       m_pTail->m_pNext = nullptr;
                }
                else
                {
                        delete m_pTail;
-                       m_pHead = NULL;
-                       m_pTail = NULL;
+                       m_pHead = nullptr;
+                       m_pTail = nullptr;
                }
-               m_pAux = NULL;
+               m_pAux = nullptr;
                m_uCount--;
                return pData;
        }
@@ -720,8 +715,8 @@ public:
        {
                if(!m_pTail)
                {
-                       m_pAux = NULL;
-                       return NULL;
+                       m_pAux = nullptr;
+                       return nullptr;
                }
                m_pAux = m_pTail;
                return (T *)(m_pAux->m_pData);
@@ -753,13 +748,13 @@ public:
        *
        * A call to this function should be preceded by a call to
        * first(),last(),at() or findRef().
-       * This function will return a NULL pointer if the current item has
+       * This function will return a nullptr if the current item has
        * been invalidated due to a remove operation.
        * \return T *
        */
        T * safeCurrent()
        {
-               return m_pAux ? (T *)(m_pAux->m_pData) : NULL;
+               return m_pAux ? (T *)(m_pAux->m_pData) : nullptr;
        }
 
        /**
@@ -778,7 +773,7 @@ public:
        * \brief Returns the next item in the list
        *
        * Sets the iteration pointer to the next item in the list and
-       * returns that item (or 0 if the end of the list has been reached)
+       * returns that item (or nullptr if the end of the list has been reached)
        * A call to this function MUST be preceded by a _successfull_ call
        * to first(),last(),at() or findRef().
        * \return T *
@@ -786,11 +781,11 @@ public:
        T * next()
        {
                if(!m_pAux)
-                       return NULL;
+                       return nullptr;
                m_pAux = m_pAux->m_pNext;
                if(m_pAux)
                        return (T *)(m_pAux->m_pData);
-               return NULL;
+               return nullptr;
        }
 
        /**
@@ -806,11 +801,11 @@ public:
        T * prev()
        {
                if(!m_pAux)
-                       return NULL;
+                       return nullptr;
                m_pAux = m_pAux->m_pPrev;
                if(m_pAux)
                        return (T *)(m_pAux->m_pData);
-               return NULL;
+               return nullptr;
        }
 
        /**
@@ -832,7 +827,7 @@ public:
                        t = next();
                        cnt++;
                }
-               return 0;
+               return nullptr;
        }
 
        /**
@@ -851,7 +846,7 @@ public:
                        n = n->m_pNext;
                        cnt++;
                }
-               return KviPointerListIterator<T>(*this, NULL);
+               return KviPointerListIterator<T>(*this, nullptr);
        }
 
        /**
@@ -889,7 +884,7 @@ public:
                                return KviPointerListIterator<T>(*this, n);
                        n = n->m_pNext;
                }
-               return KviPointerListIterator<T>(*this, NULL);
+               return KviPointerListIterator<T>(*this, nullptr);
        }
 
        /**
@@ -902,8 +897,8 @@ public:
                if(!m_pHead)
                {
                        m_pHead = new KviPointerListNode;
-                       m_pHead->m_pPrev = NULL;
-                       m_pHead->m_pNext = NULL;
+                       m_pHead->m_pPrev = nullptr;
+                       m_pHead->m_pNext = nullptr;
                        m_pHead->m_pData = (void *)d;
                        m_pTail = m_pHead;
                }
@@ -911,7 +906,7 @@ public:
                {
                        m_pTail->m_pNext = new KviPointerListNode;
                        m_pTail->m_pNext->m_pPrev = m_pTail;
-                       m_pTail->m_pNext->m_pNext = NULL;
+                       m_pTail->m_pNext->m_pNext = nullptr;
                        m_pTail->m_pNext->m_pData = (void *)d;
                        m_pTail = m_pTail->m_pNext;
                }
@@ -950,8 +945,8 @@ public:
                if(!m_pHead)
                {
                        m_pHead = new KviPointerListNode;
-                       m_pHead->m_pPrev = NULL;
-                       m_pHead->m_pNext = NULL;
+                       m_pHead->m_pPrev = nullptr;
+                       m_pHead->m_pNext = nullptr;
                        m_pHead->m_pData = (void *)d;
                        m_pTail = m_pHead;
                }
@@ -959,7 +954,7 @@ public:
                {
                        m_pHead->m_pPrev = new KviPointerListNode;
                        m_pHead->m_pPrev->m_pNext = m_pHead;
-                       m_pHead->m_pPrev->m_pPrev = NULL;
+                       m_pHead->m_pPrev->m_pPrev = nullptr;
                        m_pHead->m_pPrev->m_pData = (void *)d;
                        m_pHead = m_pHead->m_pPrev;
                        m_uCount++;
@@ -1008,16 +1003,16 @@ public:
                        m_pHead = m_pHead->m_pNext;
                        pAuxData = (const T *)(m_pHead->m_pPrev->m_pData);
                        delete m_pHead->m_pPrev;
-                       m_pHead->m_pPrev = NULL;
+                       m_pHead->m_pPrev = nullptr;
                }
                else
                {
                        pAuxData = (const T *)(m_pHead->m_pData);
                        delete m_pHead;
-                       m_pHead = NULL;
-                       m_pTail = NULL;
+                       m_pHead = nullptr;
+                       m_pTail = nullptr;
                }
-               m_pAux = NULL;
+               m_pAux = nullptr;
                m_uCount--;
                if(m_bAutoDelete)
                        delete pAuxData;
@@ -1040,16 +1035,16 @@ public:
                        m_pTail = m_pTail->m_pPrev;
                        pAuxData = (const T *)(m_pTail->m_pNext->m_pData);
                        delete m_pTail->m_pNext;
-                       m_pTail->m_pNext = NULL;
+                       m_pTail->m_pNext = nullptr;
                }
                else
                {
                        pAuxData = (const T *)(m_pTail->m_pData);
                        delete m_pTail;
-                       m_pHead = NULL;
-                       m_pTail = NULL;
+                       m_pHead = nullptr;
+                       m_pTail = nullptr;
                }
-               m_pAux = NULL;
+               m_pAux = nullptr;
                m_uCount--;
                if(m_bAutoDelete)
                        delete pAuxData;
@@ -1258,10 +1253,10 @@ public:
        KviPointerList<T>(bool bAutoDelete = true)
        {
                m_bAutoDelete = bAutoDelete;
-               m_pHead = NULL;
-               m_pTail = NULL;
+               m_pHead = nullptr;
+               m_pTail = nullptr;
                m_uCount = 0;
-               m_pAux = NULL;
+               m_pAux = nullptr;
        };
 
        /**
index 4f7b0eac30a48b1a135af5fe9644f2ae8f4fe414..4de4fd3098490cd44d4450cd8ea8d9b5487ef112 100644 (file)
@@ -40,9 +40,9 @@ private:
        ~KviShortcut();
 
 public:
-       static QShortcut * create(const char * key, QWidget * parent, const char * member = 0, const char * ambiguousMember = 0, Qt::ShortcutContext context = Qt::WindowShortcut);
-       static QShortcut * create(const QKeySequence & key, QWidget * parent, const char * member = 0, const char * ambiguousMember = 0, Qt::ShortcutContext context = Qt::WindowShortcut);
-       static void create(QKeySequence::StandardKey key, QWidget * parent, const char * member = 0, const char * ambiguousMember = 0, Qt::ShortcutContext context = Qt::WindowShortcut, KviPointerList<QShortcut> * pBufferList = nullptr);
+       static QShortcut * create(const char * key, QWidget * parent, const char * member = nullptr, const char * ambiguousMember = nullptr, Qt::ShortcutContext context = Qt::WindowShortcut);
+       static QShortcut * create(const QKeySequence & key, QWidget * parent, const char * member = nullptr, const char * ambiguousMember = nullptr, Qt::ShortcutContext context = Qt::WindowShortcut);
+       static void create(QKeySequence::StandardKey key, QWidget * parent, const char * member = nullptr, const char * ambiguousMember = nullptr, Qt::ShortcutContext context = Qt::WindowShortcut, KviPointerList<QShortcut> * pBufferList = nullptr);
 };
 
 #endif //_KVI_SHORTCUT_CLASSFILE_H_
index 52d02d16080398ddea75e6d7b7febddb10fbe097..137fa2527813d9d047b47b208249db3df3a83e97 100644 (file)
@@ -33,7 +33,7 @@ public:
        // uSize MUST be greater than 0
        // if data is non-zero, it MUST point to a buffer at least uSize bytes long
        // and the data is COPIED from that buffer!
-       KviDataBuffer(int uSize, const unsigned char * data = 0);
+       KviDataBuffer(int uSize, const unsigned char * data = nullptr);
        KviDataBuffer();
        ~KviDataBuffer();
 
index 116477e43e4c685807c601855ea99b2f9bcb300c..82e1a047ddd9d55b4c4a4ac77670271d976c6d54 100644 (file)
@@ -55,7 +55,7 @@ KviOggTheoraDecoder::KviOggTheoraDecoder(KviDataBuffer * videoSignal, KviDataBuf
        m_pTextSignal = textSignal;
        theora_p = 0;
        stateflag = 0;
-       ts = NULL;
+       ts = nullptr;
        thda = false;
        thtic = false;
 
@@ -249,7 +249,7 @@ void KviOggTheoraDecoder::addData(KviDataBuffer * stream)
        {
                if(ogg_stream_packetout(&zo, &op) > 0)
                {
-                       char * textPkt = 0;
+                       char * textPkt = nullptr;
                        int textSize = 0;
                        if(irct_decode_packetin(&textPkt, &textSize, &op) == 0)
                        {
index ca0ced24d26effbcb9a4b77ff6b8959bc00b606d..e366858914864f91990c0cb2a79091fe97d08bc8 100644 (file)
@@ -88,7 +88,7 @@ KviOggTheoraEncoder::KviOggTheoraEncoder(KviDataBuffer * stream, int iWidth, int
        y4m_dst_buf_sz = geometry.pic_w * geometry.pic_h * 3;
 
        // Set up Ogg output stream
-       srand(time(NULL));
+       srand(time(nullptr));
        ogg_stream_init(&to, rand());
 
        ogg_stream_init(&zo, rand());
index 4537590a65c2692a0109c139d8411eb91e9ceab8..77e9ac274a42867a24ac94b2e229bd6635f6cc6d 100644 (file)
@@ -222,7 +222,7 @@ static QString queryWinInfo(QueryInfo info)
        pGNSI = (PGNSI)GetProcAddress(
            GetModuleHandle(TEXT("kernel32.dll")),
            "GetNativeSystemInfo");
-       if(NULL != pGNSI)
+       if(nullptr != pGNSI)
                pGNSI(&si);
        else
                GetSystemInfo(&si);
@@ -299,7 +299,7 @@ static QString queryWinInfo(QueryInfo info)
                        if(bOsVersionInfoEx)
                        {
                                DWORD dwPlatformInfo;
-                               if(NULL != pGetProductInfo)
+                               if(nullptr != pGetProductInfo)
                                        if(pGetProductInfo(osvi.dwMajorVersion, osvi.dwMinorVersion,
                                               osvi.wServicePackMajor, osvi.wServicePackMinor, &dwPlatformInfo))
                                        {
index 476692084322226588c9479fffc81f894f5da073..116504e20fb2a1adcbf537822c9c731f96ceb71d 100644 (file)
@@ -180,7 +180,7 @@ void KviDnsResolverThread::run()
 
        // gethostbyaddr and gethostbyname are thread-safe on Windoze
        struct in_addr inAddr;
-       struct hostent * pHostEntry = 0;
+       struct hostent * pHostEntry = nullptr;
 
        // DIE DIE!....I hope that this stuff will disappear sooner or later :)
 
index 0114373992bfc9d0a6381397ebfde6a240261dcb..390b686b50f9f440fb02e21ec46edef065fc1fb4 100644 (file)
@@ -1055,7 +1055,7 @@ void KviHttpRequest::dnsLookupDone(KviDnsResolver *d)
        {
                m_szIp = d->firstIpAddress();
                delete m_pDns;
-               m_pDns = 0;
+               m_pDns = nullptr;
                QString tmp;
                tmp = QString(__tr2qs("Host %1 resolved to %2")).arg(m_connectionUrl.host(),m_szIp);
                emit status(tmp);
index f52c6a753b58af395fb155078ed177f35bf6837b..8226778dd1c6cce9cf0d88ef6349a78ac61f77f6 100644 (file)
@@ -40,7 +40,7 @@ private:
 public:
        static QNetworkAccessManager * getInstance()
        {
-               static QNetworkAccessManager * pInstance = NULL;
+               static QNetworkAccessManager * pInstance = nullptr;
                if(!pInstance)
                        pInstance = new QNetworkAccessManager();
                return pInstance;
index 196bc39e58236d3b156863c0c81a95f120dbba5c..49b9787394175ad382facfea764e87a71a976e71 100644 (file)
@@ -63,7 +63,7 @@ namespace KviEnvironment
 
        inline void unsetVariable(const QString & szName)
        {
-               SetEnvironmentVariable(szName.toStdWString().c_str(), NULL);
+               SetEnvironmentVariable(szName.toStdWString().c_str(), nullptr);
        }
 #else
        /**
index b5be82547956589ccc7929b048f0a8e84f73ed82..a0cb7d7214f3ed6b8367059336c32e3fb3e74f77 100644 (file)
@@ -39,7 +39,7 @@ class KviSignalHandler : public QObject
        Q_OBJECT
 
 public:
-       KviSignalHandler(QObject *parent = 0);
+       KviSignalHandler(QObject *parent = nullptr);
 
        static void unixSignalHandler(int unused);
 
index 48a04db76f045d2a0b80b724701f110bcce66842..fd0ae971cf6ded255d599f50e48588c14cd6f050 100644 (file)
@@ -280,7 +280,7 @@ protected:
        KviThread * m_pSender;
 
 public:
-       KviThreadEvent(int evId, KviThread * sender = 0)
+       KviThreadEvent(int evId, KviThread * sender = nullptr)
            : QEvent((QEvent::Type)KVI_THREAD_EVENT), m_eventId(evId), m_pSender(sender){};
        ~KviThreadEvent(){};
 
@@ -298,7 +298,7 @@ protected:
        TData * m_pData;
 
 public:
-       KviThreadDataEvent(int evId, TData * pData = 0, KviThread * sender = 0)
+       KviThreadDataEvent(int evId, TData * pData = nullptr, KviThread * sender = nullptr)
            : KviThreadEvent(evId, sender) { m_pData = pData; };
        ~KviThreadDataEvent()
        {
@@ -316,7 +316,7 @@ public:
        TData * getData()
        {
                TData * aux = m_pData;
-               m_pData = 0;
+               m_pData = nullptr;
                return aux;
        };
        TData * data() { return m_pData; };
index 0c91ea03da5bc2a4ab693492f3699e4259931695..a99fcafa4e3fc2fbbe547992eab2ca9ab402c219 100644 (file)
@@ -66,7 +66,7 @@ public:
        * \param bModal Whether the dialog is modal
        * \return KviTalFileDialog
        */
-       KviTalFileDialog(const QString & szDirName, const QString & szFilter = QString(), QWidget * pParent = 0, const char * pcName = 0, bool bModal = false);
+       KviTalFileDialog(const QString & szDirName, const QString & szFilter = QString(), QWidget * pParent = nullptr, const char * pcName = nullptr, bool bModal = false);
 
        /**
        * \brief Destroys the filedialog object
index 15554d65f5889b6292f399270e20799bd48ad22f..8ad1f22b551fbbd21d3b2d08e789244f6ec62e5d 100644 (file)
@@ -51,14 +51,14 @@ public:
        * \param pcName the name of the groupbox
        * \return KviTalGroupBox
        */
-       KviTalGroupBox(QWidget * pParent, char * pcName = 0);
+       KviTalGroupBox(QWidget * pParent, char * pcName = nullptr);
 
        /**
        * \brief Constructs the groupbox object
        * \param pParent The parent object
        * \return KviTalGroupBox
        */
-       KviTalGroupBox(QWidget * pParent = 0);
+       KviTalGroupBox(QWidget * pParent = nullptr);
 
        /**
        * \brief Constructs the groupbox object
@@ -66,7 +66,7 @@ public:
        * \param pParent The parent object
        * \return KviTalGroupBox
        */
-       KviTalGroupBox(const QString & szTitle, QWidget * pParent = 0);
+       KviTalGroupBox(const QString & szTitle, QWidget * pParent = nullptr);
 
        /**
        * \brief Constructs the groupbox object
@@ -74,7 +74,7 @@ public:
        * \param pParent The parent object
        * \return KviTalGroupBox
        */
-       KviTalGroupBox(Qt::Orientation orientation, QWidget * pParent = 0);
+       KviTalGroupBox(Qt::Orientation orientation, QWidget * pParent = nullptr);
 
        /**
        * \brief Constructs the groupbox object
@@ -83,7 +83,7 @@ public:
        * \param pParent The parent object
        * \return KviTalGroupBox
        */
-       KviTalGroupBox(Qt::Orientation orientation, const QString & szTitle, QWidget * pParent = 0);
+       KviTalGroupBox(Qt::Orientation orientation, const QString & szTitle, QWidget * pParent = nullptr);
 
        /**
        * \brief Destroys the groupbox object
index 5352d3940335c4e2a706f5e9a53540dcfdd5ff89..2d837454bceb5236f92ae5df21c993cc34685bd0 100644 (file)
@@ -50,7 +50,7 @@ public:
        * \param pcName The name of the box
        * \return KviTalHBox
        */
-       KviTalHBox(QWidget * pParent, char * pcName = 0);
+       KviTalHBox(QWidget * pParent, char * pcName = nullptr);
 
        /**
        * \brief Destroys an horizontal box object
index b4215802ab1584df305d591cdfebb08120aaeff1..e53f4d70e80a7a3c10b642ee443c57861386c430 100644 (file)
@@ -58,7 +58,7 @@ public:
        * \param pWidget The item which we have to delegate for the paint
        * \return KviTalIconAndRichTextItemDelegate
        */
-       KviTalIconAndRichTextItemDelegate(QAbstractItemView * pWidget = 0);
+       KviTalIconAndRichTextItemDelegate(QAbstractItemView * pWidget = nullptr);
 
        /**
        * \brief Destroys the icon and rich text item delegate object
index 349403234344126984a7a0fef4ddb25b69b37e68..c85959b7fd9757e24e973e02e6ca5dd08659d0ec 100644 (file)
@@ -36,7 +36,7 @@ class KVILIB_API KviTalTabDialog : public QDialog
 {
        Q_OBJECT
 public:
-       KviTalTabDialog(QWidget * pParent = 0, const char * name = 0, bool bModal = false);
+       KviTalTabDialog(QWidget * pParent = nullptr, const char * name = nullptr, bool bModal = false);
        ~KviTalTabDialog();
 
 protected:
index 06f2e2411aec538dbe68a3ca0678f8e9a184ea08..296bd40d7993ab648005e91ba9a5192367027c14 100644 (file)
@@ -50,7 +50,7 @@ public:
        * \param pcName The name of the box
        * \return KviTalVBox
        */
-       KviTalVBox(QWidget * pParent, char * pcName = 0);
+       KviTalVBox(QWidget * pParent, char * pcName = nullptr);
 
        /**
        * \brief Destroys a vertical box object
index 9797f50d1397ae60f3431444befdcf60dde048be..0c030c2b01c34d45094051048443952cb4620fcf 100644 (file)
@@ -115,22 +115,22 @@ void KviApplication::setupUriAssociations(const QString & szProto)
 
        tmp = QString("Software\\Classes\\" + szProto).toStdWString();
        SHDeleteKey(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str());
-       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL);
+       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, nullptr, 0, KEY_WRITE, nullptr, &hKey, nullptr);
        RegSetValueEx(hKey, 0, 0, REG_SZ, (LPBYTE)TEXT("URL:IRC Protocol"), 16 * 2 + 1);
        RegSetValueEx(hKey, TEXT("URL Protocol"), 0, REG_SZ, (LPBYTE)"", 0);
 
        tmp = QString("Software\\Classes\\" + szProto + "\\DefaultIcon").toStdWString();
-       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL);
+       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, nullptr, 0, KEY_WRITE, nullptr, &hKey, nullptr);
        tmp = QString(szAppPath + ",0").toStdWString();
        RegSetValueEx(hKey, 0, 0, REG_SZ, (LPBYTE)tmp.c_str(), tmp.length() * 2 + 1);
 
        tmp = QString("Software\\Classes\\" + szProto + "\\Shell\\open").toStdWString();
-       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL);
+       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, nullptr, 0, KEY_WRITE, nullptr, &hKey, nullptr);
        tmp = __tr2qs("Open with KVIrc").toStdWString();
        RegSetValueEx(hKey, 0, 0, REG_SZ, (LPBYTE)tmp.c_str(), tmp.length() * 2 + 1);
 
        tmp = QString("Software\\Classes\\" + szProto + "\\Shell\\open\\command").toStdWString();
-       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL);
+       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, nullptr, 0, KEY_WRITE, nullptr, &hKey, nullptr);
        tmp = QString(szAppPath + " --external \"%1\"").toStdWString();
        RegSetValueEx(hKey, 0, 0, REG_SZ, (LPBYTE)tmp.c_str(), tmp.length() * 2 + 1);
 
@@ -150,7 +150,7 @@ void KviApplication::setFileAssociation(const QString & szExtension, const QStri
 
        tmp = QString("Software\\Classes\\." + szExtension).toStdWString();
        SHDeleteKey(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str());
-       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL);
+       RegCreateKeyEx(HKEY_CURRENT_USER, (LPCWSTR)tmp.c_str(), 0, nullptr, 0, KEY_WRITE, nullptr, &hKey, nullptr);
        tmp = szClassName.toStdWString();
        RegSetValueEx(hKey, 0, 0, REG_SZ, (LPBYTE)tmp.c_str(), tmp.length() * 2 + 1);
 
index c363367da30bcd9d9fadbb12a477b21bca6bb2fb..dc1bb6fded911573e91c01cf4f3a3d953e8166fc 100644 (file)
@@ -106,14 +106,14 @@ protected:
        *
        * This is actually used only by KviConsoleWindow.
        *
-       * pContext must not be NULL and is kept as shallow pointer (that is, it's
+       * pContext must not be nullptr and is kept as shallow pointer (that is, it's
        * not owned and must persists for the entire life of KviIrcConnection:
        * caller is responsable for that).
        *
-       * pTarget must not be NULL and must be allocated with new as this class
+       * pTarget must not be nullptr and must be allocated with new as this class
        * takes the ownership.
        *
-       * pIdentity must not be NULL and must be allocated with new as this class
+       * pIdentity must not be nullptr and must be allocated with new as this class
        * takes the ownership.
        * \param pContext The KviIrcContext we're attacched to
        * \param pTarget The server data
@@ -186,7 +186,7 @@ public:
        /**
        * \brief Returns a pointer to the owning console
        *
-       * The pointer is never NULL
+       * The pointer is never nullptr
        * \return KviConsoleWindow *
        */
        KviConsoleWindow * console() const { return m_pConsole; }
@@ -194,7 +194,7 @@ public:
        /**
        * \brief Returns a pointer to the owning KviIrcContext.
        *
-       * The returned value is never NULL
+       * The returned value is never nullptr
        * \return KviIrcContext *
        */
        KviIrcContext * context() const { return m_pContext; }
@@ -204,7 +204,7 @@ public:
        *
        * Please note that the target doesn't necessairly contain up-to-date data.
        * You might want to look at serverInfo() instead.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * \return KviIrcConnectionTarget *
        */
        KviIrcConnectionTarget * target() const { return m_pTarget; }
@@ -212,7 +212,7 @@ public:
        /**
        * \brief Returns the underlying KviIrcLink object
        *
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * \return KviIrcLink *
        */
        KviIrcLink * link() const { return m_pLink; }
@@ -227,7 +227,7 @@ public:
        * \brief Returns a pointer to the big connection user database.
        *
        * The database contains ALL the users KVIrc can "see" in this connection.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * \return KviIrcUserDataBase *
        */
        KviIrcUserDataBase * userDataBase() const { return m_pUserDataBase; }
@@ -238,7 +238,7 @@ public:
        * It contains runtime information about the user. This includes the
        * current nickname, username, flags and other stuff that KviUserIdentity
        * actually doesn't contain (or has only "default" values for).
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionUserInfo.h" as the class is only
        * forwarded here.
        * \return KviIrcConnectionUserInfo *
@@ -252,7 +252,7 @@ public:
        * the current servername, the server capabilities and other stuff that
        * KviConnectionTarget actually doesn't contain (or has only "default"
        * values for).
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionServerInfo.h" as the class is only
        * forwarded here.
        * \return KviIrcConnectionServerInfo *
@@ -266,7 +266,7 @@ public:
        * nickname index at login time, flags that signal "micro-states" etc...
        * This data *could* be part of KviIrcConnection itself but we prefer to
        * keep it in a separate class in order to cleanup the implementation.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionStateData.h" as the class is only
        * forwarded here.
        * \return KviIrcConnectionStateData *
@@ -278,7 +278,7 @@ public:
        *
        * It contains data private to the Anti CTCP Flood engine. Very similar
        * to KviIrcConnectionStateData but dedicated to Ctcp flood.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionAntiCtcpFloodData.h" as the class is
        * only forwarded here.
        * \return KviIrcConnectionAntiCtcpFloodData *
@@ -293,7 +293,7 @@ public:
        *
        * It contains data private to the netsplit detector engine. Very similar
        * to KviIrcConnectionStateData but dedicated to netsplit detection.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionNetsplitDetectorData.h" as the class is
        * only forwarded here.
        * \return KviIrcConnectionNetsplitDetectorData *
@@ -308,7 +308,7 @@ public:
        *
        * It contains data private to the async whois engine. Very similar to
        * KviIrcConnectionStateData but dedicated to async whois.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionAsyncWhoisData.h" as the class is only
        * forwarded here.
        * \return KviIrcConnectionAsyncWhoisData *
@@ -323,7 +323,7 @@ public:
        *
        * It contains runtime statistics about the connection. Very similar to
        * KviIrcConnectionStateData but dedicated to statistics.
-       * The returned pointer is never NULL.
+       * The returned pointer is never nullptr.
        * Include "KviIrcConnectionStatistics.h" as the class is only
        * forwarded here.
        * \return KviIrcConnectionStatistics *
@@ -333,7 +333,7 @@ public:
        /**
        * \brief Returns a pointer to the current KviNotifyListManager.
        *
-       * The returned pointer is NULL if notify list management is disabled for
+       * The returned pointer is nullptr if notify list management is disabled for
        * the current connection.
        * \return KviNotifyListManager *
        */
@@ -345,7 +345,7 @@ public:
        /**
        * \brief Returns a pointer to the current KviLagMeter.
        *
-       * The returned pointer is NULL if lag measurement is disabled for the
+       * The returned pointer is nullptr if lag measurement is disabled for the
        * current connection.
        * \return KviLagMeter *
        */
@@ -398,7 +398,7 @@ public:
        /**
        * \brief Finds the channel with the specified unicode name.
        *
-       * Returns the pointer to the channel found or NULL if there is no such
+       * Returns the pointer to the channel found or nullptr if there is no such
        * channel.
        * \param szName The name of the channel
        * \return KviChannelWindow *
@@ -428,7 +428,7 @@ public:
        * This should be called in response to a JOIN message.
        * This function _assumes_ that such a channel doesn't exist yet (or if it
        * exists then it's actually in DEAD state). You can assume that channel
-       * creation never fails: if the returned pointer is NULL then we're screwed
+       * creation never fails: if the returned pointer is nullptr then we're screwed
        * anyway as virtual memory is exausted.
        * \param szName The name of the channel
        * \return KviChannelWindow *
@@ -481,7 +481,7 @@ public:
        /**
        * \brief Finds the query with the specified nick.
        *
-       * Returns the pointer to the query found or NULL if there is no such
+       * Returns the pointer to the query found or nullptr if there is no such
        * query.
        * \param szNick The nickname of the user
        * \return KviQueryWindow *
@@ -491,7 +491,7 @@ public:
        /**
        * \brief Returns the list of the currently open queries.
        *
-       * The returned pointer is never NULL (the list may be empty though).
+       * The returned pointer is never nullptr (the list may be empty though).
        * \return std::vector<KviQueryWindow *> &
        */
        std::vector<KviQueryWindow *> & queryList() { return m_pQueryList; }
index fe99411be9b036041accdc361f82b8071390e2e1..00b31714546dad4e109362901d78202d5f09d35a 100644 (file)
@@ -746,7 +746,7 @@ void KviIrcSocket::proxyLoginV4()
        KviMemory::move((void *)(pcBufToSend + 4), (void *)&host, 4);
        KviMemory::move((void *)(pcBufToSend + 8), (void *)(szUserAndPass.ptr()), szUserAndPass.len());
 
-       pcBufToSend[iLen - 1] = 0; //NULL
+       pcBufToSend[iLen - 1] = '\0';
 
        // send it into hyperspace...
        setState(ProxyFinalV4);
index afed0cd8cdfa8d97a6a38044a425924291e7f4b7..7c451c790f82c1dfc165dc498c4a7aa215853e7e 100644 (file)
@@ -41,7 +41,7 @@ namespace KviSSLMaster
 
        extern KVIRC_API void printSSLConnectionInfo(KviWindow * wnd, KviSSL * s);
 
-       extern KVIRC_API KviSSL * allocSSL(KviWindow * wnd, kvi_socket_t sock, KviSSL::Method m, const char * contextString = 0);
+       extern KVIRC_API KviSSL * allocSSL(KviWindow * wnd, kvi_socket_t sock, KviSSL::Method m, const char * contextString = nullptr);
        extern KVIRC_API void freeSSL(KviSSL * s);
 
        extern KVIRC_API bool getSSLCertInfo(KviSSLCertificate * pCert, QString szQuery, QString szOptionalParam, KviKvsVariant * pRetBuffer);
index 3db570e8268c09eaadc2e3ba8b34fffca52920c5..f10ef156944782250c142deb1824511ef70bd87a 100644 (file)
@@ -67,7 +67,7 @@ public:
            const QString & szScriptCode,
            const QString & szVisibleName,
            const QString & szDescription,
-           KviActionCategory * pCategory = NULL,
+           KviActionCategory * pCategory = nullptr,
            const QString & szBigIconId = QString(),
            const QString & szSmallIconId = QString(),
            unsigned int uFlags = 0,
@@ -93,7 +93,7 @@ public:
            const QString & szScriptCode,
            const QString & szVisibleName,
            const QString & szDescription,
-           KviActionCategory * pCategory = NULL,
+           KviActionCategory * pCategory = nullptr,
            const QString & szBigIconId = QString(),
            KviIconManager::SmallIcon eSmallIcon = KviIconManager::None,
            unsigned int uFlags = 0,
index fcebd4111d25f12435153f71fb4f78f062298844..068a3c9ef2219c85c87f311611d836ee597b1e9a 100644 (file)
@@ -37,7 +37,7 @@ class KVIRC_API KviKvsAsyncDnsOperation : public KviKvsAsyncOperation
 {
        Q_OBJECT
 public:
-       KviKvsAsyncDnsOperation(KviWindow * pWnd, QString & szQuery, KviDnsResolver::QueryType eType, KviKvsScript * pCallback = 0, KviKvsVariant * pMagic = 0);
+       KviKvsAsyncDnsOperation(KviWindow * pWnd, QString & szQuery, KviDnsResolver::QueryType eType, KviKvsScript * pCallback = nullptr, KviKvsVariant * pMagic = nullptr);
        virtual ~KviKvsAsyncDnsOperation();
 
 protected:
index 5092a1a247e9d55a330ed66349a7621ad1aede53..38bd9d7d3e1fcf15a9119487e0b9b85966d5d029 100644 (file)
@@ -80,7 +80,7 @@ protected:
 
 protected:
        // the parameter list is always shallow!
-       CallbackStatus execute(KviKvsVariantList * pParams = 0, KviKvsVariant * pRetVal = 0);
+       CallbackStatus execute(KviKvsVariantList * pParams = nullptr, KviKvsVariant * pRetVal = nullptr);
 };
 
 #endif //!_KVI_KVS_CALLBACKOBJECT_H_
index c71992301bd07593cceae83a4f4569258a71ea44..bbeca3d901717134c06445eb392e8f4541a347f5 100644 (file)
@@ -402,7 +402,7 @@ namespace KviKvsCoreSimpleCommands
 #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
                if(KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers))
                {
-                       intptr_t iRet = (intptr_t)::ShellExecute(NULL, TEXT("open"), szUrl.toStdWString().c_str(), NULL, NULL, SW_SHOWNORMAL);
+                       intptr_t iRet = (intptr_t)::ShellExecute(nullptr, TEXT("open"), szUrl.toStdWString().c_str(), nullptr, nullptr, SW_SHOWNORMAL);
                        if(iRet <= 32)
                        {
                                /*
index 341fe0bf06a5c087c0b55b67bac06c3c5ab4770a..1154ecd5da13e53ffc632f4c32267e8b60de7b68 100644 (file)
@@ -42,8 +42,8 @@ public:
            KviWindow * pWnd,
            const QString & szQuery,
            bool bRebindOnWindowClose = true,
-           KviKvsScript * pCallback = 0,
-           KviKvsVariantList * pParameterList = 0);
+           KviKvsScript * pCallback = nullptr,
+           KviKvsVariantList * pParameterList = nullptr);
        ~KviKvsDnsObject();
 
 protected:
index 0d04b195e73b76d86f844762141a0a7b2f0e980b..45e2a940b5a820d1cf738407b07377b9be524e04 100644 (file)
@@ -103,7 +103,7 @@ public:
        ~KviKvsModuleCallbackCommandCall(){};
 
 public:
-       // Never NULL, but may have empty code
+       // Never nullptr, but may have empty code
        const KviKvsScript * callback() { return m_pCallback; };
        virtual bool getParameterCode(unsigned int uParamIdx, QString & szParamBuffer);
 };
index 4ab74d7d0c26d6cd083139ebea4b6eb1c1538858..551a01c7719c1249dca6fa7b9fce9f678a295d95 100644 (file)
@@ -211,11 +211,11 @@ namespace KviKvsParameterProcessor
 
                // KVS_PT_IGNORE
                ParameterFormat(const char * name)
-                   : szName(name), uType(KVS_PT_IGNORE), uFlags(0), pContainer(NULL) {}
+                   : szName(name), uType(KVS_PT_IGNORE), uFlags(0), pContainer(nullptr) {}
 
                // terminator
                ParameterFormat()
-                   : szName(NULL), uType(KVS_PT_IGNORE), uFlags(0), pContainer(NULL){};
+                   : szName(nullptr), uType(KVS_PT_IGNORE), uFlags(0), pContainer(nullptr){};
 
                //ParameterFormat(const char * n,unsigned char t,unsigned char f,void * p)
                //: szName(n), uType(t), uFlags(f), pContainer(p) {};
@@ -227,9 +227,9 @@ namespace KviKvsParameterProcessor
 #define KVS_PARAMETERS_BEGIN(__name) \
        KviKvsParameterProcessor::ParameterFormat __name[] = {
 
-#define KVS_PARAMETERS_END                       \
-       KviKvsParameterProcessor::ParameterFormat(0) \
-       }                                            \
+#define KVS_PARAMETERS_END                             \
+       KviKvsParameterProcessor::ParameterFormat(nullptr) \
+       }                                                  \
        ;
 
 //#define KVS_PARAMETER(__name,__type,__flags,__void)
index 48e51e8b2a6d6f2491613a501ce1da8a32a17820..dcaad4ec68073f335948eb54e319926f0d140760 100644 (file)
@@ -385,7 +385,7 @@ void KviKvsProcessManager::done()
 {
        if(!m_pInstance)return;
        delete m_pInstance;
-       m_pInstance = 0;
+       m_pInstance = nullptr;
 }
 
 bool KviKvsProcessManager::execute(KviKvsProcessAsyncOperationData * d)
index 09c8c89a71e28c150b8d296da6c06ac6bf5c1000..f2c20494ed24b696b676edf302cc6a16a58d13f4 100644 (file)
@@ -113,7 +113,7 @@ protected:
            KviWindow * pWnd,
            KviKvsVariantList * pParams,
            KviKvsVariant * pRetVal,
-           KviKvsExtendedRunTimeData * pExtData = 0);
+           KviKvsExtendedRunTimeData * pExtData = nullptr);
 
 public:
        ~KviKvsRunTimeContext();
index 8e68ce30960b36444debb19cd5df6c0b764be775..f8639a0abaa62085c12b1ab70e776f2539ecb848 100644 (file)
@@ -181,7 +181,7 @@ public:
        * \param pExtData Extended data (usually 0)
        * \return int
        */
-       int run(KviWindow * pWnd, KviKvsVariantList * pParams = 0, KviKvsVariant * pRetVal = 0, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = 0);
+       int run(KviWindow * pWnd, KviKvsVariantList * pParams = nullptr, KviKvsVariant * pRetVal = nullptr, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = nullptr);
 
        /**
        * \brief Runs the script
@@ -199,7 +199,7 @@ public:
        * \param pExtData Extended data (usually 0)
        * \return int
        */
-       int run(KviWindow * pWnd, KviKvsVariantList * pParams, QString & szRetVal, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = 0);
+       int run(KviWindow * pWnd, KviKvsVariantList * pParams, QString & szRetVal, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = nullptr);
 
        /**
        * \brief Runs the script
@@ -225,7 +225,7 @@ public:
        * \param pRetVal Return value buffer (0 if you ignore it)
        * \return int
        */
-       static int run(const QString & szCode, KviWindow * pWindow, KviKvsVariantList * pParams = 0, KviKvsVariant * pRetVal = 0);
+       static int run(const QString & szCode, KviWindow * pWindow, KviKvsVariantList * pParams = nullptr, KviKvsVariant * pRetVal = nullptr);
 
        /**
        * \brief Static helper for quick evaluating parameters
@@ -271,7 +271,7 @@ protected:
        * \param iRunFlags A combination of run flags (usually default)
        * \return bool
        */
-       bool parse(KviWindow * pOutput = 0, int iRunFlags = 0);
+       bool parse(KviWindow * pOutput = nullptr, int iRunFlags = 0);
 
        /**
        * \brief Runs the script
@@ -285,7 +285,7 @@ protected:
        * \param pExtData Extended data (usually 0)
        * \return int
        */
-       int execute(KviWindow * pWnd, KviKvsVariantList * pParams = 0, KviKvsVariant * pRetVal = 0, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = 0);
+       int execute(KviWindow * pWnd, KviKvsVariantList * pParams = nullptr, KviKvsVariant * pRetVal = nullptr, int iRunFlags = 0, KviKvsExtendedRunTimeData * pExtData = nullptr);
 
        /**
        * \brief Runs the script
index fdef5e20ca26b7c514698fac92ef2387924fe6b4..4b52a76dea663e1f6d2581e2f9377008e3f7fad0 100644 (file)
@@ -109,7 +109,7 @@ public:
        // this is intended to be called from other function calls (the parameters are copied from pOuterCall)
        // since we should NEVER emit totally spontaneous signals: all of them
        // should be generated inside object functions (either from scripting or by core calls)
-       int emitSignal(const QString & sigName, KviKvsObjectFunctionCall * pOuterCall, KviKvsVariantList * pParams = 0);
+       int emitSignal(const QString & sigName, KviKvsObjectFunctionCall * pOuterCall, KviKvsVariantList * pParams = nullptr);
 
        void setSignalSender(kvs_hobject_t hObject) { m_hSignalSender = hObject; }
        kvs_hobject_t signalSender() { return m_hSignalSender; }
@@ -144,9 +144,9 @@ public:
            KviKvsVariant * pRetVal,         // the return value
            KviKvsVariantList * pParams);    // the parameters for the call
        // a nice and simple wrapper: it accepts a parameter list only (eventually 0)
-       bool callFunction(KviKvsObject * pCaller, const QString & fncName, KviKvsVariantList * pParams = 0);
+       bool callFunction(KviKvsObject * pCaller, const QString & fncName, KviKvsVariantList * pParams = nullptr);
        // this one gets a non null ret val too
-       bool callFunction(KviKvsObject * pCaller, const QString & fncName, KviKvsVariant * pRetVal, KviKvsVariantList * pParams = 0);
+       bool callFunction(KviKvsObject * pCaller, const QString & fncName, KviKvsVariant * pRetVal, KviKvsVariantList * pParams = nullptr);
 
        KviKvsObject * findChild(const QString & szClass, const QString & szName);
        void killAllChildrenWithClass(KviKvsObjectClass * cl);
index 55b0a8e9fa534456e51138c849bbb7463ef9089b..556a510f76b5b7cec618ffb9c7154fe0a2fedfb2 100644 (file)
@@ -3013,7 +3013,7 @@ KviKvsTreeNodeDataList * KviKvsParser::parseCommaSeparatedParameterList()
                }                                                                                                         \
                }                                                                                                         \
                KVSP_ASSERT(false);                                                                                       \
-               return 0;                                                                                                 \
+               return nullptr;                                                                                           \
                }
 
 LITERAL_PARAM_PARSING_FUNCTION_BEGIN(parseCommandLiteralParameter)
@@ -3131,13 +3131,13 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex()
                                delete l;
                                warning(pBegin,__tr2qs_ctx("Unterminated array index","kvs"));
                                error(KVSP_curCharPointer,__tr2qs_ctx("Unexpected end of script in array index (missing ']' character?)","kvs"));
-                               return 0;
+                               return nullptr;
                        break;
                        case '\n':
                                delete l;
                                warning(pBegin,__tr2qs_ctx("Unterminated array index","kvs"));
                                error(KVSP_curCharPointer,__tr2qs_ctx("Unexpected end of line in array index (missing ']' character or unescaped newline)","kvs"));
-                               return 0;
+                               return nullptr;
                        break;
                        case ' ':
                        case '\t':
@@ -3158,7 +3158,7 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex()
                                                        error(KVSP_curCharPointer,__tr2qs_ctx("Unexpected character '%q' (Unicode %x) in array index: it should be already terminated","kvs"),KVSP_curCharPointer,KVSP_curCharUnicode);
                                                break;
                                        }
-                                       return 0;
+                                       return nullptr;
                                }
                                goto end_of_the_array_index;
                        break;
@@ -3171,7 +3171,7 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex()
                                {
                                        // this is an error
                                        delete l;
-                                       return 0;
+                                       return nullptr;
                                }
                                l->append(p);
                        }
@@ -3190,7 +3190,7 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex()
                                {
                                        // error
                                        delete l;
-                                       return 0;
+                                       return nullptr;
                                }
                                l->append(p);
                        }
index 0033d29365646a120da96752328e0b781f938e60..e379d6af7a214e7de04de3797d5dd17431d3e266 100644 (file)
@@ -103,31 +103,31 @@ protected:
        static void init();
 
 private:
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts on the first char of a buffer
        // stops at the first null char encountered
        KviKvsTreeNodeInstruction * parseInstructionList();
-       // may return 0 (empty instruction), check error() for error conditions
+       // may return nullptr (empty instruction), check error() for error conditions
        // starts on the first character of an instruction
-       // if the first char is ';' '\n' or null it just returns 0 without error
+       // if the first char is ';' '\n' or null it just returns nullptr without error
        // stops after the ending char of the instruction
        KviKvsTreeNodeInstruction * parseInstruction();
-       // may return 0 (empty block), check error() for error conditions
+       // may return nullptr (empty block), check error() for error conditions
        // starts at the leading '{' of the block
        // stops after the trailing '}' of the block
        KviKvsTreeNodeInstruction * parseInstructionBlock();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts on the first character of the parameters
        // ends after the end of the command
        KviKvsTreeNodeDataList * parseCommandParameterList();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts on the leading '(' or a ',' in the middle of the list
        // ends after the trailing ')'
        // if started in the middle of the list returns only the remaining
        // parameters.
        KviKvsTreeNodeDataList * parseCommaSeparatedParameterList();
        KviPointerList<QString> * parseCommaSeparatedParameterListNoTree();
-       // returns 0 in case of error or if it starts on a terminating character (null parameter)
+       // returns nullptr in case of error or if it starts on a terminating character (null parameter)
        // check error() to see if there was an error condition (unless you already know that
        // there was a valid first character)
        // start on the first character of the parameter
@@ -136,105 +136,105 @@ private:
        // is extracted an attempt to convert it to a numeric format is made.
        // This optimizes assignments, self-sums etc...
        KviKvsTreeNodeData * parseCommandParameter(bool bPreferNumeric = false);
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // start on the first character of the parameter
        // ends after the first character not included in the param (')','\n','\0',',')
        KviKvsTreeNodeData * parseCommaSeparatedParameter();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // start on the first character of the parameter
        // ends after the first character not included in the param (')','\n','\0')
        KviKvsTreeNodeData * parseSingleParameterInParenthesis();
-       // never returns 0
+       // never returns nullptr
        KviKvsTreeNodeConstantData * parseCommandLiteralParameter();
-       // never returns 0
+       // never returns nullptr
        KviKvsTreeNodeConstantData * parseCommaSeparatedLiteralParameter();
-       // never returns 0
+       // never returns nullptr
        KviKvsTreeNodeConstantData * parseSingleLiteralParameterInParenthesis();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at the leading '"'
        // ends after the trailing '"'
        KviKvsTreeNodeData * parseStringParameter();
-       // never returns 0
+       // never returns nullptr
        KviKvsTreeNodeConstantData * parseStringLiteralParameter();
-       // returns 0 in case of error or of an empty switch list (check the error code!)
+       // returns nullptr in case of error or of an empty switch list (check the error code!)
        // starts at the leading '-' of the first switch
        // ends after the last switch
        KviKvsTreeNodeSwitchList * parseCommandSwitchList();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at '%' or '$'
        // and ends after the end of the data reference
        // or just after the '%' or '$' if this was only a ConstandData (not a var or func)
        KviKvsTreeNodeData * parseParameterPercentOrDollar();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at '%' or '$'
        // ends after the end of the complete data reference (including scope operators!)
        KviKvsTreeNodeData * parsePercentOrDollar(bool bInObjScope = false);
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at '%'
        // ends after the end of the structured data
        KviKvsTreeNodeVariable * parsePercent(bool bInObjectScope = false);
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        KviKvsTreeNodeData * parseHashKey();
-       // never returns 0
+       // never returns nullptr
        KviKvsTreeNodeConstantData * parseHashKeyLiteralParameter();
 
        //
        // KviKvsParser_specialCommands.cpp
        //
 
-       // return 0 only in case of error
+       // return nullptr only in case of error
        // starts at the leading '(' of the if command (after the switches)
        // and stops after the end of the else block
        // if the first character is not '(' then this function fails with an error
        KviKvsTreeNodeCommand * parseSpecialCommandIf();
-       // always returns 0
+       // always returns nullptr
        // check error() for error conditions
        // starts after the switches of the "global" keyword
        // and stops at the end of the command
        // if the first character is not '%' of a variable then this function fails with an error
        KviKvsTreeNodeCommand * parseSpecialCommandGlobal();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at the leading '(' of the while command (after the switches)
        // and stops after the end of the command block
        // if the first character is not '(' then this function fails with an error
        KviKvsTreeNodeCommand * parseSpecialCommandWhile();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at the leading '(' of the while command (after the switches)
        // and stops after the end of the command block
        // if the first character is not '(' then this function fails with an error
        KviKvsTreeNodeCommand * parseSpecialCommandDo();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the break command
        KviKvsTreeNodeCommand * parseSpecialCommandBreak();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and jumps to the next iteration after the end of the continue command
        KviKvsTreeNodeCommand * parseSpecialCommandContinue();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the for command block
        KviKvsTreeNodeCommand * parseSpecialCommandFor();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the foreach command block
        KviKvsTreeNodeCommand * parseSpecialCommandForeach();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the switch command block
        KviKvsTreeNodeCommand * parseSpecialCommandSwitch();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the defpopup command block
        KviKvsTreeNodeCommand * parseSpecialCommandUnset();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the defpopup command block
        KviKvsTreeNodeCommand * parseSpecialCommandDefpopup();
        KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * parseSpecialCommandDefpopupLabelPopup();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // stops after the class command block
        KviKvsTreeNodeCommand * parseSpecialCommandClass();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // stops after the perl.end statement
        KviKvsTreeNodeCommand * parseSpecialCommandPerlBegin();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // stops after the perl.end statement
        KviKvsTreeNodeCommand * parseSpecialCommandPythonBegin();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // and stops after the end of the help command
        KviKvsTreeNodeCommand * parseSpecialCommandHelp();
 
@@ -242,7 +242,7 @@ private:
        // KviKvsParser_command.cpp
        //
 
-       // may return 0 (empty command), check error() for error conditions
+       // may return nullptr (empty command), check error() for error conditions
        // starts at the beginning of a command (can be non valid)
        // ends after the ending char of the command
        KviKvsTreeNodeCommand * parseCommand();
@@ -251,7 +251,7 @@ private:
        // KviKvsParser_comment.cpp
        //
 
-       // always returns 0, and it CAN be an error!
+       // always returns nullptr, and it CAN be an error!
        // starts at the beginning of a comment (must be '#' or '/')
        // ends after the ending char of the comment
        KviKvsTreeNode * parseComment();
@@ -260,12 +260,12 @@ private:
        // KviKvsParser_dollar.cpp
        //
 
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at '$'
        // ends after the end of the function call
        KviKvsTreeNodeData * parseDollar(bool bInObjScope = false);
 
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts at '@'
        // ends after the end of the function call
        KviKvsTreeNodeData * parseAt(bool bInObjScope = false);
@@ -274,17 +274,17 @@ private:
        // KviKvsParser_lside.cpp
        //
 
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // returns after the command terminator
        KviKvsTreeNodeInstruction * parseVoidFunctionCallOrOperation();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // returns after the command terminator
        KviKvsTreeNodeOperation * parseOperation();
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // returns after the command terminator
        // If bPreferNumeric is propagated to parseCommandParameter() function
        KviKvsTreeNodeData * parseOperationRightSide(bool bPreferNumeric = false);
-       // return 0 only in case of error
+       // return nullptr only in case of error
        // returns after the command terminator
        KviKvsTreeNodeOperation * parseBindingOperation();
        KviKvsTreeNodeConstantData * parseBindingOperationLiteralParameter();
@@ -294,7 +294,7 @@ private:
        // KviKvsParser_expression.cpp
        //
 
-       // returns 0 only in case of error
+       // returns nullptr only in case of error
        // starts AFTER the leading char of the expression
        // ends after the first terminator found
        KviKvsTreeNodeExpression * parseExpression(char terminator);
index 34668ce217d45738d84df593dccf2eb9f94f2b83..74dc761a6f029fc9cddad7b0fd07b39bf86176cc 100644 (file)
@@ -177,7 +177,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand()
                                                                // might be an error, but might be not...
                                                                // it is an error only if error() returns true
                                                                // but since the caller will take care of it
-                                                               // we just return 0
+                                                               // we just return nullptr
                                                                if(sw)
                                                                        delete sw;
                                                                if(pRebindData)
@@ -218,7 +218,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand()
                                        // might be an error, but might be not...
                                        // it is an error only if error() returns true
                                        // but since the caller will take care of it
-                                       // we just return 0
+                                       // we just return nullptr
                                        if(sw)
                                                delete sw;
                                        if(pRebindData)
index 1c9c9d500f3cd202a5710fb72b1789b6a661e5b8..78459f170a95c55486769b84c1fbbfe0dab2ea0e 100644 (file)
@@ -899,11 +899,11 @@ KviKvsTreeNodeOperation * KviKvsParser::parseOperation()
                                if(KVSP_curCharIsEndOfCommand)                                                                           \
                                {                                                                                                        \
                                        error(KVSP_curCharPointer, __tr2qs_ctx("Missing right operand for operator '" __opstr "='", "kvs")); \
-                                       return 0;                                                                                            \
+                                       return nullptr;                                                                                      \
                                }                                                                                                        \
                                KviKvsTreeNodeData * d = parseOperationRightSide(true);                                                  \
                                if(!d)                                                                                                   \
-                                       return 0;                                                                                            \
+                                       return nullptr;                                                                                      \
                                return new __class(pBegin, d);                                                                           \
                                break;                                                                                                   \
                }                                                                                                                \
index 06a36a19f9c53cc730eceb480fe09600cccd70fc..609ac1b1128d54becb9c20420b114a17b27d1fd7 100644 (file)
@@ -54,7 +54,7 @@ python.begin <python code> python.end
                {                                                                                                                 \
                        dl = parseCommaSeparatedParameterList();                                                                      \
                        if(!dl)                                                                                                       \
-                               return 0;                                                                                                 \
+                               return nullptr;                                                                                           \
                }                                                                                                                 \
                else                                                                                                              \
                {                                                                                                                 \
@@ -67,7 +67,7 @@ python.begin <python code> python.end
                if(!skipSpacesAndNewlines())                                                                                      \
                {                                                                                                                 \
                        delete dl;                                                                                                    \
-                       return 0;                                                                                                     \
+                       return nullptr;                                                                                               \
                }                                                                                                                 \
                                                                                                                           \
                /* allow a ';' after [interpreter].begin */                                                                       \
@@ -77,7 +77,7 @@ python.begin <python code> python.end
                        if(!skipSpacesAndNewlines())                                                                                  \
                        {                                                                                                             \
                                delete dl;                                                                                                \
-                               return 0;                                                                                                 \
+                               return nullptr;                                                                                           \
                        }                                                                                                             \
                }                                                                                                                 \
                                                                                                                           \
@@ -102,7 +102,7 @@ python.begin <python code> python.end
                                szErr += " statement";                                                                                    \
                                                                                                                           \
                                error(KVSP_curCharPointer, __tr2qs_ctx(szErr.toUtf8().data(), "kvs"));                                    \
-                               return 0;                                                                                                 \
+                               return nullptr;                                                                                           \
                        }                                                                                                             \
                        pInterpreterEnd = KVSP_curCharPointer;                                                                        \
                                                                                                                           \
index 2beec376e768d128e9db16770d67857a02687140..026e7da47b414831773dd77bae35a00d75e8647b 100644 (file)
@@ -73,7 +73,7 @@ private:
        KviModule * m_pModule; // module pointer
 public:
        // pParams ownership is NOT taken
-       KviModuleExtension * allocate(KviWindow * pWnd = 0, KviPointerHashTable<QString, QVariant> * pParams = 0, void * pSpecial = 0);
+       KviModuleExtension * allocate(KviWindow * pWnd = nullptr, KviPointerHashTable<QString, QVariant> * pParams = nullptr, void * pSpecial = nullptr);
 
        int id() { return m_iId; };
        KviModule * module() { return m_pModule; };
@@ -122,8 +122,8 @@ public:
        KviModuleExtensionDescriptor * findExtensionDescriptor(const KviCString & szType, const KviCString & szName);
        static KviModuleExtensionManager * instance() { return g_pModuleExtensionManager; };
        KviModuleExtensionDescriptorList * getExtensionList(const KviCString & szType);
-       KviModuleExtension * allocateExtension(const KviCString & szType, const KviCString & szName, KviWindow * pWnd = 0, KviPointerHashTable<QString, QVariant> * pParams = 0, void * pSpecial = 0, const QString & preloadModule = QString());
-       KviModuleExtension * allocateExtension(const KviCString & szType, int id, KviWindow * pWnd = 0, KviPointerHashTable<QString, QVariant> * pParams = 0, void * pSpecial = 0, const QString & preloadModule = QString());
+       KviModuleExtension * allocateExtension(const KviCString & szType, const KviCString & szName, KviWindow * pWnd = nullptr, KviPointerHashTable<QString, QVariant> * pParams = nullptr, void * pSpecial = nullptr, const QString & preloadModule = QString());
+       KviModuleExtension * allocateExtension(const KviCString & szType, int id, KviWindow * pWnd = nullptr, KviPointerHashTable<QString, QVariant> * pParams = nullptr, void * pSpecial = nullptr, const QString & preloadModule = QString());
 
 private:
        KviModuleExtensionDescriptorList * allocateExtensionGetDescriptorList(const KviCString & szType, const QString & preloadModule);
index bf984685fdc3324dffe7bbd047ff4d35fecb5c8d..37cee0b83fad60454b5642b5daa13648acd4807e 100644 (file)
@@ -265,7 +265,7 @@ bool KviModuleManager::loadModule(const QString & modName)
                if(g_pMainWindow)
                {
                        KviConsoleWindow * pWnd = g_pMainWindow->firstConsole();
-                       if(pWnd) // this may be NULL when the app is starting up
+                       if(pWnd) // this may be nullptr when the app is starting up
                                pWnd->output(
                                    KVI_OUT_VERBOSE,
                                    __tr2qs("Loaded module '%s' (%s)"),
index e88b428fc469ad4690fbbaab464fcdef84035810..2641ebb1d2620555c5786a157d8c529b91b818e3 100644 (file)
 #define RPL_SPAMFILTERLIST 941      // <nick> <channel> <spamfilter>
 
 ///* 303 */    RPL_ISON, ":",
-///* 304 */    RPL_TEXT, (char *)NULL,
+///* 304 */    RPL_TEXT, (char *)nullptr,
 ///* 305 */    RPL_UNAWAY, ":You are no longer marked as being away",
 ///* 306 */    RPL_NOWAWAY, ":You have been marked as being away",
 
 ///* 323 */    RPL_LISTEND, ":End of /LIST",
 ///* 324 */       RPL_CHANNELMODEIS, "%???"
 
-///* 334 */    0, (char *)NULL,
+///* 334 */    0, (char *)nullptr,
 ///* 341 */    RPL_INVITING, "%s %s",
 ///* 342 */    RPL_SUMMONING, "%s :User summoned to irc",
 ///* 352 */    RPL_WHOREPLY, ,
-///* 361 */    RPL_KILLDONE, (char *)NULL,
+///* 361 */    RPL_KILLDONE, (char *)nullptr,
 ///* 362 */    RPL_CLOSING, "%s :Closed. Status = %d",
 ///* 363 */    RPL_CLOSEEND, "%d: Connections Closed",
 ///* 364 */    RPL_LINKS, "%s %s :%d %s",
 ///* 369 */    RPL_ENDOFWHOWAS, "%s :End of WHOWAS",
 ///* 381 */    RPL_YOUREOPER, ":You have entered... the Twilight Zone!.",
 ///* 382 */    RPL_REHASHING, "%s :Rehashing",
-///* 383 */    0, (char *)NULL,
+///* 383 */    0, (char *)nullptr,
 ///* 384 */    RPL_MYPORTIS, "%d :Port to local server is\r\n",
-///* 385 */    RPL_NOTOPERANYMORE, (char *)NULL,
+///* 385 */    RPL_NOTOPERANYMORE, (char *)nullptr,
 ///* 391 */    RPL_TIME, "%s :%s",
 ///* 392 */    RPL_USERSSTART, ":UserID   Terminal  Host",
 ///* 393 */    RPL_USERS, ":%-8s %-9s %-8s",
 ///* 223 */    RPL_STATSELINE, "%c %s * %s %d %d",
 ///* 224 */    RPL_STATSFLINE, "%c %s * %s %d %d",
 ///* 225 */    RPL_STATSDLINE, "%c %s %s",
-///* 231 */    0, (char *)NULL,
-///* 232 */    0, (char *)NULL,
-///* 233 */    0, (char *)NULL,
-///* 234 */    RPL_SERVLIST, (char *)NULL,
-///* 235 */    RPL_SERVLISTEND, (char *)NULL,
+///* 231 */    0, (char *)nullptr,
+///* 232 */    0, (char *)nullptr,
+///* 233 */    0, (char *)nullptr,
+///* 234 */    RPL_SERVLIST, (char *)nullptr,
+///* 235 */    RPL_SERVLISTEND, (char *)nullptr,
 ///* 241 */    RPL_STATSLLINE, "%c %s * %s %d %d",
 ///* 242 */    RPL_STATSUPTIME, ":Server Up %d days, %d:%02d:%02d",
 ///* 243 */    RPL_STATSOLINE, "%c %s * %s %d %d",
index 58e64b9c7348399648fe7c6788ce6ce77939bdfc..7f1b5c4fb3ee36f90a177a2505d546ce5a4942e1 100644 (file)
@@ -179,7 +179,7 @@ public:
        // when no longer needed.
        KviAvatar * defaultAvatarFromOptions();
 
-       void terminateConnectionRequest(bool bForce = false, const char * quitMsg = 0);
+       void terminateConnectionRequest(bool bForce = false, const char * quitMsg = nullptr);
 
        // Status string (usermode + nick) (connection related too)
        const QString & statusString() const { return m_szStatusString; }
index 9c0bd1748ba8d21929b1c362ca626c941b0e7508..2d39419d7476c99f250ae81c1495a131ac28a54f 100644 (file)
@@ -51,7 +51,7 @@ class KVIRC_API KviDynamicToolTip : public QObject
        friend class KviDynamicToolTipHelper;
        Q_OBJECT
 public:
-       KviDynamicToolTip(QWidget * parent, const char * name = 0);
+       KviDynamicToolTip(QWidget * parent, const char * name = nullptr);
        virtual ~KviDynamicToolTip();
 
 protected:
index ad22bce18ae973b0915e7f3f54619f7bf0509864..ad01e2f6a7bdb28aec2eaf921f80be195001fe58 100644 (file)
@@ -57,7 +57,7 @@ public:
        * \param bModal Whether to have a modal behaviour
        * \return KviFileDialog
        */
-       KviFileDialog(const QString & szDirName, const QString & szFilter = QString(), QWidget * pParent = 0, const char * name = 0, bool bModal = false);
+       KviFileDialog(const QString & szDirName, const QString & szFilter = QString(), QWidget * pParent = nullptr, const char * name = nullptr, bool bModal = false);
 
        /**
        * \brief Destroys the file dialog object
@@ -75,7 +75,7 @@ public:
        * \param pParent The parent widget
        * \return bool
        */
-       static bool askForOpenFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial = QString(), const QString & szFilter = QString(), bool bShowHidden = false, bool bShowNative = true, QWidget * pParent = 0);
+       static bool askForOpenFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial = QString(), const QString & szFilter = QString(), bool bShowHidden = false, bool bShowNative = true, QWidget * pParent = nullptr);
 
        /**
        * \param szBuffer The buffer where to store the data
@@ -88,7 +88,7 @@ public:
        * \param pParent The parent widget
        * \return bool
        */
-       static bool askForSaveFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial = QString(), const QString & szFilter = QString(), bool bShowHidden = false, bool bConfirmOverwrite = false, bool bShowNative = true, QWidget * pParent = 0);
+       static bool askForSaveFileName(QString & szBuffer, const QString & szCaption, const QString & szInitial = QString(), const QString & szFilter = QString(), bool bShowHidden = false, bool bConfirmOverwrite = false, bool bShowNative = true, QWidget * pParent = nullptr);
 
        /**
        * \param szBuffer The buffer where to store the data
@@ -100,7 +100,7 @@ public:
        * \param pParent The parent widget
        * \return bool
        */
-       static bool askForDirectoryName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter = QString(), bool bShowHidden = false, bool bShowNative = true, QWidget * pParent = 0);
+       static bool askForDirectoryName(QString & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter = QString(), bool bShowHidden = false, bool bShowNative = true, QWidget * pParent = nullptr);
 
        /**
        * \param szBuffer The buffer where to store the data
@@ -112,7 +112,7 @@ public:
        * \param pParent The parent widget
        * \return bool
        */
-       static bool askForOpenFileNames(QStringList & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter = QString(), bool bShowHidden = false, bool bShowNative = true, QWidget * pParent = 0);
+       static bool askForOpenFileNames(QStringList & szBuffer, const QString & szCaption, const QString & szInitial, const QString & szFilter = QString(), bool bShowHidden = false, bool bShowNative = true, QWidget * pParent = nullptr);
 };
 
 #endif //_KVI_FILEDIALOG_H_
index 6beb4b69d802dbcb118bea6ec4ceeab170d42ad4..3c4061642575a3bf9951b70ddad3cac0dd1fc225 100644 (file)
@@ -61,7 +61,7 @@ public:
        * \param pView The userlist
        * \return KviInput
        */
-       KviInput(KviWindow * pPar, KviUserListView * pView = 0);
+       KviInput(KviWindow * pPar, KviUserListView * pView = nullptr);
 
        /**
        * \brief Destroys the input object
index d833b1737124c300b79eb3138eb0f57faf539049..fdbd742c9f2674acd1a52c5d509cd2d3508dc19b 100644 (file)
@@ -48,7 +48,7 @@ class KVIRC_API KviToolBarGraphicalApplet : public QWidget
 {
        Q_OBJECT
 public:
-       KviToolBarGraphicalApplet(QWidget * par, const char * name = 0);
+       KviToolBarGraphicalApplet(QWidget * par, const char * name = nullptr);
        ~KviToolBarGraphicalApplet();
 
 private:
@@ -72,7 +72,7 @@ class KVIRC_API KviIrcContextDisplay : public KviToolBarGraphicalApplet
 {
        Q_OBJECT
 public:
-       KviIrcContextDisplay(QWidget * par, const char * name = 0);
+       KviIrcContextDisplay(QWidget * par, const char * name = nullptr);
        ~KviIrcContextDisplay();
 
 protected:
index db14dba093afe14cef16af6dccf73d29a3125f60..5c85453efb6f2611de2251468bf9f5087312b195 100644 (file)
@@ -178,13 +178,13 @@ public:
        // A null pixmap passed here unsets the private backgrdound.
        void setPrivateBackgroundPixmap(const QPixmap & pixmap, bool bRepaint = true);
        QPixmap * getPrivateBackgroundPixmap() const { return m_pPrivateBackgroundPixmap; };
-       bool hasPrivateBackgroundPixmap() { return (m_pPrivateBackgroundPixmap != 0); };
+       bool hasPrivateBackgroundPixmap() { return (m_pPrivateBackgroundPixmap != nullptr); };
 
        // Logging
        // Stops previous logging session too...
        bool startLogging(const QString & fname = QString(), bool bPrependCurBuffer = false);
        void stopLogging();
-       bool isLogging() { return (m_pLogFile != 0); };
+       bool isLogging() { return (m_pLogFile != nullptr); };
        void getLogFileName(QString & buffer);
        void add2Log(const QString & szBuffer, const QDateTime & date, int iMsgType, bool bPrependDate);
 
@@ -242,7 +242,7 @@ private:
        void calculateLineWraps(KviIrcViewLine * ptr, int maxWidth);
        void recalcFontVariables(const QFont & font, const QFontInfo & fi);
        bool checkSelectionBlock(KviIrcViewLine * line, int bufIndex);
-       KviIrcViewWrappedBlock * getLinkUnderMouse(int xPos, int yPos, QRect * pRect = 0, QString * linkCmd = 0, QString * linkText = 0);
+       KviIrcViewWrappedBlock * getLinkUnderMouse(int xPos, int yPos, QRect * pRect = nullptr, QString * linkCmd = nullptr, QString * linkText = nullptr);
        void doLinkToolTip(const QRect & rct, QString & linkCmd, QString & linkText);
        void doMarkerToolTip();
        bool checkMarkerArea(const QPoint & mousePos);
index 76d70b2eadd16f99139732a923f5f63f1b1488e2..ceecbaf8f3ee71d0f15cc6d97d0066abe3bcefc4 100644 (file)
@@ -96,7 +96,7 @@ public:
        // well.. the menu bar :D
        KviMenuBar * mainMenuBar() { return m_pMenuBar; };
        KviStatusBar * mainStatusBar() { return m_pStatusBar; };
-       // this function may return 0 if the active window has no irc context
+       // this function may return nullptr if the active window has no irc context
        KviIrcContext * activeContext() { return m_pActiveContext; };
        // shortcut to a = activeContext(); return a ? a->connection() : 0
        KviIrcConnection * activeConnection();
@@ -127,7 +127,7 @@ public:
        // Exceptions are the startup and the shutdown (see activeWindow())
        KviConsoleWindow * firstConsole();
        // Returns the first console that has no connection in progress
-       // This function CAN return 0 if all the consoles are connected
+       // This function CAN return nullptr if all the consoles are connected
        KviConsoleWindow * firstNotConnectedConsole();
        // this is explicitly dedicated to the TrayIcon module
        void setTrayIcon(KviTrayIcon * e) { m_pTrayIcon = e; };
index 41cc3bb8048b8a744832012e64f1e72dcabc67ba..65e57aa06a439e35637b807751a6bd02ee7552ff 100644 (file)
@@ -71,7 +71,7 @@ protected:
                                return m_Mask.uSetAt < ((KviMaskItem *)&other)->mask()->uSetAt;
                                break;
                }
-               return 0; //make compiler happy
+               return false; //make compiler happy
        }
 };
 
index 50b350793653c1443c53571b51221f25aaa13c51..d0ff568dfe97751e9152a2e7a0cd90d1f247d2c7 100644 (file)
@@ -40,7 +40,7 @@ class KVIRC_API KviOptionsWidget : public QFrame, public KviSelectorInterface
 {
        Q_OBJECT
 public:
-       KviOptionsWidget(QWidget * parent, const char * name = 0, bool bSunken = true);
+       KviOptionsWidget(QWidget * parent, const char * name = nullptr, bool bSunken = true);
        ~KviOptionsWidget();
 
 private:
index 961f5448ef121188cf644a41e577a9119b5c8075..00a7f8191164b3d8b21ab3ac2e2f72266f980fa8 100644 (file)
@@ -52,7 +52,7 @@ public:
 public:
        virtual void commit(){};
        virtual QString textForSearch() { return QString(); };
-       virtual QWidget * widgetToHighlight() { return 0; };
+       virtual QWidget * widgetToHighlight() { return nullptr; };
 };
 
 class KVIRC_API KviBoolSelector : public QCheckBox, public KviSelectorInterface
index 85410612a078e0154b9409e5299d5d220d3cb0d9..178a878cf86b02e718e0197d7545504d131610d3 100644 (file)
@@ -44,7 +44,7 @@ class KVIRC_API KviTopicListBoxItemDelegate : public KviTalIconAndRichTextItemDe
 {
        Q_OBJECT
 public:
-       KviTopicListBoxItemDelegate(QAbstractItemView * pWidget = 0);
+       KviTopicListBoxItemDelegate(QAbstractItemView * pWidget = nullptr);
        ~KviTopicListBoxItemDelegate();
 
 public:
@@ -55,7 +55,7 @@ public:
 class KVIRC_API KviTopicListBoxItem : public KviTalListWidgetText
 {
 public:
-       KviTopicListBoxItem(KviTalListWidget * pListBox = 0, const QString & text = QString());
+       KviTopicListBoxItem(KviTalListWidget * pListBox = nullptr, const QString & text = QString());
        ~KviTopicListBoxItem();
 
 public:
index 5b5d6d509cb9a94408b90f0857c47c25db56f578..e869b3949ac7aaa2dd4aeca37ebf58c2e3b72718 100644 (file)
@@ -123,7 +123,7 @@ class KVIRC_API KviTreeWindowListItemDelegate : public QStyledItemDelegate
 {
        Q_OBJECT
 public:
-       KviTreeWindowListItemDelegate(QAbstractItemView * pWidget = 0)
+       KviTreeWindowListItemDelegate(QAbstractItemView * pWidget = nullptr)
            : QStyledItemDelegate(pWidget){};
        ~KviTreeWindowListItemDelegate(){};
        QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
index 9ec71daf0863b65437ee88778779b9abcf37bb52..219bdd72ced1085c7b4b4ee6310996639c999c85 100644 (file)
@@ -320,7 +320,7 @@ public:
        * \param pRect The rectangle where to search
        * \return KviUserListEntry *
        */
-       KviUserListEntry * itemAt(const QPoint & pnt, QRect * pRect = 0);
+       KviUserListEntry * itemAt(const QPoint & pnt, QRect * pRect = nullptr);
 
        /**
        * \brief Returns true if the item in the entry is visible
index 7659a41ed7729f8848fde36e72b94df38b243862..af2804daaeb64f4794b2db9fea363009d587ef84 100644 (file)
@@ -52,7 +52,7 @@ public:
        ///
        /// Creates an instance of KviWebPackageManagementDialog
        ///
-       KviWebPackageManagementDialog(QWidget * pParent = NULL);
+       KviWebPackageManagementDialog(QWidget * pParent = nullptr);
 
        ///
        /// Destroys the instance of KviWebPackageManagementDialog
index 8e3766869841ef50439d47ee18c5611b85aeffe4..b1cc107a2dce2f5c6096544db973998ad711b8b1 100644 (file)
@@ -276,7 +276,7 @@ public:
        /**
        * \brief Returns the KviIrcView of this window
        *
-       * May be NULL if the window has no KviIrcView (and thus supports no direct output)
+       * May be nullptr if the window has no KviIrcView (and thus supports no direct output)
        * \return KviIrcView *
        */
        KviIrcView * view() const { return m_pIrcView; }
@@ -356,7 +356,7 @@ public:
 
        virtual void getWindowListTipText(QString & szBuffer) { szBuffer = m_szPlainTextCaption; }
 
-       // This is meaningful only if view() is non NULL
+       // This is meaningful only if view() is non nullptr
        const QString & lastLineOfText();
        const QString & lastMessageText();
 
@@ -531,7 +531,7 @@ signals:
 //   This is almost always non null
 //   The exception is the startup (when there are no windows at all)
 //   and the last phase of the destructor.
-//   You usually shouldn't care of checking this pointer for NULL unless
+//   You usually shouldn't care of checking this pointer for nullptr unless
 //   you're running very early at startup or very late at shutdown
 extern KVIRC_API KviWindow * g_pActiveWindow;
 #endif
index a2a025832f5ec654c68f6bc53d67554ea3d2726c..ed0a19f631dd1f2b921b742d399b8adef75860cc 100644 (file)
@@ -88,13 +88,13 @@ protected:
        Qt::DockWidgetArea currentArea;
 
 public:
-       virtual KviWindowListItem * addItem(KviWindow *) { return 0; };
+       virtual KviWindowListItem * addItem(KviWindow *) { return nullptr; }
        virtual bool removeItem(KviWindowListItem *) { return false; };
        virtual void setActiveItem(KviWindowListItem *){};
-       virtual KviWindowListItem * firstItem() { return 0; };
-       virtual KviWindowListItem * lastItem(void) { return 0; }
-       virtual KviWindowListItem * nextItem() { return 0; };
-       virtual KviWindowListItem * prevItem(void) { return 0; }
+       virtual KviWindowListItem * firstItem() { return nullptr; }
+       virtual KviWindowListItem * lastItem(void) { return nullptr; }
+       virtual KviWindowListItem * nextItem() { return nullptr; }
+       virtual KviWindowListItem * prevItem(void) { return nullptr; }
        virtual KviWindowListItem * item(int number);
        virtual bool setIterationPointer(KviWindowListItem *) { return false; };
        virtual void switchWindow(bool bNext, bool bInContextOnly, bool bHighlightedOnly = false);
index 6d4d9cae216e8b2d891ea89c9e4a76b5a48b2163..27071dc56a73f823b971199a09d4c2645fdda6b8 100644 (file)
@@ -50,7 +50,7 @@ namespace AddonFunctions
        bool checkDirTree(const QString & szDirPath, QString * pszError);
        bool pack(AddonInfo & info, QString & szError);
        bool notAValidAddonPackage(QString & szError);
-       bool installAddonPackage(const QString & szAddonPackageFileName, QString & szError, QWidget * pDialogParent = 0);
+       bool installAddonPackage(const QString & szAddonPackageFileName, QString & szError, QWidget * pDialogParent = nullptr);
        QString createRandomDir();
 }
 
index ef575d68151b2d57fda9ab19d38a27eb13100015..11eaaf93cae695fceebe8e036314dd6bdac1cc1c 100644 (file)
        KVSM_PARAMETERS_BEGIN(c)                                                   \
        KVSM_PARAMETER("irc_context_id", KVS_PT_UINT, KVS_PF_OPTIONAL, iContextId) \
        KVSM_PARAMETERS_END(c)                                                     \
-       KviConsoleWindow * pConsole = NULL;                                        \
+       KviConsoleWindow * pConsole = nullptr;                                     \
        if(c->parameterCount() > 0)                                                \
                pConsole = g_pApp->findConsole(iContextId);                            \
        else                                                                       \
                pConsole = c->window()->console();
 
 #define GET_CONNECTION_FROM_STANDARD_PARAMS \
-       GET_CONSOLE_FROM_STANDARD_PARAMS        \
-       KviIrcConnection * pConnection = NULL;  \
-       if(pConsole)                            \
+       GET_CONSOLE_FROM_STANDARD_PARAMS          \
+       KviIrcConnection * pConnection = nullptr; \
+       if(pConsole)                              \
                pConnection = pConsole->context()->connection();
 
 #define STANDARD_IRC_CONNECTION_TARGET_PARAMETER(_fncName, _setCall) \
index 89c71f55bbedfabc52936c48a91187c812041422..e2adee2a47caac6ce5103620d839484787256709 100644 (file)
@@ -114,7 +114,7 @@ DccCanvasWindow::DccCanvasWindow(DccDescriptor * dcc, const char * name)
                        output(KVI_OUT_DCCMSG, __tr2qs_ctx("Contacting host %Q on port %Q", "dcc"), &(dcc->szIp), &(dcc->szPort));
        }
 
-       //      m_pSlaveThread = 0;
+       //      m_pSlaveThread = nullptr;
 }
 
 DccCanvasWindow::~DccCanvasWindow()
@@ -124,7 +124,7 @@ DccCanvasWindow::~DccCanvasWindow()
        //      {
        //              m_pSlaveThread->terminate();
        //              delete m_pSlaveThread;
-       //              m_pSlaveThread = 0;
+       //              m_pSlaveThread = nullptr;
        //      }
        KviThreadManager::killPendingEvents(this);
        //      delete m_pDescriptor;
index 3497843ba8edac21dc6cf96b8c73b730b5d57616..963a30b365dcd947755b8c5a7ede1e537e4b9bf4 100644 (file)
@@ -258,7 +258,7 @@ bool DccVideoThread::handleIncomingData(KviDccThreadIncomingData * data, bool bC
                                // no more data in the buffer
                                KVI_ASSERT(data->iLen == 0);
                                KviMemory::free(data->buffer);
-                               data->buffer = end = aux = 0;
+                               data->buffer = end = aux = nullptr;
                        }
                        postEvent(parent(), e);
                }
@@ -280,7 +280,7 @@ bool DccVideoThread::handleIncomingData(KviDccThreadIncomingData * data, bool bC
                        e->setData(s);
                        data->iLen = 0;
                        KviMemory::free(data->buffer);
-                       data->buffer = 0;
+                       data->buffer = nullptr;
                        postEvent(parent(), e);
                }
        }
@@ -395,8 +395,8 @@ DccVideoWindow::DccVideoWindow(DccDescriptor * dcc, const char * name)
     : DccWindow(KviWindow::DccVideo, name, dcc)
 {
        m_pDescriptor = dcc;
-       m_pSlaveThread = 0;
-       m_pszTarget = 0;
+       m_pSlaveThread = nullptr;
+       m_pszTarget = nullptr;
 
        m_pButtonBox = new KviTalHBox(this);
 
@@ -500,51 +500,51 @@ DccVideoWindow::~DccVideoWindow()
        if(m_pInVideoLabel)
        {
                delete m_pInVideoLabel;
-               m_pInVideoLabel = 0;
+               m_pInVideoLabel = nullptr;
        }
        if(m_pCameraView)
        {
                delete m_pCameraView;
-               m_pCameraView = 0;
+               m_pCameraView = nullptr;
        }
        if(m_pCameraImage)
        {
                delete m_pCameraImage;
-               m_pCameraImage = 0;
+               m_pCameraImage = nullptr;
        }
        if(m_pCamera)
        {
                delete m_pCamera;
-               m_pCamera = 0;
+               m_pCamera = nullptr;
        }
        if(m_pCDevices)
        {
                delete m_pCDevices;
-               m_pCDevices = 0;
+               m_pCDevices = nullptr;
        }
        if(m_pCInputs)
        {
                delete m_pCInputs;
-               m_pCInputs = 0;
+               m_pCInputs = nullptr;
        }
        if(m_pCStandards)
        {
                delete m_pCStandards;
-               m_pCStandards = 0;
+               m_pCStandards = nullptr;
        }
        if(m_pVideoLabel[0])
        {
                delete m_pVideoLabel[2];
                delete m_pVideoLabel[1];
                delete m_pVideoLabel[0];
-               m_pVideoLabel[2] = 0;
-               m_pVideoLabel[1] = 0;
-               m_pVideoLabel[0] = 0;
+               m_pVideoLabel[2] = nullptr;
+               m_pVideoLabel[1] = nullptr;
+               m_pVideoLabel[0] = nullptr;
        }
        if(m_pLayout)
        {
                delete m_pLayout;
-               m_pLayout = 0;
+               m_pLayout = nullptr;
        }
 
        g_pDccBroker->unregisterDccWindow(this);
@@ -553,7 +553,7 @@ DccVideoWindow::~DccVideoWindow()
        {
                m_pSlaveThread->terminate();
                delete m_pSlaveThread;
-               m_pSlaveThread = 0;
+               m_pSlaveThread = nullptr;
        }
 
        KviThreadManager::killPendingEvents(this);
@@ -561,7 +561,7 @@ DccVideoWindow::~DccVideoWindow()
        if(m_pszTarget)
        {
                delete m_pszTarget;
-               m_pszTarget = 0;
+               m_pszTarget = nullptr;
        }
 }
 
index 1028e7c721d6efb81b82423acbc98afdd66b611d..5e70d176c1b3d11b69aae90abe234d89259dd146 100644 (file)
@@ -263,19 +263,19 @@ DccVideoTheoraCodec::DccVideoTheoraCodec()
     : DccVideoCodec()
 {
        m_szName = "theora";
-       m_pEncoder = 0;
-       m_pDecoder = 0;
+       m_pEncoder = nullptr;
+       m_pDecoder = nullptr;
 }
 
 DccVideoTheoraCodec::~DccVideoTheoraCodec()
 {
        if(m_pEncoder)
                delete m_pEncoder;
-       m_pEncoder = 0;
+       m_pEncoder = nullptr;
 
        if(m_pDecoder)
                delete m_pDecoder;
-       m_pDecoder = 0;
+       m_pDecoder = nullptr;
 }
 
 void DccVideoTheoraCodec::encodeVideo(KviDataBuffer * videoSignal, KviDataBuffer * stream)
index e2a23bb4e95a1492dafa9ef73e2718507d919f8a..3a7929b3d6b9fd0503651073cd3c58070bb5b674 100644 (file)
 #define GSM_UNPACKED_FRAME_SIZE_IN_BYTES 320
 #define GSM_UNPACKED_FRAME_SIZE_IN_SHORTS 160
 
-void * (*gsm_session_create)() = 0;
-void (*gsm_session_destroy)(void *) = 0;
-void (*gsm_session_encode)(void *, short *, unsigned char *) = 0;
-int (*gsm_session_decode)(void *, unsigned char *, short *) = 0;
+void * (*gsm_session_create)() = nullptr;
+void (*gsm_session_destroy)(void *) = nullptr;
+void (*gsm_session_encode)(void *, short *, unsigned char *) = nullptr;
+int (*gsm_session_decode)(void *, unsigned char *, short *) = nullptr;
 
-void * g_pGSMCodecLibraryHandle = 0;
+void * g_pGSMCodecLibraryHandle = nullptr;
 
 bool kvi_gsm_codec_init()
 {
@@ -57,7 +57,7 @@ bool kvi_gsm_codec_init()
        if(!(gsm_session_create && gsm_session_destroy && gsm_session_encode && gsm_session_decode))
        {
                dlclose(g_pGSMCodecLibraryHandle);
-               g_pGSMCodecLibraryHandle = 0;
+               g_pGSMCodecLibraryHandle = nullptr;
                return false;
        }
        return true;
@@ -68,7 +68,7 @@ void kvi_gsm_codec_done()
        if(g_pGSMCodecLibraryHandle)
        {
                dlclose(g_pGSMCodecLibraryHandle);
-               g_pGSMCodecLibraryHandle = 0;
+               g_pGSMCodecLibraryHandle = nullptr;
        }
 }
 
index 5c21392450f40b01d745d6dbb50ff94b613c6dfd..f0f7dc898b397a47c37812f8c6efd63c2bacaf87 100644 (file)
@@ -188,7 +188,7 @@ public:
 KviVoiceParty::KviVoiceParty(const QString &szNick,const QString &szIp,unsigned short uPort)
 : m_szIp(szIp), m_uPort(uPort), m_szNick(szNick)
 {
-       m_pChildrenTree = 0;
+       m_pChildrenTree = nullptr;
 }
 
 KviVoiceParty::~KviVoiceParty()
@@ -241,8 +241,8 @@ KviVoiceLink::KviVoiceLink(KviVoiceParty * pRemoteParty)
 {
        KviQString::sprintf("%Q:%u",&(pRemoteParty->nick()),pRemoteParty->port());
        m_pRemoteParty = pRemoteParty;
-       m_pAudioEncoder = 0;
-       m_pAudioDecoder = 0;
+       m_pAudioEncoder = nullptr;
+       m_pAudioDecoder = nullptr;
 }
 
 KviVoiceLink::~KviVoiceLink()
index 31a4710fdaeeaccc1ccaf2a05fe659e4ee7ebf10..483f1ad43b5e84a28ee6a348b7740c9d167c95d4 100644 (file)
@@ -45,7 +45,7 @@ protected:
 public:
        DccDescriptor * descriptor() { return m_pDescriptor; };
        const DccMarshal * marshal() { return m_pMarshal; };
-       virtual DccThread * getSlaveThread() { return 0; };
+       virtual DccThread * getSlaveThread() { return nullptr; }
        virtual KviWindow * dccMarshalOutputWindow();
        virtual const char * dccMarshalOutputContextString();
 };
index 8da7a02040602d7652b937545f8014030e73c214..03d69ac588f27f65b9cc1ee7b402743e51c2330e 100644 (file)
@@ -466,7 +466,7 @@ KviCanvasView::KviCanvasView(QCanvas * c, DccCanvasWidget * cw, QWidget * par)
        m_pCanvasWidget = cw;
        m_state = Idle;
        m_dragMode = None;
-       m_pSelectedItem = 0;
+       m_pSelectedItem = nullptr;
        viewport()->setMouseTracking(true);
 }
 
@@ -562,7 +562,7 @@ static void calcPolygonPoints(QPointArray & pnts, unsigned int nVertices)
 
 void KviCanvasView::insertObjectAt(const QPoint & pnt, ObjectType o)
 {
-       QCanvasItem * r = 0;
+       QCanvasItem * r = nullptr;
 
        switch(o)
        {
@@ -655,7 +655,7 @@ void KviCanvasView::clearSelection()
        if(!m_pSelectedItem)
                return;
        m_pSelectedItem->setSelected(false);
-       m_pSelectedItem = 0;
+       m_pSelectedItem = nullptr;
        m_pCanvasWidget->m_pPropertiesWidget->editItem(0);
 }
 
@@ -1297,7 +1297,7 @@ QWidget * KviVariantTableItem::createEditor() const
                default:
                        break;
        }
-       return 0;
+       return nullptr;
 }
 
 void KviVariantTableItem::setContentFromEditor(QWidget * w)
@@ -1429,7 +1429,7 @@ void KviCanvasItemPropertiesWidget::editItem(QCanvasItem * it)
                return;
        }
 
-       QMap<QString, QVariant> * m = 0;
+       QMap<QString, QVariant> * m = nullptr;
 
        switch(KVI_CANVAS_RTTI_CONTROL_TYPE(it))
        {
index 91baf430362625a7f8d535128577d320051a6b77..35ee28ba9be190ec86cdf00043c508db1310c71b 100644 (file)
@@ -202,7 +202,7 @@ class ScriptEditorReplaceDialog final : public QDialog
 {
        Q_OBJECT
 public:
-       ScriptEditorReplaceDialog(QWidget * parent = 0, const QString & szName = QString());
+       ScriptEditorReplaceDialog(QWidget * parent = nullptr, const QString & szName = QString());
 
 public:
        QLineEdit * m_pFindLineEdit;
index 9025ad33d8496cc611215e90bc83d629856583e5..2ff800b5fd599f767554e8c414896d140633ae14 100644 (file)
@@ -1489,7 +1489,7 @@ static bool file_kvs_fnc_diskSpace(KviKvsModuleFunctionCall * c)
 // this for win
 #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
        ULARGE_INTEGER free, total;
-       if (GetDiskFreeSpaceEx(szPath.toStdWString().c_str(), NULL, &total, &free) == 0) {
+       if (GetDiskFreeSpaceEx(szPath.toStdWString().c_str(), nullptr, &total, &free) == 0) {
                c->warning(__tr2qs("An error occurred retrieving the amount of free space in '%Q'"), &szPath);
                return true;
        }
index 70dfcd9c39d79ffc7f14919adba46f4c69b7c295..03328ecd5fdb33b4f91c0196c284af45657c6e93 100644 (file)
@@ -666,7 +666,7 @@ void FileTransferWindow::openLocalFile()
        if(tmp.isEmpty())
                return;
        tmp.replace("/", "\\");
-       ShellExecute(0, TEXT("open"), tmp.toStdWString().c_str(), NULL, NULL, SW_SHOWNORMAL); //You have to link the shell32.lib
+       ShellExecute(0, TEXT("open"), tmp.toStdWString().c_str(), nullptr, nullptr, SW_SHOWNORMAL); //You have to link the shell32.lib
 #else
 // G&N end
 #ifdef COMPILE_KDE4_SUPPORT
index 89839c6749e632963fe52509c9134744de9df8b3..9c13d1c0c93d121fbb7916cc08f58216f0df7137 100644 (file)
@@ -81,7 +81,7 @@ class FileTransferItemDelegate : public KviTalIconAndRichTextItemDelegate
 {
        Q_OBJECT
 public:
-       FileTransferItemDelegate(QAbstractItemView * pWidget = 0)
+       FileTransferItemDelegate(QAbstractItemView * pWidget = nullptr)
            : KviTalIconAndRichTextItemDelegate(pWidget){};
        ~FileTransferItemDelegate(){};
        QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
index 613222ab53c2c39d9b776e5437ca460dc0cb8f57..2aa573402aa699bd530f2df8a17c7cee5d7859ec 100644 (file)
@@ -85,7 +85,7 @@ public:
        void run() override;
 
 protected:
-       void postMessage(const char * message, KviIdentRequest * r, const char * szAux = 0);
+       void postMessage(const char * message, KviIdentRequest * r, const char * szAux = nullptr);
 };
 
 #endif //_LIBKVIIDENT_H_
index 30da96db00ae92347df4ba2014b6e2dd3552c550..0eba68571b6e75c7a02ba2e0f8a1641aafbea072 100644 (file)
@@ -44,7 +44,7 @@ class KviThemedLineEdit;
 class ChannelTreeWidgetItemDelegate : public QItemDelegate
 {
 public:
-       ChannelTreeWidgetItemDelegate(QTreeWidget * pWidget = 0);
+       ChannelTreeWidgetItemDelegate(QTreeWidget * pWidget = nullptr);
        ~ChannelTreeWidgetItemDelegate();
        void paint(QPainter * pPainter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
        QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
index 640c9fc8f1de870655737f59a77d8c6252d553a2..2514ba52b1faad069c6da5a1ab47202351253d6b 100644 (file)
@@ -51,7 +51,7 @@ enum ac_ErrorCode
 
 #define AC_BUFFER_SIZE 2048
 
-static HINSTANCE amip_dll = NULL;
+static HINSTANCE amip_dll = nullptr;
 
 #define MP_AC_DYNPTR(__rettype, __func, __args)        \
        typedef __rettype(CALLBACK * lp_##__func)(__args); \
@@ -94,7 +94,7 @@ static bool loadAmipDll()
 
 static QTextCodec * mediaplayer_get_codec()
 {
-       QTextCodec * pCodec = 0;
+       QTextCodec * pCodec = nullptr;
        pCodec = QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding).toUtf8());
 
        if(!pCodec)
@@ -120,7 +120,7 @@ MpAmipInterface::MpAmipInterface()
                bool res = loadAmipDll();
                if(!res)
                {
-                       amip_dll = NULL;
+                       amip_dll = nullptr;
                        return;
                }
                ac_init(AC_START_CLIENT);
@@ -133,7 +133,7 @@ MpAmipInterface::~MpAmipInterface()
                return;
        ac_uninit();
        FreeLibrary(amip_dll);
-       amip_dll = NULL;
+       amip_dll = nullptr;
 }
 
 int MpAmipInterface::detect(bool bStart)
index a82016b24cf41b892f6618180d554e9a0dc67a9b..69ec610bb97a8deb9e21ed6ffd28879bb3597b0c 100644 (file)
@@ -219,7 +219,7 @@ public:
        _interfaceclass##Descriptor::_interfaceclass##Descriptor()        \
            : MpInterfaceDescriptor()                                     \
        {                                                                 \
-               m_pInstance = 0;                                              \
+               m_pInstance = nullptr;                                        \
                m_szName = _name;                                             \
                m_szDescription = _description;                               \
        }                                                                 \
index 0d08cc4b5ba3a5ebc686a3a0a0bbc86055779e0f..875fc8838287fc8ba7bebd400e1584e6c3e78c60 100644 (file)
 //     ** (requires Winamp 2.04+, only usable from plug-ins (not external apps))
 //     ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE);
 //     ** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index].
-//     ** returns a pointer to it. returns NULL on error.
+//     ** returns a pointer to it. returns nullptr on error.
 
 #define IPC_GETPLAYLISTTITLE 212
 //     * (requires Winamp 2.04+, only usable from plug-ins (not external apps))
 //     ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE);
 //     ** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index].
-//     ** returns a pointer to it. returns NULL on error.
+//     ** returns a pointer to it. returns nullptr on error.
 
 #define IPC_GET_SHUFFLE 250
 //     ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE);
 //     ** cds.dwData = IPC_PLAYFILE;
 //     ** cds.lpData = (void *) "file.mp3";
 //     ** cds.cbData = strlen((char *) cds.lpData)+1; // include space for null char
-//     ** SendMessage(hwnd_winamp,WM_COPYDATA,(WPARAM)NULL,(LPARAM)&cds);
+//     ** SendMessage(hwnd_winamp,WM_COPYDATA,(WPARAM)nullptr,(LPARAM)&cds);
 //     **
 //     ** This will play the file "file.mp3".
 
 
 static QTextCodec * mediaplayer_get_codec()
 {
-       QTextCodec * pCodec = 0;
-       pCodec = QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding).toUtf8());
+       QTextCodec * pCodec = QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding).toUtf8());
 
        if(!pCodec)
                pCodec = QTextCodec::codecForLocale();
@@ -175,7 +174,7 @@ static QTextCodec * mediaplayer_get_codec()
 
 static HWND find_winamp(KviWinampInterface * i)
 {
-       HWND hWnd = FindWindow(TEXT("Winamp v1.x"), NULL);
+       HWND hWnd = FindWindow(TEXT("Winamp v1.x"), nullptr);
        if(!hWnd)
        {
                // try to start the process ?
@@ -385,7 +384,7 @@ bool KviWinampInterface::playMrl(const QString & mrl)
                cds.dwData = IPC_PLAYFILE;
                cds.lpData = (void *)szMrl.ptr();
                cds.cbData = szMrl.len() + 1; // include space for null char
-               SendMessage(hWinamp, WM_COPYDATA, (WPARAM)NULL, (LPARAM)&cds);
+               SendMessage(hWinamp, WM_COPYDATA, (WPARAM)nullptr, (LPARAM)&cds);
                return true;
        }
        return false;
@@ -429,11 +428,11 @@ bool KviWinampInterface::jumpTo(kvs_int_t & iPos)
 bool KviWinampInterface::hide()
 {
        HWND hWinamp = find_winamp(this);
-       HWND hWinampPE = FindWindow(TEXT("Winamp PE"), NULL);       /*Playlist*/
-       HWND hWinampEQ = FindWindow(TEXT("Winamp EQ"), NULL);       /*Equalizer*/
-       HWND hWinampMB = FindWindow(TEXT("Winamp MB"), NULL);       /*MiniBrowser*/
-       HWND hWinampGen = FindWindow(TEXT("Winamp Gen"), NULL);     /*Library*/
-       HWND hWinampVideo = FindWindow(TEXT("Winamp Video"), NULL); /*Video*/
+       HWND hWinampPE = FindWindow(TEXT("Winamp PE"), nullptr);       /*Playlist*/
+       HWND hWinampEQ = FindWindow(TEXT("Winamp EQ"), nullptr);       /*Equalizer*/
+       HWND hWinampMB = FindWindow(TEXT("Winamp MB"), nullptr);       /*MiniBrowser*/
+       HWND hWinampGen = FindWindow(TEXT("Winamp Gen"), nullptr);     /*Library*/
+       HWND hWinampVideo = FindWindow(TEXT("Winamp Video"), nullptr); /*Video*/
        if(hWinamp)
        {
                ShowWindow(hWinamp, SW_HIDE);
index 4bb67b8e5a0efeeef16250c58f36deabac1aa761..0d701558aa23f32afd481a9085ef7a826c9863d2 100644 (file)
@@ -72,7 +72,7 @@ winampGeneralPurposePlugin plugin = {
 #define KVIRC_WM_USER_CHECK 13123
 #define KVIRC_WM_USER_CHECK_REPLY 13124
 
-void * lpWndProcOld = 0;
+void * lpWndProcOld = nullptr;
 
 char szBuffer[4096];
 
index 43ea72c1ca46e3e53f7d87c5386ff94b8db2b87e..8225593146d2e70cacf8382792be964523d0aeb6 100644 (file)
@@ -37,7 +37,7 @@ Idle * g_pIdle;
 
 #define GET_KVS_CONSOLE                                                       \
        kvs_uint_t uiWnd;                                                         \
-       KviConsoleWindow * wnd = 0;                                               \
+       KviConsoleWindow * wnd = nullptr;                                         \
        KVSM_PARAMETERS_BEGIN(c)                                                  \
        KVSM_PARAMETER("context_id", KVS_PT_UINT, KVS_PF_OPTIONAL, uiWnd)         \
        KVSM_PARAMETERS_END(c)                                                    \
index aa2e7b5489c0de7130bc96084b689f5aa4ad8b41..4918253d37415bf01487f5a890c542ec98a3fa53 100644 (file)
@@ -2110,7 +2110,7 @@ KVSO_CLASS_FUNCTION(painter, drawPath)
        CHECK_INTERNAL_POINTER(m_pPainter)
        m_pPainter->drawPath(*m_pPainterPath);
        //delete m_pPainterPath;
-       //m_pPainterPath=0;
+       //m_pPainterPath=nullptr;
        return true;
 }
 
index 35874f1f69a1fac657f902431918e6afbb6428ff..63b4de5c4c1b228563844cb9467eb89249ea3c0a 100644 (file)
@@ -58,7 +58,7 @@ public:
                        {
                                *m_pImage = m_pPixmap->toImage();
                                delete m_pPixmap;
-                               m_pPixmap = 0;
+                               m_pPixmap = nullptr;
                        }
                }
                m_currentType = Image;
@@ -75,7 +75,7 @@ public:
                        {
                                *m_pPixmap = m_pPixmap->fromImage(*m_pImage);
                                delete m_pImage;
-                               m_pImage = 0;
+                               m_pImage = nullptr;
                        }
                }
                m_currentType = Pixmap;
index 559f7f72473ae6e93fcaedc37a6938764fcd5c28..416e78f9b55311198835e0cd39235b4a92dfe968 100644 (file)
@@ -39,7 +39,7 @@ class KvsObject_tableWidget;
 class KviCellItemDelegate : public QItemDelegate
 {
 public:
-       KviCellItemDelegate(QAbstractItemView * pWidget = 0, KvsObject_tableWidget * pParent = 0);
+       KviCellItemDelegate(QAbstractItemView * pWidget = nullptr, KvsObject_tableWidget * pParent = nullptr);
        ~KviCellItemDelegate();
 
 protected:
index c6e92c9dcdcafdfb73f453b57dcd55ff580531f1..28525e7d036d0764305a41e508956467d046c678 100644 (file)
@@ -58,7 +58,7 @@
        g_pKvs##__className##Class->registerStandardFalseReturnFunctionHandler(__szName);
 
 #define KVSO_BEGIN_REGISTERCLASS(__className, __stringName, __baseClass)                                                                 \
-       static KviKvsObjectClass * g_pKvs##__className##Class = 0;                                                                           \
+       static KviKvsObjectClass * g_pKvs##__className##Class = nullptr;                                                                     \
        static KviKvsObject * kvs_##__className##_createInstance(KviKvsObjectClass * pClass, KviKvsObject * pParent, const QString & szName) \
        {                                                                                                                                    \
                return new __className(pClass, pParent, szName);                                                                                 \
@@ -66,7 +66,7 @@
        void __className::unregisterSelf()                                                                                                   \
        {                                                                                                                                    \
                delete g_pKvs##__className##Class;                                                                                               \
-               g_pKvs##__className##Class = 0;                                                                                                  \
+               g_pKvs##__className##Class = nullptr;                                                                                            \
        }                                                                                                                                    \
        void __className::registerSelf()                                                                                                     \
        {                                                                                                                                    \
index 41ed5ae04ad12a00897a695f4dffba90eca75980..36291b24a7a7e34481f267f0cbcd6c8206e33f94 100644 (file)
@@ -3712,7 +3712,7 @@ KviOptionsWidget * OptionsInstanceManager::getInstance(OptionsWidgetInstanceEntr
                        QWidget * pOldPar = (QWidget *)pEntry->pWidget->parent();
                        pEntry->pWidget->setParent(pPar);
                        pOldPar->deleteLater();
-                       pEntry->pWidget = 0;
+                       pEntry->pWidget = nullptr;
                }
        }
 #endif
index fb65be65d3aac7e6e2fe709327d629c769d3346b..9652a7b0c10e7f1ae9b73fe1502dd9dc9e16b6a2 100644 (file)
@@ -113,7 +113,7 @@ class MessageListWidgetItemDelegate : public QItemDelegate
 {
        Q_OBJECT
 public:
-       MessageListWidgetItemDelegate(QAbstractItemView * pWidget = 0)
+       MessageListWidgetItemDelegate(QAbstractItemView * pWidget = nullptr)
            : QItemDelegate(pWidget){};
        ~MessageListWidgetItemDelegate(){};
        void paint(QPainter * p, const QStyleOptionViewItem & opt, const QModelIndex & index) const;
@@ -151,7 +151,7 @@ class MessageColorListWidgetItemDelegate : public QItemDelegate
 {
        Q_OBJECT
 public:
-       MessageColorListWidgetItemDelegate(QAbstractItemView * pWidget = 0)
+       MessageColorListWidgetItemDelegate(QAbstractItemView * pWidget = nullptr)
            : QItemDelegate(pWidget){};
        ~MessageColorListWidgetItemDelegate(){};
        void paint(QPainter * p, const QStyleOptionViewItem & opt, const QModelIndex & index) const;
index 858f6cd6356555cea26ffab8e69fc246dca2247b..d1c33c518b80dfaf41eb0ced6af482430a94307c 100755 (executable)
@@ -229,7 +229,7 @@ printclass()
        echo "$3        e$1 = new OptionsWidgetInstanceEntry;"  >> $TARGET
        echo -n "$3     e$1->createProc = &class$2"  >> $TARGET
                echo "_createInstanceProc;"  >> $TARGET
-       echo "$3        e$1->pWidget = 0;" >> $TARGET
+       echo "$3        e$1->pWidget = nullptr;" >> $TARGET
        echo "$3        e$1->szClassName = g_szClassName_$2;" >> $TARGET
        echo "$3        e$1->eIcon = KVI_OPTIONS_WIDGET_ICON_$2;" >> $TARGET
 
@@ -288,7 +288,7 @@ addchildren()
                                NEXTLEVEL=`expr $1 + 1`
                                addchildren $NEXTLEVEL $achild "$3      "
                        else
-                               echo "$3        e$1->pChildList = 0;" >> $TARGET
+                               echo "$3        e$1->pChildList = nullptr;" >> $TARGET
                        fi
                done
        fi
@@ -316,7 +316,7 @@ void OptionsInstanceManager::deleteInstanceTree(KviPointerList<OptionsWidgetInst
                                {
                                        disconnect(pEntry->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed()));
                                        delete pEntry->pWidget->parent();
-                                       pEntry->pWidget =  0;
+                                       pEntry->pWidget = nullptr;
                                } else {
                                        qDebug("Ops...i have deleted the options dialog ?");
                                }
@@ -337,14 +337,14 @@ OptionsInstanceManager::~OptionsInstanceManager()
 void OptionsInstanceManager::cleanup(KviModule *)
 {
        deleteInstanceTree(m_pInstanceTree);
-       m_pInstanceTree = 0;
+       m_pInstanceTree = nullptr;
 }
 
 void OptionsInstanceManager::widgetDestroyed()
 {
        OptionsWidgetInstanceEntry * pEntry = findInstanceEntry(sender(),m_pInstanceTree);
        if(pEntry)
-               pEntry->pWidget = 0;
+               pEntry->pWidget = nullptr;
        if(g_iOptionWidgetInstances > 0)
                g_iOptionWidgetInstances--;
 
@@ -353,7 +353,7 @@ void OptionsInstanceManager::widgetDestroyed()
 KviOptionsWidget * OptionsInstanceManager::getInstance(OptionsWidgetInstanceEntry * pEntry, QWidget * pPar)
 {
        if(!pEntry)
-               return NULL;
+               return nullptr;
 
 #if 0
        if(pEntry->pWidget)
@@ -363,7 +363,7 @@ KviOptionsWidget * OptionsInstanceManager::getInstance(OptionsWidgetInstanceEntr
                        QWidget * pOldPar = (QWidget *)pEntry->pWidget->parent();
                        pEntry->pWidget->setParent(pPar);
                        pOldPar->deleteLater();
-                       pEntry->pWidget = 0;
+                       pEntry->pWidget = nullptr;
                }
        }
 #endif
index 9384e9e723e9a0cf474a50c19ab1189bb345d63a..62228bdecda121d347ed2ad82341ede1b9ea49cd 100644 (file)
@@ -104,7 +104,7 @@ public:
 
 protected:
        // theItem is the item above the first item that has to be inserted
-       void populateMenu(KviKvsPopupMenu * pop, PopupTreeWidgetItem * par, PopupTreeWidgetItem * theItem = 0);
+       void populateMenu(KviKvsPopupMenu * pop, PopupTreeWidgetItem * par, PopupTreeWidgetItem * theItem = nullptr);
        void saveLastSelectedItem();
        void addItemToMenu(KviKvsPopupMenu * pop, PopupTreeWidgetItem * par);
        PopupTreeWidgetItem * newItem(PopupTreeWidgetItem * par, PopupTreeWidgetItem * after, PopupTreeWidgetItem::Type t);
index f066a21f57642db8052ecc8acf05a14bafbcf4de..a949ae16d57ec5c582e8efe0e5403723ca012830 100644 (file)
@@ -54,7 +54,7 @@ signals:
 class RegisteredUsersDialogItemDelegate : public QStyledItemDelegate
 {
 public:
-       RegisteredUsersDialogItemDelegate(KviRegisteredUsersListView * pWidget = 0)
+       RegisteredUsersDialogItemDelegate(KviRegisteredUsersListView * pWidget = nullptr)
            : QStyledItemDelegate(pWidget){};
        ~RegisteredUsersDialogItemDelegate(){};
        QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const override;
@@ -123,7 +123,7 @@ class RegisteredUsersDialog : public QWidget
 {
        Q_OBJECT
 public:
-       RegisteredUsersDialog(QWidget * par = 0);
+       RegisteredUsersDialog(QWidget * par = nullptr);
        ~RegisteredUsersDialog();
 
 public:
index bfbd380c941cb1407bf1fd115d8c24a705829503..a3cd710ed6c6dc678c6e741c1c95c1e97db78030 100644 (file)
@@ -43,7 +43,7 @@ class RegistrationWizard : public KviTalWizard
 {
        Q_OBJECT
 public:
-       RegistrationWizard(const QString & startMask, KviRegisteredUserDataBase * db = 0, QWidget * par = 0, bool bModal = false);
+       RegistrationWizard(const QString & startMask, KviRegisteredUserDataBase * db = nullptr, QWidget * par = nullptr, bool bModal = false);
        ~RegistrationWizard();
 
        KviRegisteredUserDataBase * m_pDb;
index 6905397e9ce9909a42d551ec384edd8b966190c1..95331c07a5aa0dcd45c8cbb61be715a16ef45da5 100644 (file)
@@ -145,31 +145,31 @@ protected:
 public:
        // Initializes the crypt session
        // Returns RIJNDAEL_SUCCESS or an error code
-       int init(Mode mode, Direction dir, const UINT8 * key, KeyLength keyLen, UINT8 * initVector = 0);
+       int init(Mode mode, Direction dir, const UINT8 * key, KeyLength keyLen, UINT8 * initVector = nullptr);
        // Input len is in BITS!
        // Encrypts inputLen / 128 blocks of input and puts it in outBuffer
        // outBuffer must be at least inputLen / 8 bytes long.
        // Returns the encrypted buffer length in BITS or an error code < 0 in case of error
-       int blockEncrypt(const UINT8 * input, int inputLen, UINT8 * outBuffer, UINT8 * initVector = 0);
+       int blockEncrypt(const UINT8 * input, int inputLen, UINT8 * outBuffer, UINT8 * initVector = nullptr);
        // Input len is in BYTES!
        // outBuffer must be at least inputLen + 16 bytes long
        // Returns the encrypted buffer length in BYTES or an error code < 0 in case of error
-       int padEncrypt(const UINT8 * input, int inputOctets, UINT8 * outBuffer, UINT8 * initVector = 0);
+       int padEncrypt(const UINT8 * input, int inputOctets, UINT8 * outBuffer, UINT8 * initVector = nullptr);
        // Input len is in BITS!
        // outBuffer must be at least inputLen / 8 bytes long
        // Returns the decrypted buffer length in BITS and an error code < 0 in case of error
-       int blockDecrypt(const UINT8 * input, int inputLen, UINT8 * outBuffer, UINT8 * initVector = 0);
+       int blockDecrypt(const UINT8 * input, int inputLen, UINT8 * outBuffer, UINT8 * initVector = nullptr);
        // Input len is in BYTES!
        // outBuffer must be at least inputLen bytes long
        // Returns the decrypted buffer length in BYTES and an error code < 0 in case of error
-       int padDecrypt(const UINT8 * input, int inputOctets, UINT8 * outBuffer, UINT8 * initVector = 0);
+       int padDecrypt(const UINT8 * input, int inputOctets, UINT8 * outBuffer, UINT8 * initVector = nullptr);
 
 protected:
        void keySched(UINT8 key[_MAX_KEY_COLUMNS][4]);
        void keyEncToDec();
        void encrypt(const UINT8 a[16], UINT8 b[16]);
        void decrypt(const UINT8 a[16], UINT8 b[16]);
-       void updateInitVector(UINT8 * initVector = 0);
+       void updateInitVector(UINT8 * initVector = nullptr);
 };
 
 #endif // COMPILE_CRYPT_SUPPORT
index 00519dfe2e24e6dc053f516673e9cdc8a32485a4..8cef633e18f2f67bffffc013f36b79d3c31cba56 100644 (file)
@@ -806,7 +806,7 @@ void SetupWizard::makeLink()
               0, KEY_QUERY_VALUE, &hCU)
            == ERROR_SUCCESS)
        {
-               RegQueryValueEx(hCU, TEXT("Desktop"), NULL, &lpType,
+               RegQueryValueEx(hCU, TEXT("Desktop"), nullptr, &lpType,
                    (unsigned char *)&szLink, &ulSize);
                RegCloseKey(hCU);
        }
@@ -819,13 +819,13 @@ void SetupWizard::makeLink()
        szKvircExec.append("\\kvirc.exe");
 
        // Trigger a horrible machinery
-       CoInitialize(NULL); // we need COM+OLE
+       CoInitialize(nullptr); // we need COM+OLE
 
        // Fiddle with an obscure shell interface
        IShellLink * psl;
 
        // Get a pointer to the IShellLink interface: this is kinda ugly :)
-       if(CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+       if(CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER,
               IID_IShellLink, (void **)&psl)
            == S_OK)
        {
index fd9fd6deeb951e5327b5206a558904f60a944352..96de53ef329bccf20aeffdb9d07601b7254ddde7 100644 (file)
@@ -57,7 +57,7 @@ class SharedFileEditDialog : public QDialog
 {
        Q_OBJECT
 public:
-       SharedFileEditDialog(QWidget * par, KviSharedFile * f = 0);
+       SharedFileEditDialog(QWidget * par, KviSharedFile * f = nullptr);
        virtual ~SharedFileEditDialog();
 
        QDateTimeEdit * m_pExpireDateTimeEdit;
index 18f0c599b33a45be87b731c4398750447652e193..4c56ab3803fad285e40e072718f760ae46ced74e 100644 (file)
@@ -215,7 +215,7 @@ void KviSoundPlayer::detectSoundSystem()
 #else
 #ifdef COMPILE_ESD_SUPPORT
        esd_format_t format = ESD_BITS16 | ESD_STREAM | ESD_PLAY | ESD_MONO;
-       int esd_fd = esd_play_stream(format, 8012, NULL, "kvirc");
+       int esd_fd = esd_play_stream(format, 8012, nullptr, "kvirc");
        if(esd_fd >= 0)
        {
                KVI_OPTION_STRING(KviOption_stringSoundSystem) = "esd";
@@ -645,7 +645,7 @@ KviEsdSoundThread::~KviEsdSoundThread()
 void KviEsdSoundThread::play()
 {
        // ESD has a really nice API
-       if(!esd_play_file(NULL, m_szFileName.toUtf8().data(), 1)) // this is sync.. FIXME: it can't be stopped!
+       if(!esd_play_file(nullptr, m_szFileName.toUtf8().data(), 1)) // this is sync.. FIXME: it can't be stopped!
                qDebug("Could not play sound %s! [ESD]", m_szFileName.toUtf8().data());
 }
 
index 57ff5b65b402bc26f796a63971d22b5a68e44e52..304daea00725e02da5385b6218df3d4d5e79d3cb 100644 (file)
@@ -55,8 +55,8 @@ TermWidget::TermWidget(QWidget * par, bool bIsStandalone)
                g_pTermWidgetList.insert(this);
        m_bIsStandalone = bIsStandalone;
 
-       m_pKonsolePart = 0;
-       m_pKonsoleWidget = 0;
+       m_pKonsolePart = nullptr;
+       m_pKonsoleWidget = nullptr;
 
        if(bIsStandalone)
        {
@@ -71,9 +71,9 @@ TermWidget::TermWidget(QWidget * par, bool bIsStandalone)
        }
        else
        {
-               m_pHBox = 0;
-               m_pTitleLabel = 0;
-               m_pCloseButton = 0;
+               m_pHBox = nullptr;
+               m_pTitleLabel = nullptr;
+               m_pCloseButton = nullptr;
        }
 
        setFrameStyle(QFrame::Sunken | QFrame::Panel);
@@ -138,8 +138,8 @@ void TermWidget::closeClicked()
 
 void TermWidget::konsoleDestroyed()
 {
-       m_pKonsoleWidget = 0;
-       m_pKonsolePart = 0;
+       m_pKonsoleWidget = nullptr;
+       m_pKonsolePart = nullptr;
        hide();
        QTimer::singleShot(0, this, SLOT(autoClose()));
 }
index 93f17852df41a41c95544149125d93f9bcd271c4..9ee7452268299147b6d7dd66e25ce7c9f798faf0 100644 (file)
@@ -42,7 +42,7 @@ TermWindow::TermWindow(const char * name)
     : KviWindow(KviWindow::Terminal, name)
 {
        g_pTermWindowList.insert(this);
-       m_pTermWidget = 0;
+       m_pTermWidget = nullptr;
        m_pTermWidget = new TermWidget(this);
 }
 
index f4b68fdf90eb8c1384eb0aad373abbc1d5661879..af6ef10dee202f292b9a112bf62bb3b9ac008293 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace ThemeFunctions
 {
-       bool installThemePackage(const QString & szThemePackageFileName, QString & szError, QWidget * pDialogParent = 0);
+       bool installThemePackage(const QString & szThemePackageFileName, QString & szError, QWidget * pDialogParent = nullptr);
 
        void getThemeHtmlDescription(
            QString & szBuffer,
@@ -49,7 +49,7 @@ namespace ThemeFunctions
            const QString & szThemeThemeEngineVersion,
            const QPixmap & pixScreenshot,
            int iUniqueIndexInDocument = 0,
-           KviHtmlDialogData * hd = 0);
+           KviHtmlDialogData * hd = nullptr);
 
        bool makeKVIrcScreenshot(const QString & szSavePngFilePath, bool bMaximizeFrame = false);
 
index 42c906540b8153401737804723e7e69e16ff5845..3e840daeef0edf2ba96a1ade95bb88cc66f9ede8 100644 (file)
@@ -34,7 +34,7 @@ class WebThemeInterfaceDialog : public KviWebPackageManagementDialog
 {
        Q_OBJECT
 public:
-       WebThemeInterfaceDialog(QWidget * par = 0);
+       WebThemeInterfaceDialog(QWidget * par = nullptr);
        ~WebThemeInterfaceDialog();
 
 private:
index 276fd46d6104c91d22df4a84e04176abb38e0b53..31329b0b09edc4a01284eacbec8a84947533c3e2 100644 (file)
@@ -136,7 +136,7 @@ public:
        _interfaceclass##Descriptor::_interfaceclass##Descriptor()          \
            : TorrentInterfaceDescriptor()                                  \
        {                                                                   \
-               m_pInstance = 0;                                                \
+               m_pInstance = nullptr;                                          \
                m_szName = _name;                                               \
                m_szDescription = _description;                                 \
        }                                                                   \
index 59220f27b14637900f138d525b008f7b38d7d3f0..cb14edac75cd12ef70853e39682dad7834cbf6a9 100644 (file)
@@ -109,7 +109,7 @@ class BanFrame : public QFrame
 {
        Q_OBJECT
 public:
-       BanFrame(QWidget * parent = 0, const char * name = 0, bool banEnable = false);
+       BanFrame(QWidget * parent = nullptr, const char * name = nullptr, bool banEnable = false);
        ~BanFrame();
        void saveBans(KviConfigurationFile * cfg);
 
index ab8901db88c08aeaf083e706ad4c4b17a3a7f53e..a7a8cd597a28132bb4110fb231c14a60dd9b7048 100644 (file)
@@ -37,7 +37,7 @@ public:
        };
 
 public:
-       UserWindow(const char * pcName, QString & szIcon, KviConsoleWindow * pConsole = 0, int iCreationFlags = 0);
+       UserWindow(const char * pcName, QString & szIcon, KviConsoleWindow * pConsole = nullptr, int iCreationFlags = 0);
        ~UserWindow();
 
 protected: