summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-14 18:30:52 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-14 18:30:52 (GMT)
commit0ca7a9ea507c329ff542d54122b9a23adffa2327 (patch)
tree611983c5ce0d69d1292e6cf9ab867830004e3456 /src
parent780c0df56bc93fda950ce6fc4794d99629fc64c2 (diff)
parent6835055e501127a39ef78dfd5768783a75bcb156 (diff)
downloadQt-0ca7a9ea507c329ff542d54122b9a23adffa2327.zip
Qt-0ca7a9ea507c329ff542d54122b9a23adffa2327.tar.gz
Qt-0ca7a9ea507c329ff542d54122b9a23adffa2327.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Support linked fonts (.ltt) from standard font locations. QS60Style: In S60 3.x and 5.0 Qt itemviews behaviour is not nativelike Fix anomaly demo control strip icon placement
Diffstat (limited to 'src')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp5
-rw-r--r--src/gui/styles/qs60style.cpp10
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp1
3 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 2faf755..b464330 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1785,7 +1785,10 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event)
emit clicked(index);
if (edited)
return;
- if (style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, 0, this))
+ QStyleOptionViewItemV4 option = d->viewOptionsV4();
+ if (d->pressedAlreadySelected)
+ option.state |= QStyle::State_Selected;
+ if (style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, &option, this))
emit activated(index);
}
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 924cabc..d28e1d9 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2575,7 +2575,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *widget,
QStyleHintReturn *hret) const
{
- int retValue = -1;
+ int retValue = 0;
switch (sh) {
case SH_RequestSoftwareInputPanel:
if (QS60StylePrivate::isSingleClickUi())
@@ -2610,9 +2610,13 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_Dial_BackgroundRole:
retValue = QPalette::Base;
break;
- case SH_ItemView_ActivateItemOnSingleClick:
- retValue = QS60StylePrivate::isSingleClickUi();
+ case SH_ItemView_ActivateItemOnSingleClick: {
+ if (QS60StylePrivate::isSingleClickUi())
+ retValue = true;
+ else if (opt && opt->state & QStyle::State_Selected)
+ retValue = true;
break;
+ }
case SH_ProgressDialog_TextLabelAlignment:
retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ?
Qt::AlignLeft :
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 4171e40..40fe3b7 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -113,6 +113,7 @@ QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementati
QStringList filters;
filters.append(QLatin1String("*.ttf"));
filters.append(QLatin1String("*.ccc"));
+ filters.append(QLatin1String("*.ltt"));
const QFileInfoList fontFiles = alternativeFilePaths(QLatin1String("resource\\Fonts"), filters);
const TInt heapMinLength = 0x1000;