Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

KDAB contributions to Qt 5.0 (part 4)

#define QSKIP(statement, ...) QSKIP_INTERNAL(statement)
constexpr QPoint twelve_twelve(12, 12);

  switch(someInt)
  {
    case QPoint(15, 15).x():
      break;
    case twelve_twelve.x():
      break;
//  case QPoint(12, 12).x(): // ### Error: Duplicate of above.
//    break;
    case (twelve_twelve + QPoint(4, 4)).x():
      break;
// No magic number for the value being tested anymore:
    case QRect(twelve_twelve, QSize(40, 20).transposed()).bottomRight().x():
      break;
    case QLine(QPoint(4, 5), QPoint(6, 7)).translated(twelve_twelve).x2():
      break;
  }

2 Comments

3 - Jan - 2013

Robert Knight

3 - Jan - 2013

steveire