diff options
Diffstat (limited to 'src')
49 files changed, 308 insertions, 153 deletions
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 5654a18..a80eed4 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -8,7 +8,7 @@ symbian: { TARGET.CAPABILITY = All -Tcb TARGET.UID3 = 0x200267C2 - webkitlibs.sources = QtWebKit.dll + webkitlibs.sources = $$QMAKE_LIBDIR_QT/QtWebKit.dll webkitlibs.path = /sys/bin vendorinfo = \ "; Localised Vendor name" \ @@ -24,9 +24,12 @@ symbian: { DEPLOYMENT += webkitlibs webkitbackup - # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. - # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. - MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" + symbian-abld|symbian-sbsv2 { + # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. + # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. + QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000 + CONFIG += do_not_build_as_thumb + } } include($$PWD/../WebKit.pri) @@ -3417,7 +3420,7 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 symbian { shared { contains(CONFIG, def_files) { - defFilePath=../WebKit/qt/symbian + DEF_FILE=../WebKit/qt/symbian } } } diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp index cf69723..fd604a0 100644 --- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp @@ -53,7 +53,7 @@ #include "runtime_root.h" #include "QWebPageClient.h" #include <QKeyEvent> -#include <QPixmap.h> +#include <QPixmap> #include <QRegion> #include <QVector> #include <QWidget> diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index df9a463..500cde6 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -48,7 +48,7 @@ symbian: { pu_header = "; Partial upgrade package for testing QtCore changes without reinstalling everything" \ "$${LITERAL_HASH}{\"Qt corelib\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU" partial_upgrade.pkg_prerules = pu_header vendorinfo - partial_upgrade.sources = qtcore.dll + partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtCore.dll partial_upgrade.path = c:/sys/bin DEPLOYMENT = partial_upgrade $$DEPLOYMENT } diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index c8f836a..dfa2c17 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -58,6 +58,11 @@ #include <stdarg.h> #include <string.h> +#ifndef QT_NO_EXCEPTIONS +# include <string> +# include <exception> +#endif + #if !defined(Q_OS_WINCE) # include <errno.h> # if defined(Q_CC_MSVC) diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index 2ed0e46..ef448b1 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -74,7 +74,7 @@ win32 { SOURCES += io/qsettings_mac.cpp io/qfilesystemwatcher_fsevents.cpp } - linux-*:{ + linux-*:!symbian { SOURCES += \ io/qfilesystemwatcher_inotify.cpp \ io/qfilesystemwatcher_dnotify.cpp diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 728c316..aa1c7d9 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -62,21 +62,25 @@ static const int QFILE_WRITEBUFFER_SIZE = 16384; static QByteArray locale_encode(const QString &f) { -#ifndef Q_OS_DARWIN - return f.toLocal8Bit(); -#else +#if defined(Q_OS_DARWIN) // Mac always expects UTF-8... and decomposed... return f.normalized(QString::NormalizationForm_D).toUtf8(); +#elif defined(Q_OS_SYMBIAN) + return f.toUtf8(); +#else + return f.toLocal8Bit(); #endif } static QString locale_decode(const QByteArray &f) { -#ifndef Q_OS_DARWIN - return QString::fromLocal8Bit(f); -#else +#if defined(Q_OS_DARWIN) // Mac always gives us UTF-8 and decomposed, we want that composed... return QString::fromUtf8(f).normalized(QString::NormalizationForm_C); +#elif defined(Q_OS_SYMBIAN) + return QString::fromUtf8(f); +#else + return QString::fromLocal8Bit(f); #endif } diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 6df00d6..3dcc1ad 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -55,7 +55,7 @@ #include <stdlib.h> #include <limits.h> #if defined(Q_OS_SYMBIAN) -# include <syslimits.h> +# include <sys/syslimits.h> # include <f32file.h> # include <pathinfo.h> # include "private/qcore_symbian_p.h" diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp index adc87fb..8902f7d 100644 --- a/src/corelib/io/qprocess_symbian.cpp +++ b/src/corelib/io/qprocess_symbian.cpp @@ -66,7 +66,7 @@ #include "qstring.h" #include "qprocess.h" #include "qprocess_p.h" -#include "qeventdispatcher_symbian_p.h" +#include "private/qeventdispatcher_symbian_p.h" #include <private/qthread_p.h> #include <qmutex.h> diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 30af6fa..ce9ed58 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -518,19 +518,15 @@ int QMetaType::registerTypedef(const char* typeName, int aliasId) idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(), normalizedTypeName.size()); - if (idx) { - Q_ASSERT(idx == aliasId); + if (idx) return idx; - } - if (!idx) { - QCustomTypeInfo inf; - inf.typeName = normalizedTypeName; - inf.alias = aliasId; - inf.constr = 0; - inf.destr = 0; - ct->append(inf); - } + QCustomTypeInfo inf; + inf.typeName = normalizedTypeName; + inf.alias = aliasId; + inf.constr = 0; + inf.destr = 0; + ct->append(inf); return aliasId; } diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp index c252dd5..8cef611 100644 --- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp +++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp @@ -44,7 +44,7 @@ #include "qcoreapplication.h" #include <qdebug.h> -#include <qcore_symbian_p.h> +#include "qcore_symbian_p.h" #include <e32cmn.h> QT_BEGIN_NAMESPACE diff --git a/src/gui/dialogs/qerrormessage.cpp b/src/gui/dialogs/qerrormessage.cpp index 0bca811..7be7481 100644 --- a/src/gui/dialogs/qerrormessage.cpp +++ b/src/gui/dialogs/qerrormessage.cpp @@ -70,10 +70,10 @@ extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp #if defined(QT_SOFTKEYS_ENABLED) #include <qaction.h> +#endif #ifdef Q_WS_S60 #include "private/qt_s60_p.h" #endif -#endif QT_BEGIN_NAMESPACE diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index a39ccfd..483eb62 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -1315,6 +1315,8 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event) return; } + d->proxyIsGivingFocus = true; + switch (event->reason()) { case Qt::TabFocusReason: { if (QWidget *focusChild = d->findFocusChild(0, true)) @@ -1328,10 +1330,11 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event) default: if (d->widget && d->widget->focusWidget()) { d->widget->focusWidget()->setFocus(event->reason()); - return; } break; } + + d->proxyIsGivingFocus = false; } /*! diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h index 60eb058..8aed363 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget_p.h +++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h @@ -118,6 +118,7 @@ public: quint32 styleChangeMode : 2; quint32 paletteChangeMode : 2; quint32 focusFromWidgetToProxy : 1; + quint32 proxyIsGivingFocus : 1; }; QT_END_NAMESPACE diff --git a/src/gui/gui.pro b/src/gui/gui.pro index d46f3b4..52531a3 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -51,12 +51,14 @@ contains(DEFINES,QT_EVAL):include($$QT_SOURCE_TREE/src/corelib/eval.pri) QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist DEFINES += Q_INTERNAL_QAPP_SRC -symbian: { +symbian { TARGET.UID3=0x2001B2DD - # ro-section in gui can exceed default allocated space, so move rw-section a little further - QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 - QMAKE_LFLAGS.GCCE += -Tdata 0xC00000 + symbian-abld:symbian-sbsv2 { + # ro-section in gui can exceed default allocated space, so move rw-section a little further + QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 + QMAKE_LFLAGS.GCCE += -Tdata 0xC00000 + } # Partial upgrade SIS file vendorinfo = \ @@ -70,7 +72,7 @@ symbian: { pu_header = "; Partial upgrade package for testing QtGui changes without reinstalling everything" \ "$${LITERAL_HASH}{\"Qt gui\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU" partial_upgrade.pkg_prerules = pu_header vendorinfo - partial_upgrade.sources = qtgui.dll + partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtGui.dll partial_upgrade.path = c:/sys/bin DEPLOYMENT = partial_upgrade $$DEPLOYMENT } diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index c6ad345..dce5c6a 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -1217,13 +1217,13 @@ void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset() { Q_Q(QSortFilterProxyModel); q->beginResetModel(); - invalidatePersistentIndexes(); - clear_mapping(); } void QSortFilterProxyModelPrivate::_q_sourceReset() { Q_Q(QSortFilterProxyModel); + invalidatePersistentIndexes(); + clear_mapping(); // All internal structures are deleted in clear() q->endResetModel(); update_source_sort_column(); diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 2764baa..b2457f3 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -1233,17 +1233,17 @@ bool QTreeView::viewportEvent(QEvent *event) int oldBranch = d->hoverBranch; d->hoverBranch = d->itemDecorationAt(he->pos()); if (oldBranch != d->hoverBranch) { - QModelIndex oldIndex = d->modelIndex(oldBranch), - newIndex = d->modelIndex(d->hoverBranch); - if (oldIndex != newIndex) { - QRect oldRect = visualRect(oldIndex); - QRect newRect = visualRect(newIndex); - oldRect.setLeft(oldRect.left() - d->indent); - newRect.setLeft(newRect.left() - d->indent); - //we need to paint the whole items (including the decoration) so that when the user - //moves the mouse over those elements they are updated - viewport()->update(oldRect); - viewport()->update(newRect); + //we need to paint the whole items (including the decoration) so that when the user + //moves the mouse over those elements they are updated + if (oldBranch >= 0) { + int y = d->coordinateForItem(oldBranch); + int h = d->itemHeight(oldBranch); + viewport()->update(QRect(0, y, viewport()->width(), h)); + } + if (d->hoverBranch >= 0) { + int y = d->coordinateForItem(d->hoverBranch); + int h = d->itemHeight(d->hoverBranch); + viewport()->update(QRect(0, y, viewport()->width(), h)); } } break; } diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 4a15cf2..27b490b 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -52,6 +52,7 @@ #include "qstring.h" #include "qdebug.h" #include "qimage.h" +#include "qcombobox.h" #include "private/qkeymapper_p.h" #include "private/qfont_p.h" #ifndef QT_NO_STYLE_S60 @@ -1254,11 +1255,13 @@ void qt_init(QApplicationPrivate * /* priv */, int) } #endif +#ifdef QT_KEYPAD_NAVIGATION if (touch) { QApplicationPrivate::navigationMode = Qt::NavigationModeNone; } else { QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional; } +#endif #ifndef QT_NO_CURSOR //Check if window server pointer cursors are supported or not @@ -1407,11 +1410,13 @@ void QApplicationPrivate::leaveModal_sys(QWidget *widget) void QApplicationPrivate::openPopup(QWidget *popup) { + if (popup && qobject_cast<QComboBox *>(popup->parentWidget())) + static_cast<QSymbianControl *>(popup->effectiveWinId())->FadeBehindPopup(ETrue); + if (!QApplicationPrivate::popupWidgets) QApplicationPrivate::popupWidgets = new QWidgetList; QApplicationPrivate::popupWidgets->append(popup); - // Cancel focus widget pointer capture and long tap timer if (QApplication::focusWidget()) { static_cast<QSymbianControl*>(QApplication::focusWidget()->effectiveWinId())->CancelLongTapTimer(); @@ -1450,6 +1455,9 @@ void QApplicationPrivate::openPopup(QWidget *popup) void QApplicationPrivate::closePopup(QWidget *popup) { + if (popup && qobject_cast<QComboBox *>(popup->parentWidget())) + static_cast<QSymbianControl *>(popup->effectiveWinId())->FadeBehindPopup(EFalse); + if (!QApplicationPrivate::popupWidgets) return; QApplicationPrivate::popupWidgets->removeAll(popup); diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index 54a9176..68e079e 100644 --- a/src/gui/kernel/qcursor_s60.cpp +++ b/src/gui/kernel/qcursor_s60.cpp @@ -44,7 +44,7 @@ #include <private/qapplication_p.h> #include <coecntrl.h> #include <qcursor.h> -#include <qt_s60_p.h> +#include <private/qt_s60_p.h> #include <qbitmap.h> #include <w32std.h> #include <qapplication.h> diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index e5310ea..af5fcd1 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6171,6 +6171,8 @@ void QWidget::setFocus(Qt::FocusReason reason) previousProxyFocus = topData->proxyWidget->widget()->focusWidget(); if (previousProxyFocus && previousProxyFocus->focusProxy()) previousProxyFocus = previousProxyFocus->focusProxy(); + if (previousProxyFocus == this && !topData->proxyWidget->d_func()->proxyIsGivingFocus) + return; } } #endif diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index d05c7e4..b25dce5 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -44,8 +44,8 @@ #include <QtGui/qpaintdevice.h> #include <private/qwidget_p.h> #include "qwindowsurface_s60_p.h" -#include "qpixmap_s60_p.h" -#include "qt_s60_p.h" +#include <private/qpixmap_s60_p.h> +#include <private/qt_s60_p.h> #include "private/qdrawhelper_p.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri index 6080e6d..e177a33 100644 --- a/src/gui/s60framework/s60framework.pri +++ b/src/gui/s60framework/s60framework.pri @@ -9,6 +9,8 @@ minimalAppResource31 = \ "END" MMP_RULES += minimalAppResource31 +SYMBIAN_RESOURCES += s60framework/s60main.rss + SOURCES += s60framework/qs60mainapplication.cpp \ s60framework/qs60mainappui.cpp \ s60framework/qs60maindocument.cpp diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index bf5a62e..a2ebebb 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -104,11 +104,11 @@ const int QS60StylePrivate::m_numberOfLayouts = const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** -{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,-909,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1}, -{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,-909,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1}, -{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,-909,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,-909,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,-909,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1} +{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,0,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1}, +{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,0,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1}, +{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,0,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,0,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,0,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1} // *** End of generated data *** }; @@ -2475,6 +2475,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w { int retValue = -1; switch (sh) { + case SH_ComboBox_Popup: + retValue = true; + break; case SH_Table_GridLineColor: retValue = int(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 2, 0).rgba()); break; @@ -2690,6 +2693,19 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple height - 2 * frameThickness); } break; + case SC_ComboBoxListBoxPopup: { + const QRect desktopContent = QApplication::desktop()->availableGeometry(); + + // take the size of this and position bottom above available area + QRect popupRect; + const int width = desktopContent.width() - pixelMetric(PM_LayoutRightMargin) - pixelMetric(PM_LayoutLeftMargin); + popupRect.setWidth(width); + popupRect.setHeight(desktopContent.height()); //combobox resets height anyway based on content + popupRect.setBottom(desktopContent.bottom()); + popupRect.translate(pixelMetric(PM_LayoutLeftMargin), 0); + ret = popupRect; + } + break; default: break; } @@ -2844,9 +2860,13 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con ret = menuItem->rect; if (element == SE_ItemViewItemDecoration) { - if (menuItem->direction == Qt::RightToLeft) - ret.translate(ret.width()-indicatorWidth, 0); - ret.setWidth(indicatorWidth); + if (menuItem->icon.isNull()) { + ret = QRect(); + } else { + if (menuItem->direction == Qt::RightToLeft) + ret.translate(ret.width()-indicatorWidth, 0); + ret.setWidth(indicatorWidth); + } } else { ret = menuItem->rect; if (!menuItem->icon.isNull()) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index dd9e69e..9b85c04 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -73,7 +73,7 @@ #endif #endif #ifdef Q_OS_SYMBIAN -#include "qt_s60_p.h" +#include <private/qt_s60_p.h> #endif #include <QMutexLocker> diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp index 52c77d6..ccd17a2 100644 --- a/src/gui/text/qfont_s60.cpp +++ b/src/gui/text/qfont_s60.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include "qfont.h" -#include "qt_s60_p.h" -#include "qpixmap_s60_p.h" +#include <private/qt_s60_p.h> +#include <private/qpixmap_s60_p.h> #include "qmutex.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 87a73df..621f666 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -45,8 +45,8 @@ #include "qfontengine_s60_p.h" #include "qabstractfileengine.h" #include "qdesktopservices.h" -#include "qpixmap_s60_p.h" -#include "qt_s60_p.h" +#include <private/qpixmap_s60_p.h> +#include <private/qt_s60_p.h> #include "qendian.h" #include <private/qcore_symbian_p.h> #if defined(QT_NO_FREETYPE) diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri index 3074367..bd2af85 100644 --- a/src/gui/util/util.pri +++ b/src/gui/util/util.pri @@ -41,5 +41,12 @@ embedded { symbian { LIBS += -lsendas2 -letext -lapmime - contains(QT_CONFIG, s60): LIBS += -lplatformenv -lCommonUI + contains(QT_CONFIG, s60) { + LIBS += -lplatformenv + contains(CONFIG, is_using_gnupoc) { + LIBS += -lcommonui + } else { + LIBS += -lCommonUI + } + } } diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index f71d250..c16f18a 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -532,9 +532,11 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView) QStyleOptionComboBox opt = comboStyleOption(); const bool usePopup = combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo); #ifndef QT_NO_SCROLLBAR +#ifndef Q_WS_S60 if (usePopup) view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #endif +#endif if (combo->style()->styleHint(QStyle::SH_ComboBox_ListMouseTracking, &opt, combo) || usePopup) { view->setMouseTracking(true); @@ -2417,24 +2419,44 @@ void QComboBox::showPopup() // Position horizontally. listRect.moveLeft(above.x()); +#ifndef Q_WS_S60 // Position vertically so the curently selected item lines up // with the combo box. const QRect currentItemRect = view()->visualRect(view()->currentIndex()); const int offset = listRect.top() - currentItemRect.top(); listRect.moveTop(above.y() + offset - listRect.top()); +#endif // Clamp the listRect height and vertical position so we don't expand outside the // available screen geometry.This may override the vertical position, but it is more // important to show as much as possible of the popup. const int height = !boundToScreen ? listRect.height() : qMin(listRect.height(), screen.height()); +#ifdef Q_WS_S60 + //popup needs to be stretched with screen minimum dimension + listRect.setHeight(qMin(screen.height(), screen.width())); +#else listRect.setHeight(height); +#endif + if (boundToScreen) { if (listRect.top() < screen.top()) listRect.moveTop(screen.top()); if (listRect.bottom() > screen.bottom()) listRect.moveBottom(screen.bottom()); } +#ifdef Q_WS_S60 + if (screen.width() < screen.height()) { + // in portait, menu should be positioned above softkeys + listRect.moveBottom(screen.bottom()); + } else { + // landscape, menu should be at the right and horizontally centered + listRect.setWidth(listRect.height()); + listRect.moveCenter(screen.center()); + (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) : + listRect.setLeft(screen.left()); + } +#endif } else if (!boundToScreen || listRect.height() <= belowHeight) { listRect.moveTopLeft(below); } else if (listRect.height() <= aboveHeight) { @@ -2643,6 +2665,34 @@ void QComboBox::changeEvent(QEvent *e) if (d->lineEdit) d->updateLineEditGeometry(); d->setLayoutItemMargins(QStyle::SE_ComboBoxLayoutItem); + +#ifdef Q_WS_S60 + if (d->container) { + QStyleOptionComboBox opt; + initStyleOption(&opt); + + if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) { + const QRect screen = d->popupGeometry(QApplication::desktop()->screenNumber(this)); + + QRect listRect(style()->subControlRect(QStyle::CC_ComboBox, &opt, + QStyle::SC_ComboBoxListBoxPopup, this)); + listRect.setHeight(qMin(screen.height(), screen.width())); + + if (screen.width() < screen.height()) { + // in portait, menu should be positioned above softkeys + listRect.moveBottom(screen.bottom()); + } else { + // landscape, menu should be at the right and horizontally centered + listRect.setWidth(listRect.height()); + listRect.moveCenter(screen.center()); + (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) : + listRect.setLeft(screen.left()); + } + d->container->setGeometry(listRect); + } + } +#endif + // ### need to update scrollers etc. as well here break; case QEvent::EnabledChange: diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h index 74dfdc9..92d85cc 100644 --- a/src/gui/widgets/qcombobox_p.h +++ b/src/gui/widgets/qcombobox_p.h @@ -270,7 +270,9 @@ protected: const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyleOptionMenuItem opt = getStyleOption(option, index); +#ifndef Q_WS_S60 painter->fillRect(option.rect, opt.palette.background()); +#endif mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo); } QSize sizeHint(const QStyleOptionViewItem &option, diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 7224768..4a9cfed 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -48,7 +48,7 @@ #include <private/qapplication_p.h> #include <private/qmenu_p.h> #include <private/qmenubar_p.h> -#include <qt_s60_p.h> +#include <private/qt_s60_p.h> #include <QtCore/qlibrary.h> #ifdef Q_WS_S60 diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp index 965094e..f4076eb 100644 --- a/src/gui/widgets/qsplitter.cpp +++ b/src/gui/widgets/qsplitter.cpp @@ -1276,7 +1276,6 @@ void QSplitter::childEvent(QChildEvent *c) if (!c->child()->isWidgetType()) return; QWidget *w = static_cast<QWidget*>(c->child()); - if (c->added() && !d->blockChildAdd && !w->isWindow() && !d->findWidget(w)) { d->insertWidget_helper(d->list.count(), w, false); } else if (c->polished() && !d->blockChildAdd) { @@ -1313,18 +1312,16 @@ void QSplitter::setRubberBand(int pos) const int rBord = 3; // customizable? int hw = handleWidth(); if (!d->rubberBand) { - d->rubberBand = new QRubberBand(QRubberBand::Line); + QBoolBlocker b(d->blockChildAdd); + d->rubberBand = new QRubberBand(QRubberBand::Line, this); // For accessibility to identify this special widget. d->rubberBand->setObjectName(QLatin1String("qt_rubberband")); } - if (d->orient == Qt::Horizontal) - d->rubberBand->setGeometry(QRect(QPoint(pos + hw / 2 - rBord, r.y()), - QSize(2 * rBord, r.height())).translated(mapToGlobal(QPoint()))); - else - d->rubberBand->setGeometry(QRect(QPoint(r.x(), pos + hw / 2 - rBord), - QSize(r.width(), 2 * rBord)).translated(mapToGlobal(QPoint()))); - if (!d->rubberBand->isVisible()) - d->rubberBand->show(); + + const QRect newGeom = d->orient == Qt::Horizontal ? QRect(QPoint(pos + hw / 2 - rBord, r.y()), QSize(2 * rBord, r.height())) + : QRect(QPoint(r.x(), pos + hw / 2 - rBord), QSize(r.width(), 2 * rBord)); + d->rubberBand->setGeometry(newGeom); + d->rubberBand->show(); } /*! @@ -1555,16 +1552,14 @@ QSize QSplitter::sizeHint() const ensurePolished(); int l = 0; int t = 0; - QObjectList childList = children(); - for (int i = 0; i < childList.size(); ++i) { - if (QWidget *w = qobject_cast<QWidget *>(childList.at(i))) { - if (w->isHidden()) - continue; - QSize s = w->sizeHint(); - if (s.isValid()) { - l += d->pick(s); - t = qMax(t, d->trans(s)); - } + for (int i = 0; i < d->list.size(); ++i) { + QWidget *w = d->list.at(i)->widget; + if (w->isHidden()) + continue; + QSize s = w->sizeHint(); + if (s.isValid()) { + l += d->pick(s); + t = qMax(t, d->trans(s)); } } return orientation() == Qt::Horizontal ? QSize(l, t) : QSize(t, l); diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri index 6883dd8..937b8d6 100644 --- a/src/gui/widgets/widgets.pri +++ b/src/gui/widgets/widgets.pri @@ -164,6 +164,6 @@ wince*: { !static: QMAKE_WRITE_DEFAULT_RC = 1 } -symbian*: { +symbian: { SOURCES += widgets/qmenu_symbian.cpp } diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 44814cc..53f6b4c 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -459,10 +459,6 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) #if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL) if (type == QPixmapData::SgImage && pixmap) { RSgImage *sgImage = reinterpret_cast<RSgImage*>(pixmap); - // when "0" used as argument then - // default display, context are used - if (!context) - context = qt_vg_create_context(0, QInternal::Pixmap); destroyImages(); prevSize = QSize(); @@ -500,7 +496,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; - EGLImageKHR eglImage = eglCreateImageKHR(context->display(), + EGLImageKHR eglImage = eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)sgImage, @@ -515,7 +511,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) vgImage = vgCreateEGLImageTargetKHR(eglImage); if(vgGetError() != VG_NO_ERROR) { cleanup(); - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); SgDriver::Close(); return; } @@ -529,7 +525,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) prevSize = QSize(w, h); setSerialNumber(++qt_vg_pixmap_serial); // release stuff - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); SgDriver::Close(); } else if (type == QPixmapData::FbsBitmap) { CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap); @@ -624,7 +620,7 @@ void* QVGPixmapData::toNativeType(NativeType type) } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; - EGLImageKHR eglImage = eglCreateImageKHR(context->display(), + EGLImageKHR eglImage = eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)sgImage, @@ -637,7 +633,7 @@ void* QVGPixmapData::toNativeType(NativeType type) VGImage dstVgImage = vgCreateEGLImageTargetKHR(eglImage); if(vgGetError() != VG_NO_ERROR) { - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); sgImage->Close(); SgDriver::Close(); return 0; @@ -653,7 +649,7 @@ void* QVGPixmapData::toNativeType(NativeType type) } // release stuff vgDestroyImage(dstVgImage); - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); SgDriver::Close(); return reinterpret_cast<void*>(sgImage); } else if (type == QPixmapData::FbsBitmap) { diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index 693312a..9b55fd2 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -230,9 +230,9 @@ static QEglContext *createContext(QPaintDevice *device) // Set the swap interval for the display. QByteArray interval = qgetenv("QT_VG_SWAP_INTERVAL"); if (!interval.isEmpty()) - eglSwapInterval(context->display(), interval.toInt()); + eglSwapInterval(QEgl::display(), interval.toInt()); else - eglSwapInterval(context->display(), 1); + eglSwapInterval(QEgl::display(), 1); #ifdef EGL_RENDERABLE_TYPE // Has the user specified an explicit EGL configuration to use? @@ -246,16 +246,16 @@ static QEglContext *createContext(QPaintDevice *device) EGLint matching = 0; EGLConfig cfg; if (eglChooseConfig - (context->display(), properties, &cfg, 1, &matching) && + (QEgl::display(), properties, &cfg, 1, &matching) && matching > 0) { // Check that the selected configuration actually supports OpenVG // and then create the context with it. EGLint id = 0; EGLint type = 0; eglGetConfigAttrib - (context->display(), cfg, EGL_CONFIG_ID, &id); + (QEgl::display(), cfg, EGL_CONFIG_ID, &id); eglGetConfigAttrib - (context->display(), cfg, EGL_RENDERABLE_TYPE, &type); + (QEgl::display(), cfg, EGL_RENDERABLE_TYPE, &type); if (cfgId == id && (type & EGL_OPENVG_BIT) != 0) { context->setConfig(cfg); if (!context->createContext()) { @@ -334,7 +334,7 @@ static void qt_vg_destroy_shared_context(QVGSharedContext *shared) shared->engine = 0; shared->context->doneCurrent(); if (shared->surface != EGL_NO_SURFACE) { - eglDestroySurface(shared->context->display(), shared->surface); + eglDestroySurface(QEgl::display(), shared->surface); shared->surface = EGL_NO_SURFACE; } delete shared->context; @@ -412,7 +412,7 @@ EGLSurface qt_vg_shared_surface(void) attribs[4] = EGL_NONE; } shared->surface = eglCreatePbufferSurface - (shared->context->display(), shared->context->config(), attribs); + (QEgl::display(), shared->context->config(), attribs); } return shared->surface; } @@ -555,7 +555,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget) context->makeCurrent(mainSurface()); recreateBackBuffer = false; if (backBufferSurface != EGL_NO_SURFACE) { - eglDestroySurface(context->display(), backBufferSurface); + eglDestroySurface(QEgl::display(), backBufferSurface); backBufferSurface = EGL_NO_SURFACE; } if (backBuffer != VG_INVALID_HANDLE) { @@ -568,7 +568,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget) if (backBuffer != VG_INVALID_HANDLE) { // Create an EGL surface for rendering into the VGImage. backBufferSurface = eglCreatePbufferFromClientBuffer - (context->display(), EGL_OPENVG_IMAGE, + (QEgl::display(), EGL_OPENVG_IMAGE, (EGLClientBuffer)(backBuffer), context->config(), NULL); if (backBufferSurface == EGL_NO_SURFACE) { @@ -704,7 +704,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) #if defined(QVG_DIRECT_TO_WINDOW) // Did we get a direct to window rendering surface? EGLint buffer = 0; - if (eglQueryContext(context->display(), context->context(), + if (eglQueryContext(QEgl::display(), context->context(), EGL_RENDER_BUFFER, &buffer) && buffer == EGL_SINGLE_BUFFER) { needToSwap = false; @@ -714,7 +714,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) // Try to force the surface back buffer to preserve its contents. if (needToSwap) { eglGetError(); // Clear error state first. - eglSurfaceAttrib(context->display(), surface, + eglSurfaceAttrib(QEgl::display(), surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); if (eglGetError() != EGL_SUCCESS) { qWarning("QVG: could not enable preserved swap"); diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h index 30f51e1..98d4222 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.h +++ b/src/plugins/bearer/symbian/qnetworksession_impl.h @@ -58,7 +58,7 @@ #include <QDateTime> #include <e32base.h> -#include <CommDbConnPref.h> +#include <commdbconnpref.h> #include <es_sock.h> #include <rconnmon.h> #ifdef SNAP_FUNCTIONALITY_AVAILABLE diff --git a/src/plugins/graphicssystems/trace/trace.pro b/src/plugins/graphicssystems/trace/trace.pro index d548a6c..07472e2 100644 --- a/src/plugins/graphicssystems/trace/trace.pro +++ b/src/plugins/graphicssystems/trace/trace.pro @@ -4,6 +4,7 @@ include(../../qpluginbase.pri) QT += network QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems +symbian:TARGET.UID3 = 0x2002130E SOURCES = main.cpp qgraphicssystem_trace.cpp diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 85f618f..3cb64ad 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -58,7 +58,7 @@ contains(QT_CONFIG, system-tiff) { ../../../3rdparty/libtiff/libtiff/tif_wince.c \ ../../../3rdparty/libtiff/libtiff/tif_win32.c } - symbian*: { + symbian: { SOURCES += ../../../3rdparty/libtiff/port/lfind.c } } diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 730fdc5..42fbf9e 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -SUBDIRS *= accessible imageformats sqldrivers iconengines script bearer +SUBDIRS *= imageformats sqldrivers iconengines script bearer unix:!symbian { contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv):SUBDIRS *= codecs } else { @@ -9,6 +9,7 @@ unix:!symbian { !embedded:SUBDIRS *= graphicssystems embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers !win32:!embedded:!mac:!symbian:SUBDIRS *= inputmethods +!symbian:SUBDIRS += accessible symbian:SUBDIRS += s60 contains(QT_CONFIG, phonon): SUBDIRS *= phonon contains(QT_CONFIG, multimedia): SUBDIRS *= audio mediaservices diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro index 468197d..7700677 100644 --- a/src/plugins/s60/3_2/3_2.pro +++ b/src/plugins/s60/3_2/3_2.pro @@ -10,7 +10,12 @@ contains(S60_VERSION, 3.1) { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp \ ../src/qcoreapplication_3_2.cpp - LIBS += -lDirectoryLocalizer -lefsrv + contains(CONFIG, is_using_gnupoc) { + LIBS += -ldirectorylocalizer + } else { + LIBS += -lDirectoryLocalizer + } + LIBS += -lefsrv INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro index 86e3dc9..164dfaa 100644 --- a/src/plugins/s60/5_0/5_0.pro +++ b/src/plugins/s60/5_0/5_0.pro @@ -10,7 +10,12 @@ contains(S60_VERSION, 3.1) { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp \ ../src/qcoreapplication_3_2.cpp - LIBS += -lDirectoryLocalizer -lefsrv + contains(CONFIG, is_using_gnupoc) { + LIBS += -ldirectorylocalizer + } else { + LIBS += -lDirectoryLocalizer + } + LIBS += -lefsrv INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } diff --git a/src/plugins/s60/s60pluginbase.pri b/src/plugins/s60/s60pluginbase.pri index c1aa4ef..1a6f4a2 100644 --- a/src/plugins/s60/s60pluginbase.pri +++ b/src/plugins/s60/s60pluginbase.pri @@ -4,6 +4,8 @@ include(../qpluginbase.pri) CONFIG -= plugin +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60 + MMP_RULES += NOEXPORTLIBRARY defBlock = \ diff --git a/src/qbase.pri b/src/qbase.pri index 835ed0e..4a75565 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -104,7 +104,7 @@ symbian { # built in this exact environment. *Never* use this when building a version # for release. contains(CONFIG, def_files) { - defFilePath=../s60installs + DEF_FILE=../s60installs } } load(armcc_warnings) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 841fce4..b2e873f 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -11,26 +11,37 @@ symbian: { TARGET.UID3 = 0x2001E61C VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} - qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc + symbian-abld|symbian-sbsv2 { + qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc + } else { + qtresources.sources = $$QMAKE_LIBDIR_QT/s60main.rsc + DESTDIR = $$QMAKE_LIBDIR_QT + } qtresources.path = c:$$APP_RESOURCE_DIR qtlibraries.sources = \ - QtCore.dll \ - QtXml.dll \ - QtGui.dll \ - QtNetwork.dll \ - QtTest.dll \ - QtSql.dll + $$QMAKE_LIBDIR_QT/QtCore.dll \ + $$QMAKE_LIBDIR_QT/QtXml.dll \ + $$QMAKE_LIBDIR_QT/QtGui.dll \ + $$QMAKE_LIBDIR_QT/QtNetwork.dll \ + $$QMAKE_LIBDIR_QT/QtTest.dll \ + $$QMAKE_LIBDIR_QT/QtSql.dll + + symbian-abld|symbian-sbsv2 { + pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) + } else { + pluginLocations = $$QT_BUILD_TREE/plugins/s60 + } qts60plugindeployment = \ "IF package(0x1028315F)" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$$pluginLocations/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ELSEIF package(0x102752AE)" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ + " \"$$pluginLocations/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ "ELSEIF package(0x102032BE)" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ + " \"$$pluginLocations/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ "ELSE" \ - " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$$pluginLocations/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ENDIF" qtlibraries.pkg_postrules += qts60plugindeployment @@ -61,18 +72,18 @@ symbian: { } qtlibraries.pkg_prerules += "(0x2002af5f), 0, 5, 0, {\"sqlite3\"}" - !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += qjpeg.dll - !contains(QT_CONFIG, no-gif): imageformats_plugins.sources += qgif.dll - !contains(QT_CONFIG, no-mng): imageformats_plugins.sources += qmng.dll - !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += qtiff.dll - !contains(QT_CONFIG, no-ico): imageformats_plugins.sources += qico.dll + !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qjpeg.dll + !contains(QT_CONFIG, no-gif): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qgif.dll + !contains(QT_CONFIG, no-mng): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qmng.dll + !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qtiff.dll + !contains(QT_CONFIG, no-ico): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qico.dll imageformats_plugins.path = c:$$QT_PLUGINS_BASE_DIR/imageformats - codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll + codecs_plugins.sources = $$QT_BUILD_TREE/plugins/codecs/qcncodecs.dll $$QT_BUILD_TREE/plugins/codecs/qjpcodecs.dll $$QT_BUILD_TREE/plugins/codecs/qtwcodecs.dll $$QT_BUILD_TREE/plugins/codecs/qkrcodecs.dll codecs_plugins.path = c:$$QT_PLUGINS_BASE_DIR/codecs contains(QT_CONFIG, phonon-backend) { - phonon_backend_plugins.sources += phonon_mmf.dll + phonon_backend_plugins.sources += $$QMAKE_LIBDIR_QT/phonon_mmf.dll phonon_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/phonon_backend DEPLOYMENT += phonon_backend_plugins @@ -83,7 +94,7 @@ symbian: { qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) bearer_plugins.path = c:$$QT_PLUGINS_BASE_DIR/bearer - bearer_plugins.sources += qsymbianbearer.dll + bearer_plugins.sources += $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer.dll DEPLOYMENT += qtresources \ qtlibraries \ @@ -94,37 +105,37 @@ symbian: { bearer_plugins contains(QT_CONFIG, svg): { - qtlibraries.sources += QtSvg.dll - imageformats_plugins.sources += qsvg.dll - iconengines_plugins.sources = qsvgicon.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtSvg.dll + imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qsvg.dll + iconengines_plugins.sources = $$QT_BUILD_TREE/plugins/iconengines/qsvgicon.dll iconengines_plugins.path = c:$$QT_PLUGINS_BASE_DIR/iconengines DEPLOYMENT += iconengines_plugins } contains(QT_CONFIG, phonon): { - qtlibraries.sources += phonon.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/phonon.dll } contains(QT_CONFIG, script): { - qtlibraries.sources += QtScript.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtScript.dll } contains(QT_CONFIG, xmlpatterns): { - qtlibraries.sources += QtXmlPatterns.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtXmlPatterns.dll } contains(QT_CONFIG, declarative): { - qtlibraries.sources += QtDeclarative.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative.dll } graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems contains(QT_CONFIG, openvg) { - qtlibraries.sources += QtOpenVG.dll - graphicssystems_plugins.sources += qvggraphicssystem.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtOpenVG.dll + graphicssystems_plugins.sources += $$QT_BUILD_TREE/plugins/graphicssystems/qvggraphicssystem.dll } contains(QT_CONFIG, multimedia) { - qtlibraries.sources += QtMultimedia.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtMultimedia.dll } BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index 25fb188..1ba105d 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -17,7 +17,7 @@ symbian { qts60main_mcrt0.cpp # s60main needs to be built in ARM mode for GCCE to work. - MMP_RULES+="ALWAYS_BUILD_AS_ARM" + CONFIG += do_not_build_as_thumb # staticlib should not have any lib depencies in s60 # This seems not to work, some hard coded libs are still added as dependency diff --git a/src/s60main/s60main.rsg b/src/s60main/s60main.rsg new file mode 100644 index 0000000..8cdf3ba --- /dev/null +++ b/src/s60main/s60main.rsg @@ -0,0 +1,3 @@ +#define R_DEFAULT_DOCUMENT_NAME 0x55567002 +#define R_QT_WRAPPERAPP_MENUBAR 0x55567004 +#define R_QT_WRAPPERAPP_MENU 0x55567005 diff --git a/src/src.pro b/src/src.pro index 0fbce6b..0033942 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,7 +6,10 @@ win32:SRC_SUBDIRS += src_winmain wince*:{ SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib } else:symbian { - SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs + SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib + !symbian-abld:!symbian-sbsv2 { + include(tools/tools.pro) + } } else { SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_testlib !vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support @@ -31,6 +34,10 @@ contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia SRC_SUBDIRS += src_plugins contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_imports +# s60installs need to be at the end, because projects.pro does an ordered build, +# and s60installs depends on all the others. +symbian:SRC_SUBDIRS += src_s60installs + src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main src_s60main.target = sub-s60main src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs @@ -83,7 +90,7 @@ src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative src_declarative.target = sub-declarative #CONFIG += ordered -!wince*:!symbian:!ordered { +!wince*:!ordered { src_corelib.depends = src_tools_moc src_tools_rcc src_gui.depends = src_corelib src_tools_uic embedded: src_gui.depends += src_network @@ -106,6 +113,7 @@ src_declarative.target = sub-declarative src_tools_activeqt.depends = src_tools_idc src_gui src_declarative.depends = src_xml src_gui src_script src_network src_svg src_plugins.depends = src_gui src_sql src_svg src_multimedia + src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS src_imports.depends = src_gui src_declarative contains(QT_CONFIG, webkit) { src_webkit.depends = src_gui src_sql src_network src_xml @@ -123,7 +131,7 @@ src_declarative.target = sub-declarative contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl } -!symbian { + # This creates a sub-src rule sub_src_target.CONFIG = recursive sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS @@ -170,6 +178,5 @@ for(subname, SRC_SUBDIRS) { debug.depends = $$EXTRA_DEBUG_TARGETS release.depends = $$EXTRA_RELEASE_TARGETS QMAKE_EXTRA_TARGETS += debug release -} SUBDIRS += $$SRC_SUBDIRS diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index 6442526..1de7b18 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -42,12 +42,12 @@ hpux-acc*|hpuxi-acc* { } else { contains(CONFIG, debug_and_release_target) { CONFIG(debug, debug|release) { - LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/debug + QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/debug } else { - LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/release + QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/release } } else { - LIBS += -L$$QT_BUILD_TREE/src/tools/bootstrap + QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap } LIBS += -lbootstrap } @@ -62,3 +62,12 @@ mac { LIBS += -framework CoreServices } +# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working. +sis_target.target = sis +sis_target.commands = +sis_target.depends = first +QMAKE_EXTRA_TARGETS += sis_target +freeze_target.target = freeze +freeze_target.commands = +freeze_target.depends = first +QMAKE_EXTRA_TARGETS += freeze_target diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 7e91333..44dd625 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -113,3 +113,13 @@ contains(QT_CONFIG, zlib)|cross_compile { lib.CONFIG = dummy_install INSTALLS += lib + +# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working. +sis_target.target = sis +sis_target.commands = +sis_target.depends = first +QMAKE_EXTRA_TARGETS += sis_target +freeze_target.target = freeze +freeze_target.commands = +freeze_target.depends = first +QMAKE_EXTRA_TARGETS += freeze_target diff --git a/src/tools/tools.pro b/src/tools/tools.pro index 25527e3..cd7cd9b 100644 --- a/src/tools/tools.pro +++ b/src/tools/tools.pro @@ -20,7 +20,7 @@ src_tools_uic3.target = sub-uic3 src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc src_tools_idc.target = sub-idc -!wince*:!symbian:!ordered { +!wince*:!ordered { # Set dependencies for each subdir src_tools_moc.depends = src_tools_bootstrap src_tools_rcc.depends = src_tools_bootstrap diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 0150515..1267e7e 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -625,6 +625,11 @@ private: bool cdata; bool nsProcessing; QXmlLocator *locator; + +#ifdef Q_OS_SYMBIAN + // Workaround crash in elf2e32 under Wine. + virtual void dummy() {} +#endif }; /************************************************************** |