summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-07 20:01:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-07 20:01:15 (GMT)
commitef47b83aa47c687d2543ddc26ff3a6decca1b4ce (patch)
tree22e67005325802cb9529148b8e0a600b51560752
parent258ec5a9e42dc298a58675a6767d37ffcd8cd43f (diff)
parent3d87337d184edc6ec43484685a7b4ec05a01df78 (diff)
downloadQt-ef47b83aa47c687d2543ddc26ff3a6decca1b4ce.zip
Qt-ef47b83aa47c687d2543ddc26ff3a6decca1b4ce.tar.gz
Qt-ef47b83aa47c687d2543ddc26ff3a6decca1b4ce.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: New keys for media-related keys, common mobile keys Retrieve proper glyph outlines from Symbian^4 Make Fluidlauncher demo have same version as corresponding Qt Fix the building of sis files. Make symbian install to epocroot by default.
-rwxr-xr-xconfigure26
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro1
-rw-r--r--src/corelib/global/qnamespace.h14
-rw-r--r--src/corelib/global/qnamespace.qdoc19
-rw-r--r--src/gui/kernel/qkeysequence.cpp30
-rw-r--r--src/gui/text/qfontengine_s60.cpp98
-rw-r--r--src/gui/text/qfontengine_s60_p.h7
-rw-r--r--src/s60installs/s60installs.pro10
8 files changed, 172 insertions, 33 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"`
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 += \
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
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 <e32std.h>
#include <eikenv.h>
#include <gdi.h>
-#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
+#if defined(Q_SYMBIAN_HAS_FONTTABLE_API) || defined(Q_SYMBIAN_HAS_GLYPHOUTLINE_API)
#include <graphics/gdi/gdiplatapi.h>
-#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<const char*>(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);
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