Fix compilation with QT_NO_DEBUG_OUTPUT defined

Change-Id: If96e93c08240e0f626f8e465993b2c38b2cad832
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Andy Shaw 2012-04-19 22:55:33 +02:00 committed by Qt by Nokia
parent 384eec86e5
commit a48d9b52c3
6 changed files with 13 additions and 1 deletions

View File

@ -59,14 +59,16 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG #if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_OUTPUT)
bool debug_accessibility(); bool debug_accessibility();
# define accessibleDebug !debug_accessibility() ? (void)0 : qDebug # define accessibleDebug !debug_accessibility() ? (void)0 : qDebug
#else #else
# define accessibleDebug # define accessibleDebug
#endif #endif
#ifndef QT_NO_DEBUG_OUTPUT
#define DEBUG_SHOW_ATCLIENT_COMMANDS #define DEBUG_SHOW_ATCLIENT_COMMANDS
#endif
#if defined(DEBUG_SHOW_ATCLIENT_COMMANDS) #if defined(DEBUG_SHOW_ATCLIENT_COMMANDS)
void accessibleDebugClientCalls_helper(const char* funcName, const QAccessibleInterface *iface); void accessibleDebugClientCalls_helper(const char* funcName, const QAccessibleInterface *iface);
# define accessibleDebugClientCalls(iface) accessibleDebugClientCalls_helper(Q_FUNC_INFO, iface) # define accessibleDebugClientCalls(iface) accessibleDebugClientCalls_helper(Q_FUNC_INFO, iface)

View File

@ -106,6 +106,7 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
void QWindowsBackingStore::resize(const QSize &size, const QRegion &region) void QWindowsBackingStore::resize(const QSize &size, const QRegion &region)
{ {
if (m_image.isNull() || m_image->image().size() != size) { if (m_image.isNull() || m_image->image().size() != size) {
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseBackingStore) { if (QWindowsContext::verboseBackingStore) {
QDebug nsp = qDebug().nospace(); QDebug nsp = qDebug().nospace();
nsp << __FUNCTION__ << ' ' << rasterWindow()->window() nsp << __FUNCTION__ << ' ' << rasterWindow()->window()
@ -113,6 +114,7 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion &region)
if (!m_image.isNull()) if (!m_image.isNull())
nsp << " from: " << m_image->image().size(); nsp << " from: " << m_image->image().size();
} }
#endif
m_image.reset(new QWindowsNativeImage(size.width(), size.height(), m_image.reset(new QWindowsNativeImage(size.width(), size.height(),
QWindowsNativeImage::systemFormat())); QWindowsNativeImage::systemFormat()));
} }

View File

@ -158,6 +158,7 @@ QVariant QWindowsInternalMimeData::retrieveData_sys(const QString &mimeType,
if (const QWindowsMime *converter = mc.converterToMime(mimeType, pDataObj)) if (const QWindowsMime *converter = mc.converterToMime(mimeType, pDataObj))
result = converter->convertToMime(mimeType, pDataObj, type); result = converter->convertToMime(mimeType, pDataObj, type);
releaseDataObject(pDataObj); releaseDataObject(pDataObj);
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseOLE) { if (QWindowsContext::verboseOLE) {
QDebug nospace = qDebug().nospace(); QDebug nospace = qDebug().nospace();
nospace << __FUNCTION__ << ' ' << mimeType << ' ' << type nospace << __FUNCTION__ << ' ' << mimeType << ' ' << type
@ -165,6 +166,7 @@ QVariant QWindowsInternalMimeData::retrieveData_sys(const QString &mimeType,
if (result.type() != QVariant::ByteArray) if (result.type() != QVariant::ByteArray)
nospace << ' ' << result; nospace << ' ' << result;
} }
#endif
return result; return result;
} }

View File

@ -536,6 +536,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
const QFont::Weight weight = weightFromInteger(tm->tmWeight); const QFont::Weight weight = weightFromInteger(tm->tmWeight);
const QFont::Stretch stretch = QFont::Unstretched; const QFont::Stretch stretch = QFont::Unstretched;
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseFonts > 2) { if (QWindowsContext::verboseFonts > 2) {
QDebug nospace = qDebug().nospace(); QDebug nospace = qDebug().nospace();
nospace << __FUNCTION__ << familyName << scriptName nospace << __FUNCTION__ << familyName << scriptName
@ -550,6 +551,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
<< " Style=" << style << " Weight=" << weight << " Style=" << style << " Weight=" << weight
<< " stretch=" << stretch; << " stretch=" << stretch;
} }
#endif
QString englishName; QString englishName;
if (ttf && localizedName(familyName)) if (ttf && localizedName(familyName))

View File

@ -144,6 +144,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
const QFont::Weight weight = weightFromInteger(tm->tmWeight); const QFont::Weight weight = weightFromInteger(tm->tmWeight);
const QFont::Stretch stretch = QFont::Unstretched; const QFont::Stretch stretch = QFont::Unstretched;
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseFonts > 2) { if (QWindowsContext::verboseFonts > 2) {
QDebug nospace = qDebug().nospace(); QDebug nospace = qDebug().nospace();
nospace << __FUNCTION__ << faceName << fullName << scriptName nospace << __FUNCTION__ << faceName << fullName << scriptName
@ -158,6 +159,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
<< " Style=" << style << " Weight=" << weight << " Style=" << style << " Weight=" << weight
<< " stretch=" << stretch; << " stretch=" << stretch;
} }
#endif
QString englishName; QString englishName;
if (ttf && localizedName(faceName)) if (ttf && localizedName(faceName))

View File

@ -470,6 +470,7 @@ static int choosePixelFormat(HDC hdc,
pixelFormat = 0; pixelFormat = 0;
} }
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseGL) { if (QWindowsContext::verboseGL) {
QDebug nsp = qDebug().nospace(); QDebug nsp = qDebug().nospace();
nsp << __FUNCTION__; nsp << __FUNCTION__;
@ -481,6 +482,7 @@ static int choosePixelFormat(HDC hdc,
nsp << noshowbase << dec << "\n obtained px #" << pixelFormat nsp << noshowbase << dec << "\n obtained px #" << pixelFormat
<< " of " << numFormats << "\n " << *obtainedPfd; << " of " << numFormats << "\n " << *obtainedPfd;
} // Debug } // Debug
#endif
return pixelFormat; return pixelFormat;
} }