Add test for QColorDialog initial color
Task-number: QTBUG-43548 Change-Id: I9410072e5bf837933148d48c4f9d6797337485f5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>bb10
parent
9087df6bd2
commit
1909ab4b8f
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue