summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@digia.com>2015-01-16 10:46:16 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-01-19 15:41:10 +0100
commit1909ab4b8fce0f9528e0ceaec9b0edf534c220de (patch)
tree2934b482f738824df6cc663a4997253b34efd4ce /tests/auto
parent9087df6bd2dd5198ccf101a237aadee331e51ec3 (diff)
Add test for QColorDialog initial color
Task-number: QTBUG-43548 Change-Id: I9410072e5bf837933148d48c4f9d6797337485f5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
index fa50d10488..e4e4fda1ca 100644
--- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
+++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
@@ -60,6 +60,7 @@ private slots:
void defaultOkButton();
void native_activeModalWidget();
void task247349_alpha();
+ void QTBUG_43548_initialColor();
};
class TestNativeDialog : public QColorDialog
@@ -162,5 +163,14 @@ void tst_QColorDialog::task247349_alpha()
QCOMPARE(alpha, qAlpha(dialog.currentColor().rgba()));
}
+void tst_QColorDialog::QTBUG_43548_initialColor()
+{
+ QColorDialog dialog;
+ dialog.setOption(QColorDialog::DontUseNativeDialog);
+ dialog.setCurrentColor(QColor(Qt::red));
+ QColor a(Qt::red);
+ QCOMPARE(a, dialog.currentColor());
+}
+
QTEST_MAIN(tst_QColorDialog)
#include "tst_qcolordialog.moc"