QtBase (remainder): use printf-style qWarning/qDebug where possible (I)

The printf-style version of QDebug expands to a lot less code than the
std::ostream-style version. Of course, you pay in type safety (but
compilers warn about it these days), you cannot stream complex Qt
types and streaming QStrings is awkward, but in many cases you
actually improve on readability.

But the main reason is that something that's not supposed to be
executed under normal operation has no business bloating executable
code size.

This is not an attempt at converting all qWarnings() to printf-style,
only the low-hanging fruit.

In this first part, replace
   qWarning() << ""
with
   qWarning("...").

Had to fix broken qImDebug() definition. Instead of defining it as
a nullary macro in the QT_NO_DEBUG case and as a variadic macro in
the other, define it in both cases, as is customary, as a non-function
macro so that overload selection works without requiring variadic
macro support of the compiler.

Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3
AMD64 builds.

Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Marc Mutz 2015-10-17 17:48:34 +02:00
parent 8c0ae00dd6
commit 6417bbde85
48 changed files with 141 additions and 141 deletions

View File

@ -1796,7 +1796,7 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
if (e)
connection->postEventToThread(MessageResultReceivedAction, call->receiver, e);
else
qDBusDebug() << "Deliver failed!";
qDBusDebug("Deliver failed!");
}
if (call->pending) {

View File

@ -688,7 +688,7 @@ bool QGLShaderProgram::init()
if (d->glfuncs->hasOpenGLFeature(QOpenGLFunctions::Shaders)) {
GLuint program = d->glfuncs->glCreateProgram();
if (!program) {
qWarning() << "QGLShaderProgram: could not create shader program";
qWarning("QGLShaderProgram: could not create shader program");
return false;
}
if (d->programGuard)
@ -696,7 +696,7 @@ bool QGLShaderProgram::init()
d->programGuard = createSharedResourceGuard(context, program, freeProgramFunc);
return true;
} else {
qWarning() << "QGLShaderProgram: shader programs are not supported";
qWarning("QGLShaderProgram: shader programs are not supported");
return false;
}
}

View File

@ -1003,7 +1003,7 @@ QFontEngine *QCoreTextFontDatabase::freeTypeFontEngine(const QFontDef &fontDef,
}
if (!engine->init(faceId, antialias, format, fontData) || engine->invalid()) {
qWarning() << "QCoreTextFontDatabase::freeTypefontEngine Failed to create engine";
qWarning("QCoreTextFontDatabase::freeTypefontEngine Failed to create engine");
return Q_NULLPTR;
}
engine->setQtDefaultHintStyle(static_cast<QFont::HintingPreference>(fontDef.hintingPreference));

View File

@ -783,7 +783,7 @@ void AtSpiAdaptor::updateEventListeners()
}
m_applicationAdaptor->sendEvents(!evList.isEmpty());
} else {
qAtspiDebug() << "Could not query active accessibility event listeners.";
qAtspiDebug("Could not query active accessibility event listeners.");
}
}
@ -944,7 +944,7 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
if (sendObject || sendObject_text_changed) {
QAccessibleInterface * iface = event->accessibleInterface();
if (!iface || !iface->textInterface()) {
qAtspiDebug() << "Received text event for invalid interface.";
qAtspiDebug("Received text event for invalid interface.");
return;
}
QString path = pathForInterface(iface);
@ -1030,7 +1030,7 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
if (sendObject || sendObject_value_changed || sendObject_property_change_accessible_value) {
QAccessibleInterface * iface = event->accessibleInterface();
if (!iface) {
qWarning() << "ValueChanged event from invalid accessible.";
qWarning("ValueChanged event from invalid accessible.");
return;
}
if (iface->valueInterface()) {
@ -1059,7 +1059,7 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
case QAccessible::Selection: {
QAccessibleInterface * iface = event->accessibleInterface();
if (!iface) {
qWarning() << "Selection event from invalid accessible.";
qWarning("Selection event from invalid accessible.");
return;
}
QString path = pathForInterface(iface);
@ -1076,7 +1076,7 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
if (stateChange.checked) {
QAccessibleInterface * iface = event->accessibleInterface();
if (!iface) {
qWarning() << "StateChanged event from invalid accessible.";
qWarning("StateChanged event from invalid accessible.");
return;
}
int checked = iface->state().checked;
@ -1481,7 +1481,7 @@ QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface)
}
#ifdef ACCESSIBLE_CREATION_DEBUG
else {
qAtspiDebug() << " IS NOT a component";
qAtspiDebug(" IS NOT a component");
}
#endif
if (interface->role() == QAccessible::Application)
@ -1538,7 +1538,7 @@ QString AtSpiAdaptor::pathForObject(QObject *object) const
Q_ASSERT(object);
if (inheritsQAction(object)) {
qAtspiDebug() << "AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.";
qAtspiDebug("AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.");
}
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(object);
@ -1669,18 +1669,18 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt
// int width = message.arguments().at(2).toInt();
// int height = message.arguments().at(3).toInt();
// uint coordinateType = message.arguments().at(4).toUInt();
qAtspiDebug() << "SetExtents is not implemented.";
qAtspiDebug("SetExtents is not implemented.");
sendReply(connection, message, false);
} else if (function == QLatin1String("SetPosition")) {
// int x = message.arguments().at(0).toInt();
// int y = message.arguments().at(1).toInt();
// uint coordinateType = message.arguments().at(2).toUInt();
qAtspiDebug() << "SetPosition is not implemented.";
qAtspiDebug("SetPosition is not implemented.");
sendReply(connection, message, false);
} else if (function == QLatin1String("SetSize")) {
// int width = message.arguments().at(0).toInt();
// int height = message.arguments().at(1).toInt();
qAtspiDebug() << "SetSize is not implemented.";
qAtspiDebug("SetSize is not implemented.");
sendReply(connection, message, false);
} else {
qAtspiDebug() << "WARNING: AtSpiAdaptor::componentInterface does not implement " << function << message.path();

View File

@ -162,7 +162,7 @@ void QConnmanManagerInterface::connectNotify(const QMetaMethod &signal)
QLatin1String(CONNMAN_MANAGER_INTERFACE),
QLatin1String("PropertyChanged"),
this,SIGNAL(propertyChanged(QString,QDBusVariant)))) {
qWarning() << "PropertyChanged not connected";
qWarning("PropertyChanged not connected");
}
}
@ -173,7 +173,7 @@ void QConnmanManagerInterface::connectNotify(const QMetaMethod &signal)
QLatin1String(CONNMAN_MANAGER_INTERFACE),
QLatin1String("ServicesChanged"),
this,SLOT(onServicesChanged(ConnmanMapList, QList<QDBusObjectPath>)))) {
qWarning() << "servicesChanged not connected";
qWarning("servicesChanged not connected");
}
}
}

