src/gui/styles/qstyleoption.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
  5417     \relates QStyleHintReturn
  5417     \relates QStyleHintReturn
  5418 
  5418 
  5419     Returns a T or 0 depending on the type of \a hint.
  5419     Returns a T or 0 depending on the type of \a hint.
  5420 */
  5420 */
  5421 
  5421 
       
  5422 #if !defined(QT_NO_DEBUG_STREAM)
  5422 QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
  5423 QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
  5423 {
  5424 {
  5424 #if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
  5425 #if !defined(QT_NO_DEBUG)
  5425     switch (optionType) {
  5426     switch (optionType) {
  5426     case QStyleOption::SO_Default:
  5427     case QStyleOption::SO_Default:
  5427         debug << "SO_Default"; break;
  5428         debug << "SO_Default"; break;
  5428     case QStyleOption::SO_FocusRect:
  5429     case QStyleOption::SO_FocusRect:
  5429         debug << "SO_FocusRect"; break;
  5430         debug << "SO_FocusRect"; break;
  5486     return debug;
  5487     return debug;
  5487 }
  5488 }
  5488 
  5489 
  5489 QDebug operator<<(QDebug debug, const QStyleOption &option)
  5490 QDebug operator<<(QDebug debug, const QStyleOption &option)
  5490 {
  5491 {
  5491 #if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
  5492 #if !defined(QT_NO_DEBUG)
  5492     debug << "QStyleOption(";
  5493     debug << "QStyleOption(";
  5493     debug << QStyleOption::OptionType(option.type);
  5494     debug << QStyleOption::OptionType(option.type);
  5494     debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
  5495     debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
  5495     debug << ',' << option.state;
  5496     debug << ',' << option.state;
  5496     debug << ',' << option.rect;
  5497     debug << ',' << option.rect;
  5497     debug << ')';
  5498     debug << ')';
  5498 #endif
  5499 #endif
  5499     return debug;
  5500     return debug;
  5500 }
  5501 }
       
  5502 #endif
  5501 
  5503 
  5502 QT_END_NAMESPACE
  5504 QT_END_NAMESPACE