summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-17 03:20:09 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-17 03:20:09 (GMT)
commit4cd7e2ebd675fdc0b00d9a29f64e4189e74f7656 (patch)
tree9db3085e15487c4b0580035eeb0b262b0ada5920 /src
parentd1d81d48dff6b3285d9016d8f3354630926463d8 (diff)
parentfd3f9dd0f31efeea3aa0ec28b54c70d85712c7ba (diff)
downloadQt-4cd7e2ebd675fdc0b00d9a29f64e4189e74f7656.zip
Qt-4cd7e2ebd675fdc0b00d9a29f64e4189e74f7656.tar.gz
Qt-4cd7e2ebd675fdc0b00d9a29f64e4189e74f7656.tar.bz2
Merge remote branch 'origin/master' into bearermanagement/unit-tests
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp26
-rw-r--r--src/declarative/qml/qmlcompiler.cpp12
-rw-r--r--src/declarative/qml/qmlobjectscriptclass.cpp6
-rw-r--r--src/declarative/util/qmlanimation.cpp14
-rw-r--r--src/declarative/util/qmlbehavior.cpp2
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp2
-rw-r--r--src/declarative/util/qmlstateoperations.cpp8
-rw-r--r--src/declarative/util/qmlxmllistmodel.cpp4
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp10
-rw-r--r--src/gui/styles/qs60style.cpp45
-rw-r--r--src/gui/styles/qs60style_p.h2
-rw-r--r--src/gui/styles/qs60style_s60.cpp2
-rw-r--r--src/gui/widgets/qlineedit.cpp12
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
-rw-r--r--src/gui/widgets/qtextedit.cpp13
15 files changed, 86 insertions, 74 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index 93055fc..945e7d3 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -366,7 +366,7 @@ void QmlGraphicsAnchors::setFill(QmlGraphicsItem *f)
return;
}
if (f != d->item->parentItem() && f->parentItem() != d->item->parentItem()){
- qmlInfo(d->item) << tr("Can't anchor to an item that isn't a parent or sibling.");
+ qmlInfo(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling.");
return;
}
d->remDepend(d->fill);
@@ -400,7 +400,7 @@ void QmlGraphicsAnchors::setCenterIn(QmlGraphicsItem* c)
return;
}
if (c != d->item->parentItem() && c->parentItem() != d->item->parentItem()){
- qmlInfo(d->item) << tr("Can't anchor to an item that isn't a parent or sibling.");
+ qmlInfo(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling.");
return;
}
@@ -991,7 +991,7 @@ bool QmlGraphicsAnchorsPrivate::checkHValid() const
if (usedAnchors & QmlGraphicsAnchors::HasLeftAnchor &&
usedAnchors & QmlGraphicsAnchors::HasRightAnchor &&
usedAnchors & QmlGraphicsAnchors::HasHCenterAnchor) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't specify left, right, and hcenter anchors.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot specify left, right, and hcenter anchors.");
return false;
}
@@ -1001,16 +1001,16 @@ bool QmlGraphicsAnchorsPrivate::checkHValid() const
bool QmlGraphicsAnchorsPrivate::checkHAnchorValid(QmlGraphicsAnchorLine anchor) const
{
if (!anchor.item) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to a null item.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor to a null item.");
return false;
} else if (anchor.anchorLine & QmlGraphicsAnchorLine::Vertical_Mask) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor a horizontal edge to a vertical edge.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor a horizontal edge to a vertical edge.");
return false;
} else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor to an item that isn't a parent or sibling.");
return false;
} else if (anchor.item == item) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor item to self.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor item to self.");
return false;
}
@@ -1022,13 +1022,13 @@ bool QmlGraphicsAnchorsPrivate::checkVValid() const
if (usedAnchors & QmlGraphicsAnchors::HasTopAnchor &&
usedAnchors & QmlGraphicsAnchors::HasBottomAnchor &&
usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't specify top, bottom, and vcenter anchors.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot specify top, bottom, and vcenter anchors.");
return false;
} else if (usedAnchors & QmlGraphicsAnchors::HasBaselineAnchor &&
(usedAnchors & QmlGraphicsAnchors::HasTopAnchor ||
usedAnchors & QmlGraphicsAnchors::HasBottomAnchor ||
usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor)) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.");
return false;
}
@@ -1038,16 +1038,16 @@ bool QmlGraphicsAnchorsPrivate::checkVValid() const
bool QmlGraphicsAnchorsPrivate::checkVAnchorValid(QmlGraphicsAnchorLine anchor) const
{
if (!anchor.item) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to a null item.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor to a null item.");
return false;
} else if (anchor.anchorLine & QmlGraphicsAnchorLine::Horizontal_Mask) {
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor a vertical edge to a horizontal edge.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor a vertical edge to a horizontal edge.");
return false;
} else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor to an item that isn't a parent or sibling.");
return false;
} else if (anchor.item == item){
- qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor item to self.");
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Cannot anchor item to self.");
return false;
}
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 10150de..9990c06 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -730,7 +730,7 @@ bool QmlCompiler::buildObject(Object *obj, const BindingContext &ctxt)
compileState.parserStatusCount++;
// Check if this is a custom parser type. Custom parser types allow
- // assignments to non-existant properties. These assignments are then
+ // assignments to non-existent properties. These assignments are then
// compiled by the type.
bool isCustomParser = output->types.at(obj->type).type &&
output->types.at(obj->type).type->customParser() != 0;
@@ -1429,7 +1429,7 @@ bool QmlCompiler::buildProperty(QmlParser::Property *prop,
ctxt));
return true;
} else if (!type || !type->attachedPropertiesType()) {
- COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Non-existant attached object"));
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Non-existent attached object"));
}
if (!prop->value)
@@ -1486,9 +1486,9 @@ bool QmlCompiler::buildProperty(QmlParser::Property *prop,
} else if (prop->index == -1) {
if (prop->isDefault) {
- COMPILE_EXCEPTION(prop->values.first(), QCoreApplication::translate("QmlCompiler","Cannot assign to non-existant default property"));
+ COMPILE_EXCEPTION(prop->values.first(), QCoreApplication::translate("QmlCompiler","Cannot assign to non-existent default property"));
} else {
- COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Cannot assign to non-existant property \"%1\"").arg(QString::fromUtf8(prop->name)));
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(prop->name)));
}
} else if (prop->value) {
@@ -1534,7 +1534,7 @@ QmlCompiler::buildPropertyInNamespace(QmlEnginePrivate::ImportedNamespace *ns,
&type, 0, 0, 0);
if (!type || !type->attachedPropertiesType())
- COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Non-existant attached object"));
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Non-existent attached object"));
if (!prop->value)
COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Invalid attached object assignment"));
@@ -1841,7 +1841,7 @@ bool QmlCompiler::buildValueTypeProperty(QObject *type,
foreach (Property *prop, obj->properties) {
int idx = type->metaObject()->indexOfProperty(prop->name.constData());
if (idx == -1)
- COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Cannot assign to non-existant property \"%1\"").arg(QString::fromUtf8(prop->name)));
+ COMPILE_EXCEPTION(prop, QCoreApplication::translate("QmlCompiler","Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(prop->name)));
QMetaProperty p = type->metaObject()->property(idx);
prop->index = idx;
prop->type = p.userType();
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp
index 1c41d46..c373a8e 100644
--- a/src/declarative/qml/qmlobjectscriptclass.cpp
+++ b/src/declarative/qml/qmlobjectscriptclass.cpp
@@ -313,7 +313,7 @@ void QmlObjectScriptClass::setProperty(QObject *obj,
Q_ASSERT(lastData);
if (!lastData->isValid()) {
- QString error = QLatin1String("Cannot assign to non-existant property \"") +
+ QString error = QLatin1String("Cannot assign to non-existent property \"") +
toString(name) + QLatin1Char('\"');
if (context())
context()->throwError(error);
@@ -628,11 +628,11 @@ QmlObjectMethodScriptClass::Value QmlObjectMethodScriptClass::call(Object *o, QS
for (int ii = 0; ii < argTypeNames.count(); ++ii) {
argTypes[ii] = QMetaType::type(argTypeNames.at(ii));
if (argTypes[ii] == QVariant::Invalid)
- return Value(ctxt, ctxt->throwError(QString(QLatin1String("Unknown method parameter type: %1")).arg(QLatin1String(argTypeNames.at(ii)))));
+ return Value(ctxt, ctxt->throwError(QString::fromLatin1("Unknown method parameter type: %1").arg(QLatin1String(argTypeNames.at(ii)))));
}
if (argTypes.count() > ctxt->argumentCount())
- return Value(ctxt, ctxt->throwError("Insufficient arguments"));
+ return Value(ctxt, ctxt->throwError(QLatin1String("Insufficient arguments")));
QVarLengthArray<MetaCallArgument, 9> args(argTypes.count() + 1);
args[0].initAsType(method->data.propType, engine);
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index abffefe..6609c73 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -77,7 +77,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
if (hasParams) {
QString easeName = curve.trimmed();
if (!easeName.endsWith(QLatin1Char(')'))) {
- qmlInfo(obj) << obj->tr("Unmatched parenthesis in easing function \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Unmatched parenthesis in easing function \"%1\"").arg(curve);
return easingCurve;
}
@@ -86,7 +86,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
easeName.mid(idx + 1, easeName.length() - 1 - idx - 1);
normalizedCurve = easeName.left(idx);
if (!normalizedCurve.startsWith(QLatin1String("ease"))) {
- qmlInfo(obj) << obj->tr("Easing function \"%1\" must start with \"ease\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Easing function \"%1\" must start with \"ease\"").arg(curve);
return easingCurve;
}
@@ -101,7 +101,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
int value = me.keyToValue(normalizedCurve.toUtf8().constData());
if (value < 0) {
- qmlInfo(obj) << obj->tr("Unknown easing curve \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Unknown easing curve \"%1\"").arg(curve);
return easingCurve;
}
easingCurve.setType((QEasingCurve::Type)value);
@@ -111,7 +111,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
int sep = str.indexOf(QLatin1Char(':'));
if (sep == -1) {
- qmlInfo(obj) << obj->tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
continue;
}
@@ -120,7 +120,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
qreal propValue = str.mid(sep + 1).trimmed().toDouble(&isOk);
if (propName.isEmpty() || !isOk) {
- qmlInfo(obj) << obj->tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Improperly specified parameter in easing function \"%1\"").arg(curve);
continue;
}
@@ -131,7 +131,7 @@ static QEasingCurve stringToCurve(const QString &curve, QObject *obj)
} else if (propName == QLatin1String("overshoot")) {
easingCurve.setOvershoot(propValue);
} else {
- qmlInfo(obj) << obj->tr("Unknown easing parameter \"%1\"").arg(propName);
+ qmlInfo(obj) << QmlPropertyAnimation::tr("Unknown easing parameter \"%1\"").arg(propName);
continue;
}
}
@@ -226,7 +226,7 @@ QmlMetaProperty QmlAbstractAnimationPrivate::createProperty(QObject *obj, const
{
QmlMetaProperty prop = QmlMetaProperty::createProperty(obj, str, qmlContext(infoObj));
if (!prop.isValid()) {
- qmlInfo(infoObj) << QmlAbstractAnimation::tr("Cannot animate non-existant property \"%1\"").arg(str);
+ qmlInfo(infoObj) << QmlAbstractAnimation::tr("Cannot animate non-existent property \"%1\"").arg(str);
return QmlMetaProperty();
} else if (!prop.isWritable()) {
qmlInfo(infoObj) << QmlAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str);
diff --git a/src/declarative/util/qmlbehavior.cpp b/src/declarative/util/qmlbehavior.cpp
index b9c77f5..e8feeaa 100644
--- a/src/declarative/util/qmlbehavior.cpp
+++ b/src/declarative/util/qmlbehavior.cpp
@@ -119,7 +119,7 @@ void QmlBehavior::setAnimation(QmlAbstractAnimation *animation)
{
Q_D(QmlBehavior);
if (d->animation) {
- qmlInfo(this) << tr("Can't change the animation assigned to a Behavior.");
+ qmlInfo(this) << tr("Cannot change the animation assigned to a Behavior.");
return;
}
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index 68fc5cc..f1f39da 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -357,7 +357,7 @@ QmlPropertyChangesPrivate::property(const QByteArray &property)
Q_Q(QmlPropertyChanges);
QmlMetaProperty prop = QmlMetaProperty::createProperty(object, QString::fromUtf8(property));
if (!prop.isValid()) {
- qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to non-existant property \"%1\"").arg(QString::fromUtf8(property));
+ qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(property));
return QmlMetaProperty();
} else if (!(prop.type() & QmlMetaProperty::SignalProperty) && !prop.isWritable()) {
qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property));
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 35c8f7d..cefe2bc 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -82,7 +82,7 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
bool ok;
const QTransform &transform = target->itemTransform(targetParent, &ok);
if (transform.type() >= QTransform::TxShear || !ok) {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under complex transform");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under complex transform");
ok = false;
}
@@ -92,21 +92,21 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
if (transform.m11() == transform.m22())
scale = transform.m11();
else {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
} else if (ok && transform.type() == QTransform::TxRotate) {
if (transform.m11() == transform.m22())
scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
else {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
if (scale != 0)
rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI;
else {
- qmlInfo(q) << QObject::tr("Unable to preserve appearance under scale of 0");
+ qmlInfo(q) << QmlParentChange::tr("Unable to preserve appearance under scale of 0");
ok = false;
}
}
diff --git a/src/declarative/util/qmlxmllistmodel.cpp b/src/declarative/util/qmlxmllistmodel.cpp
index d31fadf..d586792 100644
--- a/src/declarative/util/qmlxmllistmodel.cpp
+++ b/src/declarative/util/qmlxmllistmodel.cpp
@@ -391,7 +391,7 @@ void QmlXmlRoleList::insert(int i, QmlXmlListModelRole *role)
{
QmlConcreteList<QmlXmlListModelRole *>::insert(i, role);
if (model->roleNames.contains(role->name())) {
- qmlInfo(role) << QObject::tr("\"%1\" duplicates a previous role name and will be disabled.").arg(role->name());
+ qmlInfo(role) << QCoreApplication::translate("QmlXmlRoleList", "\"%1\" duplicates a previous role name and will be disabled.").arg(role->name());
return;
}
model->roles.insert(i, model->highestRole);
@@ -551,7 +551,7 @@ void QmlXmlListModel::setQuery(const QString &query)
{
Q_D(QmlXmlListModel);
if (!query.startsWith(QLatin1Char('/'))) {
- qmlInfo(this) << tr("An XmlListModel query must start with '/' or \"//\"");
+ qmlInfo(this) << QCoreApplication::translate("QmlXmlRoleList", "An XmlListModel query must start with '/' or \"//\"");
return;
}
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 6cbf3d9..028ec48 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -149,11 +149,19 @@ void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoi
Q_ASSERT(window);
QTLWExtra *topExtra = window->d_func()->maybeTopData();
Q_ASSERT(topExtra);
+ QRect qr = region.boundingRect();
if (!topExtra->inExpose) {
topExtra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
- TRect tr = qt_QRect2TRect(region.boundingRect());
+ TRect tr = qt_QRect2TRect(qr);
widget->winId()->DrawNow(tr);
topExtra->inExpose = false;
+ } else {
+ // This handles the case when syncBackingStore updates content outside of the
+ // original drawing rectangle. This might happen if there are pending update()
+ // events at the same time as we get a Draw() from Symbian.
+ QRect drawRect = qt_TRect2QRect(widget->winId()->DrawableWindow()->GetDrawRect());
+ if (!drawRect.contains(qr))
+ widget->winId()->DrawDeferred();
}
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 9025e5b..ea7399f 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -289,6 +289,9 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
case SE_Editor:
drawFrame(SF_FrameLineEdit, painter, rect, flags | SF_PointNorth);
break;
+ case SE_DropArea:
+ drawPart(QS60StyleEnums::SP_QgnGrafOrgBgGrid, painter, rect, flags | SF_PointNorth);
+ break;
default:
break;
}
@@ -844,15 +847,18 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
break;
- case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed:
- case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
case QS60StyleEnums::SP_QsnCpScrollBgBottom:
- case QS60StyleEnums::SP_QsnCpScrollBgMiddle:
case QS60StyleEnums::SP_QsnCpScrollBgTop:
case QS60StyleEnums::SP_QsnCpScrollHandleBottom:
- case QS60StyleEnums::SP_QsnCpScrollHandleMiddle:
case QS60StyleEnums::SP_QsnCpScrollHandleTop:
+ case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
+ result.setHeight(pixelMetric(QStyle::PM_ScrollBarExtent));
+ result.setWidth(pixelMetric(QStyle::PM_ScrollBarExtent));
+ break;
+ case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
+ case QS60StyleEnums::SP_QsnCpScrollBgMiddle:
+ case QS60StyleEnums::SP_QsnCpScrollHandleMiddle:
result.setHeight(pixelMetric(QStyle::PM_ScrollBarExtent));
result.setWidth(pixelMetric(QStyle::PM_ScrollBarSliderMin));
break;
@@ -2271,14 +2277,16 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
QS60StyleEnums::SkinParts skinPart =
(option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
int minDimension = qMin(option->rect.width(), option->rect.height());
- const int resizeValue = minDimension >> 1;
- minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
QRect iconRect(option->rect.topLeft(), QSize(minDimension, minDimension));
- int verticalMagic(0);
- // magic values for positioning svg icon.
- if (option->rect.width() <= option->rect.height())
- verticalMagic = 3;
- iconRect.translate(3, verticalMagic - resizeValue);
+ const int magicTweak = 3;
+ int resizeValue = minDimension >> 1;
+ if (!QS60StylePrivate::isTouchSupported()) {
+ minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
+ iconRect.setSize(QSize(minDimension, minDimension));
+ const int verticalMagic = (option->rect.width() <= option->rect.height()) ? magicTweak : 0;
+ resizeValue = verticalMagic - resizeValue;
+ }
+ iconRect.translate(magicTweak, resizeValue);
QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
}
}
@@ -2302,7 +2310,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
break;
case PE_PanelScrollAreaCorner:
break;
-
+ case PE_IndicatorItemViewItemDrop:
+ if (QS60StylePrivate::isTouchSupported())
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_DropArea, painter, option->rect, flags);
+ else
+ commonStyleDraws = true;
+ break;
// todo: items are below with #ifdefs "just in case". in final version, remove all non-required cases
case PE_FrameLineEdit:
case PE_IndicatorDockWidgetResizeHandle:
@@ -2323,7 +2336,6 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_TOOLBAR
#ifndef QT_NO_COLUMNVIEW
case PE_IndicatorColumnViewArrow:
- case PE_IndicatorItemViewItemDrop:
#endif //QT_NO_COLUMNVIEW
case PE_FrameTabBarBase: // since tabs are in S60 always in navipane, let's use common style for tab base in Qt.
default:
@@ -2481,6 +2493,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_FormLayoutWrapPolicy:
retValue = QFormLayout::WrapLongRows;
break;
+ case SH_ScrollBar_ContextMenu:
+ retValue = false;
+ break;
default:
retValue = QCommonStyle::styleHint(sh, opt, widget, hret);
break;
@@ -2559,11 +2574,11 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
const int frameThickness = spinbox->frame ? pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0;
const int buttonMargin = spinbox->frame ? 2 : 0;
- const int buttonWidth = QS60StylePrivate::pixelMetric(PM_ButtonIconSize) + 2 * buttonMargin;
+ const int buttonContentWidth = QS60StylePrivate::pixelMetric(PM_ButtonIconSize) + 2 * buttonMargin;
QSize buttonSize;
buttonSize.setHeight(qMax(8, spinbox->rect.height() - frameThickness));
//width should at least be equal to height
- buttonSize.setWidth(qMax(buttonSize.height(), buttonWidth));
+ buttonSize.setWidth(qMax(buttonSize.height(), buttonContentWidth));
buttonSize = buttonSize.expandedTo(QApplication::globalStrut());
const int y = frameThickness + spinbox->rect.y();
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index eae2291..ea30b81 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -131,6 +131,7 @@ public:
SP_QgnGrafBarFrameSideL,
SP_QgnGrafBarFrameSideR,
SP_QgnGrafBarProgress,
+ SP_QgnGrafOrgBgGrid,
SP_QgnGrafScrollArrowDown,
SP_QgnGrafScrollArrowLeft,
SP_QgnGrafScrollArrowRight,
@@ -428,6 +429,7 @@ public:
SE_ScrollBarHandlePressedVertical,
SE_ButtonInactive,
SE_Editor,
+ SE_DropArea
};
enum SkinFrameElements {
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 6d9ba05..cb49fbc 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -178,6 +178,8 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QgnGrafBarFrameSideL */ {KAknsIIDQgnGrafBarFrameSideL, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_All, -1,-1},
/* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_All, -1,-1},
+ // No drop area for 3.x non-touch devices
+ /* SP_QgnGrafOrgBgGrid */ {KAknsIIDNone, EDrawIcon, ES60_3_X, EAknsMajorGeneric ,0x1eba}, //KAknsIIDQgnGrafOrgBgGrid
/* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1},
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 141f844..0ba8b9f 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1637,12 +1637,8 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
if (!hasEditFocus() && !(event->modifiers() & Qt::ControlModifier)) {
if (!event->text().isEmpty() && event->text().at(0).isPrint()
&& !isReadOnly())
- {
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- clear();
-#endif
- } else {
+ else {
event->ignore();
return;
}
@@ -1698,12 +1694,8 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e)
// commit text as they focus out without interfering with focus
if (QApplication::keypadNavigationEnabled()
&& hasFocus() && !hasEditFocus()
- && !e->preeditString().isEmpty()) {
+ && !e->preeditString().isEmpty())
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- selectAll(); // so text is replaced rather than appended to
-#endif
- }
#endif
d->control->processInputMethodEvent(e);
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 02ffe13..0d798b7 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -2394,7 +2394,7 @@ void QPlainTextEdit::setReadOnly(bool ro)
then the focus policy is also automatically set to Qt::ClickFocus.
The default value depends on whether the QPlainTextEdit is read-only
- or editable, and whether it is a QTextBrowser or not.
+ or editable.
*/
void QPlainTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index b6886b4..4541730 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -1212,12 +1212,9 @@ void QTextEdit::keyPressEvent(QKeyEvent *e)
default:
if (QApplication::keypadNavigationEnabled()) {
if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) {
- if (e->text()[0].isPrint()) {
+ if (e->text()[0].isPrint())
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- clear();
-#endif
- } else {
+ else {
e->ignore();
return;
}
@@ -1677,12 +1674,8 @@ void QTextEdit::inputMethodEvent(QInputMethodEvent *e)
#ifdef QT_KEYPAD_NAVIGATION
if (d->control->textInteractionFlags() & Qt::TextEditable
&& QApplication::keypadNavigationEnabled()
- && !hasEditFocus()) {
+ && !hasEditFocus())
setEditFocus(true);
-#ifndef Q_OS_SYMBIAN
- selectAll(); // so text is replaced rather than appended to
-#endif
- }
#endif
d->sendControlEvent(e);
ensureCursorVisible();