View File

@ -136,7 +136,7 @@ bool QNetworkManagerInterface::setConnections()
QList <QDBusObjectPath> QNetworkManagerInterface::getDevices()
{
if (devicesPathList.isEmpty()) {
//qWarning() << "using blocking call!";
//qWarning("using blocking call!");
QDBusReply<QList<QDBusObjectPath> > reply = call(QLatin1String("GetDevices"));
devicesPathList = reply.value();
}
@ -639,7 +639,7 @@ void QNetworkManagerInterfaceDeviceWireless::accessPointsFinished(QDBusPendingCa
QList <QDBusObjectPath> QNetworkManagerInterfaceDeviceWireless::getAccessPoints()
{
if (accessPointsList.isEmpty()) {
//qWarning() << "Using blocking call!";
//qWarning("Using blocking call!");
QDBusReply<QList<QDBusObjectPath> > reply
= call(QLatin1String("GetAccessPoints"));
accessPointsList = reply.value();
@ -802,7 +802,7 @@ bool QNetworkManagerSettings::setConnections()
QList <QDBusObjectPath> QNetworkManagerSettings::listConnections()
{
if (connectionsList.isEmpty()) {
//qWarning() << "Using blocking call!";
//qWarning("Using blocking call!");
QDBusReply<QList<QDBusObjectPath> > reply
= call(QLatin1String("ListConnections"));
connectionsList = reply.value();
@ -874,7 +874,7 @@ void QNetworkManagerSettingsConnection::slotSettingsRemoved()
QNmSettingsMap QNetworkManagerSettingsConnection::getSettings()
{
if (settingsMap.isEmpty()) {
//qWarning() << "Using blocking call!";
//qWarning("Using blocking call!");
QDBusReply<QNmSettingsMap> reply = call(QLatin1String("GetSettings"));
settingsMap = reply.value();
}

View File

@ -110,10 +110,10 @@ static void printBlob(NLA_BLOB *blob)
<< "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName;
break;
default:
qDebug() << "UNKNOWN BLOB TYPE";
qDebug("UNKNOWN BLOB TYPE");
}
qDebug() << "===== END NLA_BLOB =====";
qDebug("===== END NLA_BLOB =====");
}
#endif

View File

@ -122,7 +122,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
if (size == 0) {
// empty bundle; these are valid, but should they be allowed? the
// spec is unclear on this...
qWarning() << "Empty bundle?";
qWarning("Empty bundle?");
m_isValid = true;
m_immediate = isImmediate;
m_timeEpoch = oscTimeEpoch;
@ -152,7 +152,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
m_timePico = oscTimePico;
m_messages.append(subMessage);
} else {
qWarning() << "Invalid sub-message";
qWarning("Invalid sub-message");
return;
}
} else if (subdata.startsWith(bundleIdentifier)) {
@ -166,7 +166,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
m_bundles.append(subBundle);
}
} else {
qWarning() << "Malformed sub-data!";
qWarning("Malformed sub-data!");
return;
}
}

View File

@ -165,7 +165,7 @@ void QTuioHandler::processPackets()
QList<QVariant> arguments = message.arguments();
if (arguments.count() == 0) {
qWarning() << "Ignoring TUIO message with no arguments";
qWarning("Ignoring TUIO message with no arguments");
continue;
}
@ -195,7 +195,7 @@ void QTuioHandler::process2DCurSource(const QOscMessage &message)
}
if (QMetaType::Type(arguments.at(1).type()) != QMetaType::QByteArray) {
qWarning() << "Ignoring malformed TUIO source message (bad argument type)";
qWarning("Ignoring malformed TUIO source message (bad argument type)");
return;
}

View File

@ -289,7 +289,7 @@ void QIBusPlatformInputContext::updatePreeditText(const QDBusVariant &text, uint
void QIBusPlatformInputContext::surroundingTextRequired()
{
if (debug)
qDebug() << "surroundingTextRequired";
qDebug("surroundingTextRequired");
d->needsSurroundingText = true;
update(Qt::ImSurroundingText);
}

View File

@ -98,7 +98,7 @@ namespace QtAndroidInput
{
QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "resetSoftwareKeyboard");
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ RESETSOFTWAREKEYBOARD";
qDebug("@@@ RESETSOFTWAREKEYBOARD");
#endif
}
@ -106,7 +106,7 @@ namespace QtAndroidInput
{
QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "hideSoftwareKeyboard");
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ HIDESOFTWAREKEYBOARD";
qDebug("@@@ HIDESOFTWAREKEYBOARD");
#endif
}

View File

@ -521,7 +521,7 @@ static jboolean startQtApplication(JNIEnv *env, jobject /*object*/, jstring para
}
m_main = (Main)dlsym(m_mainLibraryHnd, "main");
} else {
qWarning() << "No main library was specified; searching entire process (this is slow!)";
qWarning("No main library was specified; searching entire process (this is slow!)");
m_main = (Main)dlsym(RTLD_DEFAULT, "main");
}

View File

