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
#ifndef QT_NO_DEBUG
#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_OUTPUT)
bool debug_accessibility();
# define accessibleDebug !debug_accessibility() ? (void)0 : qDebug
#else
# define accessibleDebug
#endif
#ifndef QT_NO_DEBUG_OUTPUT
#define DEBUG_SHOW_ATCLIENT_COMMANDS
#endif
#if defined(DEBUG_SHOW_ATCLIENT_COMMANDS)
void accessibleDebugClientCalls_helper(const char* funcName, const QAccessibleInterface *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)
{
if (m_image.isNull() || m_image->image().size() != size) {
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseBackingStore) {
QDebug nsp = qDebug().nospace();
nsp << __FUNCTION__ << ' ' << rasterWindow()->window()
@ -113,6 +114,7 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion &region)
if (!m_image.isNull())
nsp << " from: " << m_image->image().size();
}
#endif
m_image.reset(new QWindowsNativeImage(size.width(), size.height(),
QWindowsNativeImage::systemFormat()));
}

View File

@ -158,6 +158,7 @@ QVariant QWindowsInternalMimeData::retrieveData_sys(const QString &mimeType,
if (const QWindowsMime *converter = mc.converterToMime(mimeType, pDataObj))
result = converter->convertToMime(mimeType, pDataObj, type);
releaseDataObject(pDataObj);
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseOLE) {
QDebug nospace = qDebug().nospace();
nospace << __FUNCTION__ << ' ' << mimeType << ' ' << type
@ -165,6 +166,7 @@ QVariant QWindowsInternalMimeData::retrieveData_sys(const QString &mimeType,
if (result.type() != QVariant::ByteArray)
nospace << ' ' << result;
}
#endif
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::Stretch stretch = QFont::Unstretched;
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseFonts > 2) {
QDebug nospace = qDebug().nospace();
nospace << __FUNCTION__ << familyName << scriptName
@ -550,6 +551,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
<< " Style=" << style << " Weight=" << weight
<< " stretch=" << stretch;
}
#endif
QString englishName;
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::Stretch stretch = QFont::Unstretched;
#ifndef QT_NO_DEBUG_OUTPUT
if (QWindowsContext::verboseFonts > 2) {
QDebug nospace = qDebug().nospace();
nospace << __FUNCTION__ << faceName << fullName << scriptName
@ -158,6 +159,7 @@ static bool addFontToDatabase(QString familyName, const QString &scriptName,
<< " Style=" << style << " Weight=" << weight
<< " stretch=" << stretch;
}
#endif
QString englishName;
if (ttf && localizedName(faceName))

View File

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