本文整理汇总了C++中QTextStream::setIntegerBase方法的典型用法代码示例。如果您正苦于以下问题:C++ QTextStream::setIntegerBase方法的具体用法?C++ QTextStream::setIntegerBase怎么用?C++ QTextStream::setIntegerBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTextStream
的用法示例。
在下文中一共展示了QTextStream::setIntegerBase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: format
void ModuleLoadEventInfo::format(QTextStream &str) const
{
str << "name='" << name << "' file='" << file << "' " <<
(loaded ? "[loaded] " : "[not loaded] ");
if (requireResume)
str << "[requires resume] ";
str.setIntegerBase(16);
str << " code: 0x" << codeAddress << " data: 0x" << dataAddress;
str.setIntegerBase(10);
}
示例2: pmEventFlagsStr
void
QmcEventRecord::dump(QTextStream &os, int instID, uint recordID) const
{
os << " " << QmcSource::timeStringBrief(&my.timestamp);
os << " --- event record [" << recordID << "]";
if (my.flags) {
os.setIntegerBase(16);
os << " flags 0x" << (uint)my.flags << " (" << pmEventFlagsStr(my.flags) << ")";
os.setIntegerBase(10);
}
os << " ---" << endl;
if (my.flags & PM_EVENT_FLAG_MISSED)
os << " ==> " << my.missed << " missed event records" << endl;
for (int i = 0; i < my.parameters.size(); i++)
my.parameters.at(i).dump(os, instID);
}
示例3: formatWindowsException
// Simple exception formatting
void formatWindowsException(unsigned long code, quint64 address,
unsigned long flags, quint64 info1, quint64 info2,
QTextStream &str)
{
str.setIntegerBase(16);
str << "\nException at 0x" << address
<< ", code: 0x" << code << ": ";
switch (code) {
case winExceptionCppException:
str << "C++ exception";
break;
case winExceptionStartupCompleteTrap:
str << "Startup complete";
break;
case winExceptionDllNotFound:
str << "DLL not found";
break;
case winExceptionDllEntryPointNoFound:
str << "DLL entry point not found";
break;
case winExceptionDllInitFailed:
str << "DLL failed to initialize";
break;
case winExceptionMissingSystemFile:
str << "System file is missing";
break;
case winExceptionRpcServerUnavailable:
str << "RPC server unavailable";
break;
case winExceptionRpcServerInvalid:
str << "Invalid RPC server";
break;
case winExceptionWX86Breakpoint:
str << "Win32 x86 emulation subsystem breakpoint hit";
break;
case EXCEPTION_ACCESS_VIOLATION: {
const bool writeOperation = info1;
str << (writeOperation ? "write" : "read")
<< " access violation at: 0x" << info2;
}
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
str << "arrary bounds exceeded";
break;
case EXCEPTION_BREAKPOINT:
str << "breakpoint";
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
str << "datatype misalignment";
break;
case EXCEPTION_FLT_DENORMAL_OPERAND:
str << "floating point exception";
break;
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
str << "division by zero";
break;
case EXCEPTION_FLT_INEXACT_RESULT:
str << " floating-point operation cannot be represented exactly as a decimal fraction";
break;
case EXCEPTION_FLT_INVALID_OPERATION:
str << "invalid floating-point operation";
break;
case EXCEPTION_FLT_OVERFLOW:
str << "floating-point overflow";
break;
case EXCEPTION_FLT_STACK_CHECK:
str << "floating-point operation stack over/underflow";
break;
case EXCEPTION_FLT_UNDERFLOW:
str << "floating-point UNDERFLOW";
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
str << "invalid instruction";
break;
case EXCEPTION_IN_PAGE_ERROR:
str << "page in error";
break;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
str << "integer division by zero";
break;
case EXCEPTION_INT_OVERFLOW:
str << "integer overflow";
break;
case EXCEPTION_INVALID_DISPOSITION:
str << "invalid disposition to exception dispatcher";
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
str << "attempt to continue execution after noncontinuable exception";
break;
case EXCEPTION_PRIV_INSTRUCTION:
str << "privileged instruction";
break;
case EXCEPTION_SINGLE_STEP:
str << "single step";
break;
case EXCEPTION_STACK_OVERFLOW:
str << "stack_overflow";
break;
}
//.........这里部分代码省略.........