@ -78,7 +78,7 @@ static jboolean beginBatchEdit(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ BEGINBATCH";
qDebug("@@@ BEGINBATCH");
#endif
return m_androidInputContext->beginBatchEdit();
@ -92,7 +92,7 @@ static jboolean endBatchEdit(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ ENDBATCH";
qDebug("@@@ ENDBATCH");
#endif
return m_androidInputContext->endBatchEdit();
@ -134,7 +134,7 @@ static jboolean finishComposingText(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ FINISH";
qDebug("@@@ FINISH");
#endif
return m_androidInputContext->finishComposingText();
}
@ -256,7 +256,7 @@ static jboolean selectAll(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ SELALL";
qDebug("@@@ SELALL");
#endif
return m_androidInputContext->selectAll();
}
@ -267,7 +267,7 @@ static jboolean cut(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@";
qDebug("@@@");
#endif
return m_androidInputContext->cut();
}
@ -278,7 +278,7 @@ static jboolean copy(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@";
qDebug("@@@");
#endif
return m_androidInputContext->copy();
}
@ -289,7 +289,7 @@ static jboolean copyURL(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@";
qDebug("@@@");
#endif
return m_androidInputContext->copyURL();
}
@ -300,7 +300,7 @@ static jboolean paste(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@";
qDebug("@@@");
#endif
return m_androidInputContext->paste();
}
@ -311,7 +311,7 @@ static jboolean updateCursorPosition(JNIEnv */*env*/, jobject /*thiz*/)
return JNI_FALSE;
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
qDebug() << "@@@ UPDATECURSORPOS";
qDebug("@@@ UPDATECURSORPOS");
#endif
m_androidInputContext->updateCursorPosition();
return true;
@ -371,43 +371,43 @@ QAndroidInputContext::QAndroidInputContext()
m_extractedTextClass = static_cast<jclass>(env->NewGlobalRef(clazz));
m_classConstructorMethodID = env->GetMethodID(m_extractedTextClass, "<init>", "()V");
if (Q_UNLIKELY(!m_classConstructorMethodID)) {
qCritical() << "GetMethodID failed";
qCritical("GetMethodID failed");
return;
}
m_partialEndOffsetFieldID = env->GetFieldID(m_extractedTextClass, "partialEndOffset", "I");
if (Q_UNLIKELY(!m_partialEndOffsetFieldID)) {
qCritical() << "Can't find field partialEndOffset";
qCritical("Can't find field partialEndOffset");
return;
}
m_partialStartOffsetFieldID = env->GetFieldID(m_extractedTextClass, "partialStartOffset", "I");
if (Q_UNLIKELY(!m_partialStartOffsetFieldID)) {
qCritical() << "Can't find field partialStartOffset";
qCritical("Can't find field partialStartOffset");
return;
}
m_selectionEndFieldID = env->GetFieldID(m_extractedTextClass, "selectionEnd", "I");
if (Q_UNLIKELY(!m_selectionEndFieldID)) {
qCritical() << "Can't find field selectionEnd";
qCritical("Can't find field selectionEnd");
return;
}
m_selectionStartFieldID = env->GetFieldID(m_extractedTextClass, "selectionStart", "I");
if (Q_UNLIKELY(!m_selectionStartFieldID)) {
qCritical() << "Can't find field selectionStart";
qCritical("Can't find field selectionStart");
return;
}
m_startOffsetFieldID = env->GetFieldID(m_extractedTextClass, "startOffset", "I");
if (Q_UNLIKELY(!m_startOffsetFieldID)) {
qCritical() << "Can't find field startOffset";
qCritical("Can't find field startOffset");
return;
}
m_textFieldID = env->GetFieldID(m_extractedTextClass, "text", "Ljava/lang/String;");
if (Q_UNLIKELY(!m_textFieldID)) {
qCritical() << "Can't find field text";
qCritical("Can't find field text");
return;
}
qRegisterMetaType<QInputMethodEvent *>("QInputMethodEvent*");

View File

@ -216,7 +216,7 @@ QJsonObject AndroidStyle::loadStyleData()
}
if (Q_UNLIKELY(!document.isObject())) {
qCritical() << "Style.json does not contain a valid style.";
qCritical("Style.json does not contain a valid style.");
return QJsonObject();
}
return document.object();

View File

@ -63,7 +63,7 @@ void QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
return;
QMacAccessibilityElement *element = [QMacAccessibilityElement elementWithId: event->uniqueId()];
if (!element) {
qWarning() << "QCocoaAccessibility::notifyAccessibilityUpdate: invalid element";
qWarning("QCocoaAccessibility::notifyAccessibilityUpdate: invalid element");
return;
}
@ -277,7 +277,7 @@ NSArray *unignoredChildren(QAccessibleInterface *interface)
if (element)
[kids addObject: element];
else
qWarning() << "QCocoaAccessibility: invalid child";
qWarning("QCocoaAccessibility: invalid child");
}
return NSAccessibilityUnignoredChildren(kids);
}

View File

@ -555,7 +555,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
- (id)accessibilityHitTest:(NSPoint)point {
QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
if (!iface || !iface->isValid()) {
// qDebug() << "Hit test: INVALID";
// qDebug("Hit test: INVALID");
return NSAccessibilityUnignoredAncestor(self);
}
@ -585,7 +585,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
if (!iface || !iface->isValid()) {
qWarning() << "FocusedUIElement for INVALID";
qWarning("FocusedUIElement for INVALID");
return nil;
}

View File

@ -772,11 +772,11 @@ CGContextRef qt_mac_cg_context(QPaintDevice *pdev)
if (data && data->classId() == QPlatformPixmap::RasterClass) {
image = data->buffer();
} else {
qDebug() << "qt_mac_cg_context: Unsupported pixmap class";
qDebug("qt_mac_cg_context: Unsupported pixmap class");
}
} else if (pdev->devType() == QInternal::Widget) {
// TODO test: image = static_cast<QImage *>(static_cast<const QWidget *>(pdev)->backingStore()->paintDevice());
qDebug() << "qt_mac_cg_context: not implemented: Widget class";
qDebug("qt_mac_cg_context: not implemented: Widget class");
}
if (!image)

View File

@ -93,7 +93,7 @@ QFunctionPointer QDirectFbGLContext::getProcAddress(const char *procName)
void QDirectFbGLContext::swapBuffers()
{
// m_dfbGlContext->Unlock(m_dfbGlContext); //maybe not in doneCurrent()
qDebug() << "Swap buffers";
qDebug("Swap buffers");
}
QPlatformWindowFormat QDirectFbGLContext::platformWindowFormat() const

