summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2009-06-12 15:27:45 (GMT)
committermread <qt-info@nokia.com>2009-06-12 15:27:45 (GMT)
commit43c2996c4ffea74776de26defa277b0a886d15c1 (patch)
treee60c5424417110a59a82e8bacfe4ce0da5937bcc /src
parentff0e9d7f950d757ccbe1bb5267cd514348dadf35 (diff)
parent32bd7c09327f0234ac5415d029d76aa3bab1feaa (diff)
downloadQt-43c2996c4ffea74776de26defa277b0a886d15c1.zip
Qt-43c2996c4ffea74776de26defa277b0a886d15c1.tar.gz
Qt-43c2996c4ffea74776de26defa277b0a886d15c1.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qscopedpointer.cpp34
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp2
-rw-r--r--src/gui/kernel/qaction.cpp3
-rw-r--r--src/gui/kernel/qapplication_s60.cpp5
-rw-r--r--src/gui/styles/qs60style.cpp46
-rw-r--r--src/gui/styles/qs60style_simulated.cpp4
-rw-r--r--src/gui/widgets/qactiontokeyeventmapper_p.h13
-rw-r--r--src/network/ssl/ssl.pri2
8 files changed, 84 insertions, 25 deletions
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index f34aec8..0239575 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -3,9 +3,39 @@
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the $MODULE$ of the Qt Toolkit.
+** This file is part of the QtCore module of the Qt Toolkit.
**
-** $TROLLTECH_DUAL_LICENSE$
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index b183e1b..7d79422 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -329,6 +329,8 @@ void QCoeFepInputContext::updateHints()
m_lastImHints = hints;
applyHints(hints);
}
+ } else {
+ CCoeEnv::Static()->InputCapabilitiesChanged();
}
}
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 8263cbc..b1db8d6 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -81,7 +81,8 @@ static QString qt_strippedText(QString s)
QActionPrivate::QActionPrivate() : group(0), enabled(1), forceDisabled(0),
visible(1), forceInvisible(0), checkable(0), checked(0), separator(0), fontSet(false),
- menuRole(QAction::TextHeuristicRole), iconVisibleInMenu(-1)
+ menuRole(QAction::TextHeuristicRole), softKeyRole(QAction::OptionsSoftKey),
+ iconVisibleInMenu(-1)
{
#ifdef QT3_SUPPORT
static int qt_static_action_id = -1;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index b33fe19..4c008fb 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -392,7 +392,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
alienWidget = S60->mousePressTarget;
if (alienWidget != S60->lastPointerEventTarget)
- if (type == QEvent::MouseButtonPress || QEvent::MouseButtonDblClick || type == QEvent::MouseMove)
+ if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick || type == QEvent::MouseMove)
{
//moved to another widget, create enter and leave events
if (S60->lastPointerEventTarget)
@@ -1088,6 +1088,9 @@ void QApplication::symbianResourceChange(int type)
switch (type) {
case KEikDynamicLayoutVariantSwitch:
{
+ if (S60)
+ S60->updateScreenSize();
+
#ifndef QT_NO_STYLE_S60
QS60Style *s60Style = 0;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 0d003a6..c6118d6 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -574,7 +574,7 @@ void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start,
if (startRect.topRight().y() > endRect.bottomLeft().y()) {
const int overlap = (startRect.topRight().y() - endRect.bottomLeft().y())>>1;
startRect.setHeight(startRect.height()-overlap);
- endRect.adjust(0,overlap,0,0);
+ endRect.adjust(0,overlap,0,0);
}
}
@@ -1129,7 +1129,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
copy.state |= State_Raised;
copy.state &= ~State_Sunken;
}
- pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ?
+ pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ?
PE_IndicatorSpinPlus :
PE_IndicatorSpinUp;
@@ -1156,7 +1156,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
copy.state |= State_Raised;
copy.state &= ~State_Sunken;
}
- pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ?
+ pe = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) ?
PE_IndicatorSpinMinus :
PE_IndicatorSpinDown;
@@ -1387,7 +1387,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
// draw the icon
- const QIcon::Mode mode = !(voptAdj.state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled;
+ const QIcon::Mode mode = (voptAdj.state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled;
const QIcon::State state = voptAdj.state & QStyle::State_Open ? QIcon::On : QIcon::Off;
voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state);
@@ -1586,12 +1586,12 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QPixmap tabIcon = optionTab.icon.pixmap(iconSize,
(optionTab.state & State_Enabled) ? QIcon::Normal : QIcon::Disabled);
if (tab->text.isEmpty())
- painter->drawPixmap(tr.center().x() - (tabIcon.height() >>1),
- tr.center().y() - (tabIcon.height() >>1),
+ painter->drawPixmap(tr.center().x() - (tabIcon.height() >>1),
+ tr.center().y() - (tabIcon.height() >>1),
tabIcon);
else
- painter->drawPixmap(tr.left() + tabOverlap,
- tr.center().y() - (tabIcon.height() >>1),
+ painter->drawPixmap(tr.left() + tabOverlap,
+ tr.center().y() - (tabIcon.height() >>1),
tabIcon);
tr.setLeft(tr.left() + iconSize.width() + 4);
}
@@ -1822,7 +1822,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
}
}
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, mtyRect, adjFlags);
-
+
QRegion clipRegion = painter->clipRegion();
painter->setClipRect(option->rect);
drawControl(CE_HeaderSection, header, painter, widget);
@@ -2038,8 +2038,18 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_SPINBOX
case PE_FrameFocusRect:
// Calendar widget and combox both do not use styled itemDelegate
- if (!(widget && qobject_cast<const QCalendarWidget *>(widget->parent())) ||
- qobject_cast<const QComboBoxListView *>(widget)) {
+ if ( widget && (
+#ifndef QT_NO_CALENDARWIDGET
+ (qobject_cast<const QCalendarWidget *>(widget->parent()))
+#else
+ false
+#endif //QT_NO_CALENDARWIDGET
+#ifndef QT_NO_COMBOBOX
+ || (qobject_cast<const QComboBoxListView *>(widget))
+#else
+ || false
+#endif //QT_NO_COMBOBOX
+ )) {
// no focus selection for touch
if (option->state & State_HasFocus && !QS60StylePrivate::isTouchSupported()) {
painter->save();
@@ -2292,9 +2302,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
retValue = true;
break;
case SH_ProgressDialog_TextLabelAlignment:
- retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ?
+ retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ?
Qt::AlignLeft :
- Qt::AlignRight;
+ Qt::AlignRight;
break;
case SH_Menu_SubMenuPopupDelay:
retValue = 300;
@@ -2314,6 +2324,8 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_BlinkCursorWhenTextSelected:
retValue = true;
break;
+ case SH_UnderlineShortcut:
+ retValue = 0;
default:
break;
}
@@ -2406,7 +2418,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
const int y = frameThickness + spinbox->rect.y();
const int x = spinbox->rect.x() + spinbox->rect.width() - frameThickness - 2*buttonSize.width();
-
+
switch (scontrol) {
case SC_SpinBoxUp:
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons)
@@ -2641,7 +2653,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
// a) highlight border does not cross the rect
// b) in s60 list checkbox is smaller than normal checkbox
//todo; magic three
- ret.setRect(opt->rect.left()+3, opt->rect.top() + heightOffset,
+ ret.setRect(opt->rect.left()+3, opt->rect.top() + heightOffset,
indicatorWidth-3, indicatorHeight-3);
} else {
ret.setRect(opt->rect.right() - indicatorWidth - spacing, opt->rect.top() + heightOffset,
@@ -2780,8 +2792,8 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
QS60StyleEnums::SkinParts part;
QS60StylePrivate::SkinElementFlags adjustedFlags;
if (option)
- adjustedFlags = (option->state & State_Enabled) ?
- QS60StylePrivate::SF_StateEnabled :
+ adjustedFlags = (option->state & State_Enabled) ?
+ QS60StylePrivate::SF_StateEnabled :
QS60StylePrivate::SF_StateDisabled;
switch(standardIcon) {
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 362e29c..684f232 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -274,7 +274,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size,
const QRect leftRect = rightRect.translated(cornerWidth - rectWidth, 0);
const QRect centerRect = drawOnlyCenter ? rect : rect.adjusted(cornerWidth, cornerWidth, -cornerWidth, -cornerWidth);
- QImage result(size, QImage::Format_ARGB32);
+ QPixmap result(size);
result.fill(Qt::transparent);
QPainter painter(&result);
@@ -303,7 +303,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size,
drawPart(center, &painter, centerRect, flags);
#endif
- return QPixmap::fromImage(result);
+ return result;
}
void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value)
diff --git a/src/gui/widgets/qactiontokeyeventmapper_p.h b/src/gui/widgets/qactiontokeyeventmapper_p.h
index da336e8..c54e612 100644
--- a/src/gui/widgets/qactiontokeyeventmapper_p.h
+++ b/src/gui/widgets/qactiontokeyeventmapper_p.h
@@ -42,6 +42,17 @@
#ifndef QACTIONTOKEYEVENTMAPPER_P_H
#define QACTIONTOKEYEVENTMAPPER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qobject.h>
#include "QtGui/qaction.h"
QT_BEGIN_HEADER
@@ -67,4 +78,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif //QACTIONTOKEYEVENTMAPPER_H
+#endif //QACTIONTOKEYEVENTMAPPER_P_H
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index dd7b917..6021d5d 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -3,7 +3,7 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
symbian {
- exists($${EPOCROOT}$$OS_LAYER_SSL_SYSTEMINCLUDE):INCLUDEPATH *= $$OS_LAYER_SSL_SYSTEMINCLUDE
+ INCLUDEPATH *= $$OS_LAYER_SSL_SYSTEMINCLUDE
} else {
include($$QT_SOURCE_TREE/config.tests/unix/openssl/openssl.pri)
}