From cafd332caee4ddfc724dc1271edd1cf69516f3cd Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 31 May 2010 13:18:38 +0200 Subject: Make symbian install to epocroot by default. On symbian cross-compiling is the only way so the libraries and headers are all stored in symbian-specific ways which is called EPOCROOT. This change makes a configure without -prefix being passed in populate the EPOCROOT on 'make install'. When the user passes a prefix it will just do what a normal unix build does on make install. --- configure | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 991596f..916b2e5 100755 --- a/configure +++ b/configure @@ -3203,15 +3203,25 @@ fi #prefix if [ -z "$QT_INSTALL_PREFIX" ]; then - if [ "$CFG_DEV" = "yes" ]; then - QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default - elif [ "$PLATFORM_QWS" = "yes" ]; then - QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}" - if [ "$PLATFORM" != "$XPLATFORM" ]; then - QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}" + if [ -d "$EPOCROOT" ]; then + case "$XPLATFORM" in *symbian*) + QT_INSTALL_PREFIX="$EPOCROOT/epoc32/" + QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/" + ;; + esac + fi + + if [ -z "$QT_INSTALL_PREFIX" ]; then # still empty + if [ "$CFG_DEV" = "yes" ]; then + QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default + elif [ "$PLATFORM_QWS" = "yes" ]; then + QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}" + if [ "$PLATFORM" != "$XPLATFORM" ]; then + QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}" + fi + else + QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION fi - else - QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION fi fi QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"` -- cgit v0.12 From e35d63a791b554fe585a8ca47b905c36f5eea340 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 7 Jun 2010 12:07:39 +0200 Subject: Fix the building of sis files. Stuff goes into various subdirs, these should be specified too. Reviewed-By: axis --- src/s60installs/s60installs.pro | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 532269d..d3d9eed 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -151,9 +151,9 @@ symbian: { contains(QT_CONFIG, declarative): { qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative$${QT_LIBINFIX}.dll - folderlistmodelImport.sources = $$QMAKE_LIBDIR_QT/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll - gesturesImport.sources = $$QMAKE_LIBDIR_QT/qmlgesturesplugin$${QT_LIBINFIX}.dll - particlesImport.sources = $$QMAKE_LIBDIR_QT/qmlparticlesplugin$${QT_LIBINFIX}.dll + folderlistmodelImport.sources = $$QT_BUILD_TREE/imports/Qt/labs/folderlistmodel/qmlfolderlistmodelplugin$${QT_LIBINFIX}.dll + gesturesImport.sources = $$QT_BUILD_TREE/imports/Qt/labs/gestures/qmlgesturesplugin$${QT_LIBINFIX}.dll + particlesImport.sources = $$QT_BUILD_TREE/imports/Qt/labs/particles/qmlparticlesplugin$${QT_LIBINFIX}.dll folderlistmodelImport.sources += $$QT_SOURCE_TREE/src/imports/folderlistmodel/qmldir gesturesImport.sources += $$QT_SOURCE_TREE/src/imports/gestures/qmldir @@ -166,11 +166,11 @@ symbian: { DEPLOYMENT += folderlistmodelImport gesturesImport particlesImport contains(QT_CONFIG, webkit): { - webkitImport.sources = $$QMAKE_LIBDIR_QT/qmlwebkitplugin$${QT_LIBINFIX}.dll + webkitImport.sources = $$QT_BUILD_TREE/imports/org/webkit/qmlwebkitplugin$${QT_LIBINFIX}.dll webkitImport.sources += $$QT_SOURCE_TREE/src/imports/webkit/qmldir webkitImport.path = $$QT_IMPORTS_BASE_DIR/org/webkit DEPLOYMENT += webkitImport - } + } } graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems -- cgit v0.12 From 8677cfb1cffd215403d18a4ef2ced52a8a3cf3af Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 7 Jun 2010 13:38:51 +0300 Subject: Make Fluidlauncher demo have same version as corresponding Qt To make Fluidlauncher demo update properly in Symbian when using quiet installer, it needs proper version number instead of always having default 1.0.0. Task-number: QTBUG-11265 Reviewed-by: Janne Koskinen --- demos/embedded/fluidlauncher/fluidlauncher.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index 21f3819..416e58b 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -2,6 +2,7 @@ TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . +VERSION = $$QT_VERSION # Input HEADERS += \ -- cgit v0.12 From 5d130f9682fbd3dc8c469468e805854fd70a11ea Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 4 Jun 2010 19:51:59 +0200 Subject: Retrieve proper glyph outlines from Symbian^4 Up until Symbian^4, the Symbian font Api does not provide access to the vector data of glyphs. In order to make QPainterPath::addText() and transformed text rendering work, Qt falls back to a workaound: Tracing the bitmap of a rasterized glyph. That is neither performant nor is the result of good quality. Symbian^4 will add Api that returns glyph outlines encoded as SVG paths. The code in this commit essentially parses the SVG path and returns a QPainterPath. The parsing part took some ideas from QSvg, and is implemented in a very reduced way. Task-number: QT-809 Reviewed-by: Aleksandar Sasha Babic --- src/gui/text/qfontengine_s60.cpp | 98 +++++++++++++++++++++++++++++++++++++++- src/gui/text/qfontengine_s60_p.h | 7 +++ 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 52a2c3c..925b3bf 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -50,9 +50,9 @@ #include #include #include -#ifdef Q_SYMBIAN_HAS_FONTTABLE_API +#if defined(Q_SYMBIAN_HAS_FONTTABLE_API) || defined(Q_SYMBIAN_HAS_GLYPHOUTLINE_API) #include -#endif // Q_SYMBIAN_HAS_FONTTABLE_API +#endif // Q_SYMBIAN_HAS_FONTTABLE_API || Q_SYMBIAN_HAS_GLYPHOUTLINE_API QT_BEGIN_NAMESPACE @@ -279,6 +279,35 @@ void QFontEngineS60::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFla } } +#ifdef Q_SYMBIAN_HAS_GLYPHOUTLINE_API +static bool parseGlyphPathData(const char *dataStr, const char *dataEnd, QPainterPath &path, + qreal fontPixelSize, const QPointF &offset, bool hinted); +#endif //Q_SYMBIAN_HAS_GLYPHOUTLINE_API + +void QFontEngineS60::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, + int nglyphs, QPainterPath *path, + QTextItem::RenderFlags flags) +{ +#ifdef Q_SYMBIAN_HAS_GLYPHOUTLINE_API + Q_UNUSED(flags) + RGlyphOutlineIterator iterator; + const TInt error = iterator.Open(*m_activeFont, glyphs, nglyphs); + if (KErrNone != error) + return; + const qreal fontSizeInPixels = qreal(m_activeFont->HeightInPixels()); + int count = 0; + do { + const TUint8* outlineUint8 = iterator.Outline(); + const char* const outlineChar = reinterpret_cast(outlineUint8); + const char* const outlineEnd = outlineChar + iterator.OutlineLength(); + parseGlyphPathData(outlineChar, outlineEnd, *path, fontSizeInPixels, + positions[count++].toPointF(), false); + } while(KErrNone == iterator.Next() && count <= nglyphs); +#else // Q_SYMBIAN_HAS_GLYPHOUTLINE_API + QFontEngine::addGlyphsToPath(glyphs, positions, nglyphs, path, flags); +#endif //Q_SYMBIAN_HAS_GLYPHOUTLINE_API +} + QImage QFontEngineS60::alphaMapForGlyph(glyph_t glyph) { TOpenFontCharMetrics metrics; @@ -410,4 +439,69 @@ void QFontEngineS60::getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metri } } +#ifdef Q_SYMBIAN_HAS_GLYPHOUTLINE_API +static inline void skipSpacesAndComma(const char* &str, const char* const strEnd) +{ + while (str <= strEnd && (*str == ' ' || *str == ',')) + ++str; +} + +static bool parseGlyphPathData(const char *svgPath, const char *svgPathEnd, QPainterPath &path, + qreal fontPixelSize, const QPointF &offset, bool hinted) +{ + Q_UNUSED(hinted) + QPointF p1, p2, firstSubPathPoint; + qreal *elementValues[] = + {&p1.rx(), &p1.ry(), &p2.rx(), &p2.ry()}; + const int unitsPerEm = 2048; // See: http://en.wikipedia.org/wiki/Em_%28typography%29 + const qreal resizeFactor = fontPixelSize / unitsPerEm; + + while (svgPath < svgPathEnd) { + skipSpacesAndComma(svgPath, svgPathEnd); + const char pathElem = *svgPath++; + skipSpacesAndComma(svgPath, svgPathEnd); + + if (pathElem != 'Z') { + char *endStr = 0; + int elementValuesCount = 0; + for (int i = 0; i < 4; ++i) { // 4 = size of elementValues[] + qreal coordinateValue = strtod(svgPath, &endStr); + if (svgPath == endStr) + break; + if (i % 2) // Flip vertically + coordinateValue = -coordinateValue; + *elementValues[i] = coordinateValue * resizeFactor; + elementValuesCount++; + svgPath = endStr; + skipSpacesAndComma(svgPath, svgPathEnd); + } + p1 += offset; + if (elementValuesCount == 2) + p2 = firstSubPathPoint; + else + p2 += offset; + } + + switch (pathElem) { + case 'M': + firstSubPathPoint = p1; + path.moveTo(p1); + break; + case 'Z': + path.closeSubpath(); + break; + case 'L': + path.lineTo(p1); + break; + case 'Q': + path.quadTo(p1, p2); + break; + default: + return false; + } + } + return true; +} +#endif // Q_SYMBIAN_HAS_GLYPHOUTLINE_API + QT_END_NAMESPACE diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index dea32c4..beeb4cc 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -62,6 +62,10 @@ #define Q_SYMBIAN_HAS_FONTTABLE_API #endif +#ifdef Q_SYMBIAN_HAS_FONTTABLE_API +#define Q_SYMBIAN_HAS_GLYPHOUTLINE_API +#endif // Q_SYMBIAN_HAS_FONTTABLE_API + class CFont; QT_BEGIN_NAMESPACE @@ -97,6 +101,9 @@ public: bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const; void recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const; + void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, + QPainterPath *path, QTextItem::RenderFlags flags); + QImage alphaMapForGlyph(glyph_t glyph); glyph_metrics_t boundingBox(const QGlyphLayout &glyphs); -- cgit v0.12 From 3d87337d184edc6ec43484685a7b4ec05a01df78 Mon Sep 17 00:00:00 2001 From: Iain Date: Mon, 7 Jun 2010 10:12:23 +0100 Subject: New keys for media-related keys, common mobile keys Various new keys: - introduce a proper key for pausing media - the existing Key_Pause was mapped to the Pause/Break key on a QWERTY keyboard. (In order not to break BC on applications that have been using the directfb keyboard map, the key mapping for DIKS_PLAYPAUSE *was not* updated). - introduce explicit keys to handle the case where play/pause is a single (toggling state) key rather than two discrete keys; same thing for a toggling version of call/hangup. - add new keys for voice dial and last number redial NOTE: Due to renumbering Key_Camera and Key_CameraFocus in order to make space in the more mobile-specific key range, this change introduces a binary compatibility break between this change and anything built before (ie. with Qt 4.7 beta 1 or earlier) (But not Qt 4.6, since the camera and camera focus keys were not in 4.6) Reviewed-by: axis Reviewed-by: Shane Kearns --- src/corelib/global/qnamespace.h | 14 ++++++++++---- src/corelib/global/qnamespace.qdoc | 19 ++++++++++++------- src/gui/kernel/qkeysequence.cpp | 30 +++++++++++++++++++++++------- 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 607ab52..a9c56f6 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -948,6 +948,8 @@ public: #endif Key_MediaNext = 0x01000083, Key_MediaRecord = 0x01000084, + Key_MediaPause = 0x1000085, + Key_MediaTogglePlayPause = 0x1000086, Key_HomePage = 0x01000090, Key_Favorites = 0x01000091, Key_Search = 0x01000092, @@ -1090,11 +1092,15 @@ public: Key_Context2 = 0x01100001, Key_Context3 = 0x01100002, Key_Context4 = 0x01100003, - Key_Call = 0x01100004, - Key_Hangup = 0x01100005, + Key_Call = 0x01100004, // set absolute state to in a call (do not toggle state) + Key_Hangup = 0x01100005, // set absolute state to hang up (do not toggle state) Key_Flip = 0x01100006, - Key_Camera = 0x01100007, - Key_CameraFocus = 0x01100008, + Key_ToggleCallHangup = 0x01100007, // a toggle key for answering, or hanging up, based on current call state + Key_VoiceDial = 0x01100008, + Key_LastNumberRedial = 0x01100009, + + Key_Camera = 0x01100020, + Key_CameraFocus = 0x01100021, Key_unknown = 0x01ffffff }; diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index f71ba9d..7eae3a5 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1317,7 +1317,7 @@ \value Key_Enter Typically located on the keypad. \value Key_Insert \value Key_Delete - \value Key_Pause + \value Key_Pause The Pause/Break key (\note Not anything to do with pausing media) \value Key_Print \value Key_SysReq \value Key_Clear @@ -1615,12 +1615,14 @@ \value Key_BassDown \value Key_TrebleUp \value Key_TrebleDown - \value Key_MediaPlay - \value Key_MediaStop + \value Key_MediaPlay A key setting the state of the media player to play + \value Key_MediaStop A key setting the state of the media player to stop \value Key_MediaPrevious \omitvalue Key_MediaPrev \value Key_MediaNext \value Key_MediaRecord + \value Key_MediaPause A key setting the state of the media player to pause (\note not the pause/break key) + \value Key_MediaTogglePlayPause A key to toggle the play/pause state in the media player (rather than setting an absolute state) \value Key_HomePage \value Key_Favorites \value Key_Search @@ -1741,18 +1743,21 @@ \value Key_MediaLast \value Key_unknown - \value Key_Call - \value Key_Camera - \value Key_CameraFocus + \value Key_Call A key to answer or initiate a call (\see Key_ToggleCallHangup for a key to toggle current call state) + \value Key_Camera A key to activate the camera shutter + \value Key_CameraFocus A key to focus the camera \value Key_Context1 \value Key_Context2 \value Key_Context3 \value Key_Context4 \value Key_Flip - \value Key_Hangup + \value Key_Hangup A key to end an ongoing call (\see Key_ToggleCallHangup for a key to toggle current call state) \value Key_No \value Key_Select \value Key_Yes + \value Key_ToggleCallHangup A key to toggle the current call state (ie. either answer, or hangup) depending on current call state + \value Key_VoiceDial + \value Key_LastNumberRedial \value Key_Execute \value Key_Printer diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 931bc33..c2f275a 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -439,6 +439,10 @@ static const struct { { Qt::Key_MediaPrevious, QT_TRANSLATE_NOOP("QShortcut", "Media Previous") }, { Qt::Key_MediaNext, QT_TRANSLATE_NOOP("QShortcut", "Media Next") }, { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP("QShortcut", "Media Record") }, + //: Media player pause button + { Qt::Key_MediaPause, QT_TRANSLATE_NOOP("QShortcut", "Media Pause") }, + //: Media player button to toggle between playing and paused + { Qt::Key_MediaTogglePlayPause, QT_TRANSLATE_NOOP("QShortcut", "Toggle Media Play/Pause") }, { Qt::Key_HomePage, QT_TRANSLATE_NOOP("QShortcut", "Home Page") }, { Qt::Key_Favorites, QT_TRANSLATE_NOOP("QShortcut", "Favorites") }, { Qt::Key_Search, QT_TRANSLATE_NOOP("QShortcut", "Search") }, @@ -575,13 +579,25 @@ static const struct { // -------------------------------------------------------------- // Device keys - { Qt::Key_Context1, QT_TRANSLATE_NOOP("QShortcut", "Context1") }, - { Qt::Key_Context2, QT_TRANSLATE_NOOP("QShortcut", "Context2") }, - { Qt::Key_Context3, QT_TRANSLATE_NOOP("QShortcut", "Context3") }, - { Qt::Key_Context4, QT_TRANSLATE_NOOP("QShortcut", "Context4") }, - { Qt::Key_Call, QT_TRANSLATE_NOOP("QShortcut", "Call") }, - { Qt::Key_Hangup, QT_TRANSLATE_NOOP("QShortcut", "Hangup") }, - { Qt::Key_Flip, QT_TRANSLATE_NOOP("QShortcut", "Flip") }, + { Qt::Key_Context1, QT_TRANSLATE_NOOP("QShortcut", "Context1") }, + { Qt::Key_Context2, QT_TRANSLATE_NOOP("QShortcut", "Context2") }, + { Qt::Key_Context3, QT_TRANSLATE_NOOP("QShortcut", "Context3") }, + { Qt::Key_Context4, QT_TRANSLATE_NOOP("QShortcut", "Context4") }, + //: Button to start a call (note: a separate button is used to end the call) + { Qt::Key_Call, QT_TRANSLATE_NOOP("QShortcut", "Call") }, + //: Button to end a call (note: a separate button is used to start the call) + { Qt::Key_Hangup, QT_TRANSLATE_NOOP("QShortcut", "Hangup") }, + //: Button that will hang up if we're in call, or make a call if we're not. + { Qt::Key_ToggleCallHangup, QT_TRANSLATE_NOOP("QShortcut", "Toggle Call/Hangup") }, + { Qt::Key_Flip, QT_TRANSLATE_NOOP("QShortcut", "Flip") }, + //: Button to trigger voice dialling + { Qt::Key_VoiceDial, QT_TRANSLATE_NOOP("QShortcut", "Voice Dial") }, + //: Button to redial the last number called + { Qt::Key_LastNumberRedial, QT_TRANSLATE_NOOP("QShortcut", "Last Number Redial") }, + //: Button to trigger the camera shutter (take a picture) + { Qt::Key_Camera, QT_TRANSLATE_NOOP("QShortcut", "Camera Shutter") }, + //: Button to focus the camera + { Qt::Key_CameraFocus, QT_TRANSLATE_NOOP("QShortcut", "Camera Focus") }, // -------------------------------------------------------------- // Japanese keyboard support -- cgit v0.12