tests/auto/qwidget/tst_qwidget.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
child 33 3e2da88830cd
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
  9512 
  9512 
  9513     // Check one more time, because the second time around does more caching.
  9513     // Check one more time, because the second time around does more caching.
  9514     w.update();
  9514     w.update();
  9515     QApplication::processEvents();
  9515     QApplication::processEvents();
  9516     QCOMPARE(w.numPaintEvents, 2);
  9516     QCOMPARE(w.numPaintEvents, 2);
       
  9517 #else
       
  9518     QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll);
  9517 #endif
  9519 #endif
  9518 }
  9520 }
  9519 
  9521 
  9520 void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
  9522 void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
  9521 {
  9523 {
  9990     QCOMPARE(inputContext->focusWidget(), toplevel);
  9992     QCOMPARE(inputContext->focusWidget(), toplevel);
  9991 
  9993 
  9992     delete toplevel;
  9994     delete toplevel;
  9993 }
  9995 }
  9994 
  9996 
       
  9997 #ifdef QT_BUILD_INTERNAL
  9995 class scrollWidgetWBS : public QWidget
  9998 class scrollWidgetWBS : public QWidget
  9996 {
  9999 {
  9997 public:
 10000 public:
  9998     void deleteBackingStore()
 10001     void deleteBackingStore()
  9999     {
 10002     {
 10009             static_cast<QWidgetPrivate*>(d_ptr.data())->invalidateBuffer(this->rect());
 10012             static_cast<QWidgetPrivate*>(d_ptr.data())->invalidateBuffer(this->rect());
 10010             repaint();
 10013             repaint();
 10011         }
 10014         }
 10012     }
 10015     }
 10013 };
 10016 };
       
 10017 #endif
 10014 
 10018 
 10015 void tst_QWidget::scrollWithoutBackingStore()
 10019 void tst_QWidget::scrollWithoutBackingStore()
 10016 {
 10020 {
       
 10021 #ifdef QT_BUILD_INTERNAL
 10017     scrollWidgetWBS scrollable;
 10022     scrollWidgetWBS scrollable;
 10018     scrollable.resize(100,100);
 10023     scrollable.resize(100,100);
 10019     QLabel child(QString("@"),&scrollable);
 10024     QLabel child(QString("@"),&scrollable);
 10020     child.resize(50,50);
 10025     child.resize(50,50);
 10021     scrollable.show();
 10026     scrollable.show();
 10025     scrollable.deleteBackingStore();
 10030     scrollable.deleteBackingStore();
 10026     scrollable.scroll(-25,-25);
 10031     scrollable.scroll(-25,-25);
 10027     QCOMPARE(child.pos(),QPoint(25,25));
 10032     QCOMPARE(child.pos(),QPoint(25,25));
 10028     scrollable.enableBackingStore();
 10033     scrollable.enableBackingStore();
 10029     QCOMPARE(child.pos(),QPoint(25,25));
 10034     QCOMPARE(child.pos(),QPoint(25,25));
       
 10035 #else
       
 10036     QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll);
       
 10037 #endif
 10030 }
 10038 }
 10031 
 10039 
 10032 void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy()
 10040 void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy()
 10033 {
 10041 {
 10034     QWidget w;
 10042     QWidget w;