diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/concurrent/qfuturewatcher.cpp | 14 | ||||
-rw-r--r-- | src/corelib/concurrent/qfuturewatcher.h | 13 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 10 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 35 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_s60.cpp | 40 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 16 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 2 | ||||
-rw-r--r-- | src/opengl/qpaintengine_opengl.cpp | 4 | ||||
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 4 | ||||
-rw-r--r-- | src/s60installs/bwins/QtGuiu.def | 2 | ||||
-rw-r--r-- | src/s60installs/eabi/QtGuiu.def | 2 | ||||
-rw-r--r-- | src/s60installs/eabi/QtOpenGLu.def | 28 |
15 files changed, 135 insertions, 49 deletions
diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp index ea12bc9..728714a 100644 --- a/src/corelib/concurrent/qfuturewatcher.cpp +++ b/src/corelib/concurrent/qfuturewatcher.cpp @@ -589,4 +589,16 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event) QT_END_NAMESPACE -#endif // QT_NO_CONCURRENT +#else + +// On Symbian winscw target QT_NO_QFUTURE and QT_NO_CONCURRENT are both defined. +// However moc will be run without having them set, so provide a dummy stub at +// least for the slots to prevent linker errors. + +void QFutureWatcherBase::cancel() { } +void QFutureWatcherBase::setPaused(bool) { } +void QFutureWatcherBase::pause() { } +void QFutureWatcherBase::resume() { } +void QFutureWatcherBase::togglePaused() { } + +#endif // QT_NO_QFUTURE diff --git a/src/corelib/concurrent/qfuturewatcher.h b/src/corelib/concurrent/qfuturewatcher.h index 5fe2007..26e549d 100644 --- a/src/corelib/concurrent/qfuturewatcher.h +++ b/src/corelib/concurrent/qfuturewatcher.h @@ -44,8 +44,6 @@ #include <QtCore/qfuture.h> -#ifndef QT_NO_QFUTURE - #include <QtCore/qobject.h> QT_BEGIN_HEADER @@ -56,6 +54,11 @@ QT_MODULE(Core) class QEvent; class QFutureWatcherBasePrivate; + +#ifdef QT_NO_QFUTURE +class QFutureInterfaceBase; +#endif + class Q_CORE_EXPORT QFutureWatcherBase : public QObject { Q_OBJECT @@ -114,6 +117,8 @@ private: virtual QFutureInterfaceBase &futureInterface() = 0; }; +#ifndef QT_NO_QFUTURE + template <typename T> class QFutureWatcher : public QFutureWatcherBase { @@ -214,9 +219,9 @@ Q_INLINE_TEMPLATE void QFutureWatcher<void>::setFuture(const QFuture<void> &_fut connectOutputInterface(); } +#endif // QT_NO_QFUTURE + QT_END_NAMESPACE QT_END_HEADER -#endif // QT_NO_CONCURRENT - #endif // QFUTUREWATCHER_H diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 49f5f98..3e1f011 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2545,6 +2545,16 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); //Symbian does not support data imports from a DLL #define Q_NO_DATA_RELOCATION +// Winscw compiler is unable to compile QtConcurrent. +#ifdef Q_CC_NOKIAX86 +#ifndef QT_NO_CONCURRENT +#define QT_NO_CONCURRENT +#endif +#ifndef QT_NO_QFUTURE +#define QT_NO_QFUTURE +#endif +#endif + QT_END_NAMESPACE // forward declare std::exception #ifdef __cplusplus diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index de3577f..57c1e45 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -168,6 +168,7 @@ private: }; Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable); +Q_GUI_EXPORT void qt_s60_setPartialScreenAutomaticTranslation(bool enable); QT_END_NAMESPACE diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 06dc25c..a4d53c0 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -88,6 +88,11 @@ Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable) ic->update(); } +Q_GUI_EXPORT void qt_s60_setPartialScreenAutomaticTranslation(bool enable) +{ + S60->partial_keyboardAutoTranslation = enable; +} + QCoeFepInputContext::QCoeFepInputContext(QObject *parent) : QInputContext(parent), m_fepState(q_check_ptr(new CAknEdwinState)), // CBase derived object needs check on new @@ -559,12 +564,13 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) widget->resize(widget->width(), splitViewRect.height() - windowTop); } - if (gv->scene()) { + if (gv->scene() && S60->partial_keyboardAutoTranslation) { const QRectF microFocusRect = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF(); gv->ensureVisible(microFocusRect); } } else { - translateInputWidget(); + if (S60->partial_keyboardAutoTranslation) + translateInputWidget(); } if (alwaysResize) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 2221500..68c1ab5 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1360,6 +1360,23 @@ void QSymbianControl::PositionChanged() } } +// Search recursively if there is a child widget that is both visible and focused. +bool QSymbianControl::hasFocusedAndVisibleChild(QWidget *parentWidget) +{ + for (int i = 0; i < parentWidget->children().size(); ++i) { + QObject *object = parentWidget->children().at(i); + if (object && object->isWidgetType()) { + QWidget *w = static_cast<QWidget *>(object); + WId winId = w->internalWinId(); + if (winId && winId->IsFocused() && winId->IsVisible()) + return true; + if (hasFocusedAndVisibleChild(w)) + return true; + } + } + return false; +} + void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) { if (m_ignoreFocusChanged || (qwidget->windowType() & Qt::WindowType_Mask) == Qt::Desktop) @@ -1392,17 +1409,9 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) if (qwidget->isWindow()) S60->setRecursiveDecorationsVisibility(qwidget, qwidget->windowState()); #endif - } else if (QApplication::activeWindow() == qwidget->window()) { - bool focusedControlFound = false; - WId winId = 0; - for (QWidget *w = qwidget->parentWidget(); w && (winId = w->internalWinId()); w = w->parentWidget()) { - if (winId->IsFocused() && winId->IsVisible()) { - focusedControlFound = true; - break; - } else if (w->isWindow()) - break; - } - if (!focusedControlFound) { + } else { + QWidget *parentWindow = qwidget->window(); + if (QApplication::activeWindow() == parentWindow && !hasFocusedAndVisibleChild(parentWindow)) { if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) { QWidget *fw = QApplication::focusWidget(); if (fw) { @@ -1509,6 +1518,10 @@ void QSymbianControl::HandleResourceChange(int resourceType) #ifdef Q_WS_S60 case KEikDynamicLayoutVariantSwitch: { +#ifdef QT_SOFTKEYS_ENABLED + // Update needed just in case softkeys contain icons + QSoftKeyManager::updateSoftKeys(); +#endif handleClientAreaChange(); // Send resize event to trigger desktopwidget workAreaResized signal if (qt_desktopWidget) { diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index 79ed91a..d80cf8a 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -278,12 +278,6 @@ bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, EikSoftkeyImage::SetImage(cba, *myimage, left); // Takes myimage ownership cbaHasImage[position] = true; ret = true; - } else { - // Restore softkey to text based - if (cbaHasImage[position]) { - EikSoftkeyImage::SetLabel(cba, left); - cbaHasImage[position] = false; - } } } return ret; @@ -294,7 +288,7 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba, { QAction *action = highestPrioritySoftkey(role); if (action) { - setSoftkeyImage(&cba, *action, position); + bool hasImage = setSoftkeyImage(&cba, *action, position); QString text = softkeyText(*action); TPtrC nativeText = qt_QString2TPtrC(text); int command = S60_COMMAND_START + position; @@ -303,6 +297,11 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba, command = softKeyCommandActions.value(action); #endif setNativeSoftkey(cba, position, command, nativeText); + if (!hasImage && cbaHasImage[position]) { + EikSoftkeyImage::SetLabel(&cba, (position == LSK_POSITION)); + cbaHasImage[position] = false; + } + const bool dimmed = !action->isEnabled() && !QSoftKeyManager::isForceEnabledInSofkeys(action); cba.DimCommand(command, dimmed); realSoftKeyActions.insert(command, action); @@ -313,7 +312,18 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba, bool QSoftKeyManagerPrivateS60::setLeftSoftkey(CEikButtonGroupContainer &cba) { - return setSoftkey(cba, QAction::PositiveSoftKey, LSK_POSITION); + if (!setSoftkey(cba, QAction::PositiveSoftKey, LSK_POSITION)) { + if (cbaHasImage[LSK_POSITION]) { + // Clear any residual icon if LSK has no action. A real softkey + // is needed for SetLabel command to work, so do a temporary dummy + setNativeSoftkey(cba, LSK_POSITION, EAknSoftkeyExit, KNullDesC); + EikSoftkeyImage::SetLabel(&cba, true); + setNativeSoftkey(cba, LSK_POSITION, EAknSoftkeyEmpty, KNullDesC); + cbaHasImage[LSK_POSITION] = false; + } + return false; + } + return true; } bool QSoftKeyManagerPrivateS60::setMiddleSoftkey(CEikButtonGroupContainer &cba) @@ -332,16 +342,26 @@ bool QSoftKeyManagerPrivateS60::setRightSoftkey(CEikButtonGroupContainer &cba) if (windowType != Qt::Dialog && windowType != Qt::Popup) { QString text(QSoftKeyManager::tr("Exit")); TPtrC nativeText = qt_QString2TPtrC(text); + setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, nativeText); if (cbaHasImage[RSK_POSITION]) { EikSoftkeyImage::SetLabel(&cba, false); cbaHasImage[RSK_POSITION] = false; } - setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, nativeText); cba.DimCommand(EAknSoftkeyExit, false); return true; + } else { + if (cbaHasImage[RSK_POSITION]) { + // Clear any residual icon if RSK has no action. A real softkey + // is needed for SetLabel command to work, so do a temporary dummy + setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyExit, KNullDesC); + EikSoftkeyImage::SetLabel(&cba, false); + setNativeSoftkey(cba, RSK_POSITION, EAknSoftkeyEmpty, KNullDesC); + cbaHasImage[RSK_POSITION] = false; + } + return false; } } - return false; + return true; } void QSoftKeyManagerPrivateS60::setSoftkeys(CEikButtonGroupContainer &cba) diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 02977ce..4640393 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -159,6 +159,7 @@ public: int menuBeingConstructed : 1; int orientationSet : 1; int partial_keyboard : 1; + int partial_keyboardAutoTranslation : 1; QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type QPointer<QWidget> splitViewLastWidget; @@ -299,6 +300,7 @@ private: void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event); #endif bool isSplitViewWidget(QWidget *widget); + bool hasFocusedAndVisibleChild(QWidget *parentWidget); public: void handleClientAreaChange(); @@ -348,6 +350,7 @@ inline QS60Data::QS60Data() menuBeingConstructed(0), orientationSet(0), partial_keyboard(0), + partial_keyboardAutoTranslation(1), s60ApplicationFactory(0) #ifdef Q_OS_SYMBIAN ,s60InstalledTrapHandler(0) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 12bcc4b..5e9584b 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -235,19 +235,21 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) QSize oldSize(q->size()); QRect oldGeom(data.crect); - // Lose maximized status if deliberate resize - if (w != oldSize.width() || h != oldSize.height()) - data.window_state &= ~Qt::WindowMaximized; - bool checkExtra = true; - if (q->isWindow() && (data.window_state & Qt::WindowFullScreen)) { - // Do not modity window size for fullscreen windows, if requested - // size is already equal to clientRect. + if (q->isWindow() && (data.window_state & (Qt::WindowFullScreen | Qt::WindowMaximized))) { + // Do not allow fullscreen/maximized windows to expand beyond client rect TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); + w = qMin(w, r.Width()); + h = qMin(h, r.Height()); + if (w == r.Width() && h == r.Height()) checkExtra = false; } + // Lose maximized status if deliberate resize + if (w != oldSize.width() || h != oldSize.height()) + data.window_state &= ~Qt::WindowMaximized; + if (checkExtra && extra) { // any size restrictions? w = qMin(w,extra->maxw); h = qMin(h,extra->maxh); diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 9e28102..3fd4c5b 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -692,7 +692,7 @@ void QPainterPrivate::updateInvMatrix() invMatrix = state->matrix.inverted(); } -extern bool qt_isExtendedRadialGradient(const QBrush &brush); +Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush); void QPainterPrivate::updateEmulationSpecifier(QPainterState *s) { diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 5fa9f32..58ce6f8 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -2119,7 +2119,7 @@ void QOpenGLPaintEnginePrivate::fillPath(const QPainterPath &path) updateGLMatrix(); } -extern bool qt_isExtendedRadialGradient(const QBrush &brush); +Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush); static inline bool needsEmulation(Qt::BrushStyle style) { @@ -5450,7 +5450,7 @@ void QOpenGLPaintEngine::transformChanged() updateMatrix(state()->matrix); } -extern QPainterPath qt_painterPathFromVectorPath(const QVectorPath &path); +Q_GUI_EXPORT QPainterPath qt_painterPathFromVectorPath(const QVectorPath &path); void QOpenGLPaintEngine::fill(const QVectorPath &path, const QBrush &brush) { diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 68a6a0b..70e26fb 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -280,7 +280,7 @@ public: inline bool needsEmulation(const QBrush &brush) const { - extern bool qt_isExtendedRadialGradient(const QBrush &brush); + Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush); return qt_isExtendedRadialGradient(brush); } @@ -1579,7 +1579,7 @@ void QVGPaintEngine::draw(const QVectorPath &path) vgDestroyPath(vgpath); } -extern QPainterPath qt_painterPathFromVectorPath(const QVectorPath &path); +Q_GUI_EXPORT QPainterPath qt_painterPathFromVectorPath(const QVectorPath &path); void QVGPaintEngine::fill(const QVectorPath &path, const QBrush &brush) { diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index d370065..88973f9 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -14020,4 +14020,4 @@ EXPORTS ?staticMetaObjectExtraData@QIdentityProxyModel@@0UQMetaObjectExtraData@@B @ 14019 NONAME ; struct QMetaObjectExtraData const QIdentityProxyModel::staticMetaObjectExtraData ?getStaticMetaObject@QIdentityProxyModel@@SAABUQMetaObject@@XZ @ 14020 NONAME ; struct QMetaObject const & QIdentityProxyModel::getStaticMetaObject(void) ?removeRows@QIdentityProxyModel@@UAE_NHHABVQModelIndex@@@Z @ 14021 NONAME ; bool QIdentityProxyModel::removeRows(int, int, class QModelIndex const &) - + ?qt_s60_setPartialScreenAutomaticTranslation@@YAX_N@Z @ 14022 NONAME ; void qt_s60_setPartialScreenAutomaticTranslation(bool) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index aec6831..2a0cf21 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12864,4 +12864,4 @@ EXPORTS _ZNK9QLineEdit15cursorMoveStyleEv @ 12863 NONAME _ZTI19QIdentityProxyModel @ 12864 NONAME _ZTV19QIdentityProxyModel @ 12865 NONAME - + _Z43qt_s60_setPartialScreenAutomaticTranslationb @ 12866 NONAME diff --git a/src/s60installs/eabi/QtOpenGLu.def b/src/s60installs/eabi/QtOpenGLu.def index 44f7306..c252484 100644 --- a/src/s60installs/eabi/QtOpenGLu.def +++ b/src/s60installs/eabi/QtOpenGLu.def @@ -759,11 +759,25 @@ EXPORTS _ZNK14QGLPaintDevice9isFlippedEv @ 758 NONAME _ZNK16QGLWindowSurface8featuresEv @ 759 NONAME _ZNK26QGLFramebufferObjectFormat6mipmapEv @ 760 NONAME - _ZTI22QGLContextResourceBase @ 761 NONAME - _ZTI27QGLContextGroupResourceBase @ 762 NONAME - _ZTV22QGLContextResourceBase @ 763 NONAME - _ZTV27QGLContextGroupResourceBase @ 764 NONAME - _ZThn104_N20QGLTextureGlyphCacheD0Ev @ 765 NONAME - _ZThn104_N20QGLTextureGlyphCacheD1Ev @ 766 NONAME - _ZThn8_NK16QGLWindowSurface8featuresEv @ 767 NONAME + _ZTI22QGLContextResourceBase @ 761 NONAME ABSENT + _ZTI27QGLContextGroupResourceBase @ 762 NONAME ABSENT + _ZTV22QGLContextResourceBase @ 763 NONAME ABSENT + _ZTV27QGLContextGroupResourceBase @ 764 NONAME ABSENT + _ZThn104_N20QGLTextureGlyphCacheD0Ev @ 765 NONAME ABSENT + _ZThn104_N20QGLTextureGlyphCacheD1Ev @ 766 NONAME ABSENT + _ZThn8_NK16QGLWindowSurface8featuresEv @ 767 NONAME ABSENT + _ZN14QGLSignalProxy18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 768 NONAME + _ZN14QGLSignalProxy25staticMetaObjectExtraDataE @ 769 NONAME DATA 8 + _ZN16QGLShaderProgram18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 770 NONAME + _ZN16QGLShaderProgram25staticMetaObjectExtraDataE @ 771 NONAME DATA 8 + _ZN16QGLWindowSurface18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 772 NONAME + _ZN16QGLWindowSurface25staticMetaObjectExtraDataE @ 773 NONAME DATA 8 + _ZN21QGraphicsShaderEffect18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 774 NONAME + _ZN21QGraphicsShaderEffect25staticMetaObjectExtraDataE @ 775 NONAME DATA 8 + _ZN22QGLEngineShaderManager18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 776 NONAME + _ZN22QGLEngineShaderManager25staticMetaObjectExtraDataE @ 777 NONAME DATA 8 + _ZN9QGLShader18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 778 NONAME + _ZN9QGLShader25staticMetaObjectExtraDataE @ 779 NONAME DATA 8 + _ZN9QGLWidget18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 780 NONAME + _ZN9QGLWidget25staticMetaObjectExtraDataE @ 781 NONAME DATA 8 |