QDebug operator<<(QDebug d, const EnginioReply *reply) { if (!reply) { d << "EnginioReply(null)"; return d; } d.nospace(); d << "EnginioReply(" << hex << (void *) reply << dec; if (!reply->isError()) { d << " success data=" << reply->data(); } else { d << " errorCode=" << reply->networkError() << " "; d << " errorString=" << reply->errorString() << " "; d << " errorData=" << reply->data() << " "; } d << "backendStatus=" << reply->backendStatus(); d << ")"; return d.space(); }
QDebug operator<<(QDebug dbg, const QSurfaceFormat &f) { const QSurfaceFormatPrivate * const d = f.d; dbg.nospace() << "QSurfaceFormat(" << "version " << d->major << '.' << d->minor << ", options " << d->opts << ", depthBufferSize " << d->depthSize << ", redBufferSize " << d->redBufferSize << ", greenBufferSize " << d->greenBufferSize << ", blueBufferSize " << d->blueBufferSize << ", alphaBufferSize " << d->alphaBufferSize << ", stencilBufferSize " << d->stencilSize << ", samples " << d->numSamples << ", swapBehavior " << d->swapBehavior << ", profile " << d->profile << ')'; return dbg.space(); }
QDebug operator<<(QDebug dbg, const ModXData &d) { dbg.nospace() << "ModXData ("; dbg.nospace() << "\n\ttitle = " << d.title; dbg.nospace() << "\n\tdescription = " << d.description; dbg.nospace() << "\n\tauthorNotes = " << d.authorNotes; dbg.nospace() << "\n\tauthorGroup = " << d.authorGroup; dbg.nospace() << "\n\thistory = " << d.history; dbg.nospace() << "\n\tlicense = " << d.license; dbg.nospace() << "\n\tinstallLevel = " << d.installLevel; dbg.nospace() << "\n\tinstallTime = " << d.installTime; dbg.nospace() << "\n\tactions = " << d.actions; dbg.nospace() << "\n\tdiy = " << d.diy; dbg.nospace() << "\n)"; return dbg.space(); }
QDebug operator<<(QDebug dbg, const IptcCoreContactInfo& inf) { dbg.nospace() << "IptcCoreContactInfo::city: " << inf.city << ", "; dbg.nospace() << "IptcCoreContactInfo::country: " << inf.country << ", "; dbg.nospace() << "IptcCoreContactInfo::address: " << inf.address << ", "; dbg.nospace() << "IptcCoreContactInfo::postalCode: " << inf.postalCode << ", "; dbg.nospace() << "IptcCoreContactInfo::provinceState: " << inf.provinceState << ", "; dbg.nospace() << "IptcCoreContactInfo::email: " << inf.email << ", "; dbg.nospace() << "IptcCoreContactInfo::phone: " << inf.phone << ", "; dbg.nospace() << "IptcCoreContactInfo::webUrl: " << inf.webUrl; return dbg.space(); }
QDebug operator<<(QDebug dbg, const TagSet &ts) { dbg.nospace() << "Tagset " << ts.uri() << " [" << ts.title() << "]" <<"\n"; dbg.nospace() << " DiscId " << ts.diskTag(TAG_DISCID) << "\n"; dbg.nospace() << " Genre " << ts.diskTag(TAG_GENRE) << "\n"; dbg.nospace() << " Artist " << ts.diskTag(TAG_PERFORMER) << "\n"; dbg.nospace() << " Album " << ts.diskTag(TAG_ALBUM) << "\n"; dbg.nospace() << " Date " << ts.diskTag(TAG_DATE) << "\n"; for (int i=0; i < ts.tracksCount(); ++i) { dbg.nospace() << " Track " << i << "-=-=-=-=-" << "\n"; dbg.nospace() << " * Album " << ts.trackTag(i, TAG_ALBUM) << "\n"; dbg.nospace() << " * Artist " << ts.trackTag(i, TAG_PERFORMER) << "\n"; dbg.nospace() << " * Title " << ts.trackTag(i, TAG_TITLE) << "\n"; dbg.nospace() << " * Genre " << ts.trackTag(i, TAG_GENRE) << "\n"; } return dbg.space(); }
QDebug operator<<(QDebug dbg, const QJsonRpcMessage &msg) { dbg.nospace() << "QJsonRpcMessage(type=" << msg.type(); if (msg.type() != QJsonRpcMessage::Notification) { dbg.nospace() << ", id=" << msg.id(); } if (msg.type() == QJsonRpcMessage::Request || msg.type() == QJsonRpcMessage::Notification) { dbg.nospace() << ", method=" << msg.method() << ", params=" << msg.params(); } else if (msg.type() == QJsonRpcMessage::Response) { dbg.nospace() << ", result=" << msg.result(); } else if (msg.type() == QJsonRpcMessage::Error) { dbg.nospace() << ", code=" << msg.errorCode() << ", message=" << msg.errorMessage() << ", data=" << msg.errorData(); } dbg.nospace() << ")"; return dbg.space(); }
QDebug operator<<(QDebug dbg, const Packet* p){ QString message = QString("[%1] [%2] Packet {\n\tPacketId: %3\n\tSize: %4\n\tDecayed: %5ms\n\tImportance: %6%\n\tData:\n%7\n}\n") .arg((p->locality() == Packet::FROM_SERVER) ? "Incoming" : "Outgoing") .arg(p->protocolString()) .arg(p->packetIdString()) .arg(p->data().size()) .arg(QDateTime::currentMSecsSinceEpoch() - p->activeTime()) .arg(p->importance()) .arg(QByteArrayBuilder(p->toPackedData()).toReadableString()); // QString message = QString("[%1] [%2] Packet {\n\tPacketId: %3\n\tSize: %4\n\tDecayed: %5ms\n\tImportance: %6%\n}\n") // .arg((p->locality() == Packet::FROM_SERVER) ? "Incoming" : "Outgoing") // .arg(p->protocolString()) // .arg(p->packetIdString()) // .arg(p->data().size()) // .arg(QDateTime::currentMSecsSinceEpoch() - p->activeTime()) // .arg(p->importance()); dbg.nospace() << qPrintable(message); return dbg.space(); }
QDebug operator<<(QDebug d, const QWebEngineScript &script) { if (script.isNull()) return d.maybeSpace() << "QWebEngineScript()"; d.nospace() << "QWebEngineScript(" << script.name() << ", "; switch (script.injectionPoint()) { case QWebEngineScript::DocumentCreation: d << "QWebEngineScript::DocumentCreation" << ", "; break; case QWebEngineScript::DocumentReady: d << "QWebEngineScript::DocumentReady" << ", "; break; case QWebEngineScript::Deferred: d << "QWebEngineScript::Deferred" << ", "; break; } d << script.worldId() << ", " << script.runsOnSubFrames() << ", " << script.sourceCode() << ")"; return d.space(); }
QDebug operator<<(QDebug dbg, const ClPlatform &pl) { dbg.nospace() << "\nClPlatform{" << "\n\tid\t= " << pl.getId() << "\n\tname\t= " << pl.getName() << "\n\tvendor\t= " << pl.getVendor() << "\n\tprofile\t= " << pl.getProfile() << "\n\tversion\t= " << pl.getVersion(); const QList<ClDevice> devices = pl.getDevices(); if(!devices.isEmpty()) { dbg.nospace() << "\nDevices["; for(int i = 0; i < devices.count(); ++i) { dbg.nospace() << devices.at(i); } dbg.nospace() << "\n]"; } dbg.nospace() << "\n}"; return dbg.space(); }
QDebug operator<<(QDebug dbg, const DcrawInfoContainer& c) { dbg.nospace() << "DcrawInfoContainer::sensitivity: " << c.sensitivity << ", "; dbg.nospace() << "DcrawInfoContainer::exposureTime: " << c.exposureTime << ", "; dbg.nospace() << "DcrawInfoContainer::aperture: " << c.aperture << ", "; dbg.nospace() << "DcrawInfoContainer::focalLength: " << c.focalLength << ", "; dbg.nospace() << "DcrawInfoContainer::pixelAspectRatio: " << c.pixelAspectRatio << ", "; dbg.nospace() << "DcrawInfoContainer::rawColors: " << c.rawColors << ", "; dbg.nospace() << "DcrawInfoContainer::rawImages: " << c.rawImages << ", "; dbg.nospace() << "DcrawInfoContainer::hasIccProfile: " << c.hasIccProfile << ", "; dbg.nospace() << "DcrawInfoContainer::isDecodable: " << c.isDecodable << ", "; dbg.nospace() << "DcrawInfoContainer::daylightMult: " << c.daylightMult << ", "; dbg.nospace() << "DcrawInfoContainer::cameraMult: " << c.cameraMult << ", "; dbg.nospace() << "DcrawInfoContainer::blackPoint: " << c.blackPoint << ", "; dbg.nospace() << "DcrawInfoContainer::whitePoint: " << c.whitePoint << ", "; dbg.nospace() << "DcrawInfoContainer::topMargin: " << c.topMargin << ", "; dbg.nospace() << "DcrawInfoContainer::leftMargin: " << c.leftMargin << ", "; dbg.nospace() << "DcrawInfoContainer::rightMargin: " << c.rightMargin << ", "; dbg.nospace() << "DcrawInfoContainer::bottomMargin: " << c.bottomMargin << ", "; dbg.nospace() << "DcrawInfoContainer::orientation: " << c.orientation; return dbg.space(); }
QDebug operator<<(QDebug dbg, const QPageLayout &layout) { if (layout.isValid()) { QString output = QStringLiteral("QPageLayout(%1, %2, l:%3 r:%4 t:%5 b:%6 %7)"); QString units; switch (layout.units()) { case QPageLayout::Millimeter: units = QStringLiteral("mm"); break; case QPageLayout::Point: units = QStringLiteral("pt"); break; case QPageLayout::Inch: units = QStringLiteral("in"); break; case QPageLayout::Pica: units = QStringLiteral("pc"); break; case QPageLayout::Didot: units = QStringLiteral("DD"); break; case QPageLayout::Cicero: units = QStringLiteral("CC"); break; } output = output.arg(layout.pageSize().name()) .arg(layout.orientation() == QPageLayout::Portrait ? QStringLiteral("Portrait") : QStringLiteral("Landscape")) .arg(layout.margins().left()) .arg(layout.margins().right()) .arg(layout.margins().top()) .arg(layout.margins().bottom()) .arg(units); dbg.nospace() << output; } else { dbg.nospace() << "QPageLayout()"; } return dbg.space(); }
QDebug operator<<(QDebug debug, const CoreLink &link) { const QMetaObject &metaObject = CoapPdu::staticMetaObject; QMetaEnum contentTypeEnum = metaObject.enumerator(metaObject.indexOfEnumerator("ContentType")); debug.nospace() << "CoapLink(" << link.path() << ")" << endl; if (!link.title().isEmpty()) debug.nospace() << " Title: " << link.title() << endl; debug.nospace() << " Resource type: " << link.resourceType() << endl; debug.nospace() << " Content type: " << contentTypeEnum.valueToKey(link.contentType()) << endl; if (link.observable()) debug.nospace() << " Observable: " << link.observable() << endl; if (!link.interfaceDescription().isEmpty()) debug.nospace() << " Interface description: " << link.interfaceDescription() << endl; if (link.maximumSize() >= 0) debug.nospace() << " Maximum size: " << link.maximumSize() << endl; return debug.space(); }
void tst_QDebug::debugSpaceHandling() const { MessageHandlerSetter mhs(myMessageHandler); { QDebug d = qDebug(); QVERIFY(d.autoInsertSpaces()); d.setAutoInsertSpaces(false); QVERIFY(!d.autoInsertSpaces()); d << " "; d.setAutoInsertSpaces(true); QVERIFY(d.autoInsertSpaces()); d << "foo"; d.nospace(); d << "key=" << "value"; d.space(); d << 1 << 2; MyLine line(MyPoint(10, 11), MyPoint (12, 13)); d << line; // With the old implementation of MyPoint doing dbg.nospace() << ...; dbg.space() we ended up with // MyLine(MyPoint(10, 11) , MyPoint(12, 13) ) } QCOMPARE(s_msg, QString::fromLatin1(" foo key=value 1 2 MyLine(MyPoint(10, 11), MyPoint(12, 13))")); }
QDebug operator<<(QDebug c, const OpenTrade::Bar &bar) { c.nospace() << "Bar(" << "Average:" << bar.average() << "BeginTime:" << bar.beginTime() << "Close:" << bar.close() << "DateTime:" << bar.dateTime() << "Duration:" << bar.duration() << "EndTime:" << bar.endTime() << "High:" << bar.high() << "IsComplete:" << bar.isComplete() << "Low:" << bar.low() << "Median:" << bar.median() << "Open:" << bar.open() << "OpenInt:" << bar.openInt() << "Size:" << bar.size() << "Type:" << bar.type() << "Typical:" << bar.typical() << "Volume:" << bar.volume() << "Weighted:" << bar.weighted() <<')'; return c.space(); }
QDebug ConsoleAppender::debug(QDebug &rDebug) const { QString layout_name; if (layout()) layout_name = layout()->name(); QString target; if (mTarget == STDOUT_TARGET) target = QLatin1String("STDOUT"); else target = QLatin1String("STDERR"); rDebug.nospace() << "ConsoleAppender(" << "name:" << name() << " " << "filter:" << firstFilter() << " " << "isactive:" << isActive() << " " << "isclosed:" << isClosed() << " " << "layout:" << layout_name << " " << "target:" << target << " " << "referencecount:" << referenceCount() << " " << "threshold:" << threshold().toString() << ")"; return rDebug.space(); }
QDebug operator <<(QDebug dbg, const KDSoapValue &value) { dbg.space() << value.name() << value.value(); if (!value.childValues().isEmpty()) { dbg << "<children>"; KDSoapValueListIterator it(value.childValues()); while (it.hasNext()) { const KDSoapValue &child = it.next(); dbg << child; } dbg << "</children>"; } if (!value.childValues().attributes().isEmpty()) { dbg << "<attributes>"; QListIterator<KDSoapValue> it(value.childValues().attributes()); while (it.hasNext()) { const KDSoapValue &child = it.next(); dbg << child; } dbg << "</attributes>"; } return dbg; }
QDebug operator<<(QDebug dbg, const QSqlField &f) { #ifndef Q_BROKEN_DEBUG_STREAM dbg.nospace() << "QSqlField(" << f.name() << ", " << QVariant::typeToName(f.type()); if (f.length() >= 0) dbg.nospace() << ", length: " << f.length(); if (f.precision() >= 0) dbg.nospace() << ", precision: " << f.precision(); if (f.requiredStatus() != QSqlField::Unknown) dbg.nospace() << ", required: " << (f.requiredStatus() == QSqlField::Required ? "yes" : "no"); dbg.nospace() << ", generated: " << (f.isGenerated() ? "yes" : "no"); if (f.typeID() >= 0) dbg.nospace() << ", typeID: " << f.typeID(); if (!f.defaultValue().isNull()) dbg.nospace() << ", auto-value: \"" << f.defaultValue() << '\"'; dbg.nospace() << ')'; return dbg.space(); #else qWarning("This compiler doesn't support streaming QSqlField to QDebug"); return dbg; Q_UNUSED(f); #endif }
QDebug operator<<(QDebug debug, const IrcMessage* message) { if (!message) return debug << "IrcMessage(0x0) "; debug.nospace() << message->metaObject()->className() << '(' << (void*) message; QStringList flags; if (message->flags() == IrcMessage::None) flags << "None"; else if (message->flags() & IrcMessage::Identified) flags << "Identified"; else if (message->flags() & IrcMessage::Unidentified) flags << "Unidentified"; debug << ", flags = " << flags; if (!message->objectName().isEmpty()) debug << ", name = " << message->objectName(); if (message->sender().isValid()) debug << ", sender = " << message->sender().name(); if (!message->command().isEmpty()) debug << ", command = " << message->command(); if (!message->parameters().isEmpty()) debug << ", params = " << message->parameters(); debug.nospace() << ')'; return debug.space(); }
//! kDebug() stream operator. Writes property @a s to the debug output in a nicely formatted way. QDebug operator<<(QDebug dbg, const MaintenanceSettings& s) { dbg.nospace() << endl; dbg.nospace() << "wholeAlbums : " << s.wholeAlbums << endl; dbg.nospace() << "wholeTags : " << s.wholeTags << endl; dbg.nospace() << "Albums : " << s.albums.count() << endl; dbg.nospace() << "Tags : " << s.tags.count() << endl; dbg.nospace() << "useMutiCoreCPU : " << s.useMutiCoreCPU << endl; dbg.nospace() << "newItems : " << s.newItems << endl; dbg.nospace() << "thumbnails : " << s.thumbnails << endl; dbg.nospace() << "scanThumbs : " << s.scanThumbs << endl; dbg.nospace() << "fingerPrints : " << s.fingerPrints << endl; dbg.nospace() << "scanFingerPrints : " << s.scanFingerPrints << endl; dbg.nospace() << "duplicates : " << s.duplicates << endl; dbg.nospace() << "similarity : " << s.similarity << endl; dbg.nospace() << "faceManagement : " << s.faceManagement << endl; dbg.nospace() << "faceScannedHandling : " << s.faceSettings.alreadyScannedHandling << endl; dbg.nospace() << "qualitySort : " << s.qualitySort << endl; dbg.nospace() << "quality : " << s.quality << endl; dbg.nospace() << "qualityScanMode : " << s.qualityScanMode << endl; dbg.nospace() << "metadataSync : " << s.metadataSync << endl; dbg.nospace() << "syncDirection : " << s.syncDirection << endl; return dbg.space(); }
QDebug operator<<(QDebug dbg, const Result& result) { if (result.isError()) { dbg.nospace() << "Predicate::Result:"; dbg.space() << "CODE=" << result.code(); if (!result.message().isEmpty()) dbg.space() << "MESSAGE=" << result.message(); if (!result.messageTitle().isEmpty()) dbg.space() << "TITLE=" << result.messageTitle(); if (!result.sql().isEmpty()) dbg.space() << "SQL=" << result.sql(); if (!result.errorSql().isEmpty()) dbg.space() << "ERR_SQL=" << result.errorSql(); dbg.space() << "SERVER_RESULT=(CODE:" << result.serverResultCode() /*<< "NAME:" << result.serverResultName()*/ << ")"; if (!result.serverMessage().isEmpty()) dbg.nospace() << "MESSAGE:" << result.serverMessage(); /*dbg.space() << "PREV_SERVER_RESULT=(CODE:" << result.previousServerResultCode() << "NAME:" << result.previousServerResultName() << ")";*/ } else { dbg.nospace() << "Predicate::Result: OK"; } return dbg.space(); }
QDebug operator<<(QDebug dbg, const BufferInfo &b) { dbg.nospace() << "(bufId: " << b.bufferId() << ", netId: " << b.networkId() << ", groupId: " << b.groupId() << ", buf: " << b.bufferName() << ")"; return dbg.space(); }
/** * Print UML Object to debug output stream, so it can be used like * uDebug() << "This object shouldn't be here: " << illegalObject; */ QDebug operator<<(QDebug out, const UMLObject& obj) { out.nospace() << "UMLObject: name= " << obj.name() << ", type= " << UMLObject::toString(obj.m_BaseType); return out.space(); }
QDebug ChartAxisIndex::debug( QDebug dbg ) const { dbg.nospace() << "( KPlato::ChartAxisIndex[ number=" << m_number << " userData=" << userData << " parentId=" << parentId<< " )"; return dbg.space(); }
QDebug operator<<(QDebug s, const QNetworkCookie &cookie) { s.nospace() << "QNetworkCookie(" << cookie.toRawForm(QNetworkCookie::Full) << ')'; return s.space(); }
QDebug operator<<(QDebug s, const Individual& i) { return s.space() << (i.HasFitness() ? QString::number(i.Fitness()).toAscii().constData() : "??") << "-" << i.Weights(); }
QDebug operator <<(QDebug debug, const AkPacket &packet) { debug.nospace() << packet.toString().toStdString().c_str(); return debug.space(); }
/*! Writes the name and value of the given \a param to \a dbg. */ QDebug operator<<(QDebug dbg, const Param ¶m) { dbg.nospace() << "Param(Name: " << param.name() << ", Value:" << param.value() << ")"; return dbg.space(); }
QDebug operator<<(QDebug dbg, const Call::Action& c) { dbg.nospace() << static_cast<int>(c); return dbg.space(); }
QDebug operator<<(QDebug dbg, const Call::State& c) { dbg.nospace() << QString(Call::toHumanStateName(c)); return dbg.space(); }
QDebug operator<<(QDebug dbg, const QVector2D &vector) { dbg.nospace() << "QVector2D(" << vector.x() << ", " << vector.y() << ')'; return dbg.space(); }