From 1f56953fca1a38b31734ce8a87c01c85f1f0f901 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 19 Feb 2010 12:38:30 +0200 Subject: Fixed libstdcpp.dll version autodetection for Symbian Libstdcpp.dll version autodetection was broken for clean builds, so made it default for new version when neither new or old can be detected. Task-number: QT-1171 Reviewed-by: Janne Anttila --- mkspecs/features/symbian/stl.prf | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf index e21ee5c..85c758a 100644 --- a/mkspecs/features/symbian/stl.prf +++ b/mkspecs/features/symbian/stl.prf @@ -15,11 +15,18 @@ INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE INCLUDEPATH -= $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off # libstdcppv5 is preferred over libstdcpp as it has/uses the throwing version of operator new -exists($${EPOCROOT}epoc32/release/armv5/urel/libstdcppv5.dll)|exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcppv5.dll) { - LIBS *= -llibstdcppv5.dll +STL_LIB = -llibstdcppv5.dll - # STDCPP turns on standard C++ new behaviour (ie. throwing new) - MMP_RULES += "STDCPP" -} else { - LIBS *= -llibstdcpp.dll +# STDCPP turns on standard C++ new behaviour (ie. throwing new) +STL_MMP_RULE = "STDCPP" + +# Fall back to old implementation if that is the only one that is found +exists($${EPOCROOT}epoc32/release/armv5/urel/libstdcpp.dll)|exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcpp.dll) { + !exists($${EPOCROOT}epoc32/release/armv5/urel/libstdcppv5.dll):!exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcppv5.dll) { + STL_LIB = -llibstdcpp.dll + STL_MMP_RULE = + } } + +LIBS *= $$STL_LIB +MMP_RULES *= $$STL_MMP_RULE -- cgit v0.12 From 145f46347bdcdf0efe2821b8ae2c34f53c543d1c Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 19 Feb 2010 14:23:47 +0200 Subject: Supressed Icon sizes on QPushButton in QS60Style QS60Style should have smaller button margins when icon height is larger than text height within a button. Task-number: QTBUG-7586 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 74707af..565cc2c 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2396,10 +2396,20 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, case CT_PushButton: sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); //FIXME properly - style should calculate the location of border frame-part - sz += QSize(2 * pixelMetric(PM_ButtonMargin), 2 * pixelMetric(PM_ButtonMargin)); - if (const QAbstractButton *buttonWidget = (qobject_cast(widget))) + if (const QAbstractButton *buttonWidget = (qobject_cast(widget))) { if (buttonWidget->isCheckable()) sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0); + const int iconHeight = (!buttonWidget->icon().isNull()) ? buttonWidget->iconSize().height() : 0; + const int textHeight = (buttonWidget->text().length() > 0) ? + buttonWidget->fontMetrics().size(Qt::TextSingleLine, buttonWidget->text()).height() : 0; + const int decoratorHeight = (buttonWidget->isCheckable()) ? pixelMetric(PM_IndicatorHeight) : 0; + + const int contentHeight = + qMax(qMax(iconHeight, decoratorHeight) + pixelMetric(PM_ButtonMargin), + textHeight + 2*pixelMetric(PM_ButtonMargin)); + sz.setHeight(contentHeight); + sz += QSize(2 * pixelMetric(PM_ButtonMargin), 0); + } break; case CT_LineEdit: if (const QStyleOptionFrame *f = qstyleoption_cast(opt)) -- cgit v0.12