View File

@ -169,7 +169,7 @@ void QIOSBackingStore::resize(const QSize &size, const QRegion &staticContents)
// size in beginPaint().
if (size != window()->size() && !window()->inherits("QWidgetWindow"))
qWarning() << "QIOSBackingStore needs to have the same size as its window";
qWarning("QIOSBackingStore needs to have the same size as its window");
return;
}

View File

@ -50,11 +50,11 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(lcQpaInputMethods);
#if !defined(QT_NO_DEBUG)
#define qImDebug(...) \
#define qImDebug \
for (bool qt_category_enabled = lcQpaInputMethods().isDebugEnabled(); qt_category_enabled; qt_category_enabled = false) \
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, lcQpaInputMethods().categoryName()).debug(__VA_ARGS__)
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, lcQpaInputMethods().categoryName()).debug
#else
#define qImDebug() QT_NO_QDEBUG_MACRO()
#define qImDebug QT_NO_QDEBUG_MACRO
#endif
class QPlatformScreen;

View File

@ -93,7 +93,7 @@ Qt::ScreenOrientation toQtScreenOrientation(UIDeviceOrientation uiDeviceOrientat
break;
case UIDeviceOrientationFaceUp:
case UIDeviceOrientationFaceDown:
qWarning() << "Falling back to Qt::PortraitOrientation for UIDeviceOrientationFaceUp/UIDeviceOrientationFaceDown";
qWarning("Falling back to Qt::PortraitOrientation for UIDeviceOrientationFaceUp/UIDeviceOrientationFaceDown");
qtOrientation = Qt::PortraitOrientation;
break;
default:

View File

@ -227,7 +227,7 @@ static QUIView *focusView()
Q_UNUSED(sender);
if (self.state == UIGestureRecognizerStateBegan) {
qImDebug() << "hide keyboard gesture was triggered";
qImDebug("hide keyboard gesture was triggered");
UIResponder *firstResponder = [UIResponder currentFirstResponder];
Q_ASSERT([firstResponder isKindOfClass:[QIOSTextInputResponder class]]);
[firstResponder resignFirstResponder];
@ -239,12 +239,12 @@ static QUIView *focusView()
[super reset];
if (!m_context->isInputPanelVisible()) {
qImDebug() << "keyboard was hidden, disabling hide-keyboard gesture";
qImDebug("keyboard was hidden, disabling hide-keyboard gesture");
self.enabled = NO;
} else {
qImDebug() << "gesture completed without triggering";
qImDebug("gesture completed without triggering");
if (self.hasDeferredScrollToCursor) {
qImDebug() << "applying deferred scroll to cursor";
qImDebug("applying deferred scroll to cursor");
m_context->scrollToCursor();
}
}
@ -313,22 +313,22 @@ QIOSInputContext::~QIOSInputContext()
void QIOSInputContext::showInputPanel()
{
// No-op, keyboard controlled fully by platform based on focus
qImDebug() << "can't show virtual keyboard without a focus object, ignoring";
qImDebug("can't show virtual keyboard without a focus object, ignoring");
}
void QIOSInputContext::hideInputPanel()
{
if (![m_textResponder isFirstResponder]) {
qImDebug() << "QIOSTextInputResponder is not first responder, ignoring";
qImDebug("QIOSTextInputResponder is not first responder, ignoring");
return;
}
if (qGuiApp->focusObject() != m_imeState.focusObject) {
qImDebug() << "current focus object does not match IM state, likely hiding from focusOut event, so ignoring";
qImDebug("current focus object does not match IM state, likely hiding from focusOut event, so ignoring");
return;
}
qImDebug() << "hiding VKB as requested by QInputMethod::hide()";
qImDebug("hiding VKB as requested by QInputMethod::hide()");
[m_textResponder resignFirstResponder];
}
@ -380,7 +380,7 @@ void QIOSInputContext::updateKeyboardState(NSNotification *notification)
qImDebug() << qPrintable(QString::fromNSString(notification.name)) << "from" << fromCGRect(frameBegin) << "to" << fromCGRect(frameEnd)
<< "(curve =" << m_keyboardState.animationCurve << "duration =" << m_keyboardState.animationDuration << "s)";
} else {
qImDebug() << "No notification to update keyboard state based on, just updating keyboard rect";
qImDebug("No notification to update keyboard state based on, just updating keyboard rect");
}
if (!focusView() || CGRectIsEmpty(currentKeyboardRect))
@ -434,7 +434,7 @@ void QIOSInputContext::scrollToCursor()
if (m_keyboardHideGesture.state == UIGestureRecognizerStatePossible && m_keyboardHideGesture.numberOfTouches == 1) {
// Don't scroll to the cursor if the user is touching the screen and possibly
// trying to trigger the hide-keyboard gesture.
qImDebug() << "deferring scrolling to cursor as we're still waiting for a possible gesture";
qImDebug("deferring scrolling to cursor as we're still waiting for a possible gesture");
m_keyboardHideGesture.hasDeferredScrollToCursor = YES;
return;
}
@ -451,7 +451,7 @@ void QIOSInputContext::scrollToCursor()
// We only support auto-scroll for docked keyboards for now, so make sure that's the case
if (CGRectGetMaxY(m_keyboardState.keyboardEndRect) != CGRectGetMaxY([UIScreen mainScreen].bounds)) {
qImDebug() << "Keyboard not docked, ignoring request to scroll to reveal cursor";
qImDebug("Keyboard not docked, ignoring request to scroll to reveal cursor");
return;
}
@ -550,7 +550,7 @@ void QIOSInputContext::setFocusObject(QObject *focusObject)
clearCurrentFocusObject();
return;
} else if (focusObject == m_imeState.focusObject) {
qImDebug() << "same focus object as last update, skipping reset";
qImDebug("same focus object as last update, skipping reset");
return;
}
@ -594,23 +594,23 @@ void QIOSInputContext::update(Qt::InputMethodQueries updatedProperties)
if (inputMethodAccepted()) {
if (!m_textResponder || [m_textResponder needsKeyboardReconfigure:changedProperties]) {
qImDebug() << "creating new text responder";
qImDebug("creating new text responder");
[m_textResponder autorelease];
m_textResponder = [[QIOSTextInputResponder alloc] initWithInputContext:this];
} else {
qImDebug() << "no need to reconfigure keyboard, just notifying input delegate";
qImDebug("no need to reconfigure keyboard, just notifying input delegate");
[m_textResponder notifyInputDelegate:changedProperties];
}
if (![m_textResponder isFirstResponder]) {
qImDebug() << "IM enabled, making text responder first responder";
qImDebug("IM enabled, making text responder first responder");
[m_textResponder becomeFirstResponder];
}
if (changedProperties & Qt::ImCursorRectangle)
scrollToCursor();
} else if ([m_textResponder isFirstResponder]) {
qImDebug() << "IM not enabled, resigning text responder as first responder";
qImDebug("IM not enabled, resigning text responder as first responder");
[m_textResponder resignFirstResponder];
}
}
@ -640,7 +640,7 @@ bool QIOSInputContext::inputMethodAccepted() const
*/
void QIOSInputContext::reset()
{
qImDebug() << "updating Qt::ImQueryAll and unmarking text";
qImDebug("updating Qt::ImQueryAll and unmarking text");
update(Qt::ImQueryAll);
@ -658,7 +658,7 @@ void QIOSInputContext::reset()
*/
void QIOSInputContext::commit()
{
qImDebug() << "unmarking text";
qImDebug("unmarking text");
[m_textResponder unmarkText];
[m_textResponder notifyInputDelegate:Qt::ImSurroundingText];

View File

@ -261,7 +261,7 @@
// as well, as the IM state that we were based on may have been invalidated when
// IM was switched off.
qImDebug() << "IM was turned on, we need to check hints and platform data as well";
qImDebug("IM was turned on, we need to check hints and platform data as well");
updatedProperties |= (Qt::ImHints | Qt::ImPlatformData);
}
@ -311,7 +311,7 @@
// Don't allow activation events of the window that we're doing text on behalf on
// to steal responder.
if (FirstResponderCandidate::currentCandidate() == [self nextResponder]) {
qImDebug() << "not allowing parent window to steal responder";
qImDebug("not allowing parent window to steal responder");
return NO;
}
@ -334,7 +334,7 @@
if ([self currentImeState:Qt::ImEnabled].toBool()) {
// The current focus object expects text input, but there
// is no keyboard to get input from. So we clear focus.
qImDebug() << "no keyboard available, clearing focus object";
qImDebug("no keyboard available, clearing focus object");
m_inputContext->clearCurrentFocusObject();
}
} else {
@ -342,7 +342,7 @@
// another QIOSTextResponder was made first-responder, another UIView was
// made first-responder, or the first-responder was cleared globally. In
// either of these cases we don't have to do anything.
qImDebug() << "lost first responder, but not clearing focus object";
qImDebug("lost first responder, but not clearing focus object");
}
return YES;

