本文整理汇总了C++中QDebug::space方法的典型用法代码示例。如果您正苦于以下问题:C++ QDebug::space方法的具体用法?C++ QDebug::space怎么用?C++ QDebug::space使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDebug
的用法示例。
在下文中一共展示了QDebug::space方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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();
}
示例2:
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();
}
示例3:
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();
}
示例4:
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();
}
示例5:
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();
}
示例6: if
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();
}
示例7: QString
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();
}
示例8: switch
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();
}
示例9:
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();
}
示例10:
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();
}
示例11: QStringLiteral
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();
}
示例12:
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();
}
示例13: debugSpaceHandling
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))"));
}
示例14:
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();
}
示例15: debug
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();
}