summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-12 12:42:50 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-12 12:42:50 (GMT)
commitaed2adc93b6d35f419d5b3ea061193b5bf60cadc (patch)
treeaef07a66044b845c484e6f0e5979553d0e2a6c85 /src/gui/styles/qs60style.cpp
parentbf71ab63e805e49e59fbe25265104a414ab7d039 (diff)
parent2b50979c0a957ed1712a3becdd394f83e9b7f153 (diff)
downloadQt-aed2adc93b6d35f419d5b3ea061193b5bf60cadc.zip
Qt-aed2adc93b6d35f419d5b3ea061193b5bf60cadc.tar.gz
Qt-aed2adc93b6d35f419d5b3ea061193b5bf60cadc.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: (21 commits) QFile cannot deal with crlf-translated stdio, so use binary mode remove trimming of (expected) output really fix the autotest support regexp-like quantifiers of expected output lines remove superfluous \r filtering print actual rather than expected output for matching text Do not set the font size unnecessarily in the simulated s60 style. Doc typos fixed Translations: Update German for 4.6.1 fix test under windows don't complain about unresolved base when the reference is absolute make the lupdate tests more verbose in case of failure don't use qmake for test setup move equivalent of output_ts test to good/ look for the .result file in the dir where the output is expected to go fix sametext and number heuristics fix number heuristics, part 1 no point in specifying -ts when a .pro file is specified clean up the lupdatecmd files tidy up the test .pro files ...
Diffstat (limited to 'src/gui/styles/qs60style.cpp')
-rw-r--r--src/gui/styles/qs60style.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index d78ea21..a715087 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -343,7 +343,8 @@ bool QS60StylePrivate::drawsOwnThemeBackground(const QWidget *widget)
}
QFont QS60StylePrivate::s60Font(
- QS60StyleEnums::FontCategories fontCategory, int pointSize) const
+ QS60StyleEnums::FontCategories fontCategory,
+ int pointSize, bool resolveFontSize) const
{
QFont result;
int actualPointSize = pointSize;
@@ -356,7 +357,7 @@ QFont QS60StylePrivate::s60Font(
Q_ASSERT(actualPointSize > 0);
const QPair<QS60StyleEnums::FontCategories, int> key(fontCategory, actualPointSize);
if (!m_mappedFontsCache.contains(key)) {
- result = s60Font_specific(fontCategory, actualPointSize);
+ result = s60Font_specific(fontCategory, actualPointSize, resolveFontSize);
m_mappedFontsCache.insert(key, result);
} else {
result = m_mappedFontsCache.value(key);
@@ -620,8 +621,10 @@ void QS60StylePrivate::setFont(QWidget *widget) const
fontCategory = QS60StyleEnums::FC_Title;
}
if (fontCategory != QS60StyleEnums::FC_Undefined) {
+ const bool resolveFontSize = widget->testAttribute(Qt::WA_SetFont)
+ && (widget->font().resolve() & QFont::SizeResolved);
const QFont suggestedFont =
- s60Font(fontCategory, widget->font().pointSizeF());
+ s60Font(fontCategory, widget->font().pointSizeF(), resolveFontSize);
widget->setFont(suggestedFont);
}
}