View File

@ -62,7 +62,7 @@ QMinimalBackingStore::~QMinimalBackingStore()
QPaintDevice *QMinimalBackingStore::paintDevice()
{
if (mDebug)
qDebug() << "QMinimalBackingStore::paintDevice";
qDebug("QMinimalBackingStore::paintDevice");
return &mImage;
}

View File

@ -214,7 +214,7 @@ void QMirClientInput::customEvent(QEvent* event)
const MirEvent *nativeEvent = ubuntuEvent->nativeEvent;
if ((ubuntuEvent->window == nullptr) || (ubuntuEvent->window->window() == nullptr)) {
qWarning() << "Attempted to deliver an event to a non-existent window, ignoring.";
qWarning("Attempted to deliver an event to a non-existent window, ignoring.");
return;
}

View File

@ -55,11 +55,11 @@ QOpenWFDDevice::QOpenWFDDevice(QOpenWFDIntegration *integration, WFDint device_e
{
mDevice = wfdCreateDevice(WFD_DEFAULT_DEVICE_ID,WFD_NONE);
if (mDevice == WFD_INVALID_HANDLE)
qDebug() << "failed to create device";
qDebug("failed to create device");
mEvent = wfdCreateEvent(mDevice,0);
if (mEvent == WFD_INVALID_HANDLE)
qDebug() << "failed to create event handle";
qDebug("failed to create event handle");
//initialize pipelines for device.
wfdEnumeratePipelines(mDevice,WFD_NONE,0,WFD_NONE);
@ -181,22 +181,22 @@ void QOpenWFDDevice::readEvents(WFDtime wait)
case WFD_EVENT_NONE:
return;
case WFD_EVENT_DESTROYED:
qDebug() << "Event or Device destoryed!";
qDebug("Event or Device destoryed!");
return;
case WFD_EVENT_PORT_ATTACH_DETACH:
handlePortAttachDetach();
break;
case WFD_EVENT_PORT_PROTECTION_FAILURE:
qDebug() << "Port protection event handling not implemented";
qDebug("Port protection event handling not implemented");
break;
case WFD_EVENT_PIPELINE_BIND_SOURCE_COMPLETE:
handlePipelineBindSourceComplete();
break;
case WFD_EVENT_PIPELINE_BIND_MASK_COMPLETE:
qDebug() << "Pipeline bind mask event handling not implemented";
qDebug("Pipeline bind mask event handling not implemented");
break;
default:
qDebug() << "Not recognised event type";
qDebug("Not recognised event type");
break;
}
@ -206,10 +206,10 @@ void QOpenWFDDevice::readEvents(WFDtime wait)
void QOpenWFDDevice::initializeGbmAndEgl()
{
qDebug() << "initializing GBM and EGL";
qDebug("initializing GBM and EGL");
int fd = wfdGetDeviceAttribi(mDevice,WFD_DEVICE_ID);
if (fd < 0) {
qDebug() << "failed to get WFD_DEVICE_ID";
qDebug("failed to get WFD_DEVICE_ID");
}
mGbmDevice = gbm_create_device(fd);
@ -221,12 +221,12 @@ void QOpenWFDDevice::initializeGbmAndEgl()
EGLint minor, major;
if (!eglInitialize(mEglDisplay,&major,&minor)) {
qDebug() << "failed to initialize egl";
qDebug("failed to initialize egl");
}
QByteArray eglExtensions = eglQueryString(mEglDisplay, EGL_EXTENSIONS);
if (!eglExtensions.contains("EGL_KHR_surfaceless_opengl")) {
qDebug() << "This egl implementation does not have the required EGL extension EGL_KHR_surfaceless_opengl";
qDebug("This egl implementation does not have the required EGL extension EGL_KHR_surfaceless_opengl");
}
eglBindAPI(EGL_OPENGL_ES_API);
@ -238,7 +238,7 @@ void QOpenWFDDevice::initializeGbmAndEgl()
mEglContext = eglCreateContext(mEglDisplay,NULL,EGL_NO_CONTEXT,contextAttribs);
if (mEglContext == EGL_NO_CONTEXT) {
qDebug() << "Failed to create EGL context";
qDebug("Failed to create EGL context");
}
eglCreateImage = (PFNEGLCREATEIMAGEKHRPROC) eglGetProcAddress("eglCreateImageKHR");
@ -269,7 +269,7 @@ void QOpenWFDDevice::handlePortAttachDetach()
for (int i = 0; i < mPorts.size(); i++) {
if (mPorts.at(i)->portId() == id) {
indexToAdd = i;
qDebug() << "found index to attach";
qDebug("found index to attach");
break;
}
}
@ -301,7 +301,7 @@ void QOpenWFDDevice::handlePipelineBindSourceComplete()
WFDint overflow = wfdGetEventAttribi(mDevice,mEvent, WFD_EVENT_PIPELINE_BIND_QUEUE_OVERFLOW);
if (overflow == WFD_TRUE) {
qDebug() << "PIPELINE_BIND_QUEUE_OVERFLOW event occurred";
qDebug("PIPELINE_BIND_QUEUE_OVERFLOW event occurred");
}
WFDint pipelineId = wfdGetEventAttribi(mDevice,mEvent,WFD_EVENT_PIPELINE_BIND_PIPELINE_ID);

View File

@ -61,7 +61,7 @@ bool QOpenWFDGLContext::makeCurrent(QPlatformSurface *surface)
EGLDisplay display = mWfdDevice->eglDisplay();
EGLContext context = mWfdDevice->eglContext();
if (!eglMakeCurrent(display,EGL_NO_SURFACE,EGL_NO_SURFACE,context)) {
qDebug() << "GLContext: eglMakeCurrent FAILED!";
qDebug("GLContext: eglMakeCurrent FAILED!");
}
QPlatformWindow *window = static_cast<QPlatformWindow *>(surface);

View File

@ -79,7 +79,7 @@ QOpenWFDIntegration::QOpenWFDIntegration()
QOpenWFDIntegration::~QOpenWFDIntegration()
{
//don't delete screens since they are deleted by the devices
qDebug() << "deleting platform integration";
qDebug("deleting platform integration");
for (int i = 0; i < mDevices.size(); i++) {
delete mDevices[i];
}

View File

@ -69,7 +69,7 @@ QOpenWFDOutputBuffer::~QOpenWFDOutputBuffer()
{
wfdDestroySource(mPort->device()->handle(),mWfdSource);
if (!mPort->device()->eglDestroyImage(mPort->device()->eglDisplay(),mEglImage)) {
qDebug() << "could not delete eglImage";
qDebug("could not delete eglImage");
}
gbm_bo_destroy(mGbm_buffer);
@ -83,6 +83,6 @@ void QOpenWFDOutputBuffer::bindToCurrentFbo()
GL_RENDERBUFFER,
mRbo);
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
qDebug() << "framebuffer not ready!";
qDebug("framebuffer not ready!");
}
}

View File

@ -80,7 +80,7 @@ void QOpenWFDPort::attach()
Q_ASSERT(actualNumberOfPortModes == numberOfPortModes);
if (!actualNumberOfPortModes) {
qDebug() << "didn't find any available port modes";
qDebug("didn't find any available port modes");
return;
}
@ -94,7 +94,7 @@ void QOpenWFDPort::attach()
mPixelSize = setNativeResolutionMode();
if (mPixelSize.isEmpty()) {
qDebug() << "Could not set native resolution mode in QOpenWFPort";
qDebug("Could not set native resolution mode in QOpenWFPort");
}
WFDfloat physicalWFDSize[2];

View File

@ -65,7 +65,7 @@ QOpenWFDScreen::QOpenWFDScreen(QOpenWFDPort *port)
EGLContext context = mPort->device()->eglContext();
if (!eglMakeCurrent(display,EGL_NO_SURFACE,EGL_NO_SURFACE,context)) {
qDebug() << "screen: eglMakeCurrent FAILED";
qDebug("screen: eglMakeCurrent FAILED");
}
glGenFramebuffers(1,&mFbo);

View File

@ -162,7 +162,7 @@ void QQnxButtonEventNotifier::updateButtonStates()
break;
default:
qButtonDebug() << "Unknown hardware button";
qButtonDebug("Unknown hardware button");
continue;
}

View File

@ -385,7 +385,7 @@ static int32_t ic_perform_editor_action(input_session_t *ic, int32_t editor_acti
Q_UNUSED(ic);
Q_UNUSED(editor_action);
qCritical() << "ic_perform_editor_action not implemented";
qCritical("ic_perform_editor_action not implemented");
return 0;
}
@ -395,7 +395,7 @@ static int32_t ic_report_fullscreen_mode(input_session_t *ic, int32_t enabled)
Q_UNUSED(ic);
Q_UNUSED(enabled);
qCritical() << "ic_report_fullscreen_mode not implemented";
qCritical("ic_report_fullscreen_mode not implemented");
return 0;
}
@ -406,7 +406,7 @@ static extracted_text_t *ic_get_extracted_text(input_session_t *ic, extracted_te
Q_UNUSED(request);
Q_UNUSED(flags);
qCritical() << "ic_get_extracted_text not implemented";
qCritical("ic_get_extracted_text not implemented");
return 0;
}
@ -416,7 +416,7 @@ static spannable_string_t *ic_get_selected_text(input_session_t *ic, int32_t fla
Q_UNUSED(ic);
Q_UNUSED(flags);
qCritical() << "ic_get_selected_text not implemented";
qCritical("ic_get_selected_text not implemented");
return 0;
}
@ -426,7 +426,7 @@ static int32_t ic_get_cursor_caps_mode(input_session_t *ic, int32_t req_modes)
Q_UNUSED(ic);
Q_UNUSED(req_modes);
qCritical() << "ic_get_cursor_caps_mode not implemented";
qCritical("ic_get_cursor_caps_mode not implemented");
return 0;
}
@ -436,7 +436,7 @@ static int32_t ic_clear_meta_key_states(input_session_t *ic, int32_t states)
Q_UNUSED(ic);
Q_UNUSED(states);
qCritical() << "ic_clear_meta_key_states not implemented";
qCritical("ic_clear_meta_key_states not implemented");
return 0;
}
@ -447,7 +447,7 @@ static int32_t ic_set_selection(input_session_t *ic, int32_t start, int32_t end)
Q_UNUSED(start);
Q_UNUSED(end);
qCritical() << "ic_set_selection not implemented";
qCritical("ic_set_selection not implemented");
return 0;
}

