summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-15 19:27:42 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-15 19:27:42 (GMT)
commit6e2c3e7306883cd4618742e37861e326e9c91895 (patch)
treeacef1cbd0595b1e34de10935c1326bc582ad98ab /tests
parent03c01176ebf423085e56ceabcf8335ca5027a786 (diff)
parentf95a1d74c6a8672aac180ff8d9e8ba2e13074865 (diff)
downloadQt-6e2c3e7306883cd4618742e37861e326e9c91895.zip
Qt-6e2c3e7306883cd4618742e37861e326e9c91895.tar.gz
Qt-6e2c3e7306883cd4618742e37861e326e9c91895.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QFileDialog : Fix completer showing up on the MyComputer view. Amend previous commit 4e2eb2945dbc3865e2901f12d663ed89e8f0dfbf to fix compilation with QT_NO_DEBUG_STREAM Compile with QT_NO_DEBUG_STREAM Docs: HTML comments marks so Creator can extract data efficiently. Work around memory leak issue in grid and linear layouts.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qfiledialog2/tst_qfiledialog2.cpp22
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp7
-rw-r--r--tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp7
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
index eee495f..6299c24 100644
--- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
@@ -140,6 +140,7 @@ private slots:
void QTBUG4419_lineEditSelectAll();
void QTBUG6558_showDirsOnly();
void QTBUG4842_selectFilterWithHideNameFilterDetails();
+ void dontShowCompleterOnRoot();
private:
QByteArray userSettings;
@@ -1194,5 +1195,26 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails()
}
+void tst_QFileDialog2::dontShowCompleterOnRoot()
+{
+ QNonNativeFileDialog fd(0, "TestFileDialog");
+ fd.setAcceptMode(QFileDialog::AcceptSave);
+ fd.show();
+
+ QApplication::setActiveWindow(&fd);
+ QTest::qWaitForWindowShown(&fd);
+ QTRY_COMPARE(fd.isVisible(), true);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
+
+ fd.setDirectory("");
+ QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit");
+ QTRY_VERIFY(lineEdit->text().isEmpty());
+
+ //The gatherer thread will then return the result
+ QApplication::processEvents();
+
+ QTRY_VERIFY(lineEdit->completer()->popup()->isHidden());
+}
+
QTEST_MAIN(tst_QFileDialog2)
#include "tst_qfiledialog2.moc"
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index b9a5c66..d1d6860 100644
--- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -105,6 +105,7 @@ private slots:
void geometries_data();
void geometries();
void avoidRecursionInInsertItem();
+ void styleInfoLeak();
void task236367_maxSizeHint();
};
@@ -2196,6 +2197,12 @@ void tst_QGraphicsGridLayout::avoidRecursionInInsertItem()
QCOMPARE(layout->count(), 0);
}
+void tst_QGraphicsGridLayout::styleInfoLeak()
+{
+ QGraphicsGridLayout grid;
+ grid.horizontalSpacing();
+}
+
void tst_QGraphicsGridLayout::task236367_maxSizeHint()
{
QGraphicsWidget *widget = new QGraphicsWidget;
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index c26e5d4..6107fa1 100644
--- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -102,6 +102,7 @@ private slots:
void layoutDirection();
void removeLayout();
void avoidRecursionInInsertItem();
+ void styleInfoLeak();
// Task specific tests
void task218400_insertStretchCrash();
@@ -1443,6 +1444,12 @@ void tst_QGraphicsLinearLayout::avoidRecursionInInsertItem()
QCOMPARE(layout->count(), 0);
}
+void tst_QGraphicsLinearLayout::styleInfoLeak()
+{
+ QGraphicsLinearLayout layout;
+ layout.spacing();
+}
+
void tst_QGraphicsLinearLayout::task218400_insertStretchCrash()
{
QGraphicsScene *scene = new QGraphicsScene;