From 3cad63946965416c89703fbf3d9730e856283c06 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 7 Oct 2009 17:45:48 +0200 Subject: Fix tst_QTextLayout::testTabDPIScale for WinCE/Symbian Make tst_QTextLayout::testTabDPIScale work by increasing the tab stop distances. Now, systems with higher DPIs can pass this test. Review-By: Joerg Bornemann --- tests/auto/qtextlayout/tst_qtextlayout.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 5ccae94..fe87dfb 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -1085,10 +1085,6 @@ QT_END_NAMESPACE void tst_QTextLayout::testTabDPIScale() { - #ifdef Q_OS_WINCE - QSKIP("This test fails for large DPIs.", SkipAll); - #endif - class MyPaintDevice : public QPaintDevice { QPaintEngine *paintEngine () const { return 0; } int metric (QPaintDevice::PaintDeviceMetric metric) const { @@ -1118,14 +1114,14 @@ void tst_QTextLayout::testTabDPIScale() QTextOption option = layout.textOption(); QList tabs; QTextOption::Tab tab; - tab.position = 100; + tab.position = 200; tabs.append(tab); - tab.position = 200; + tab.position = 400; tab.type = QTextOption::RightTab; tabs.append(tab); - tab.position = 300; + tab.position = 600; tab.type = QTextOption::CenterTab; tabs.append(tab); option.setTabs(tabs); @@ -1133,7 +1129,7 @@ void tst_QTextLayout::testTabDPIScale() layout.beginLayout(); QTextLine line = layout.createLine(); - line.setLineWidth(500.); + line.setLineWidth(1500.); layout.endLayout(); QCOMPARE(line.cursorToX(0), 0.); QCOMPARE(line.cursorToX(1), (double) TESTFONT_SIZE); // check that the font does not resize @@ -1142,9 +1138,9 @@ void tst_QTextLayout::testTabDPIScale() int fixedScale = (int)( scale * qreal(64)); // into a QFixed scale = ((qreal)fixedScale)/(qreal)64; // and out of a QFixed - QCOMPARE(line.cursorToX(6), 100 * scale); - QCOMPARE(line.cursorToX(12), 200 * scale - TESTFONT_SIZE * 5); - QCOMPARE(line.cursorToX(18), 300 * scale - TESTFONT_SIZE * 3 / 2.0); + QCOMPARE(line.cursorToX(6), tabs.at(0).position * scale); + QCOMPARE(line.cursorToX(12), tabs.at(1).position * scale - TESTFONT_SIZE * 5); + QCOMPARE(line.cursorToX(18), tabs.at(2).position * scale - TESTFONT_SIZE * 3 / 2.0); } void tst_QTextLayout::tabHeight() -- cgit v0.12 From db182f75b69cd47ce8abbcc5acb2551306919a05 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 7 Oct 2009 13:58:02 +0200 Subject: QGuiPlatformPlugin: QFileIconProvider and QIcon backend. Add a backend for QFileIconProvider in the platform plugin Also change the QIcon::fromTheme backend in the platform plugin: On KDE, we unfortunately can't use KIcon as backend, as the current API doesn't let us know easily (and quickly) wether we should use the fallback or not (KDE always fallback to the question mark "unknown" icon) So we will use the QIconLoader even on KDE. But we need to make sure that the theme name and the icon search paths are correct. Ask that to the platform plugin Reviewed-by: Jens Bache-Wiig --- src/gui/image/qicon.cpp | 5 -- src/gui/image/qiconloader.cpp | 88 +++++---------------------------- src/gui/itemviews/qfileiconprovider.cpp | 5 ++ src/gui/kernel/qguiplatformplugin.cpp | 68 ++++++++++++++++++++++++- src/gui/kernel/qguiplatformplugin_p.h | 6 ++- 5 files changed, 87 insertions(+), 85 deletions(-) diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 3448459..e0779a0 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -962,15 +962,10 @@ QString QIcon::themeName() */ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) { - static QCache iconCache; QIcon icon; - icon = qt_guiPlatformPlugin()->loadIcon(name); - if (!icon.isNull()) - return icon; - if (iconCache.contains(name)) { icon = *iconCache.object(name); } else { diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index adc2967..5412e11 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include @@ -68,47 +68,25 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) +/* Theme to use in last resort, if the theme does not have the icon, neither the parents */ static QString fallbackTheme() { - QString defaultTheme; -#ifdef Q_WS_X11 - if (X11->desktopEnvironment == DE_GNOME) - defaultTheme = QLatin1String("gnome"); - else if (X11->desktopEnvironment == DE_KDE) - defaultTheme = X11->desktopVersion >= 4 ? - QString::fromLatin1("oxygen") : - QString::fromLatin1("crystalsvg"); -#endif - return defaultTheme; -} - -static QString systemThemeName() -{ - QString result = fallbackTheme(); #ifdef Q_WS_X11 if (X11->desktopEnvironment == DE_GNOME) { -#ifndef QT_NO_STYLE_GTK - result = QGtk::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), - result); -#endif + return QLatin1String("gnome"); } else if (X11->desktopEnvironment == DE_KDE) { - QSettings settings(QKde::kdeHome() + - QLatin1String("/share/config/kdeglobals"), - QSettings::IniFormat); - - settings.beginGroup(QLatin1String("Icons")); - - result = settings.value(QLatin1String("Theme"), result).toString(); + return X11->desktopVersion >= 4 + ? QString::fromLatin1("oxygen") + : QString::fromLatin1("crystalsvg"); } #endif - return result; + return QString(); } - QIconLoader::QIconLoader() : m_themeKey(1), m_supportsSvg(false) { - m_systemTheme = systemThemeName(); + m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName(); QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid, QLatin1String("/iconengines"), @@ -128,7 +106,7 @@ void QIconLoader::updateSystemTheme() { // Only change if this is not explicitly set by the user if (m_userTheme.isEmpty()) { - QString theme = systemThemeName(); + QString theme = qt_guiPlatformPlugin()->systemIconThemeName(); if (theme != m_systemTheme) { m_systemTheme = theme; invalidateKey(); @@ -152,51 +130,7 @@ void QIconLoader::setThemeSearchPath(const QStringList &searchPaths) QStringList QIconLoader::themeSearchPaths() const { if (m_iconDirs.isEmpty()) { - -#if defined(Q_WS_X11) - - QString xdgDirString = QFile::decodeName(getenv("XDG_DATA_DIRS")); - if (xdgDirString.isEmpty()) - xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); - - QStringList xdgDirs = xdgDirString.split(QLatin1Char(':')); - - for (int i = 0 ; i < xdgDirs.size() ; ++i) { - QDir dir(xdgDirs[i]); - if (dir.exists()) - m_iconDirs.append(dir.path() + - QLatin1String("/icons")); - } - - if (X11->desktopEnvironment == DE_KDE) { - - m_iconDirs << QLatin1Char(':') + - QKde::kdeHome() + - QLatin1String("/share/icons"); - QStringList kdeDirs = - QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':')); - - for (int i = 0 ; i< kdeDirs.count() ; ++i) { - QDir dir(QLatin1Char(':') + kdeDirs.at(i) + - QLatin1String("/share/icons")); - if (dir.exists()) - m_iconDirs.append(dir.path()); - } - } - - // Add home directory first in search path - QDir homeDir(QDir::homePath() + QLatin1String("/.icons")); - if (homeDir.exists()) - m_iconDirs.prepend(homeDir.path()); -#endif - -#if defined(Q_WS_WIN) - m_iconDirs.append(qApp->applicationDirPath() + - QLatin1String("/icons")); -#elif defined(Q_WS_MAC) - m_iconDirs.append(qApp->applicationDirPath() + - QLatin1String("/../Resources/icons")); -#endif + m_iconDirs = qt_guiPlatformPlugin()->iconThemeSearchPaths(); // Allways add resource directory as search path m_iconDirs.append(QLatin1String(":/icons")); } @@ -291,7 +225,7 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, if (!theme.isValid()) { theme = QIconTheme(themeName); if (!theme.isValid()) - theme = fallbackTheme(); + theme = QIconTheme(fallbackTheme()); themeList.insert(themeName, theme); } diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp index c78a49b..e3d17ad 100644 --- a/src/gui/itemviews/qfileiconprovider.cpp +++ b/src/gui/itemviews/qfileiconprovider.cpp @@ -61,6 +61,7 @@ #endif #include +#include #ifndef SHGFI_ADDOVERLAYS #define SHGFI_ADDOVERLAYS 0x000000020 @@ -385,6 +386,10 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const { Q_D(const QFileIconProvider); + QIcon platformIcon = qt_guiPlatformPlugin()->fileSystemIcon(info); + if (!platformIcon.isNull()) + return platformIcon; + #if defined(Q_WS_X11) && !defined(QT_NO_STYLE_GTK) if (X11->desktopEnvironment == DE_GNOME) { QIcon gtkIcon = QGtk::getFilesystemIcon(info); diff --git a/src/gui/kernel/qguiplatformplugin.cpp b/src/gui/kernel/qguiplatformplugin.cpp index c48b8f6..6e074a1 100644 --- a/src/gui/kernel/qguiplatformplugin.cpp +++ b/src/gui/kernel/qguiplatformplugin.cpp @@ -41,6 +41,9 @@ #include "qguiplatformplugin_p.h" #include +#include +#include +#include #include "private/qfactoryloader_p.h" #include "qstylefactory.h" #include "qapplication.h" @@ -58,6 +61,7 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp #if defined(Q_WS_X11) #include "qkde_p.h" #include "qt_x11_p.h" +#include #endif @@ -194,8 +198,68 @@ QPalette QGuiPlatformPlugin::palette() return QPalette(); } -/* backend for QIcon::fromTheme. A null icon means it uses the default backend */ -QIcon QGuiPlatformPlugin::loadIcon(const QString &name) +/* the default icon theme name for QIcon::fromTheme. */ +QString QGuiPlatformPlugin::systemIconThemeName() +{ + QString result; +#ifdef Q_WS_X11 + if (X11->desktopEnvironment == DE_GNOME) { + result = QString::fromLatin1("gnome"); +#ifndef QT_NO_STYLE_GTK + result = QGtk::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), result); +#endif + } else if (X11->desktopEnvironment == DE_KDE) { + result = X11->desktopVersion >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg"); + QSettings settings(QKde::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); + settings.beginGroup(QLatin1String("Icons")); + result = settings.value(QLatin1String("Theme"), result).toString(); + } +#endif + return result; +} + + +QStringList QGuiPlatformPlugin::iconThemeSearchPaths() +{ + QStringList paths; +#if defined(Q_WS_X11) + QString xdgDirString = QFile::decodeName(getenv("XDG_DATA_DIRS")); + if (xdgDirString.isEmpty()) + xdgDirString = QLatin1String("/usr/local/share/:/usr/share/"); + + QStringList xdgDirs = xdgDirString.split(QLatin1Char(':')); + + for (int i = 0 ; i < xdgDirs.size() ; ++i) { + QDir dir(xdgDirs[i]); + if (dir.exists()) + paths.append(dir.path() + QLatin1String("/icons")); + } + if (X11->desktopEnvironment == DE_KDE) { + paths << QLatin1Char(':') + QKde::kdeHome() + QLatin1String("/share/icons"); + QStringList kdeDirs = QFile::decodeName(getenv("KDEDIRS")).split(QLatin1Char(':')); + for (int i = 0 ; i< kdeDirs.count() ; ++i) { + QDir dir(QLatin1Char(':') + kdeDirs.at(i) + QLatin1String("/share/icons")); + if (dir.exists()) + paths.append(dir.path()); + } + } + + // Add home directory first in search path + QDir homeDir(QDir::homePath() + QLatin1String("/.icons")); + if (homeDir.exists()) + paths.prepend(homeDir.path()); +#endif + +#if defined(Q_WS_WIN) + paths.append(qApp->applicationDirPath() + QLatin1String("/icons")); +#elif defined(Q_WS_MAC) + paths.append(qApp->applicationDirPath() + QLatin1String("/../Resources/icons")); +#endif + return paths; +} + +/* backend for QFileIconProvider, null icon means default */ +QIcon QGuiPlatformPlugin::fileSystemIcon(const QFileInfo &) { return QIcon(); } diff --git a/src/gui/kernel/qguiplatformplugin_p.h b/src/gui/kernel/qguiplatformplugin_p.h index 57ea8af..f7d4b92 100644 --- a/src/gui/kernel/qguiplatformplugin_p.h +++ b/src/gui/kernel/qguiplatformplugin_p.h @@ -68,6 +68,7 @@ class QPalette; class QIcon; class QFileDialog; class QColorDialog; +class QFileInfo; struct Q_GUI_EXPORT QGuiPlatformPluginInterface : public QFactoryInterface { @@ -89,7 +90,10 @@ class Q_GUI_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPlugi virtual QString styleName(); virtual QPalette palette(); - virtual QIcon loadIcon(const QString &name); + virtual QString systemIconThemeName(); + virtual QStringList iconThemeSearchPaths(); + virtual QIcon fileSystemIcon(const QFileInfo &); + enum PlatformHint { PH_ToolButtonStyle, PH_ToolBarIconSize }; virtual int platformHint(PlatformHint hint); -- cgit v0.12 From 01f0164d71612ba3f03f2e8f58ff6137dc38e4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 7 Oct 2009 12:08:29 +0200 Subject: Documented the NoOpaqueDetection enum value in ImageConversionFlags. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This might be useful for some people, so we should document it. Reviewed-by: Bjørn Erik Nilsen --- src/corelib/global/qnamespace.qdoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index b7775bd..ab232bf 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -713,7 +713,13 @@ \omitvalue Dither_Mask \omitvalue AlphaDither_Mask \omitvalue DitherMode_Mask - \omitvalue NoOpaqueDetection + + \value NoOpaqueDetection Do not check whether the image contains non-opaque + pixels. Use this if you know that the image is semi-transparent and + you want to avoid the overhead of checking the pixels in the image + until a non-opaque pixel is found, or if you want the pixmap to + retain an alpha channel for some other reason. If the image has no + alpha channel this flag has no effect. */ /*! \enum Qt::GUIStyle -- cgit v0.12 From 57209cf902f9d0c9bea5b599b54fa4bdc015d2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 7 Oct 2009 13:37:31 +0200 Subject: Optimized clipping in the GL 2 engine for winding fills. When no stencil clip is set we reduce the number of compositing passes for rendering winding fill paths from four to two. When stencil clip is set, the number of compositing passes is reduced from five to four. For clipping with a winding fill path, the number of compositing passes are reduced from five to four when stencil clipping is already enabled. A performance improvement of up to 85 % was measured in certain cases. Reviewed-by: Trond --- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 69 +++++++++++++--------- .../gl2paintengineex/qpaintengineex_opengl2_p.h | 1 + 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 5875124..b3638ff 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -391,7 +391,6 @@ void QGL2PaintEngineExPrivate::setBrush(const QBrush* brush) } -// Unless this gets used elsewhere, it's probably best to merge it into fillStencilWithVertexArray void QGL2PaintEngineExPrivate::useSimpleShader() { shaderManager->simpleProgram()->enable(); @@ -891,16 +890,26 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill()); - // Stencil the brush onto the dest buffer - glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT, GL_STENCIL_HIGH_BIT); // Pass if stencil buff value != 0 - glStencilOp(GL_KEEP, GL_ZERO, GL_ZERO); - glStencilMask(GL_STENCIL_HIGH_BIT); + glStencilMask(0xff); + glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); + + if (q->state()->clipTestEnabled) { + // Pass when high bit is set, replace stencil value with current clip + glStencilFunc(GL_NOTEQUAL, q->state()->currentClip, GL_STENCIL_HIGH_BIT); + } else if (path.hasWindingFill()) { + // Pass when any bit is set, replace stencil value with 0 + glStencilFunc(GL_NOTEQUAL, 0, 0xff); + } else { + // Pass when high bit is set, replace stencil value with 0 + glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT); + } prepareForDraw(currentBrush->isOpaque()); if (inRenderText) prepareDepthRangeForRenderText(); + // Stencil the brush onto the dest buffer composite(vertexCoordinateArray.boundingRect()); if (inRenderText) @@ -916,7 +925,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) void QGL2PaintEngineExPrivate::fillStencilWithVertexArray(QGL2PEXVertexArray& vertexArray, bool useWindingFill) { // qDebug("QGL2PaintEngineExPrivate::fillStencilWithVertexArray()"); - glStencilMask(0xffff); // Enable stencil writes + glStencilMask(0xff); // Enable stencil writes if (dirtyStencilRegion.intersects(currentScissorBounds)) { QVector clearRegion = dirtyStencilRegion.intersected(currentScissorBounds).rects(); @@ -948,39 +957,30 @@ void QGL2PaintEngineExPrivate::fillStencilWithVertexArray(QGL2PEXVertexArray& ve if (useWindingFill) { if (q->state()->clipTestEnabled) { + // Flatten clip values higher than current clip, and set high bit to match current clip glStencilFunc(GL_LEQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); composite(vertexArray.boundingRect()); glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT, GL_STENCIL_HIGH_BIT); - } else { - glStencilFunc(GL_ALWAYS, 0, 0xffff); + } else if (!stencilClean) { + // Clear stencil buffer within bounding rect + glStencilFunc(GL_ALWAYS, 0, 0xff); glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO); composite(vertexArray.boundingRect()); } // Inc. for front-facing triangle glStencilOpSeparate(GL_FRONT, GL_KEEP, GL_INCR_WRAP, GL_INCR_WRAP); - //Dec. for back-facing "holes" + // Dec. for back-facing "holes" glStencilOpSeparate(GL_BACK, GL_KEEP, GL_DECR_WRAP, GL_DECR_WRAP); glStencilMask(~GL_STENCIL_HIGH_BIT); drawVertexArrays(vertexArray, GL_TRIANGLE_FAN); if (q->state()->clipTestEnabled) { - // clear high bit of stencil outside of path - glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); - glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); - glStencilMask(GL_STENCIL_HIGH_BIT); - composite(vertexArray.boundingRect()); - // reset lower bits of stencil inside path to current clip - glStencilFunc(GL_EQUAL, GL_STENCIL_HIGH_BIT | q->state()->currentClip, GL_STENCIL_HIGH_BIT); + // Clear high bit of stencil outside of path + glStencilFunc(GL_EQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); - glStencilMask(~GL_STENCIL_HIGH_BIT); - composite(vertexArray.boundingRect()); - } else { - // set high bit of stencil inside path - glStencilFunc(GL_NOTEQUAL, 0, 0xffff); - glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); glStencilMask(GL_STENCIL_HIGH_BIT); composite(vertexArray.boundingRect()); } @@ -1020,7 +1020,7 @@ void QGL2PaintEngineExPrivate::resetClipIfNeeded() QGLRect rect(bounds.left(), bounds.top(), bounds.right(), bounds.bottom()); // Set high bit on clip region - glStencilFunc(GL_LEQUAL, q->state()->currentClip, 0xffff); + glStencilFunc(GL_LEQUAL, q->state()->currentClip, 0xff); glStencilOp(GL_KEEP, GL_INVERT, GL_INVERT); glStencilMask(GL_STENCIL_HIGH_BIT); composite(rect); @@ -1028,7 +1028,7 @@ void QGL2PaintEngineExPrivate::resetClipIfNeeded() // Reset clipping to 1 and everything else to zero glStencilFunc(GL_NOTEQUAL, 0x01, GL_STENCIL_HIGH_BIT); glStencilOp(GL_ZERO, GL_REPLACE, GL_REPLACE); - glStencilMask(0xFFFF); + glStencilMask(0xff); composite(rect); q->state()->currentClip = 1; @@ -1636,6 +1636,7 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) d->use_system_clip = !systemClip().isEmpty(); d->dirtyStencilRegion = QRect(0, 0, d->width, d->height); + d->stencilClean = true; // Calling begin paint should make the correct context current. So, any // code which calls into GL or otherwise needs a current context *must* @@ -1731,7 +1732,7 @@ void QGL2PaintEngineExPrivate::updateClipScissorTest() glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); } else { glDisable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 0, 0xffff); + glStencilFunc(GL_ALWAYS, 0, 0xff); } #ifdef QT_GL_NO_SCISSOR_TEST @@ -1787,7 +1788,7 @@ void QGL2PaintEngineExPrivate::clearClip(uint value) { dirtyStencilRegion -= currentScissorBounds; - glStencilMask(0xffff); + glStencilMask(0xff); glClearStencil(value); glClear(GL_STENCIL_BUFFER_BIT); glStencilMask(0x0); @@ -1802,6 +1803,8 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) if (matrixDirty) updateMatrix(); + stencilClean = false; + const bool singlePass = !path.hasWindingFill() && (((q->state()->currentClip == maxClip - 1) && q->state()->clipTestEnabled) || q->state()->needsClipBufferClear); @@ -1819,7 +1822,7 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) if (q->state()->clipTestEnabled) glStencilFunc(GL_LEQUAL, q->state()->currentClip, ~GL_STENCIL_HIGH_BIT); else - glStencilFunc(GL_ALWAYS, 0, 0xffff); + glStencilFunc(GL_ALWAYS, 0, 0xff); vertexCoordinateArray.clear(); vertexCoordinateArray.addPath(path, inverseScale); @@ -1841,9 +1844,17 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); } else { - glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); - glStencilMask(0xffff); + glStencilMask(0xff); + + if (!q->state()->clipTestEnabled && path.hasWindingFill()) { + // Pass when any clip bit is set, set high bit + glStencilFunc(GL_NOTEQUAL, GL_STENCIL_HIGH_BIT, ~GL_STENCIL_HIGH_BIT); + composite(vertexCoordinateArray.boundingRect()); + } + + // Pass when high bit is set, replace stencil value with new clip value + glStencilFunc(GL_NOTEQUAL, value, GL_STENCIL_HIGH_BIT); composite(vertexCoordinateArray.boundingRect()); } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 28c972e..46be398 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -223,6 +223,7 @@ public: bool shaderMatrixUniformDirty; bool opacityUniformDirty; + bool stencilClean; // Has the stencil not been used for clipping so far? QRegion dirtyStencilRegion; QRect currentScissorBounds; uint maxClip; -- cgit v0.12 From 14a8f1fb7414885cc3868b1d27699b5a0d59e7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 7 Oct 2009 14:59:34 +0200 Subject: Optimized rasterizing of paths using stencil method in GL 2 engine. Making the triangle fan of each sub path start at the sub path's centroid will on average improve performance for complex paths, because less pixels that are outside the path need to be touched. The centroid is a more balanced choice than just picking the first element of the sub path as triangle fan origin. A performance improvement of 20 % was measured for star formed paths. Reviewed-by: Trond --- src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp | 37 +++++++++++++++++++++- src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 5 ++- .../gl2paintengineex/qpaintengineex_opengl2.cpp | 6 ++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index 866d1a2..1fe3999 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -67,7 +67,30 @@ void QGL2PEXVertexArray::addRect(const QRectF &rect) << rect.bottomRight() << rect.bottomLeft() << rect.topLeft(); } -void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseScale) +void QGL2PEXVertexArray::addClosingLine(int index) +{ + if (QPointF(vertexArray.at(index)) != QPointF(vertexArray.last())) + vertexArray.add(vertexArray.at(index)); +} + +void QGL2PEXVertexArray::addCentroid(const QVectorPath &path, int subPathIndex) +{ + const QPointF *const points = reinterpret_cast(path.points()); + const QPainterPath::ElementType *const elements = path.elements(); + + QPointF sum = points[subPathIndex]; + int count = 1; + + for (int i = subPathIndex + 1; i < path.elementCount() && (!elements || elements[i] != QPainterPath::MoveToElement); ++i) { + sum += points[i]; + ++count; + } + + const QPointF centroid = sum / qreal(count); + vertexArray.add(centroid); +} + +void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline) { const QPointF* const points = reinterpret_cast(path.points()); const QPainterPath::ElementType* const elements = path.elements(); @@ -78,6 +101,10 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc boundingRectDirty = false; } + if (!outline) + addCentroid(path, 0); + + int lastMoveTo = vertexArray.size(); vertexArray.add(points[0]); // The first element is always a moveTo do { @@ -96,8 +123,14 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc const QPainterPath::ElementType elementType = elements[i]; switch (elementType) { case QPainterPath::MoveToElement: + if (!outline) + addClosingLine(lastMoveTo); // qDebug("element[%d] is a MoveToElement", i); vertexArrayStops.append(vertexArray.size()); + if (!outline) { + addCentroid(path, i); + lastMoveTo = vertexArray.size(); + } lineToArray(points[i].x(), points[i].y()); // Add the moveTo as a new vertex break; case QPainterPath::LineToElement: @@ -115,6 +148,8 @@ void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseSc } } while (0); + if (!outline) + addClosingLine(lastMoveTo); vertexArrayStops.append(vertexArray.size()); } diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h index 08ce234..719904f 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h @@ -104,7 +104,7 @@ public: boundingRectDirty(true) {} void addRect(const QRectF &rect); - void addPath(const QVectorPath &path, GLfloat curveInverseScale); + void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline = true); void clear(); QGLPoint* data() {return vertexArray.data();} @@ -124,6 +124,9 @@ private: bool boundingRectDirty; inline void curveToArray(const QGLPoint &cp1, const QGLPoint &cp2, const QGLPoint &ep, GLfloat inverseScale); + + void addClosingLine(int index); + void addCentroid(const QVectorPath &path, int subPathIndex); }; QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index b3638ff..ab02c69 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -880,13 +880,13 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) || path.shape() == QVectorPath::ConvexPolygonHint) { vertexCoordinateArray.clear(); - vertexCoordinateArray.addPath(path, inverseScale); + vertexCoordinateArray.addPath(path, inverseScale, false); prepareForDraw(currentBrush->isOpaque()); drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); } else { // The path is too complicated & needs the stencil technique vertexCoordinateArray.clear(); - vertexCoordinateArray.addPath(path, inverseScale); + vertexCoordinateArray.addPath(path, inverseScale, false); fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill()); @@ -1825,7 +1825,7 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint value) glStencilFunc(GL_ALWAYS, 0, 0xff); vertexCoordinateArray.clear(); - vertexCoordinateArray.addPath(path, inverseScale); + vertexCoordinateArray.addPath(path, inverseScale, false); if (!singlePass) fillStencilWithVertexArray(vertexCoordinateArray, path.hasWindingFill()); -- cgit v0.12 From df5cdc6d9a22ae11d607e9359a3bb9a80596fdb6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 7 Oct 2009 18:16:15 +0200 Subject: QDesktopServices compile fix for Windows CE There's no CSIDL_LOCAL_APPDATA on Windows CE. Use CSIDL_APPDATA instead. Reviewed-by: TrustMe --- src/gui/util/qdesktopservices_win.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp index bf29870..4ecef97 100644 --- a/src/gui/util/qdesktopservices_win.cpp +++ b/src/gui/util/qdesktopservices_win.cpp @@ -186,7 +186,11 @@ QString QDesktopServices::storageLocation(StandardLocation type) switch (type) { case DataLocation: +#if defined Q_WS_WINCE + if (SHGetSpecialFolderPath(0, path, CSIDL_APPDATA, FALSE)) +#else if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE)) +#endif result = QString::fromWCharArray(path); if (!QCoreApplication::organizationName().isEmpty()) result = result + QLatin1String("\\") + QCoreApplication::organizationName(); -- cgit v0.12 From 2dd5facac01df4a90fbf9b7ce666704fddaf9e4f Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 7 Oct 2009 12:56:50 +0200 Subject: Inline QScriptValuePrivate operator new and delete Make allocation faster. --- src/script/api/qscriptengine_p.h | 16 ++++++++++++++++ src/script/api/qscriptvalue.cpp | 16 ---------------- src/script/api/qscriptvalue_p.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 5f31054..f1fc135 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -468,6 +468,22 @@ inline QScriptValue QScriptValuePrivate::property(const QString &name, int resol return property(JSC::Identifier(exec, name), resolveMode); } +inline void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine) +{ + if (engine) + return engine->allocateScriptValuePrivate(size); + return qMalloc(size); +} + +inline void QScriptValuePrivate::operator delete(void *ptr) +{ + QScriptValuePrivate *d = reinterpret_cast(ptr); + if (d->engine) + d->engine->freeScriptValuePrivate(d); + else + qFree(d); +} + inline void QScriptEnginePrivate::registerScriptString(QScriptStringPrivate *value) { Q_ASSERT(value->type == QScriptStringPrivate::HeapAllocated); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 92c987c..1c668a9 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -466,22 +466,6 @@ void QScriptValuePrivate::detachFromEngine() engine = 0; } -void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine) -{ - if (engine) - return engine->allocateScriptValuePrivate(size); - return qMalloc(size); -} - -void QScriptValuePrivate::operator delete(void *ptr) -{ - QScriptValuePrivate *d = reinterpret_cast(ptr); - if (d->engine) - d->engine->freeScriptValuePrivate(d); - else - qFree(d); -} - /*! \internal */ diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 6cbda97..351d616 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -68,8 +68,8 @@ class QScriptValuePrivate { Q_DISABLE_COPY(QScriptValuePrivate); public: - void* operator new(size_t, QScriptEnginePrivate*); - void operator delete(void*); + inline void* operator new(size_t, QScriptEnginePrivate*); + inline void operator delete(void*); enum Type { JavaScriptCore, -- cgit v0.12 From eb10655a9e94d0953d5f43815750fe128b862051 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 7 Oct 2009 16:31:09 +0200 Subject: Use JSC::asObject() when we know that the value is an object It's faster than calling getObject(), since getObject() will do type checking of the value. --- src/script/api/qscriptvalue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 1c668a9..b8340a7 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -280,7 +280,7 @@ QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolv { Q_ASSERT(isObject()); JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = jscValue.getObject(); + JSC::JSObject *object = JSC::asObject(jscValue); JSC::PropertySlot slot(const_cast(object)); JSC::JSValue result; if (const_cast(object)->getOwnPropertySlot(exec, id, slot)) { @@ -303,7 +303,7 @@ QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const { Q_ASSERT(isObject()); JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = jscValue.getObject(); + JSC::JSObject *object = JSC::asObject(jscValue); JSC::PropertySlot slot(const_cast(object)); JSC::JSValue result; if (const_cast(object)->getOwnPropertySlot(exec, index, slot)) { -- cgit v0.12 From f48432eb47eb37aa362e4da44888b718cdb3a841 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 7 Oct 2009 18:29:18 +0200 Subject: Revert "Fix linker error with Symbian/ARM RVCT ABIv2 toolchain" This reverts commit 342fcb287b09d016d482e25482ddd1b36e2983a3. Didn't work on all compilers --- src/3rdparty/phonon/phonon/objectdescriptionmodel.h | 16 ++++++++++++---- src/s60installs/eabi/phononu.def | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h index 9af2615..ba3cb42 100644 --- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h +++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h @@ -175,18 +175,26 @@ namespace Phonon * \author Matthias Kretz */ template - class PHONON_EXPORT ObjectDescriptionModel : public QAbstractListModel + class ObjectDescriptionModel : public QAbstractListModel { public: Q_OBJECT_CHECK +/* MinGW 3.4.x gives an ICE when trying to instantiate one of the + ObjectDescriptionModel classes because it can't handle + half exported classes correct. gcc 4.3.x has a fix for this but + we currently there's no official gcc 4.3 on windows available. + Because of this we need this little hack + */ +#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4 /** \internal */ - static const QMetaObject staticMetaObject; + static PHONON_EXPORT const QMetaObject staticMetaObject; /** \internal */ - const QMetaObject *metaObject() const; + PHONON_EXPORT const QMetaObject *metaObject() const; /** \internal */ - void *qt_metacast(const char *_clname); + PHONON_EXPORT void *qt_metacast(const char *_clname); //int qt_metacall(QMetaObject::Call _c, int _id, void **_a); +#endif /** * Returns the number of rows in the model. This value corresponds diff --git a/src/s60installs/eabi/phononu.def b/src/s60installs/eabi/phononu.def index d70942c..d407ba4 100644 --- a/src/s60installs/eabi/phononu.def +++ b/src/s60installs/eabi/phononu.def @@ -495,11 +495,11 @@ EXPORTS _ZTIN6Phonon19AbstractVideoOutputE @ 494 NONAME _ZTIN6Phonon19BackendCapabilities8NotifierE @ 495 NONAME ABSENT _ZTIN6Phonon22MediaControllerPrivateE @ 496 NONAME ABSENT - _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 497 NONAME - _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 498 NONAME - _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 499 NONAME - _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 500 NONAME - _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 501 NONAME + _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 497 NONAME ABSENT + _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 498 NONAME ABSENT + _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 499 NONAME ABSENT + _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 500 NONAME ABSENT + _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 501 NONAME ABSENT _ZTIN6Phonon24VolumeFaderEffectPrivateE @ 502 NONAME ABSENT _ZTIN6Phonon26AbstractAudioOutputPrivateE @ 503 NONAME ABSENT _ZTIN6Phonon26AbstractMediaStreamPrivateE @ 504 NONAME @@ -532,11 +532,11 @@ EXPORTS _ZTVN6Phonon19AbstractVideoOutputE @ 531 NONAME _ZTVN6Phonon19BackendCapabilities8NotifierE @ 532 NONAME ABSENT _ZTVN6Phonon22MediaControllerPrivateE @ 533 NONAME ABSENT - _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 534 NONAME - _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 535 NONAME - _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 536 NONAME - _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 537 NONAME - _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 538 NONAME + _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 534 NONAME ABSENT + _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 535 NONAME ABSENT + _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 536 NONAME ABSENT + _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 537 NONAME ABSENT + _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 538 NONAME ABSENT _ZTVN6Phonon24VolumeFaderEffectPrivateE @ 539 NONAME ABSENT _ZTVN6Phonon26AbstractAudioOutputPrivateE @ 540 NONAME ABSENT _ZTVN6Phonon26AbstractMediaStreamPrivateE @ 541 NONAME -- cgit v0.12 From f85ad9872913887d0e12033517ddc989dec68005 Mon Sep 17 00:00:00 2001 From: Iain Date: Wed, 7 Oct 2009 23:28:24 +0200 Subject: Updates to EABI DEF files for Symbian OS Reviewed-by: TrustMe --- src/s60installs/eabi/QtGuiu.def | 38 ++++++++++++++++++++++++++++++++++++-- src/s60installs/eabi/QtScriptu.def | 1 + 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 581d3bc..09ea6ab 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -10640,7 +10640,7 @@ EXPORTS _ZTI17QTextFramePrivate @ 10639 NONAME ABSENT _ZTI17QTextImageHandler @ 10640 NONAME ABSENT _ZTI17QTextTablePrivate @ 10641 NONAME ABSENT - _ZTI17QToolBarExtension @ 10642 NONAME ABSENT + _ZTI17QToolBarExtension @ 10642 NONAME _ZTI17QToolBarSeparator @ 10643 NONAME ABSENT _ZTI17QUpdateLaterEvent @ 10644 NONAME ABSENT _ZTI17QWhatsThisPrivate @ 10645 NONAME ABSENT @@ -11051,7 +11051,7 @@ EXPORTS _ZTV17QTextFramePrivate @ 11050 NONAME ABSENT _ZTV17QTextImageHandler @ 11051 NONAME ABSENT _ZTV17QTextTablePrivate @ 11052 NONAME ABSENT - _ZTV17QToolBarExtension @ 11053 NONAME ABSENT + _ZTV17QToolBarExtension @ 11053 NONAME _ZTV17QToolBarSeparator @ 11054 NONAME ABSENT _ZTV17QUpdateLaterEvent @ 11055 NONAME ABSENT _ZTV17QWhatsThisPrivate @ 11056 NONAME ABSENT @@ -13102,4 +13102,38 @@ EXPORTS _ZTI28QGraphicsAnchorLayoutPrivate @ 13101 NONAME _ZTV20QGraphicsBloomEffect @ 13102 NONAME _ZTV28QGraphicsAnchorLayoutPrivate @ 13103 NONAME + _ZN17QToolBarExtension10paintEventEP11QPaintEvent @ 13104 NONAME + _ZN17QToolBarExtension11qt_metacallEN11QMetaObject4CallEiPPv @ 13105 NONAME + _ZN17QToolBarExtension11qt_metacastEPKc @ 13106 NONAME + _ZN17QToolBarExtension14setOrientationEN2Qt11OrientationE @ 13107 NONAME + _ZN17QToolBarExtension16staticMetaObjectE @ 13108 NONAME DATA 16 + _ZN17QToolBarExtension19getStaticMetaObjectEv @ 13109 NONAME + _ZN17QToolBarExtensionC1EP7QWidget @ 13110 NONAME + _ZN17QToolBarExtensionC2EP7QWidget @ 13111 NONAME + _ZN18QGuiPlatformPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 13112 NONAME + _ZN18QGuiPlatformPlugin11qt_metacastEPKc @ 13113 NONAME + _ZN18QGuiPlatformPlugin12platformHintENS_12PlatformHintE @ 13114 NONAME + _ZN18QGuiPlatformPlugin14fileSystemIconERK9QFileInfo @ 13115 NONAME + _ZN18QGuiPlatformPlugin16staticMetaObjectE @ 13116 NONAME DATA 16 + _ZN18QGuiPlatformPlugin19getStaticMetaObjectEv @ 13117 NONAME + _ZN18QGuiPlatformPlugin19systemIconThemeNameEv @ 13118 NONAME + _ZN18QGuiPlatformPlugin20iconThemeSearchPathsEv @ 13119 NONAME + _ZN18QGuiPlatformPlugin7paletteEv @ 13120 NONAME + _ZN18QGuiPlatformPlugin9styleNameEv @ 13121 NONAME + _ZN18QGuiPlatformPluginC1EP7QObject @ 13122 NONAME + _ZN18QGuiPlatformPluginC2EP7QObject @ 13123 NONAME + _ZN18QGuiPlatformPluginD0Ev @ 13124 NONAME + _ZN18QGuiPlatformPluginD1Ev @ 13125 NONAME + _ZN18QGuiPlatformPluginD2Ev @ 13126 NONAME + _ZN28QGraphicsAnchorLayoutPrivate14solveExpandingE5QListIP18QSimplexConstraintE @ 13127 NONAME + _ZN28QGraphicsAnchorLayoutPrivate21identifyNonFloatItemsE4QSetIP10AnchorDataENS_11OrientationE @ 13128 NONAME + _ZN28QGraphicsAnchorLayoutPrivate28identifyNonFloatItems_helperEPK10AnchorDataNS_11OrientationE @ 13129 NONAME + _ZNK17QToolBarExtension10metaObjectEv @ 13130 NONAME + _ZNK17QToolBarExtension8sizeHintEv @ 13131 NONAME + _ZNK18QGuiPlatformPlugin10metaObjectEv @ 13132 NONAME + _ZTI18QGuiPlatformPlugin @ 13133 NONAME + _ZTI27QGuiPlatformPluginInterface @ 13134 NONAME + _ZTV18QGuiPlatformPlugin @ 13135 NONAME + _ZThn8_N18QGuiPlatformPluginD0Ev @ 13136 NONAME + _ZThn8_N18QGuiPlatformPluginD1Ev @ 13137 NONAME diff --git a/src/s60installs/eabi/QtScriptu.def b/src/s60installs/eabi/QtScriptu.def index cca0a2a..1205c04 100644 --- a/src/s60installs/eabi/QtScriptu.def +++ b/src/s60installs/eabi/QtScriptu.def @@ -600,4 +600,5 @@ EXPORTS _ZN25QScriptEngineAgentPrivate18didReachBreakpointERKN5QTJSC17DebuggerCallFrameEiii @ 599 NONAME _ZN25QScriptEngineAgentPrivate6attachEv @ 600 NONAME _ZN25QScriptEngineAgentPrivate6detachEv @ 601 NONAME + _Z5qHashRK13QScriptString @ 602 NONAME -- cgit v0.12 From c3cfba7295c990d8135e1dd70b8cdbefd25615ab Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 8 Oct 2009 14:02:09 +1000 Subject: Stub out flush() in the PowerVR GL window surface class When QGLWidget was used as a viewport for QGraphicsView on PowerVR/MBX systems, it was double-flushing every frame because the window surface flush() implementation was still trying to do a raster blit after painting. This change suppresses the raster blit, leaving it up to the GL swapBuffers() call to get the painted contents onto the screen. Reviewed-by: Sarah Smith --- .../powervr/pvreglscreen/pvreglwindowsurface.cpp | 21 +++++++++++++-------- .../powervr/pvreglscreen/pvreglwindowsurface.h | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp index afee77e..09c0ace 100644 --- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp +++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp @@ -149,6 +149,18 @@ void PvrEglWindowSurface::setPermanentState(const QByteArray &state) Q_UNUSED(state); } +void PvrEglWindowSurface::flush + (QWidget *widget, const QRegion ®ion, const QPoint &offset) +{ + // The GL paint engine is responsible for the swapBuffers() call. + // If we were to call the base class's implementation of flush() + // then it would fetch the image() and manually blit it to the + // screeen instead of using the fast PVR2D blit. + Q_UNUSED(widget); + Q_UNUSED(region); + Q_UNUSED(offset); +} + QImage PvrEglWindowSurface::image() const { if (drawable) { @@ -165,14 +177,7 @@ QImage PvrEglWindowSurface::image() const QPaintDevice *PvrEglWindowSurface::paintDevice() { - QGLWidget *glWidget = qobject_cast(window()); - if (glWidget) - return glWidget; - - // Should be a QGLWidget, but if not return a dummy paint device. - if (!pdevice) - pdevice = new QImage(50, 50, screen->pixelFormat()); - return pdevice; + return widget; } void PvrEglWindowSurface::setDirectRegion(const QRegion &r, int id) diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h index 80fc8f8..0da3653 100644 --- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h +++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h @@ -65,6 +65,8 @@ public: QByteArray permanentState() const; void setPermanentState(const QByteArray &state); + void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset); + QImage image() const; QPaintDevice *paintDevice(); -- cgit v0.12 From 4a99901283d44be4aaa5a5c221435099c8c8849c Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 8 Oct 2009 09:06:01 +0300 Subject: Fix "Warning: #381-D: extra ";" ignored" reported by RVCT Reviewed-by: TrustMe --- src/script/api/qscriptvalue_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 351d616..77b5084 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -66,7 +66,7 @@ class QScriptEnginePrivate; class QScriptValue; class QScriptValuePrivate { - Q_DISABLE_COPY(QScriptValuePrivate); + Q_DISABLE_COPY(QScriptValuePrivate) public: inline void* operator new(size_t, QScriptEnginePrivate*); inline void operator delete(void*); -- cgit v0.12 From 8826cc56e2989964d56ca9952e6ab639f1652cfd Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 8 Oct 2009 09:23:46 +0300 Subject: Fix qsound autotest build break in Symbian. Reviewed-by: TrustMe --- tests/auto/qsound/qsound.pro | 2 +- tests/auto/qsound/tst_qsound.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/auto/qsound/qsound.pro b/tests/auto/qsound/qsound.pro index c48d50d..383a085 100644 --- a/tests/auto/qsound/qsound.pro +++ b/tests/auto/qsound/qsound.pro @@ -4,7 +4,7 @@ SOURCES += tst_qsound.cpp wince*|symbian*: { deploy.sources += 4.wav DEPLOYMENT = deploy - DEFINES += SRCDIR=\\\"\\\" + !symbian:DEFINES += SRCDIR=\\\"\\\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qsound/tst_qsound.cpp b/tests/auto/qsound/tst_qsound.cpp index dd5f2ce..fdbf6a2 100644 --- a/tests/auto/qsound/tst_qsound.cpp +++ b/tests/auto/qsound/tst_qsound.cpp @@ -43,6 +43,10 @@ #include #include +#if defined(Q_OS_SYMBIAN) +#define SRCDIR "" +#endif + class tst_QSound : public QObject { Q_OBJECT -- cgit v0.12 From f831c60a7ae82511f9a42c1596fe7ad3fe09b97f Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 8 Oct 2009 09:29:19 +0300 Subject: Fix for "Braces mismatch \tests\auto\qsqlrecord\qsqlrecord.pro:16" Reviewed-by: Miikka Heikkinen --- tests/auto/qsqlrecord/qsqlrecord.pro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/qsqlrecord/qsqlrecord.pro b/tests/auto/qsqlrecord/qsqlrecord.pro index 7a72075..39a800e 100644 --- a/tests/auto/qsqlrecord/qsqlrecord.pro +++ b/tests/auto/qsqlrecord/qsqlrecord.pro @@ -9,11 +9,11 @@ symbian { DEPLOYMENT += sqlite } } + + TARGET.EPOCSTACKSIZE=50000 + TARGET.EPOCHEAPSIZE=50000 5000000 } -TARGET.EPOCSTACKSIZE=50000 -TARGET.EPOCHEAPSIZE=50000 5000000 -} QT += sql -- cgit v0.12 From 0c64fc77e95180171fc46d89d08bea3f2efc6bcc Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 8 Oct 2009 09:32:52 +0300 Subject: Fix for qfiledialog autotest build break in Symbian. The error was: "*** No rule to make target `\Qt\tests\auto\kernel\ qguiplatformplugin_p.h_, needed by ..." This happens since Symbian does not use same include semantics. Reviewed-by: Miikka Heikkinen --- src/gui/dialogs/qfiledialog_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h index 44289d9..32cd397 100644 --- a/src/gui/dialogs/qfiledialog_p.h +++ b/src/gui/dialogs/qfiledialog_p.h @@ -76,7 +76,7 @@ #include #include "qsidebar_p.h" #include "qfscompleter_p.h" -#include "../kernel/qguiplatformplugin_p.h" +#include "private/qguiplatformplugin_p.h" #if defined (Q_OS_UNIX) -- cgit v0.12 From c15b370c9db16fdbfd9e7bec89ee9bf8c1110827 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 8 Oct 2009 09:15:20 +0200 Subject: Ensure that qmake doesn't lose the error code when processing subdirs When processing a project in a subdirs template failed for whatever reason then qmake would lose the result of that and would return an error code of 0 if the subdirs project file itself was processed fine. So now it ensures that any errors arising from processing a project referenced in a subdirs project file are not lost so that the error code returned from qmake will indicate an error actually occured. Task-number: QTBUG-4065 Reviewed-by: mariusSO --- qmake/generators/metamakefile.cpp | 14 ++++++++------ qmake/generators/metamakefile.h | 2 +- qmake/main.cpp | 5 ++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 69dd627..3acb2dd 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -291,7 +291,7 @@ SubdirsMetaMakefileGenerator::init() if(init_flag) return false; init_flag = true; - + bool hasError = false; if(Option::recursive) { QString old_output_dir = Option::output_dir; QString old_output = Option::output.fileName(); @@ -336,7 +336,7 @@ SubdirsMetaMakefileGenerator::init() } qmake_setpwd(sub->input_dir); Option::output_dir = sub->output_dir; - sub_proj->read(subdir.fileName()); + hasError |= !sub_proj->read(subdir.fileName()); if(!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { fprintf(stderr, "Project file(%s) not recursed because all requirements not met:\n\t%s\n", subdir.fileName().toLatin1().constData(), @@ -351,7 +351,7 @@ SubdirsMetaMakefileGenerator::init() } else { const QString output_name = Option::output.fileName(); Option::output.setFileName(sub->output_file); - sub->makefile->write(sub->output_dir); + hasError |= !sub->makefile->write(sub->output_dir); delete sub; qmakeClearCaches(); sub = 0; @@ -376,7 +376,7 @@ SubdirsMetaMakefileGenerator::init() self->makefile->init(); subs.append(self); - return true; + return !hasError; } bool @@ -745,7 +745,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) } MetaMakefileGenerator * -MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op) +MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op, bool *success) { MetaMakefileGenerator *ret = 0; if ((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || @@ -758,7 +758,9 @@ MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &na } if (!ret) ret = new BuildsMetaMakefileGenerator(proj, name, op); - ret->init(); + bool res = ret->init(); + if (success) + *success = res; return ret; } diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h index e69304a..f74f4a2 100644 --- a/qmake/generators/metamakefile.h +++ b/qmake/generators/metamakefile.h @@ -62,7 +62,7 @@ public: virtual ~MetaMakefileGenerator(); - static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true); + static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true, bool *success = 0); static MakefileGenerator *createMakefileGenerator(QMakeProject *proj, bool noIO = false); inline QMakeProject *projectFile() const { return project; } diff --git a/qmake/main.cpp b/qmake/main.cpp index 73fdda9..8117a4c 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -168,7 +168,10 @@ int runQMake(int argc, char **argv) continue; } - MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false); + bool success = true; + MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false, &success); + if (!success) + exit_val = 3; if(mkfile && !mkfile->write(oldpwd)) { if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) fprintf(stderr, "Unable to generate project file.\n"); -- cgit v0.12 From 0f290238385f3e272e2b8afcb89a7b64764d72be Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 8 Oct 2009 09:29:41 +0200 Subject: Fix Qt Designer startup warnings about Qt::DropAction properties Add Q_ENUMS/Q_FLAGS accordingly. Reviewed-by: Olivier Goffart --- src/corelib/global/qnamespace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 9d76dcc..4234a7e 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -71,8 +71,8 @@ Qt { Q_ENUMS(ArrowType ToolButtonStyle PenStyle PenCapStyle PenJoinStyle BrushStyle) Q_ENUMS(FillRule MaskMode BGMode ClipOperation SizeMode) Q_ENUMS(BackgroundMode) // Qt3 - Q_ENUMS(Axis Corner LayoutDirection SizeHint Orientation) - Q_FLAGS(Alignment Orientations) + Q_ENUMS(Axis Corner LayoutDirection SizeHint Orientation DropAction) + Q_FLAGS(Alignment Orientations DropActions) Q_FLAGS(DockWidgetAreas ToolBarAreas) Q_ENUMS(DockWidgetArea ToolBarArea) Q_ENUMS(TextFormat) -- cgit v0.12 From 902ee9839bf6d03f5e1ff3f45fb1251d50d752be Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 8 Oct 2009 10:02:03 +0200 Subject: Let the platform plugin decide on the click policy on itemview Reviewed-by: Jens Bache-Wiig --- src/gui/kernel/qguiplatformplugin_p.h | 2 +- src/gui/styles/qcommonstyle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qguiplatformplugin_p.h b/src/gui/kernel/qguiplatformplugin_p.h index f7d4b92..2a70ee7 100644 --- a/src/gui/kernel/qguiplatformplugin_p.h +++ b/src/gui/kernel/qguiplatformplugin_p.h @@ -94,7 +94,7 @@ class Q_GUI_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPlugi virtual QStringList iconThemeSearchPaths(); virtual QIcon fileSystemIcon(const QFileInfo &); - enum PlatformHint { PH_ToolButtonStyle, PH_ToolBarIconSize }; + enum PlatformHint { PH_ToolButtonStyle, PH_ToolBarIconSize, PH_ItemView_ActivateItemOnSingleClick }; virtual int platformHint(PlatformHint hint); diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 612258a..5886512 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -5058,7 +5058,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget break; case SH_ItemView_ActivateItemOnSingleClick: - ret = false; + ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ItemView_ActivateItemOnSingleClick); break; case SH_TitleBar_ModifyNotification: -- cgit v0.12 From c851e1e6cd481e69585fab16c384ec5ab7cc7900 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 8 Oct 2009 10:05:43 +0200 Subject: Remove handling of arrow key on QDialog This code was kind of dead anyway because - On X11 and Windows, most of the widgets have the StrongFocus FocusPolicy - On Mac, e->modifiers always contains KeypadModifier for arrows, so the code is never reached on mac with real applications Morever, QAbstractButton already have a more complex handling of arrow keys. And the code breaks the QButtonGroup arrowKeyNavigation test on Mac (as when the test system simulates events, the KeyPadModifier is not set) Reviewed-by: mbm Reviewed-by: Paul --- src/gui/dialogs/qdialog.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 7df49fa..ed2d676 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -673,28 +673,6 @@ void QDialog::keyPressEvent(QKeyEvent *e) case Qt::Key_Escape: reject(); break; - case Qt::Key_Up: - case Qt::Key_Left: - if (focusWidget() && - (focusWidget()->focusPolicy() == Qt::StrongFocus || - focusWidget()->focusPolicy() == Qt::WheelFocus)) { - e->ignore(); - break; - } - // call ours, since c++ blocks us from calling the one - // belonging to focusWidget(). - focusNextPrevChild(false); - break; - case Qt::Key_Down: - case Qt::Key_Right: - if (focusWidget() && - (focusWidget()->focusPolicy() == Qt::StrongFocus || - focusWidget()->focusPolicy() == Qt::WheelFocus)) { - e->ignore(); - break; - } - focusNextPrevChild(true); - break; default: e->ignore(); return; -- cgit v0.12 From cdf2e8162939257c6c715659db58854457f2811f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Thu, 8 Oct 2009 12:19:35 +0300 Subject: DialogButtonBox is shown together with softkeys (QTBUG-4739) This fixes issue that both DialogButtonBox and softkeys are visible (e.g. in Ftp example) at the same time. Reason is that the previous implementation did the visiblitity setting when buttons were created. Unfortunately buttons can be created without parent and let layout manager to find parent them for you - so dialog as parent (=hide dialogbuttonbox as softkeys are in use) check failed. Now similar check is done before showing the widget - it is layoutted here, so it has parent as well. As a bonus, the event handling is already looking for dialog parent, so we can avoid doing another for-loop. Task-number: QTBUG-4739 --- src/gui/widgets/qdialogbuttonbox.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 6cc720d..280ca63 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -468,18 +468,6 @@ void QDialogButtonBoxPrivate::layoutButtons() if (center) buttonLayout->addStretch(); - -#ifdef QT_SOFTKEYS_ENABLED - QWidget *dialog = 0; - QWidget *p = q; - while (p && !p->isWindow()) { - p = p->parentWidget(); - if (dialog = qobject_cast(p)) - break; - } - if (dialog) - q->setFixedSize(0, 0); -#endif } QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardButton sbutton, @@ -1196,10 +1184,12 @@ bool QDialogButtonBox::event(QEvent *event) if (!hasDefault && firstAcceptButton) firstAcceptButton->setDefault(true); #ifdef QT_SOFTKEYS_ENABLED - if (dialog) + if (dialog) { + setFixedSize(0,0); dialog->addActions(d->softKeyActions.values()); - else + } else { addActions(d->softKeyActions.values()); + } #endif }else if (event->type() == QEvent::LanguageChange) { d->retranslateStrings(); -- cgit v0.12 From 2f7d1318d2dc63322a468d8c301ae718eaba0d03 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 8 Oct 2009 08:06:02 +0300 Subject: Workaround for OpenC daylight saving cache issue when using localtime_r. OpenC incorrectly caches DST information between localtime_r calls, i.e. if previous call to localtime_r has been called for DST affected date, also the second call will be affected by DST even the date is such that DST should not be applied. The workaround is to call mktime with non-DST affected date before calling localtime_r. mktime call resets the OpenC internal DST cache to right value and localtime_r will return correct values. This commit can be reverted once Open C bug 9525 has been reverted. AutoTest: Fixes tst_QDateTime::totime_t Reviewed-by: Aleksandar Sasha Babic --- src/corelib/tools/qdatetime.cpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 1b559cf..1277623 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -54,7 +54,6 @@ #ifndef Q_WS_WIN #include #endif - #include #if defined(Q_OS_WINCE) #include "qfunctions_wince.h" @@ -69,6 +68,31 @@ # define QDTPDEBUGN if (false) qDebug #endif +#if defined(Q_OS_SYMBIAN) + // Workaround for OpenC bug. + + // OpenC incorrectly caches DST information between localtime_r + // calls, i.e. if previous call to localtime_r has been called for DST + // affected date, also the second call will be affected by DST even + // the date is such that DST should not be applied. + + // The workaround is to call mktime with non-DST affected date before + // calling localtime_r. mktime call resets the OpenC internal DST cache + // to right value and localtime_r will return correct values. +#define FIX_OPENC_DSTCACHE \ + tm localTM; \ + localTM.tm_sec = 0; \ + localTM.tm_min = 0; \ + localTM.tm_hour = 12; \ + localTM.tm_mday = 1; \ + localTM.tm_mon = 1; \ + localTM.tm_year = 2002 - 1900; \ + localTM.tm_isdst = -1; \ + time_t temp = mktime(&localTM); +#else +#define FIX_OPENC_DSTCACHE +#endif + #if defined(Q_WS_MAC) #include #endif @@ -1138,6 +1162,7 @@ QDate QDate::currentDate() // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE t = localtime_r(<ime, &res); #else t = localtime(<ime); @@ -1834,12 +1859,13 @@ QTime QTime::currentTime() // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE t = localtime_r(<ime, &res); #else t = localtime(<ime); #endif Q_CHECK_PTR(t); - + ct.mds = MSECS_PER_HOUR * t->tm_hour + MSECS_PER_MIN * t->tm_min + 1000 * t->tm_sec + tv.tv_usec / 1000; #else @@ -2887,6 +2913,7 @@ QDateTime QDateTime::currentDateTime() // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE t = localtime_r(<ime, &res); #else t = localtime(<ime); @@ -3704,6 +3731,7 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time) // use the reentrant version of localtime() where available tzset(); tm res; + FIX_OPENC_DSTCACHE brokenDown = localtime_r(&secsSince1Jan1970UTC, &res); #elif defined(_MSC_VER) && _MSC_VER >= 1400 tm res; -- cgit v0.12 From 67ba51dd0d9d7292ee5f1d3a484330fde84a7248 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 8 Oct 2009 12:40:36 +0300 Subject: Fixed trailing whitespaces for f831c60a. Reviewed-by: TrustMe --- tests/auto/qsqlrecord/qsqlrecord.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qsqlrecord/qsqlrecord.pro b/tests/auto/qsqlrecord/qsqlrecord.pro index 39a800e..f36f076 100644 --- a/tests/auto/qsqlrecord/qsqlrecord.pro +++ b/tests/auto/qsqlrecord/qsqlrecord.pro @@ -9,9 +9,9 @@ symbian { DEPLOYMENT += sqlite } } - + TARGET.EPOCSTACKSIZE=50000 - TARGET.EPOCHEAPSIZE=50000 5000000 + TARGET.EPOCHEAPSIZE=50000 5000000 } QT += sql -- cgit v0.12 From 013503f8f1a29f12789a8f88bd095597170ff76b Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 8 Oct 2009 10:34:14 +0200 Subject: Prevented input composition in password fields on X11 and Windows. This restores the behavior in 4.5. Task: QT-2257 RevBy: Simon Hausmann --- src/gui/inputmethod/qwininputcontext_win.cpp | 2 +- src/gui/inputmethod/qximinputcontext_x11.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/inputmethod/qwininputcontext_win.cpp b/src/gui/inputmethod/qwininputcontext_win.cpp index 4a160d7..e9ab870 100644 --- a/src/gui/inputmethod/qwininputcontext_win.cpp +++ b/src/gui/inputmethod/qwininputcontext_win.cpp @@ -701,7 +701,7 @@ void QWinInputContext::updateImeStatus(QWidget *w, bool hasFocus) if (!focusProxyWidget) focusProxyWidget = w; bool e = w->testAttribute(Qt::WA_InputMethodEnabled) && w->isEnabled() - && !(focusProxyWidget->inputMethodHints() & Qt::ImhExclusiveInputMask); + && !(focusProxyWidget->inputMethodHints() & (Qt::ImhExclusiveInputMask | Qt::ImhHiddenText)); bool hasIme = e && hasFocus; #ifdef Q_IME_DEBUG qDebug("%s HasFocus = %d hasIme = %d e = %d ", w->className(), hasFocus, hasIme, e); diff --git a/src/gui/inputmethod/qximinputcontext_x11.cpp b/src/gui/inputmethod/qximinputcontext_x11.cpp index bee3ce8..b46b162 100644 --- a/src/gui/inputmethod/qximinputcontext_x11.cpp +++ b/src/gui/inputmethod/qximinputcontext_x11.cpp @@ -612,7 +612,7 @@ void QXIMInputContext::setFocusWidget(QWidget *w) QInputContext::setFocusWidget(w); - if (!w || w->inputMethodHints() & Qt::ImhExclusiveInputMask) + if (!w || w->inputMethodHints() & (Qt::ImhExclusiveInputMask | Qt::ImhHiddenText)) return; ICData *data = ximData.value(w->effectiveWinId()); -- cgit v0.12 From 5987274b8ce244d0020359d113800e7305367c68 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Thu, 8 Oct 2009 13:06:24 +0300 Subject: Fix to Symbian accelerated scrolling problem. The reason for scrolling bug was that CFbsBitmapDevice wasn't informed if CFbsBitmap was resized. However, it seems that scroll implementation in QRasterPixmapData is faster that CFbsBitGc->CopyRect so this is also a patch which changes QS60PixmapData's scroll function to call QRasterPixmapData::scroll(). Reviewed-by: Janne Koskinen --- src/gui/image/qpixmap_s60.cpp | 45 ++++++++++++++++++------------------------- src/gui/image/qpixmap_s60_p.h | 4 ++-- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 37b6438..554c0f3 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -229,24 +229,15 @@ static CFbsBitmap* uncompress(CFbsBitmap* bitmap) lock.relock(); - CBitmapContext *bitmapContext = 0; CFbsBitmapDevice* bitmapDevice = 0; + CFbsBitGc *bitmapGc = 0; QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(uncompressed)); - TInt err = bitmapDevice->CreateBitmapContext(bitmapContext); - if (err != KErrNone) { - delete bitmap; - delete bitmapDevice; - bitmap = 0; - bitmapDevice = 0; - - lock.relock(); + QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL()); + bitmapGc->Activate(bitmapDevice); - return bitmap; - } + bitmapGc->DrawBitmap(TPoint(), bitmap); - bitmapContext->DrawBitmap(TPoint(), bitmap); - - delete bitmapContext; + delete bitmapGc; delete bitmapDevice; return uncompressed; @@ -355,7 +346,7 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), symbianBitmapDataAccess(new QSymbianBitmapDataAccess), cfbsBitmap(0), bitmapDevice(0), - bitmapContext(0), + bitmapGc(0), pengine(0), bytes(0) { @@ -365,6 +356,7 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), QS60PixmapData::~QS60PixmapData() { release(); + delete symbianBitmapDataAccess; } void QS60PixmapData::resize(int width, int height) @@ -391,6 +383,8 @@ void QS60PixmapData::resize(int width, int height) if(cfbsBitmap->SizeInPixels() != newSize) { cfbsBitmap->Resize(TSize(width, height)); + bitmapDevice->Resize(TSize(width, height)); + bitmapGc->Resized(); if(pengine) { delete pengine; pengine = 0; @@ -404,12 +398,9 @@ void QS60PixmapData::resize(int width, int height) bool QS60PixmapData::initSymbianBitmapContext() { QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(cfbsBitmap)); - TInt err = bitmapDevice->CreateBitmapContext(bitmapContext); - if (err != KErrNone) { - delete bitmapDevice; - bitmapDevice = 0; - return false; - } + QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL()); + bitmapGc->Activate(bitmapDevice); + return true; } @@ -417,7 +408,7 @@ void QS60PixmapData::release() { if (cfbsBitmap) { QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); - delete bitmapContext; + delete bitmapGc; delete bitmapDevice; delete cfbsBitmap; lock.relock(); @@ -426,7 +417,7 @@ void QS60PixmapData::release() delete pengine; image = QImage(); cfbsBitmap = 0; - bitmapContext = 0; + bitmapGc = 0; bitmapDevice = 0; pengine = 0; bytes = 0; @@ -559,13 +550,15 @@ void QS60PixmapData::copy(const QPixmapData *data, const QRect &rect) resize(rect.width(), rect.height()); cfbsBitmap->SetDisplayMode(s60Data->cfbsBitmap->DisplayMode()); - bitmapContext->BitBlt(TPoint(0, 0), s60Data->cfbsBitmap, qt_QRect2TRect(rect)); + bitmapGc->BitBlt(TPoint(0, 0), s60Data->cfbsBitmap, qt_QRect2TRect(rect)); } bool QS60PixmapData::scroll(int dx, int dy, const QRect &rect) { - bitmapContext->CopyRect(TPoint(dx, dy), qt_QRect2TRect(rect)); - return true; + beginDataAccess(); + bool res = QRasterPixmapData::scroll(dx, dy, rect); + endDataAccess(); + return res; } int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index 4498c05..b23961a 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class CFbsBitmap; class CFbsBitmapDevice; -class CBitmapContext; +class CFbsBitGc; class QSymbianBitmapDataAccess; @@ -114,7 +114,7 @@ private: CFbsBitmap *cfbsBitmap; CFbsBitmapDevice *bitmapDevice; - CBitmapContext *bitmapContext; + CFbsBitGc *bitmapGc; QPaintEngine *pengine; uchar* bytes; -- cgit v0.12 From dac817b8d3bbcfcad34295f134dfafbf0a26c23f Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 8 Oct 2009 12:26:29 +0200 Subject: Changing S60 to Symbian in the Docs Changing names to Symbian platform Task-number: QT-2268 Rev-by: Espen Riskedal --- doc/src/development/qmake-manual.qdoc | 87 ++++++++++++++++--------------- doc/src/getting-started/installation.qdoc | 48 +++++++++-------- doc/src/howtos/appicon.qdoc | 4 +- doc/src/platforms/qt-embedded.qdoc | 7 +-- doc/src/platforms/s60-introduction.qdoc | 27 +++++----- 5 files changed, 91 insertions(+), 82 deletions(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index f2cae5b..87132cc 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -920,7 +920,7 @@ {deployment guide for Windows}. - \section1 S60 + \section1 Symbian platform Features specific to this platform include handling of static data, capabilities, stack and heap size, compiler specific options, and unique @@ -940,7 +940,7 @@ \section2 Stack and heap size - Symbian uses predefined sizes for stacks and heaps. If an + The Symbian platform uses predefined sizes for stacks and heaps. If an application exceeds either limit, it may crash or fail to complete its task. Crashes that seem to have no reason can often be traced back to insufficient stack and/or heap sizes. @@ -1095,7 +1095,7 @@ \target BLD_INF_RULES \section1 BLD_INF_RULES - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables. The section of \c bld.inf file where each rule goes is appended to @@ -1288,7 +1288,7 @@ The build process for bundles is also influenced by the contents of the \l{#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA} variable. - These options only have an effect on Symbian: + These options only have an effect on the Symbian platform: \table 95% \header \o Option \o Description @@ -1345,7 +1345,7 @@ \target DEPLOYMENT \section1 DEPLOYMENT - \e {This is only used on Windows CE and Symbian.} + \e {This is only used on Windows CE and the Symbian platform.} Specifies which additional files will be deployed. Deployment means the transfer of files from the development system to the target device or @@ -1363,8 +1363,8 @@ The default deployment target path for Windows CE is \c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to - \c{\Program Files\target}. For Symbian, the default target is the application - private directory on the drive it is installed to. + \c{\Program Files\target}. For the Symbian platform, the default target +is the application private directory on the drive it is installed to. It is also possible to specify multiple \c sources to be deployed on target \c paths. In addition, different variables can be used for @@ -1375,10 +1375,10 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 29 \note In Windows CE all linked Qt libraries will be deployed to the path - specified by \c{myFiles.path}. In Symbian all libraries and executables + specified by \c{myFiles.path}. On Symbian platform all libraries and executables will always be deployed to the \\sys\\bin of the installation drive. - Since the Symbian build system automatically moves binaries to certain + Since the Symbian platform build system automatically moves binaries to certain directories under the epoc32 directory, custom plugins, executables or dynamically loadable libraries need special handling. When deploying extra executables or dynamically loadable libraries, the target path @@ -1393,13 +1393,13 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 128 - In Symbian, generic PKG file content can also be specified with this + On the Symbian platform, generic PKG file content can also be specified with this variable. You can use either \c pkg_prerules or \c pkg_postrules to pass raw data to PKG file. The strings in \c pkg_prerules are added before package-body and \c pkg_postrules after. The strings defined in \c pkg_postrules or \c pkg_prerules are not parsed by qmake, so they should be in a format understood by Symbian package generation tools. - Please consult Symbian documentation for correct syntax. + Please consult the Symbian platform documentation for correct syntax. For example, to deploy DLL and add a new dependency: @@ -1424,7 +1424,7 @@ override languages statement, you must override also package-header statement and all other statements which are language specific. - In Symbian, the \c default_deployment item specifies + On the Symbian platform, the \c default_deployment item specifies default platform dependencies. It can be overwritten if a more restrictive set is needed - e.g. if a specific device is required to run the application. @@ -1436,7 +1436,7 @@ \target DEPLOYMENT_PLUGIN \section1 DEPLOYMENT_PLUGIN - \e {This is only used on Windows CE and Symbian.} + \e {This is only used on Windows CE and the Symbian platform.} This variable specifies the Qt plugins that will be deployed. All plugins available in Qt can be explicitly deployed to the device. See @@ -1446,9 +1446,9 @@ If the application depends on plugins, these plugins have to be specified manually. - \note In Symbian, all plugins supported by this variable will be deployed - by default with Qt libraries, so generally using this variable is not - needed. + \note On the Symbian platform, all plugins supported by this variable +will be deployed by default with Qt libraries, so generally using this +variable is not needed. For example: @@ -1556,7 +1556,7 @@ \target ICON \section1 ICON - This variable is used only in MAC and S60 to set the application icon. + This variable is used only in MAC and the Symbian platform to set the application icon. Please see \l{Setting the Application Icon}{the application icon documentation} for more information. @@ -1623,10 +1623,10 @@ This variable contains a list of libraries to be linked into the project. You can use the Unix \c -l (library) and -L (library path) flags and qmake - will do the correct thing with these libraries on Windows and Symbian - (namely this means passing the full path of the library to the linker). The - only limitation to this is the library must exist, for qmake to find which - directory a \c -l lib lives in. + will do the correct thing with these libraries on Windows and the + Symbian platform (namely this means passing the full path of the library to + the linker). The only limitation to this is the library must exist, for + qmake to find which directory a \c -l lib lives in. For example: @@ -1647,7 +1647,8 @@ explicitly specify the library to be used by including the \c{.lib} file name suffix. - \bold{Note:} On S60, the build system makes a distinction between shared and + \bold{Note:} On the Symbian platform, the build system makes a +distinction between shared and static libraries. In most cases, qmake will figure out which library you are refering to, but in some cases you may have to specify it explicitly to get the expected behavior. This typically happens if you are building a @@ -1693,7 +1694,7 @@ \target MMP_RULES \section1 MMP_RULES - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Generic MMP file content can be specified with this variable. @@ -2013,8 +2014,9 @@ the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables, respectively. - \bold{Note:} On S60, this variable can be used to pass architecture specific - options to each compiler in the Symbian build system. For example: + \bold{Note:} On the Symbian platform, this variable can be used to pass +architecture specific options to each compiler in the Symbian build system. +For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 131 @@ -2812,7 +2814,7 @@ \target RSS_RULES \section1 RSS_RULES - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Generic RSS file content can be specified with this variable. The syntax is similar to \c MMP_RULES and \c BLD_INF_RULES. @@ -2832,10 +2834,12 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 145 - This example will install the application to MyFolder in S60 application - shell. In addition it will make the application to be launched in background. + This example will install the application to MyFolder in the Symbian + platform application shell. In addition it will make the application to + be launched in background. - For detailed list of possible RSS statements, please refer to Symbian OS help. + For detailed list of possible RSS statements, please refer to the + Symbian platform help. \note You should not use \c RSS_RULES variable to set the following RSS statements: @@ -2848,7 +2852,7 @@ \target S60_VERSION \section1 S60_VERSION - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Contains the version number of the underlying S60 SDK; e.g. "5.0". @@ -2918,7 +2922,7 @@ \target TARGET.CAPABILITY \section1 TARGET.CAPABILITY - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies which platform capabilities the application should have. For more information, please refer to the S60 SDK documentation. @@ -2926,7 +2930,7 @@ \target TARGET.EPOCALLOWDLLDATA \section1 TARGET.EPOCALLOWDLLDATA - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies whether static data should be allowed in the application. Symbian disallows this by default in order to save memory. To use it, set this to 1. @@ -2934,7 +2938,7 @@ \target TARGET.EPOCHEAPSIZE \section1 TARGET.EPOCHEAPSIZE - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies the minimum and maximum heap size of the application. The program will refuse to run if the minimum size is not available when it starts. For @@ -2945,7 +2949,7 @@ \target TARGET.EPOCSTACKSIZE \section1 TARGET.EPOCSTACKSIZE - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies the maximum stack size of the application. For example: @@ -2954,7 +2958,7 @@ \target TARGET.SID \section1 TARGET.SID - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies which secure identifier to use for the target application or library. For more information, see the S60 SDK documentation. @@ -2962,7 +2966,7 @@ \target TARGET.UID2 \section1 TARGET.UID2 - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies which unique identifier 2 to use for the target application or library. If this variable is not specified, it defaults to the same value @@ -2971,7 +2975,7 @@ \target TARGET.UID3 \section1 TARGET.UID3 - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies which unique identifier 3 to use for the target application or library. If this variable is not specified, a UID3 suitable for development @@ -2982,7 +2986,7 @@ \target TARGET.VID \section1 TARGET.VID - \e {This is only used on Symbian.} + \e {This is only used on the Symbian platform.} Specifies which vendor identifier to use for the target application or library. For more information, see the S60 SDK documentation. @@ -3862,9 +3866,10 @@ \o Indicates that the output should not be added to the list of objects to be linked in. \endtable - \note Symbian specific: Generating objects to be linked in is not supported in Symbian, - so either the \c CONFIG option \c no_link or variable \c variable_out - should always be defined for extra compilers. + \note Symbian platform specific: Generating objects to be linked in is + not supported on the Symbian platform, so either the \c CONFIG option + \c no_link or variable \c variable_out should always be defined for + extra compilers. */ diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 2ace8de..366a906 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -497,14 +497,14 @@ in the \l{Qt for Windows CE Requirements} document. We hope you will enjoy using Qt. Good luck! */ -/*! \page install-S60-installer.html +/*! \page install-Symbian-installer.html -\title Installing Qt on S60 using binary package +\title Installing Qt on the Symbian platform using binary package \ingroup qts60 -\brief How to install Qt on S60 using the binary package. +\brief How to install Qt on the Symbian platform using the binary package. -\note Qt for S60 has some requirements that are given in more detail -in the \l{Qt for S60 Requirements} document. +\note Qt for Symbian platform has some requirements that are given in more detail +in the \l{Qt for Symbian platform Requirements} document. \list 1 @@ -527,7 +527,7 @@ in the \l{Qt for S60 Requirements} document. and follow the instructions. To run the demos and examples on the emulator, you need to build them first. - Open the "Qt for S60 Command Prompt" from the Start menu and type: + Open the "Qt for Symbian platform Command Prompt" from the Start menu and type: \snippet doc/src/snippets/code/doc_src_installation.qdoc 25 @@ -536,27 +536,29 @@ in the \l{Qt for S60 Requirements} document. \snippet doc/src/snippets/code/doc_src_installation.qdoc 27 - For more information about building and running Qt programs on S60, - see \l{S60 - Introduction to using Qt}. + For more information about building and running Qt programs on the +Symbian platform, + see \l{Symbian platform - Introduction to using Qt}. We hope you will enjoy using Qt. \endlist */ -/*! \page install-S60.html +/*! \page install-Symbian.html -\title Installing Qt on S60 +\title Installing Qt on the Symbian platform \ingroup installation \ingroup qts60 -\brief How to install Qt on S60 +\brief How to install Qt for the Symbian platform -\note Qt for S60 has some requirements that are given in more detail -in the \l{Qt for S60 Requirements} document. +\note Qt for the Symbian platform has some requirements that are given in more detail +in the \l{Qt for Symbian platform Requirements} document. -\note \bold {This document describes how to install and configure Qt for S60 from scratch. +\note \bold {This document describes how to install and configure Qt for +the Symbian platform from scratch. If you are using pre-built binaries, follow the instructions -\l{Installing Qt on S60 using binary package}{here}.} +\l{Installing Qt on the Symbian platform using binary package}{here}.} \list 1 @@ -586,7 +588,7 @@ If you are using pre-built binaries, follow the instructions \o Configure Qt - To configure Qt for S60, do: + To configure Qt for the Symbian platform, do: \snippet doc/src/snippets/code/doc_src_installation.qdoc 23 to build the tools using MinGW, and the libraries using abld. @@ -633,8 +635,8 @@ If you are using pre-built binaries, follow the instructions \snippet doc/src/snippets/code/doc_src_installation.qdoc 27 - For more information about building and running Qt programs on S60, - see \l{S60 - Introduction to using Qt}. + For more information about building and running Qt programs on the +Symbian platform, see \l{Symbian platform - Introduction to using Qt}. We hope you will enjoy using Qt. @@ -669,7 +671,7 @@ If you are using pre-built binaries, follow the instructions \list \o \l{Qt for Embedded Linux Requirements} \o \l{Qt for Mac OS X Requirements} - \o \l{Qt for S60 Requirements} + \o \l{Qt for Symbian platform Requirements} \o \l{Qt for Windows CE Requirements} \o \l{Qt for Windows Requirements} \o \l{Qt for X11 Requirements} @@ -953,13 +955,13 @@ If you are using pre-built binaries, follow the instructions */ /*! - \page requirements-s60.html - \title Qt for S60 Requirements + \page requirements-symbian.html + \title Qt for Symbian platform Requirements \ingroup installation - \brief Setting up the S60 environment for Qt. + \brief Setting up the Symbian platform environment for Qt. \previouspage General Qt Requirements - Qt for S60 requires the following software installed on your development PC: + Qt for Symbian platform requires the following software installed on your development PC: \list \o \l{http://www.mingw.org/}{MinGW 3.4.5 or higher}, or another windows compiler to build the tools. \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher} diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc index ece2dcf..4108c11 100644 --- a/doc/src/howtos/appicon.qdoc +++ b/doc/src/howtos/appicon.qdoc @@ -213,9 +213,9 @@ The GNOME developer website is at \l{http://developer.gnome.org/}. - \section1 Setting the Application Icon on S60 platforms + \section1 Setting the Application Icon on the Symbian platform - In order to set the application icon for S60 applications, you need + In order to set the application icon for Symbian platform applications, you need an SVG-T icon. For information on how to create SVG-T compliant icons, please refer to \l{http://wiki.forum.nokia.com/index.php/How_to_create_application_icon(SVG)_in_S60_3rd_edition/} diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc index 0b2c2ac..c39a967 100644 --- a/doc/src/platforms/qt-embedded.qdoc +++ b/doc/src/platforms/qt-embedded.qdoc @@ -54,7 +54,7 @@ Currently, three embedded platforms are supported by Qt: \table 90% - \header \o Embedded Linux \o Windows CE \o S60 + \header \o Embedded Linux \o Windows CE \o Symbian platform \row \o \l{Qt for Embedded Linux} is designed to be used on Linux devices without X11 or existing graphical environments. This flavor of @@ -67,8 +67,9 @@ Applications use the appropriate style for the embedded environment and use native features, such as menus, to conform to the native style guidelines. - \o \l{S60 - Introduction to using Qt}{Qt for S60} is used to create - applications running in existing S60 environments. + \o \l{Symbian platform - Introduction to using Qt}{Qt for the Symbian +platform} is used to create + applications running in existing Symbian platform environments. Applications use the appropriate style for the embedded environment and use native features, such as menus, to conform to the native style guidelines. diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/s60-introduction.qdoc index 086ee52..d145a82 100644 --- a/doc/src/platforms/s60-introduction.qdoc +++ b/doc/src/platforms/s60-introduction.qdoc @@ -40,10 +40,10 @@ ****************************************************************************/ /*! - \page s60-with-qt-introduction.html + \page symbian-with-qt-introduction.html - \title S60 - Introduction to using Qt - \brief An introduction to Qt for S60 developers. + \title Symbian platform - Introduction to using Qt + \brief An introduction to Qt for Symbian platform developers. \ingroup howto \ingroup qts60 @@ -51,21 +51,22 @@ \section1 Required tools - See \l{Qt for S60 Requirements} to see what tools are required to use Qt for S60. + See \l{Qt for Symbian platform Requirements} to see what tools are +required to use Qt for Symbian platform. \section1 Installing Qt and running demos - Follow the instructions found in \l{Installing Qt on S60 using binary package} to learn how + Follow the instructions found in \l{Installing Qt on the Symbian platform using binary package} to learn how to install Qt using binary package and how to build and run Qt demos. - Follow the instructions found in \l{Installing Qt on S60} to learn how to install Qt using + Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using using source package and how to build and run the Qt demos. \section1 Building your own applications If you are new to Qt development, have a look at \l{How to Learn Qt}. In general, the difference between developing a - Qt application on S60 compared to any of the other platforms supported + Qt application on the Symbian platform compared to any of the other platforms supported by Qt is not that big. Once you have crated a \c .pro file for your project, generate the @@ -76,10 +77,10 @@ For more information on how to use qmake have a look at the \l {qmake Tutorial}. - Now you can build the Qt on S60 application with standard build - tools. By default, running \c make will produce binaries for the - emulator. However, S60 comes with several alternative build targets, - as shown in the table below: + Now you can build the Qt for the Symbian platform application with +standard build tools. By default, running \c make will produce binaries for +the emulator. However, the Symbian platform comes with several alternative +build targets, as shown in the table below: \table \row \o \c debug-winscw \o Build debug binaries for the emulator (default). @@ -121,8 +122,8 @@ \row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation. -i, install the package right away using PC suite. -c=, read certificate information from a file. - Execute \c{createpackage.pl} script without any - parameters for more information about options. + Execute \c{perl createpackage.pl} for more information + about options. By default no otions are given. \row \o \c QT_SIS_TARGET \o Target for which \c .sis file is created. Accepted values are build targets listed in -- cgit v0.12 From 7d75f1427f80df87b728baa8c7f63f7a7762d280 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 8 Oct 2009 12:27:37 +0200 Subject: Changing S60 to Symbian in the Docs Changing names to Symbian platform Task-number: QT-2268 Rev-by: Espen Riskedal --- doc/src/images/qt-embedded-architecture.png | Bin 22388 -> 8511 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/src/images/qt-embedded-architecture.png b/doc/src/images/qt-embedded-architecture.png index d3f8edc..20b3e7f 100644 Binary files a/doc/src/images/qt-embedded-architecture.png and b/doc/src/images/qt-embedded-architecture.png differ -- cgit v0.12 From 1040ba2fd850196234424f769e28d513a6eb0948 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 8 Oct 2009 12:11:32 +0200 Subject: Fix compile errors on mingw (The version supplied with Qt 4.5) Added the missing defines Reviewed-by: Denis --- src/gui/dialogs/qprintdialog_win.cpp | 7 +++++++ src/gui/inputmethod/qwininputcontext_p.h | 13 +++++++++++++ src/gui/kernel/qapplication_win.cpp | 5 ++++- src/gui/util/qdesktopservices_win.cpp | 5 +++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp index f66c27f..843c4e2 100644 --- a/src/gui/dialogs/qprintdialog_win.cpp +++ b/src/gui/dialogs/qprintdialog_win.cpp @@ -52,6 +52,13 @@ #include #include +#if defined(Q_CC_MINGW) && !defined(PD_NOCURRENTPAGE) +#define PD_NOCURRENTPAGE 0x00800000 +#define PD_RESULT_PRINT 1 +#define PD_RESULT_APPLY 2 +#define START_PAGE_GENERAL 0XFFFFFFFF +#endif + QT_BEGIN_NAMESPACE extern void qt_win_eatMouseMove(); diff --git a/src/gui/inputmethod/qwininputcontext_p.h b/src/gui/inputmethod/qwininputcontext_p.h index 39d50fd..dd0490d 100644 --- a/src/gui/inputmethod/qwininputcontext_p.h +++ b/src/gui/inputmethod/qwininputcontext_p.h @@ -56,6 +56,19 @@ #include "QtGui/qinputcontext.h" #include "QtCore/qt_windows.h" +#if defined(Q_CC_MINGW) && !defined(IMR_RECONVERTSTRING) +typedef struct tagRECONVERTSTRING { + DWORD dwSize; + DWORD dwVersion; + DWORD dwStrLen; + DWORD dwStrOffset; + DWORD dwCompStrLen; + DWORD dwCompStrOffset; + DWORD dwTargetStrLen; + DWORD dwTargetStrOffset; +} RECONVERTSTRING, *PRECONVERTSTRING; +#endif + QT_BEGIN_NAMESPACE class QWinInputContext : public QInputContext diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 44f82b6..270562f 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -171,10 +171,13 @@ typedef struct tagTOUCHINPUT #include #endif +#ifndef IMR_RECONVERTSTRING +#define IMR_RECONVERTSTRING 4 +#endif + #ifndef IMR_CONFIRMRECONVERTSTRING #define IMR_CONFIRMRECONVERTSTRING 0x0005 #endif - QT_BEGIN_NAMESPACE #ifdef Q_WS_WINCE diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp index 4ecef97..c0bd5e7 100644 --- a/src/gui/util/qdesktopservices_win.cpp +++ b/src/gui/util/qdesktopservices_win.cpp @@ -59,6 +59,11 @@ # endif #endif +#if defined(Q_CC_MINGW) && !defined(CSIDL_MYMUSIC) +#define CSIDL_MYMUSIC 13 +#define CSIDL_MYVIDEO 14 +#endif + #ifndef QT_NO_DESKTOPSERVICES QT_BEGIN_NAMESPACE -- cgit v0.12