View File

@ -553,7 +553,7 @@ void QQnxScreenEventHandler::handleDisplayEvent(screen_event_t event)
if (val[0] == 0 && val[1] == 0) //If screen size is invalid, wait for the next event
return;
qScreenEventDebug() << "creating new QQnxScreen for newly attached display";
qScreenEventDebug("creating new QQnxScreen for newly attached display");
m_qnxIntegration->createDisplay(nativeDisplay, false /* not primary, we assume */);
}
} else if (!isAttached) {
@ -566,7 +566,7 @@ void QQnxScreenEventHandler::handleDisplayEvent(screen_event_t event)
if (!screen->isPrimaryScreen()) {
// libscreen display is deactivated, let's remove the QQnxScreen / QScreen
qScreenEventDebug() << "removing display";
qScreenEventDebug("removing display");
m_qnxIntegration->removeDisplay(screen);
}
}

View File

@ -475,7 +475,7 @@ void QQnxWindow::setParent(const QPlatformWindow *window)
return;
if (screen()->rootWindow() == this) {
qWarning() << "Application window cannot be reparented";
qWarning("Application window cannot be reparented");
return;
}

View File

@ -208,7 +208,7 @@ QWindowsTabletSupport *QWindowsTabletSupport::create()
if (currentQueueSize != TabletPacketQSize) {
if (!QWindowsTabletSupport::m_winTab32DLL.wTQueueSizeSet(context, TabletPacketQSize)) {
if (!QWindowsTabletSupport::m_winTab32DLL.wTQueueSizeSet(context, currentQueueSize)) {
qWarning() << "Unable to set queue size on tablet. The tablet will not work.";
qWarning("Unable to set queue size on tablet. The tablet will not work.");
QWindowsTabletSupport::m_winTab32DLL.wTClose(context);
DestroyWindow(window);
return 0;

View File

@ -700,7 +700,7 @@ void WindowCreationData::initialize(const QWindow *w, HWND hwnd, bool frameChang
if ((flags & Qt::WindowStaysOnTopHint) || (type == Qt::ToolTip)) {
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, swpFlags);
if (flags & Qt::WindowStaysOnBottomHint)
qWarning() << "QWidget: Incompatible window flags: the window can't be on top and on bottom at the same time";
qWarning("QWidget: Incompatible window flags: the window can't be on top and on bottom at the same time");
} else if (flags & Qt::WindowStaysOnBottomHint) {
SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, swpFlags);
} else if (frameChange) { // Force WM_NCCALCSIZE with wParam=1 in case of custom margins.
@ -2213,7 +2213,7 @@ void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const
mmi->ptMaxPosition.x = availableGeometry.x();
mmi->ptMaxPosition.y = availableGeometry.y();
} else if (!screen){
qWarning() << "window()->screen() returned a null screen";
qWarning("window()->screen() returned a null screen");
}
}

View File

@ -187,7 +187,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI
m_xcb_image->data = (uint8_t *)malloc(segmentSize);
} else {
if (shmctl(m_shm_info.shmid, IPC_RMID, 0) == -1)
qWarning() << "QXcbBackingStore: Error while marking the shared memory segment to be destroyed";
qWarning("QXcbBackingStore: Error while marking the shared memory segment to be destroyed");
}
m_hasAlpha = QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::UsesAlpha;

View File

@ -2173,7 +2173,7 @@ void QXcbConnection::initializeXKB()
#ifndef QT_NO_XKB
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_xkb_id);
if (!reply || !reply->present) {
qWarning() << "Qt: XKEYBOARD extension not present on the X server.";
qWarning("Qt: XKEYBOARD extension not present on the X server.");
xkb_first_event = 0;
return;
}
@ -2227,7 +2227,7 @@ void QXcbConnection::initializeXKB()
xcb_generic_error_t *error = xcb_request_check(c, select);
if (error) {
free(error);
qWarning() << "Qt: failed to select notify events from xcb-xkb";
qWarning("Qt: failed to select notify events from xcb-xkb");
return;
}
#endif

View File

@ -164,7 +164,7 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters, int &argc, char
bool underDebugger = runningUnderDebugger();
if (noGrabArg && doGrabArg && underDebugger) {
qWarning() << "Both -nograb and -dograb command line arguments specified. Please pick one. -nograb takes prcedence";
qWarning("Both -nograb and -dograb command line arguments specified. Please pick one. -nograb takes prcedence");
doGrabArg = false;
}

View File

