equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the test suite of the Qt Toolkit. |
7 ** This file is part of the test suite of the Qt Toolkit. |
8 ** |
8 ** |
121 void tst_QFontComboBox::currentFont_data() |
121 void tst_QFontComboBox::currentFont_data() |
122 { |
122 { |
123 QTest::addColumn<QFont>("currentFont"); |
123 QTest::addColumn<QFont>("currentFont"); |
124 // Normalize the names |
124 // Normalize the names |
125 QFont defaultFont; |
125 QFont defaultFont; |
|
126 QFontInfo fi(defaultFont); |
|
127 defaultFont = QFont(fi.family()); // make sure we have a real font name and not something like 'Sans Serif'. |
126 QTest::newRow("default") << defaultFont; |
128 QTest::newRow("default") << defaultFont; |
127 defaultFont.setPointSize(defaultFont.pointSize() + 10); |
129 defaultFont.setPointSize(defaultFont.pointSize() + 10); |
128 QTest::newRow("default") << defaultFont; |
130 QTest::newRow("default2") << defaultFont; |
129 QFontDatabase db; |
131 QFontDatabase db; |
130 QStringList list = db.families(); |
132 QStringList list = db.families(); |
131 for (int i = 0; i < list.count(); ++i) { |
133 for (int i = 0; i < list.count(); ++i) { |
132 QFont f = QFont(QFontInfo(QFont(list.at(i))).family()); |
134 QFont f = QFont(QFontInfo(QFont(list.at(i))).family()); |
133 QTest::newRow(qPrintable(list.at(i))) << f; |
135 QTest::newRow(qPrintable(list.at(i))) << f; |