diff options
Diffstat (limited to 'tests/auto/widgets')
8 files changed, 88 insertions, 0 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST new file mode 100644 index 0000000000..717c791280 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST @@ -0,0 +1,2 @@ +[hoverEnterLeaveEvent] +ubuntu-14.04 diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST new file mode 100644 index 0000000000..be7a7e398b --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST @@ -0,0 +1,4 @@ +[task255529_transformationAnchorMouseAndViewportMargins] +ubuntu-14.04 +[cursor] +ubuntu-14.04 diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST new file mode 100644 index 0000000000..5db5c97917 --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST @@ -0,0 +1,2 @@ +[initialShow2] +ubuntu-14.04 diff --git a/tests/auto/widgets/kernel/qaction/BLACKLIST b/tests/auto/widgets/kernel/qaction/BLACKLIST new file mode 100644 index 0000000000..f67a3c471e --- /dev/null +++ b/tests/auto/widgets/kernel/qaction/BLACKLIST @@ -0,0 +1,2 @@ +[setStandardKeys] +ubuntu-14.04 diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST new file mode 100644 index 0000000000..ed40f98051 --- /dev/null +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -0,0 +1,16 @@ +[normalGeometry] +ubuntu-14.04 +[saveRestoreGeometry] +ubuntu-14.04 +[restoreVersion1Geometry] +ubuntu-14.04 +[updateWhileMinimized] +ubuntu-14.04 +[focusProxyAndInputMethods] +ubuntu-14.04 +[touchEventSynthesizedMouseEvent] +ubuntu-14.04 +[grabMouse] +ubuntu-14.04 +[largerThanScreen_QTBUG30142] +ubuntu-14.04 diff --git a/tests/auto/widgets/util/qcompleter/BLACKLIST b/tests/auto/widgets/util/qcompleter/BLACKLIST new file mode 100644 index 0000000000..ffbcc94a1f --- /dev/null +++ b/tests/auto/widgets/util/qcompleter/BLACKLIST @@ -0,0 +1,2 @@ +[QTBUG_14292_filesystem] +ubuntu-14.04 diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 7b4b65e841..c409698ec0 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -160,6 +160,7 @@ private slots: void highlightedSignal(); void itemData(); void task_QTBUG_31146_popupCompletion(); + void task_QTBUG_41288_completerChangesCurrentIndex(); void keyboardSelection(); void setCustomModelAndView(); void updateDelegateOnEditableChange(); @@ -530,6 +531,23 @@ void tst_QComboBox::sizeAdjustPolicy() QCOMPARE(testWidget->sizeHint(), content); testWidget->setMinimumContentsLength(0); QVERIFY(testWidget->sizeHint().width() < content.width()); + + // check AdjustToContents changes when model changes + content = testWidget->sizeHint(); + QStandardItemModel *model = new QStandardItemModel(2, 1, testWidget); + testWidget->setModel(model); + QVERIFY(testWidget->sizeHint().width() < content.width()); + + // check AdjustToContents changes when a row is inserted into the model + content = testWidget->sizeHint(); + QStandardItem *item = new QStandardItem(QStringLiteral("This is an item")); + model->appendRow(item); + QVERIFY(testWidget->sizeHint().width() > content.width()); + + // check AdjustToContents changes when model is reset + content = testWidget->sizeHint(); + model->clear(); + QVERIFY(testWidget->sizeHint().width() < content.width()); } void tst_QComboBox::clear() @@ -3059,6 +3077,44 @@ void tst_QComboBox::task_QTBUG_31146_popupCompletion() QCOMPARE(comboBox.currentIndex(), 0); } +void tst_QComboBox::task_QTBUG_41288_completerChangesCurrentIndex() +{ + QComboBox comboBox; + comboBox.setEditable(true); + + comboBox.addItems(QStringList() << QStringLiteral("111") << QStringLiteral("222")); + + comboBox.show(); + comboBox.activateWindow(); + QVERIFY(QTest::qWaitForWindowActive(&comboBox)); + + { + // change currentIndex() by keyboard + comboBox.lineEdit()->selectAll(); + QTest::keyClicks(comboBox.lineEdit(), "222"); + QTest::keyClick(comboBox.lineEdit(), Qt::Key_Enter); + QCOMPARE(comboBox.currentIndex(), 1); + + QTest::keyClick(&comboBox, Qt::Key_Up); + comboBox.lineEdit()->selectAll(); + QTest::keyClick(comboBox.lineEdit(), Qt::Key_Enter); + QCOMPARE(comboBox.currentIndex(), 0); + } + + { + // change currentIndex() programmatically + comboBox.lineEdit()->selectAll(); + QTest::keyClicks(comboBox.lineEdit(), "222"); + QTest::keyClick(comboBox.lineEdit(), Qt::Key_Enter); + QCOMPARE(comboBox.currentIndex(), 1); + + comboBox.setCurrentIndex(0); + comboBox.lineEdit()->selectAll(); + QTest::keyClick(comboBox.lineEdit(), Qt::Key_Enter); + QCOMPARE(comboBox.currentIndex(), 0); + } +} + void tst_QComboBox::keyboardSelection() { QComboBox comboBox; diff --git a/tests/auto/widgets/widgets/qmenubar/BLACKLIST b/tests/auto/widgets/widgets/qmenubar/BLACKLIST new file mode 100644 index 0000000000..53ea4a9148 --- /dev/null +++ b/tests/auto/widgets/widgets/qmenubar/BLACKLIST @@ -0,0 +1,4 @@ +[check_menuPosition] +ubuntu-14.04 +[taskQTBUG4965_escapeEaten] +ubuntu-14.04 |