OSDN Git Service

replace NDEBUG with QT_NO_DEBUG definition
authorIvailo Monev <xakepa10@laimg.moc>
Wed, 18 Dec 2019 03:19:12 +0000 (03:19 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Wed, 18 Dec 2019 03:19:12 +0000 (03:19 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
38 files changed:
mkspecs/mkspecs.cmake
src/3rdparty/javascriptcore/bytecode/CodeBlock.cpp
src/3rdparty/javascriptcore/bytecode/CodeBlock.h
src/3rdparty/javascriptcore/bytecompiler/BytecodeGenerator.cpp
src/3rdparty/javascriptcore/bytecompiler/RegisterID.h
src/3rdparty/javascriptcore/interpreter/CallFrame.cpp
src/3rdparty/javascriptcore/interpreter/CallFrame.h
src/3rdparty/javascriptcore/interpreter/Interpreter.cpp
src/3rdparty/javascriptcore/interpreter/Register.h
src/3rdparty/javascriptcore/runtime/ArgList.h
src/3rdparty/javascriptcore/runtime/Identifier.cpp
src/3rdparty/javascriptcore/runtime/Identifier.h
src/3rdparty/javascriptcore/runtime/JSArray.h
src/3rdparty/javascriptcore/runtime/JSGlobalData.cpp
src/3rdparty/javascriptcore/runtime/JSGlobalObjectFunctions.cpp
src/3rdparty/javascriptcore/runtime/JSGlobalObjectFunctions.h
src/3rdparty/javascriptcore/runtime/JSObject.cpp
src/3rdparty/javascriptcore/runtime/JSValue.cpp
src/3rdparty/javascriptcore/runtime/JSValue.h
src/3rdparty/javascriptcore/runtime/MarkStack.h
src/3rdparty/javascriptcore/runtime/PropertySlot.h
src/3rdparty/javascriptcore/runtime/RegExp.cpp
src/3rdparty/javascriptcore/runtime/ScopeChain.cpp
src/3rdparty/javascriptcore/runtime/ScopeChain.h
src/3rdparty/javascriptcore/runtime/Structure.cpp
src/3rdparty/javascriptcore/runtime/Structure.h
src/3rdparty/javascriptcore/runtime/StructureTransitionTable.h
src/3rdparty/javascriptcore/wtf/AlwaysInline.h
src/3rdparty/javascriptcore/wtf/CrossThreadRefCounted.h
src/3rdparty/javascriptcore/wtf/DateMath.cpp
src/3rdparty/javascriptcore/wtf/FastMalloc.cpp
src/3rdparty/javascriptcore/wtf/FastMalloc.h
src/3rdparty/javascriptcore/wtf/HashTable.h
src/3rdparty/javascriptcore/wtf/PtrAndFlags.h
src/3rdparty/javascriptcore/wtf/RefCounted.h
src/designer/sdk/abstractwidgetdatabase.cpp
src/designer/shared/widgetdatabase.cpp
src/gui/text/qzip.cpp

index 76fa7df..a8d05d4 100644 (file)
@@ -77,7 +77,7 @@ if(NOT KATIE_ARCHITECTURE)
 endif()
 
 if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-    katie_definition(-DQT_NO_DEBUG -DNDEBUG)
+    katie_definition(-DQT_NO_DEBUG)
 endif()
 
 try_compile(bsymbolic_functions_test
index ad411f4..fc793df 100644 (file)
@@ -42,7 +42,7 @@
 
 namespace JSC {
 
-#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
+#if !defined(QT_NO_DEBUG) || ENABLE(OPCODE_SAMPLING)
 
 static UString escapeQuotes(const UString& str)
 {
@@ -991,7 +991,7 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
     }
 }
 
-#endif // !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
+#endif // !defined(QT_NO_DEBUG) || ENABLE(OPCODE_SAMPLING)
 
 #if DUMP_CODE_BLOCK_STATISTICS
 static HashSet<CodeBlock*> liveCodeBlockSet;
@@ -1138,7 +1138,7 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassR
     , m_numParameters(0)
     , m_ownerExecutable(ownerExecutable)
     , m_globalData(0)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     , m_instructionCount(0)
 #endif
     , m_needsFullScopeChain(ownerExecutable->needsActivation())
index 46b18c2..298d0c6 100644 (file)
@@ -109,7 +109,7 @@ namespace JSC {
 
         static void dumpStatistics();
 
-#if !defined(NDEBUG) || ENABLE_OPCODE_SAMPLING
+#if !defined(QT_NO_DEBUG) || ENABLE_OPCODE_SAMPLING
         void dump(ExecState*) const;
         void printStructures(const Instruction*) const;
         void printStructure(const char* name, const Instruction*, int operand) const;
@@ -142,7 +142,7 @@ namespace JSC {
         Vector<Instruction>& instructions() { return m_instructions; }
         void discardBytecode() { m_instructions.clear(); }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         unsigned instructionCount() { return m_instructionCount; }
         void setInstructionCount(unsigned instructionCount) { m_instructionCount = instructionCount; }
 #endif
@@ -243,7 +243,7 @@ namespace JSC {
         int m_numParameters;
 
     private:
-#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
+#if !defined(QT_NO_DEBUG) || ENABLE(OPCODE_SAMPLING)
         void dump(ExecState*, const Vector<Instruction>::const_iterator& begin, Vector<Instruction>::const_iterator&) const;
 
         const char* registerName(ExecState*, int r) const;
@@ -266,7 +266,7 @@ namespace JSC {
         JSGlobalData* m_globalData;
 
         Vector<Instruction> m_instructions;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         unsigned m_instructionCount;
 #endif
 
index 26e3851..02467f2 100644 (file)
@@ -115,13 +115,13 @@ namespace JSC {
     expected by the callee.
 */
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 static bool s_dumpsGeneratedCode = false;
 #endif
 
 void BytecodeGenerator::setDumpsGeneratedCode(bool dumpsGeneratedCode)
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     s_dumpsGeneratedCode = dumpsGeneratedCode;
 #else
     Q_UNUSED(dumpsGeneratedCode);
@@ -130,7 +130,7 @@ void BytecodeGenerator::setDumpsGeneratedCode(bool dumpsGeneratedCode)
 
 bool BytecodeGenerator::dumpsGeneratedCode()
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     return s_dumpsGeneratedCode;
 #else
     return false;
@@ -143,7 +143,7 @@ void BytecodeGenerator::generate()
 
     m_scopeNode->emitBytecode(*this);
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     m_codeBlock->setInstructionCount(m_codeBlock->instructions().size());
 
     if (s_dumpsGeneratedCode)
index 1204ca8..624353f 100644 (file)
@@ -40,7 +40,7 @@ namespace JSC {
         RegisterID()
             : m_refCount(0)
             , m_isTemporary(false)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             , m_didSetIndex(false)
 #endif
         {
@@ -50,7 +50,7 @@ namespace JSC {
             : m_refCount(0)
             , m_index(index)
             , m_isTemporary(false)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             , m_didSetIndex(true)
 #endif
         {
@@ -59,7 +59,7 @@ namespace JSC {
         void setIndex(int index)
         {
             Q_ASSERT(!m_refCount);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_didSetIndex = true;
 #endif
             m_index = index;
@@ -102,7 +102,7 @@ namespace JSC {
         int m_refCount;
         int m_index;
         bool m_isTemporary;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         bool m_didSetIndex;
 #endif
     };
index 69c2934..35b8a06 100644 (file)
@@ -36,7 +36,7 @@ JSValue CallFrame::thisValue()
     return this[codeBlock()->thisRegister()].jsValue();
 }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 void CallFrame::dumpCaller()
 {
     int signedLineNumber;
index b2ed3ab..ead6648 100644 (file)
@@ -89,7 +89,7 @@ namespace JSC  {
         const MarkedArgumentBuffer& emptyList() const { return *globalData().emptyList; }
         Interpreter* interpreter() { return globalData().interpreter; }
         Heap* heap() { return &globalData().heap; }
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         void dumpCaller();
 #endif
         static const HashTable* arrayTable(CallFrame* callFrame) { return callFrame->globalData().arrayTable; }
index a50853b..a5bc19d 100644 (file)
@@ -314,7 +314,7 @@ Interpreter::Interpreter()
 #endif
 }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 
 void Interpreter::dumpCallFrame(CallFrame* callFrame)
 {
index 9750e52..2e58a36 100644 (file)
@@ -97,7 +97,7 @@ namespace JSC {
 
     ALWAYS_INLINE Register::Register()
     {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         *this = JSValue();
 #endif
     }
index 45d3d40..a787f22 100644 (file)
@@ -46,7 +46,7 @@ namespace JSC {
         MarkedArgumentBuffer()
             : m_isUsingInlineBuffer(true)
             , m_markSet(Q_NULLPTR)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             , m_isReadOnly(false)
 #endif
         {
@@ -60,7 +60,7 @@ namespace JSC {
             , m_size(size)
             , m_isUsingInlineBuffer(true)
             , m_markSet(Q_NULLPTR)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             , m_isReadOnly(true)
 #endif
         {
@@ -73,7 +73,7 @@ namespace JSC {
 
             m_buffer = buffer;
             m_size = size;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_isReadOnly = true;
 #endif
         }
@@ -151,7 +151,7 @@ namespace JSC {
 
         VectorType m_vector;
         ListSet* m_markSet;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         bool m_isReadOnly;
 #endif
 
index 0c271b2..428e8b6 100644 (file)
@@ -214,7 +214,7 @@ PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UStri
         if (c <= 0xFF) {
             r = globalData->smallStrings.singleCharacterStringRep(c);
             if (r->isIdentifier()) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
                 checkSameIdentifierTable(globalData);
 #endif
                 return r;
@@ -238,7 +238,7 @@ void Identifier::remove(UString::Rep* r)
     currentIdentifierTable()->remove(r);
 }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 void Identifier::checkSameIdentifierTable(ExecState* exec)
 {
     Q_UNUSED(exec);
index b8eb9c8..079de99 100644 (file)
@@ -93,7 +93,7 @@ namespace JSC {
         static PassRefPtr<UString::Rep> add(ExecState* exec, UString::Rep* r)
         {
             if (r->isIdentifier()) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
                 checkSameIdentifierTable(exec);
 #endif
                 return r;
@@ -103,7 +103,7 @@ namespace JSC {
         static PassRefPtr<UString::Rep> add(JSGlobalData* globalData, UString::Rep* r)
         {
             if (r->isIdentifier()) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
                 checkSameIdentifierTable(globalData);
 #endif
                 return r;
@@ -114,7 +114,7 @@ namespace JSC {
         static PassRefPtr<UString::Rep> addSlowCase(ExecState*, UString::Rep* r);
         static PassRefPtr<UString::Rep> addSlowCase(JSGlobalData*, UString::Rep* r);
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         static void checkSameIdentifierTable(ExecState*);
         static void checkSameIdentifierTable(JSGlobalData*);
 #endif
index 14924f3..3219186 100644 (file)
@@ -157,7 +157,7 @@ namespace JSC {
     {
         Q_ASSERT(Heap::isCellMarked(cell));
         if (!cell->structure()->typeInfo().overridesMarkChildren()) {
-#ifdef NDEBUG
+#ifdef QT_NO_DEBUG
             asObject(cell)->markChildrenDirect(*this);
 #else
             Q_ASSERT(!m_isCheckingForDefaultMarkViolation);
index d423655..fc64f1a 100644 (file)
@@ -139,7 +139,7 @@ JSGlobalData::~JSGlobalData()
     // By the time this is destroyed, heap.destroy() must already have been called.
 
     delete interpreter;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     // Zeroing out to make the behavior more predictable when someone attempts to use a deleted instance.
     interpreter = 0;
 #endif
index 3f6d740..968bc68 100644 (file)
@@ -428,7 +428,7 @@ JSValue QT_FASTCALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, cons
     return jsString(exec, builder.release());
 }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 JSValue QT_FASTCALL globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
 {
     CStringBuffer string;
index 09c6c9c..82b6dcf 100644 (file)
@@ -47,7 +47,7 @@ namespace JSC {
     JSValue QT_FASTCALL globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValue, const ArgList&);
     JSValue QT_FASTCALL globalFuncEscape(ExecState*, JSObject*, JSValue, const ArgList&);
     JSValue QT_FASTCALL globalFuncUnescape(ExecState*, JSObject*, JSValue, const ArgList&);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     JSValue QT_FASTCALL globalFuncJSCPrint(ExecState*, JSObject*, JSValue, const ArgList&);
 #endif
 
index 1cb1355..3ce824d 100644 (file)
@@ -65,14 +65,14 @@ static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* class
 
 void JSObject::markChildren(MarkStack& markStack)
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     bool wasCheckingForDefaultMarkViolation = markStack.m_isCheckingForDefaultMarkViolation;
     markStack.m_isCheckingForDefaultMarkViolation = false;
 #endif
 
     markChildrenDirect(markStack);
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     markStack.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation;
 #endif
 }
index bbadaa9..f80c399 100644 (file)
@@ -105,7 +105,7 @@ JSObject* JSValue::synthesizePrototype(ExecState* exec) const
     return new (exec) JSNotAnObject(exec, exception);
 }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 char* JSValue::description()
 {
     static const size_t size = 32;
index 60859d0..e31b5a1 100644 (file)
@@ -199,7 +199,7 @@ namespace JSC {
         bool isCell() const;
         JSCell* asCell() const;
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         char* description();
 #endif
 
index dfa3850..293bbb8 100644 (file)
@@ -40,7 +40,7 @@ namespace JSC {
     public:
         MarkStack(void* jsArrayVPtr)
             : m_jsArrayVPtr(jsArrayVPtr)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             , m_isCheckingForDefaultMarkViolation(false)
 #endif
         {
@@ -170,7 +170,7 @@ namespace JSC {
         MarkStackArray<JSCell*> m_values;
         static size_t s_pageSize;
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     public:
         bool m_isCheckingForDefaultMarkViolation;
 #endif
index c118ccf..1350f92 100644 (file)
@@ -172,14 +172,14 @@ namespace JSC {
 
         void clearBase()
         {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_slotBase = JSValue();
 #endif
         }
 
         void clearValue()
         {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_value = JSValue();
 #endif
         }
index 9e0142d..8a1c143 100644 (file)
@@ -129,7 +129,7 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
         const int numMatches = pcre_exec(m_regExp, Q_NULLPTR, s.ascii(), s.size(), startOffset, 0, offsetVector, offsetVectorSize);
 
         if (numMatches < 0) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             if (numMatches != PCRE_ERROR_NOMATCH)
                 fprintf(stderr, "jsRegExpExecute failed with result %d\n", numMatches);
 #endif
index 3102939..2a55f74 100644 (file)
@@ -29,7 +29,7 @@
 
 namespace JSC {
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 
 void ScopeChainNode::print() const
 {
index c7916ce..d8bdc03 100644 (file)
@@ -44,7 +44,7 @@ namespace JSC {
             Q_ASSERT(globalData);
             Q_ASSERT(globalObject);
         }
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         // Due to the number of subtle and timing dependent bugs that have occurred due
         // to deleted but still "valid" ScopeChainNodes we now deliberately clobber the
         // contents in debug builds.
@@ -86,7 +86,7 @@ namespace JSC {
         ScopeChainIterator begin() const;
         ScopeChainIterator end() const;
 
-#ifndef NDEBUG        
+#ifndef QT_NO_DEBUG        
         void print() const;
 #endif
     };
@@ -184,7 +184,7 @@ namespace JSC {
         {
             if (m_node)
                 m_node->deref();
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_node = 0;
 #endif
         }
@@ -214,7 +214,7 @@ namespace JSC {
         // Returns the depth of the current call frame's scope chain
         int localDepth() const;
 
-#ifndef NDEBUG        
+#ifndef QT_NO_DEBUG        
         void print() const { m_node->print(); }
 #endif
 
index 7de5318..2af62cf 100644 (file)
@@ -36,7 +36,7 @@
 
 #define DUMP_STRUCTURE_ID_STATISTICS 0
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 #define DO_PROPERTYMAP_CONSTENCY_CHECK 0
 #else
 #define DO_PROPERTYMAP_CONSTENCY_CHECK 0
@@ -56,7 +56,7 @@ static const unsigned tinyMapThreshold = 20;
 
 static const unsigned newTableSize = 16;
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 static bool shouldIgnoreLeaks;
 static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>);
 #endif
@@ -127,7 +127,7 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo)
     Q_ASSERT(m_prototype);
     Q_ASSERT(m_prototype.isObject() || m_prototype.isNull());
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     if (shouldIgnoreLeaks)
         ignoreSet.add(this);
     else
@@ -164,7 +164,7 @@ Structure::~Structure()
         fastFree(m_propertyTable);
     }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     HashSet<Structure*>::iterator it = ignoreSet.find(this);
     if (it != ignoreSet.end())
         ignoreSet.remove(it);
@@ -176,7 +176,7 @@ Structure::~Structure()
     liveStructureSet.remove(this);
 #endif
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     if (m_count) {
         qDebug("LEAK: %u Structure", m_count);
     }
@@ -185,14 +185,14 @@ Structure::~Structure()
 
 void Structure::startIgnoringLeaks()
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     shouldIgnoreLeaks = true;
 #endif
 }
 
 void Structure::stopIgnoringLeaks()
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     shouldIgnoreLeaks = false;
 #endif
 }
index b0e2572..8b85237 100644 (file)
@@ -38,7 +38,7 @@
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 #define DUMP_PROPERTYMAP_STATS 0
 #else
 #define DUMP_PROPERTYMAP_STATS 0
@@ -179,7 +179,7 @@ namespace JSC {
         
         bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const;
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         volatile int m_count;
 #endif
 
index a8df9c1..1bdc4e6 100644 (file)
@@ -190,7 +190,7 @@ namespace JSC {
         void setTransitionTable(TransitionTable* table)
         {
             Q_ASSERT(usingSingleTransitionSlot());
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             setSingleTransition(0);
 #endif
             m_transitions.m_table = table;
index a40e428..4567b0f 100644 (file)
@@ -21,7 +21,7 @@
 #include "Platform.h"
 
 #ifndef ALWAYS_INLINE
-#if COMPILER(GCC) && defined(NDEBUG) && !COMPILER(MINGW)
+#if COMPILER(GCC) && defined(QT_NO_DEBUG) && !COMPILER(MINGW)
 #define ALWAYS_INLINE inline __attribute__((__always_inline__))
 #else
 #define ALWAYS_INLINE inline
index 3ceeb6b..f022bb5 100644 (file)
@@ -74,7 +74,7 @@ namespace WTF {
         CrossThreadRefCounted(T* data, ThreadSafeSharedBase* threadedCounter)
             : m_threadSafeRefCounter(threadedCounter)
             , m_data(data)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             , m_threadId(0)
 #endif
         {
@@ -88,14 +88,14 @@ namespace WTF {
 
         void threadSafeDeref();
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         bool isOwnedByCurrentThread() const { return !m_threadId || m_threadId == currentThread(); }
 #endif
 
         RefCountedBase m_refCounter;
         ThreadSafeSharedBase* m_threadSafeRefCounter;
         T* m_data;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         ThreadIdentifier m_threadId;
 #endif
     };
@@ -105,7 +105,7 @@ namespace WTF {
     {
         Q_ASSERT(isOwnedByCurrentThread());
         m_refCounter.ref();
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         // Store the threadId as soon as the ref count gets to 2.
         // The class gets created with a ref count of 1 and then passed
         // to another thread where to ref count get increased.  This
@@ -124,7 +124,7 @@ namespace WTF {
             threadSafeDeref();
             delete this;
         } else {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             // Clear the threadId when the ref goes to 1 because it
             // is safe to be passed to another thread at this point.
             if (m_threadId && m_refCounter.refCount() == 1)
index 57c3730..c206508 100644 (file)
@@ -463,7 +463,7 @@ LocalTimeOffset calculateLocalTimeOffset(double ms)
 
 void initializeDates()
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     static bool alreadyInitialized;
     Q_ASSERT(!alreadyInitialized);
     alreadyInitialized = true;
index f45fac7..9901a91 100644 (file)
@@ -80,7 +80,7 @@
 #include "Assertions.h"
 #include <string.h>
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
 namespace WTF {
 
 static bool staticIsForbidden;
@@ -100,7 +100,7 @@ void fastMallocAllow()
 }
 
 } // namespace WTF
-#endif // NDEBUG
+#endif // QT_NO_DEBUG
 
 namespace WTF {
 
index 77884f1..8fda380 100644 (file)
@@ -37,7 +37,7 @@ namespace WTF {
 
     void fastFree(void*);
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     void fastMallocForbid();
     void fastMallocAllow();
 #endif
@@ -50,7 +50,7 @@ using WTF::tryFastMalloc;
 using WTF::tryFastRealloc;
 using WTF::fastFree;
 
-#ifndef NDEBUG    
+#ifndef QT_NO_DEBUG    
 using WTF::fastMallocForbid;
 using WTF::fastMallocAllow;
 #endif
index b645187..28eecb5 100644 (file)
@@ -32,7 +32,7 @@ namespace WTF {
 #define DUMP_HASHTABLE_STATS 0
 #define CHECK_HASHTABLE_CONSISTENCY 0
 
-#ifdef NDEBUG
+#ifdef QT_NO_DEBUG
 #define CHECK_HASHTABLE_ITERATORS 0
 #define CHECK_HASHTABLE_USE_AFTER_DESTRUCTION 0
 #else
index 10e67ea..e43ea9b 100644 (file)
@@ -44,7 +44,7 @@ namespace WTF {
         {
             Q_ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3));
             m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3);
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_leaksPtr = ptr;
 #endif
         }
@@ -54,7 +54,7 @@ namespace WTF {
 
     protected:
         intptr_t m_ptrAndFlags;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced.
 #endif
     };
index f9e8b39..9358677 100644 (file)
@@ -51,7 +51,7 @@ public:
 protected:
     RefCountedBase()
         : m_refCount(1)
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         , m_deletionHasBegun(false)
 #endif
     {
@@ -67,7 +67,7 @@ protected:
         Q_ASSERT(!m_deletionHasBegun);
         Q_ASSERT(m_refCount > 0);
         if (m_refCount == 1) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
             m_deletionHasBegun = true;
 #endif
             return true;
@@ -77,7 +77,7 @@ protected:
         return false;
     }
 
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     bool deletionHasBegun() const
     {
         return m_deletionHasBegun;
@@ -89,7 +89,7 @@ private:
     friend class CrossThreadRefCounted;
 
     int m_refCount;
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     bool m_deletionHasBegun;
 #endif
 };
index d748834..e931228 100644 (file)
@@ -95,7 +95,7 @@ int QDesignerWidgetDataBaseInterface::indexOf(QDesignerWidgetDataBaseItemInterfa
 */
 void QDesignerWidgetDataBaseInterface::insert(int index, QDesignerWidgetDataBaseItemInterface *item)
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     qDebug() << "insert at " << index << ' ' << item->name() << " derived from " << item->extends(); 
 #endif
     m_items.insert(index, item);
@@ -105,7 +105,7 @@ void QDesignerWidgetDataBaseInterface::insert(int index, QDesignerWidgetDataBase
 */
 void QDesignerWidgetDataBaseInterface::append(QDesignerWidgetDataBaseItemInterface *item)
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     qDebug() << "append " << item->name() << " derived from " << item->extends();
 #endif
     m_items.append(item);
index 327cdb0..743be02 100644 (file)
@@ -422,7 +422,7 @@ void WidgetDataBase::loadPlugins()
             }
         }
     }
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     qDebug() << "WidgetDataBase::loadPlugins(): " << addedPlugins << " added, " << replacedPlugins << " replaced, " << removedPlugins << "deleted.";
 #endif
 }
@@ -780,7 +780,7 @@ QDESIGNER_SHARED_EXPORT QDesignerWidgetDataBaseItemInterface *
                       const QString &includeFile,
                       bool promoted, bool custom)
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     qDebug() << "appendDerived " << className << " derived from " << baseClassName;
 #endif
     // Check.
@@ -817,7 +817,7 @@ QDESIGNER_SHARED_EXPORT QDesignerWidgetDataBaseItemInterface *
     // Create this item, inheriting its base properties
     const int baseIndex = db->indexOfClassName(baseClassName);
     if (baseIndex == -1) {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
         qDebug() << "appendDerived failed due to missing base class";
 #endif
         return 0;
index 1d6ecf7..e8b42bf 100644 (file)
@@ -535,7 +535,7 @@ void QZipReaderPrivate::scanFiles()
 
 void QZipWriterPrivate::addEntry(EntryType type, const QString &fileName, const QByteArray &contents/*, QFile::Permissions permissions, QZip::Method m*/)
 {
-#ifndef NDEBUG
+#ifndef QT_NO_DEBUG
     static const char *entryTypes[] = {
         "directory",
         "file     ",