diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-02 23:00:15 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-02 23:00:15 (GMT) |
commit | d70dbc6050404787c15be814054ab251cfe09db7 (patch) | |
tree | f1e5517fbe3620a23cb3a18319889b374f371a93 | |
parent | aeecea2fe853f1b10e84ac004de8b3461b295925 (diff) | |
parent | 1d38ef4f4f9c0ec03998ab4d9998a1989f5385ab (diff) | |
download | Qt-d70dbc6050404787c15be814054ab251cfe09db7.zip Qt-d70dbc6050404787c15be814054ab251cfe09db7.tar.gz Qt-d70dbc6050404787c15be814054ab251cfe09db7.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
-rw-r--r-- | doc/src/platforms/symbian-introduction.qdoc | 9 | ||||
-rw-r--r-- | mkspecs/features/symbian/sis_targets.prf | 84 | ||||
-rw-r--r-- | src/declarative/declarative.pro | 5 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativerectangle.cpp | 8 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeimport.cpp | 30 |
6 files changed, 87 insertions, 51 deletions
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 9da94c4..cce2be3 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -144,8 +144,17 @@ Smart installer will attempt to download missing dependencies in addition to just installing the application. + Note: The application \c .sis contained in smart installer \c .sis + will be recreated and signed with same certificates as + smart installer \c .sis. + \row \o \c ok_installer_sis \o Otherwise similar to \c installer_sis target, except + the application sis will not be recreated. This is useful + when application \c .sis needs to be separately signed before + including it into smart installer \c .sis. \row \o \c unsigned_installer_sis \o Create unsigned \l{Smart Installer}{smart installer} \c .sis file for project. + Note: The application \c .sis contained in smart installer + \c .sis will also be unsigned. \row \o \c stub_sis \o Create a stub sis to allow upgradability of projects that are deployed in ROM \endtable diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf index ad81803..024378b 100644 --- a/mkspecs/features/symbian/sis_targets.prf +++ b/mkspecs/features/symbian/sis_targets.prf @@ -33,19 +33,16 @@ equals(GENERATE_SIS_TARGETS, true) { make_cache_name = .make.cache sis_target.target = sis - sis_target.commands = $(if $(wildcard $${baseTarget}_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ + sis_target.commands = $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_sis \ , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ ) + sis_target.depends += $${baseTarget}_template.pkg ok_sis_target.target = ok_sis @@ -53,19 +50,16 @@ equals(GENERATE_SIS_TARGETS, true) { $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) unsigned_sis_target.target = unsigned_sis - unsigned_sis_target.commands = $(if $(wildcard $${baseTarget}_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_unsigned_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_unsigned_sis \ + unsigned_sis_target.commands = $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_unsigned_sis MAKEFILES=$$make_cache_name \ , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_unsigned_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ + ) + unsigned_sis_target.depends += $${baseTarget}_template.pkg ok_unsigned_sis_target.target = ok_unsigned_sis @@ -74,49 +68,39 @@ equals(GENERATE_SIS_TARGETS, true) { target_sis_target.target = $${baseTarget}.sis target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + # The installer_sis target has dependency to sis target, so it will regenerate sis package. + # To create smart installer wrapper for for an existing sis package, use ok_installer_sis target directly. installer_sis_target.target = installer_sis - installer_sis_target.commands = $(if $(wildcard $${baseTarget}_installer.pkg), \ - $(MAKE) -f $(MAKEFILE) ok_installer_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) + installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_installer_sis installer_sis_target.depends = $${baseTarget}_installer.pkg sis ok_installer_sis_target.target = ok_installer_sis ok_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + ok_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_installer_sis_target.target = unsigned_installer_sis - unsigned_installer_sis_target.commands = $(if $(wildcard $${baseTarget}_installer.pkg), \ - $(MAKE) -f $(MAKEFILE) ok_unsigned_installer_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) + unsigned_installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_unsigned_installer_sis unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis ok_unsigned_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg - - fail_sis_nopkg_target.target = fail_sis_nopkg - fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" + ok_unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg fail_sis_nocache_target.target = fail_sis_nocache fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" stub_sis_target.target = stub_sis - stub_sis_target.commands = $(if $(wildcard $${baseTarget}_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ + stub_sis_target.commands = $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_stub_sis \ , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ ) + stub_sis_target.depends += $${baseTarget}_stub.pkg ok_stub_sis_target.target = ok_stub_sis @@ -132,7 +116,6 @@ equals(GENERATE_SIS_TARGETS, true) { ok_installer_sis_target \ unsigned_installer_sis_target \ ok_unsigned_installer_sis_target \ - fail_sis_nopkg_target \ fail_sis_nocache_target \ stub_sis_target \ ok_stub_sis_target @@ -178,10 +161,14 @@ equals(GENERATE_SIS_TARGETS, true) { target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis installer_sis_target.target = installer_sis - installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_installer_sis installer_sis_target.depends = $${baseTarget}_installer.pkg sis + ok_installer_sis_target.target = ok_installer_sis + ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + ok_installer_sis_target.depends = $${baseTarget}_installer.pkg + unsigned_installer_sis_target.target = unsigned_installer_sis unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis @@ -197,6 +184,7 @@ equals(GENERATE_SIS_TARGETS, true) { unsigned_sis_target \ target_sis_target \ installer_sis_target \ + ok_installer_sis_target \ unsigned_installer_sis_target QMAKE_DISTCLEAN += $${sis_destdir}/$${baseTarget}.sis diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index 299ca06..93ad861 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -25,7 +25,10 @@ include(graphicsitems/graphicsitems.pri) include(qml/qml.pri) include(debugger/debugger.pri) -symbian:TARGET.UID3=0x2001E623 +symbian: { + TARGET.UID3=0x2001E623 + LIBS += -lefsrv +} DEFINES += QT_NO_OPENTYPE INCLUDEPATH += ../3rdparty/harfbuzz/src diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index dedb3f7..99b36a8 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -470,6 +470,8 @@ void QDeclarativeRectangle::generateBorderedRect() void QDeclarativeRectangle::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativeRectangle); + if (width() <= 0 || height() <= 0) + return; if (d->radius > 0 || (d->pen && d->pen->isValid()) || (d->gradient && d->gradient->gradient()) ) { drawRect(*p); @@ -539,6 +541,12 @@ void QDeclarativeRectangle::drawRect(QPainter &p) Q_ASSERT(d->rectImage.width() == 2*xOffset + 1); Q_ASSERT(d->rectImage.height() == 2*yOffset + 1); + // check whether we've eliminated the center completely + if (2*xOffset > width()+pw) + xOffset = (width()+pw)/2; + if (2*yOffset > height()+pw) + yOffset = (height()+pw)/2; + QMargins margins(xOffset, yOffset, xOffset, yOffset); QTileRules rules(Qt::StretchTile, Qt::StretchTile); //NOTE: even though our item may have qreal-based width and height, qDrawBorderPixmap only supports QRects diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 0deacf8..f8421a3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -771,7 +771,7 @@ void QDeclarativeTextInput::setEchoMode(QDeclarativeTextInput::EchoMode echo) imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); setInputMethodHints(imHints); d->control->setEchoMode((uint)echo); - update(); + q_textChanged(); emit echoModeChanged(echoMode()); } diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 6f5216a..acc13de 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -51,6 +51,10 @@ #include <private/qdeclarativetypenamecache_p.h> #include <private/qdeclarativeengine_p.h> +#ifdef Q_OS_SYMBIAN +#include "private/qcore_symbian_p.h" +#endif + QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) @@ -658,8 +662,32 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) // Search order is applicationDirPath(), $QML_IMPORT_PATH, QLibraryInfo::ImportsPath - addImportPath(QLibraryInfo::location(QLibraryInfo::ImportsPath)); + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); +#if defined(Q_OS_SYMBIAN) + // Append imports path for all available drives in Symbian + if (installImportsPath.at(1) != QChar(QLatin1Char(':'))) { + QString tempPath = installImportsPath; + if (tempPath.at(tempPath.length() - 1) != QDir::separator()) { + tempPath += QDir::separator(); + } + RFs& fs = qt_s60GetRFs(); + TPtrC tempPathPtr(reinterpret_cast<const TText*> (tempPath.constData())); + TFindFile finder(fs); + TInt err = finder.FindByDir(tempPathPtr, tempPathPtr); + while (err == KErrNone) { + QString foundDir(reinterpret_cast<const QChar *>(finder.File().Ptr()), + finder.File().Length()); + foundDir = QDir(foundDir).canonicalPath(); + addImportPath(foundDir); + err = finder.Find(); + } + } else { + addImportPath(installImportsPath); + } +#else + addImportPath(installImportsPath); +#endif // env import paths QByteArray envImportPath = qgetenv("QML_IMPORT_PATH"); if (!envImportPath.isEmpty()) { |