summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ulattil@nokia.com>2009-09-30 08:22:29 (GMT)
committerPrasanth Ullattil <prasanth.ulattil@nokia.com>2009-09-30 09:20:38 (GMT)
commitf16330e8d7f0e15d79b17a162a77044da57bb748 (patch)
tree710bbda89f124df6fc0723b96786a687b4aa982c /src/gui
parent85b4c2a9e4c62a836819baf0669b91a3f30c9a4e (diff)
downloadQt-f16330e8d7f0e15d79b17a162a77044da57bb748.zip
Qt-f16330e8d7f0e15d79b17a162a77044da57bb748.tar.gz
Qt-f16330e8d7f0e15d79b17a162a77044da57bb748.tar.bz2
Fix tst_QFontDialog::task256466_wrongStyle() autotest failure in Cocoa.
Some fonts contain only styles other than Normal (or Regualr). If we try to retrive the font sizes for such fonts by passing an empty style string, the QFontDatabase will return a null list. This was causing the autotest to fail. This patch will make sure that a style is always selected in the QFontDialog. Reviewed-by: Olivier
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogs/qfontdialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp
index ca882c5..60fae27 100644
--- a/src/gui/dialogs/qfontdialog.cpp
+++ b/src/gui/dialogs/qfontdialog.cpp
@@ -602,6 +602,8 @@ void QFontDialogPrivate::updateStyles()
}
if (!found)
styleList->setCurrentItem(0);
+ } else {
+ styleList->setCurrentItem(0);
}
styleEdit->setText(styleList->currentText());