@ -676,13 +676,13 @@ void QXcbKeyboard::printKeymapError(const char *error) const
{
qWarning() << error;
if (xkb_context) {
qWarning() << "Current XKB configuration data search paths are: ";
qWarning("Current XKB configuration data search paths are: ");
for (unsigned int i = 0; i < xkb_context_num_include_paths(xkb_context); ++i)
qWarning() << xkb_context_include_path_get(xkb_context, i);
}
qWarning() << "Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, "
"add ':' as separator to provide several search paths and/or make sure that XKB configuration data "
"directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .";
qWarning("Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, "
"add ':' as separator to provide several search paths and/or make sure that XKB configuration data "
"directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .");
}
void QXcbKeyboard::updateKeymap()

View File

@ -203,7 +203,7 @@ void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceSt
void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resourceString, QScreen *screen)
{
if (!screen) {
qWarning() << "nativeResourceForScreen: null screen";
qWarning("nativeResourceForScreen: null screen");
return Q_NULLPTR;
}

View File

@ -372,7 +372,7 @@ void QXcbWindow::create()
if (visual)
m_visualId = connection()->defaultVisualId();
if (!visual)
qWarning() << "Could not use default visual id. Falling back to root_visual for screen.";
qWarning("Could not use default visual id. Falling back to root_visual for screen.");
}
if (!visual)
visual = platformScreen->visualForId(m_visualId);

View File

@ -122,10 +122,10 @@ void QXcbWMSupport::updateVirtualRoots()
} while (remaining > 0);
#ifdef Q_XCB_DEBUG
qDebug() << "======== updateVirtualRoots";
qDebug("======== updateVirtualRoots");
for (int i = 0; i < net_virtual_roots.size(); ++i)
qDebug() << connection()->atomName(net_virtual_roots.at(i));
qDebug() << "======== updateVirtualRoots";
qDebug("======== updateVirtualRoots");
#endif
}

View File

@ -169,7 +169,7 @@ bool QWin32PrintEngine::begin(QPaintDevice *pdev)
cleanUp();
#ifdef QT_DEBUG_METRICS
qDebug() << "QWin32PrintEngine::begin()";
qDebug("QWin32PrintEngine::begin()");
d->debugMetrics();
#endif // QT_DEBUG_METRICS
@ -236,7 +236,7 @@ bool QWin32PrintEngine::newPage()
SetBkMode(d->hdc, TRANSPARENT);
#ifdef QT_DEBUG_METRICS
qDebug() << "QWin32PrintEngine::newPage()";
qDebug("QWin32PrintEngine::newPage()");
d->debugMetrics();
#endif // QT_DEBUG_METRICS
@ -930,7 +930,7 @@ void QWin32PrintEnginePrivate::initialize()
initHDC();
#if defined QT_DEBUG_DRAW || defined QT_DEBUG_METRICS
qDebug() << "QWin32PrintEngine::initialize()";
qDebug("QWin32PrintEngine::initialize()");
debugMetrics();
#endif // QT_DEBUG_DRAW || QT_DEBUG_METRICS
}
@ -1007,7 +1007,7 @@ void QWin32PrintEnginePrivate::doReinit()
bool QWin32PrintEnginePrivate::resetDC()
{
if (!hdc) {
qWarning() << "ResetDC() called with null hdc.";
qWarning("ResetDC() called with null hdc.");
return false;
}
const HDC oldHdc = hdc;
@ -1593,7 +1593,7 @@ void QWin32PrintEngine::setGlobalDevMode(HGLOBAL globalDevNames, HGLOBAL globalD
d->initHDC();
#if defined QT_DEBUG_DRAW || defined QT_DEBUG_METRICS
qDebug() << "QWin32PrintEngine::setGlobalDevMode()";
qDebug("QWin32PrintEngine::setGlobalDevMode()");
debugMetrics();
#endif // QT_DEBUG_DRAW || QT_DEBUG_METRICS
}

View File

@ -2135,7 +2135,7 @@ int QPrinter::toPage() const
void QPrinter::setFromTo(int from, int to)
{
if (from > to) {
qWarning() << "QPrinter::setFromTo: 'from' must be less than or equal to 'to'";
qWarning("QPrinter::setFromTo: 'from' must be less than or equal to 'to'");
from = to;
}
d->fromPage = from;

View File

@ -1297,7 +1297,7 @@ int QIBaseResult::size()
if (ct == isc_info_req_select_count)
return val;
}
//qDebug() << "size -1";
//qDebug("size -1");
return -1;
unsigned int i, result_size;

View File

@ -2195,7 +2195,7 @@ void QODBCDriverPrivate::checkHasSQLFetchScroll()
SQLRETURN r = SQLGetFunctions(hDbc, SQL_API_SQLFETCHSCROLL, &sup);
if ((r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) || sup != SQL_TRUE) {
hasSQLFetchScroll = false;
qWarning() << "QODBCDriver::checkHasSQLFetchScroll: Warning - Driver doesn't support scrollable result sets, use forward only mode for queries";
qWarning("QODBCDriver::checkHasSQLFetchScroll: Warning - Driver doesn't support scrollable result sets, use forward only mode for queries");
}
}
@ -2244,7 +2244,7 @@ bool QODBCDriver::beginTransaction()
{
Q_D(QODBCDriver);
if (!isOpen()) {
qWarning() << "QODBCDriver::beginTransaction: Database not open";
qWarning("QODBCDriver::beginTransaction: Database not open");
return false;
}
SQLUINTEGER ac(SQL_AUTOCOMMIT_OFF);
@ -2264,7 +2264,7 @@ bool QODBCDriver::commitTransaction()
{
Q_D(QODBCDriver);
if (!isOpen()) {
qWarning() << "QODBCDriver::commitTransaction: Database not open";
qWarning("QODBCDriver::commitTransaction: Database not open");
return false;
}
SQLRETURN r = SQLEndTran(SQL_HANDLE_DBC,
@ -2282,7 +2282,7 @@ bool QODBCDriver::rollbackTransaction()
{
Q_D(QODBCDriver);
if (!isOpen()) {
qWarning() << "QODBCDriver::rollbackTransaction: Database not open";
qWarning("QODBCDriver::rollbackTransaction: Database not open");
return false;
}
SQLRETURN r = SQLEndTran(SQL_HANDLE_DBC,