summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-09 21:23:03 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-09 21:23:03 (GMT)
commit213b5d2651aaf55e76b3aab3788ab86a08a75b82 (patch)
treeb6103525329ee34c80e1a68063726bd8f12766f1
parent3817f59657147c6341dea54d220e5bfa704f24de (diff)
parent97305f4ca91b380f42ff5d3fd49c268df0c5ff8c (diff)
downloadQt-213b5d2651aaf55e76b3aab3788ab86a08a75b82.zip
Qt-213b5d2651aaf55e76b3aab3788ab86a08a75b82.tar.gz
Qt-213b5d2651aaf55e76b3aab3788ab86a08a75b82.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: 4.7.2 changes Change paging attributes for Symbian binaries Fix build failure Fix regression in creating mkspecs/default Changes for 4.7.2 Recreate Symbian raster backing store when WA_TranslucentBackground set
-rw-r--r--dist/changes-4.7.230
-rw-r--r--mkspecs/common/symbian/symbian-mmp.conf5
-rw-r--r--src/corelib/corelib.pro9
-rw-r--r--src/gui/image/qpixmap_s60.cpp27
-rw-r--r--src/gui/image/qpixmap_s60_p.h2
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp17
-rw-r--r--src/sql/sql.pro9
-rw-r--r--tools/configure/configureapp.cpp30
-rw-r--r--tools/configure/environment.cpp61
-rw-r--r--tools/configure/environment.h4
10 files changed, 149 insertions, 45 deletions
diff --git a/dist/changes-4.7.2 b/dist/changes-4.7.2
index d351856..03a5408 100644
--- a/dist/changes-4.7.2
+++ b/dist/changes-4.7.2
@@ -47,10 +47,10 @@ QtGui
- QWidget
* [QTMOBILITY-645] Send WinIdChange event when winId is set to zero.
- The window handle of a native widget may be set to zero in two
- situations: (i) temporarily, during reparenting and (ii) during
- widget destruction. Previously, no WinIdChange event was sent in
- either of these cases; now, it is sent in both cases.
+ The window handle of a native widget may be set to zero in two
+ situations: (i) temporarily, during reparenting and (ii) during
+ widget destruction. Previously, no WinIdChange event was sent in
+ either of these cases; now, it is sent in both cases.
QtDBus
------
@@ -129,6 +129,22 @@ Qt for Mac OS X
Qt for Symbian
--------------
+ - Paging changes
+ * [QT-3503] Remove PAGED keyword from all Qt-based binaries for
+ MMP-based build systems (abld, SBSv2 (a.k.a. Raptor)).
+ This changes the code paging field in the Symbian (E32Image) header
+ from "paged" to "default". Thus it is left to the configuration
+ of the particular device whether paging is used for the binary or
+ not. All devices that support code paging should have it turned
+ on (the value is stored in the HAL, so can be checked using eg.
+ fshell); data paging may or may not be turned on depending on the
+ device characteristics. Leaving both code and data paging as
+ "default" means that any limitations in the device (eg. around
+ flash wear) can be controlled by that device by disabling the
+ appropriate types of paging rather than being forced by the binary
+ (which may be deployed to several different devices with different
+ characteristics).
+
- Phonon MMF backend
* [QTBUG-11436] Added a MediaObject property which allows the client to
specify which Internet Access Point should be used for streaming.
@@ -192,6 +208,12 @@ Qt for Symbian
- qtmain.lib
* [QTBUG-14735] Use qtmain.lib to provide entry point for all Symbian applications.
+ - QWidget
+ * [QT-4416, QTBUG-17288] On devices which lack support for transparency
+ in EGL surfaces, setting Qt::WA_TranslucentBackground on a widget
+ whose windowType() is Qt::Window causes that widget to be rendered
+ using the raster graphics system.
+
Qt for Embedded Linux
---------------------
diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf
index 4d554bd..8ed326a 100644
--- a/mkspecs/common/symbian/symbian-mmp.conf
+++ b/mkspecs/common/symbian/symbian-mmp.conf
@@ -13,7 +13,7 @@ symbian-abld {
} else {
MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl"
}
-MMP_RULES += PAGED BYTEPAIRCOMPRESSTARGET
+MMP_RULES += BYTEPAIRCOMPRESSTARGET
MMP_RULES += $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6
@@ -28,7 +28,8 @@ INCLUDEPATH = \
# RVCT seems to do this automatically, but WINSCW compiler does not, so add it here.
MMP_RULES += "USERINCLUDE ."
-contains(S60_VERSION, 3.1):MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET
+# S60 3.1 devices don't support paging for non-ROM components, so no point in using the less efficient compression mechanism
+contains(S60_VERSION, 3.1):MMP_RULES -= BYTEPAIRCOMPRESSTARGET
QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE =
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index a001940..06aa191 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -33,7 +33,10 @@ contains(DEFINES,QT_EVAL):include(eval.pri)
symbian: {
TARGET.UID3=0x2001B2DC
- # Workaroud for problems with paging this dll
- MMP_RULES -= PAGED
- MMP_RULES *= UNPAGED
+ # Problems using data exports from this DLL mean that we can't page it on releases that don't support
+ # data exports (currently that's any release before Symbian^3)
+ pagingBlock = "$${LITERAL_HASH}ifndef SYMBIAN_DLL_DATA_EXPORTS_SUPPORTED" \
+ "UNPAGED" \
+ "$${LITERAL_HASH}endif"
+ MMP_RULES += pagingBlock
}
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index dbe8177..ca5f133 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -1012,6 +1012,33 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
}
}
+void QS60PixmapData::convertToDisplayMode(int mode)
+{
+ const TDisplayMode displayMode = static_cast<TDisplayMode>(mode);
+ if (!cfbsBitmap || cfbsBitmap->DisplayMode() == displayMode)
+ return;
+ if (image.depth() != TDisplayModeUtils::NumDisplayModeBitsPerPixel(displayMode)) {
+ qWarning("Cannot convert display mode due to depth mismatch");
+ return;
+ }
+
+ const TSize size = cfbsBitmap->SizeInPixels();
+ QScopedPointer<CFbsBitmap> newBitmap(createSymbianCFbsBitmap(size, displayMode));
+
+ const uchar *sptr = const_cast<const QImage &>(image).bits();
+ symbianBitmapDataAccess->beginDataAccess(newBitmap.data());
+ uchar *dptr = (uchar*)newBitmap->DataAddress();
+ Mem::Copy(dptr, sptr, image.byteCount());
+ symbianBitmapDataAccess->endDataAccess(newBitmap.data());
+
+ QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
+ delete cfbsBitmap;
+ lock.relock();
+ cfbsBitmap = newBitmap.take();
+ setSerialNumber(cfbsBitmap->Handle());
+ UPDATE_BUFFER();
+}
+
QPixmapData *QS60PixmapData::createCompatiblePixmapData() const
{
return new QS60PixmapData(pixelType());
diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h
index e4060dc..c440bbc 100644
--- a/src/gui/image/qpixmap_s60_p.h
+++ b/src/gui/image/qpixmap_s60_p.h
@@ -107,6 +107,8 @@ public:
void* toNativeType(NativeType type);
void fromNativeType(void* pixmap, NativeType type);
+ void convertToDisplayMode(int mode);
+
private:
void release();
void fromSymbianBitmap(CFbsBitmap* bitmap, bool lockFormat=false);
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 7dc5cb7..9f371a8 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -61,13 +61,11 @@ struct QS60WindowSurfacePrivate
QList<QImage*> bufferImages;
};
-QS60WindowSurface::QS60WindowSurface(QWidget* widget)
- : QWindowSurface(widget), d_ptr(new QS60WindowSurfacePrivate)
+TDisplayMode displayMode(bool opaque)
{
TDisplayMode mode = S60->screenDevice()->DisplayMode();
- bool isOpaque = qt_widget_private(widget)->isOpaque;
- if (isOpaque) {
+ if (opaque) {
mode = EColor16MU;
} else {
if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_3)
@@ -75,7 +73,13 @@ QS60WindowSurface::QS60WindowSurface(QWidget* widget)
else
mode = EColor16MA; // Symbian prior to Symbian^3 sw accelerates EColor16MA
}
+ return mode;
+}
+QS60WindowSurface::QS60WindowSurface(QWidget* widget)
+ : QWindowSurface(widget), d_ptr(new QS60WindowSurfacePrivate)
+{
+ TDisplayMode mode = displayMode(qt_widget_private(widget)->isOpaque);
// We create empty CFbsBitmap here -> it will be resized in setGeometry
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new
qt_symbian_throwIfError( bitmap->Create( TSize(0, 0), mode ) );
@@ -121,6 +125,11 @@ void QS60WindowSurface::beginPaint(const QRegion &rgn)
if (!qt_widget_private(window())->isOpaque) {
QS60PixmapData *pixmapData = static_cast<QS60PixmapData *>(d_ptr->device.data_ptr().data());
+
+ TDisplayMode mode = displayMode(false);
+ if (pixmapData->cfbsBitmap->DisplayMode() != mode)
+ pixmapData->convertToDisplayMode(mode);
+
pixmapData->beginDataAccess();
QPainter p(&pixmapData->image);
diff --git a/src/sql/sql.pro b/src/sql/sql.pro
index b8f819d..a02b0f4 100644
--- a/src/sql/sql.pro
+++ b/src/sql/sql.pro
@@ -20,7 +20,10 @@ include(models/models.pri)
symbian: {
TARGET.UID3=0x2001E61D
- # Workaroud for problems with paging this dll
- MMP_RULES -= PAGED
- MMP_RULES *= UNPAGED
+ # Problems using data exports from this DLL mean that we can't page it on releases that don't support
+ # data exports (currently that's any release before Symbian^3)
+ pagingBlock = "$${LITERAL_HASH}ifndef SYMBIAN_DLL_DATA_EXPORTS_SUPPORTED" \
+ "UNPAGED" \
+ "$${LITERAL_HASH}endif"
+ MMP_RULES += pagingBlock
}
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 8fa03ab..1b77058 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3244,8 +3244,7 @@ void Configure::generateConfigfiles()
}
// Copy configured mkspec to default directory, but remove the old one first, if there is any
- QString mkspecsPath = buildPath + "/mkspecs";
- QString defSpec = mkspecsPath + "/default";
+ QString defSpec = buildPath + "/mkspecs/default";
QFileInfo defSpecInfo(defSpec);
if (defSpecInfo.exists()) {
if (!Environment::rmdir(defSpec)) {
@@ -3255,30 +3254,13 @@ void Configure::generateConfigfiles()
}
}
- QDir mkspecsDir(mkspecsPath);
- if (!mkspecsDir.mkdir("default")) {
- cout << "Couldn't create default mkspec dir!" << endl;
- dictionary["DONE"] = "error";
- return;
- }
-
QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
QString pltSpec = sourcePath + "/mkspecs/" + spec;
- outName = defSpec + "/qmake.conf";
- QFile qmakeConfFile(outName);
- if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) {
- QTextStream qmakeConfStream;
- qmakeConfStream.setDevice(&qmakeConfFile);
- // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the
- // primary use of this variable by qmake to identify the original mkspec, the
- // variable is also used for few special cases where the absolute path is required.
- // Conversely, the include of the original qmake.conf must be done using relative path,
- // as some Qt binary deployments are done in a manner that doesn't allow for patching
- // the paths at the installation time.
- qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl;
- qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl;
- qmakeConfStream.flush();
- qmakeConfFile.close();
+ QString includeSpec = buildPath + "/mkspecs/" + spec;
+ if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) {
+ cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
+ dictionary["DONE"] = "error";
+ return;
}
// Generate the new qconfig.cpp file
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 05fd567..9d1c23a 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -407,10 +407,25 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
return exitCode;
}
-bool Environment::cpdir(const QString &srcDir, const QString &destDir)
+/*!
+ Copies the \a srcDir contents into \a destDir.
+
+ If \a includeSrcDir is not empty, any files with 'h', 'prf', or 'conf' suffixes
+ will not be copied over from \a srcDir. Instead a new file will be created
+ in \a destDir with the same name and that file will include a file with the
+ same name from the \a includeSrcDir using relative path and appropriate
+ syntax for the file type.
+
+ Returns true if copying was successful.
+*/
+bool Environment::cpdir(const QString &srcDir,
+ const QString &destDir,
+ const QString &includeSrcDir)
{
QString cleanSrcName = QDir::cleanPath(srcDir);
QString cleanDstName = QDir::cleanPath(destDir);
+ QString cleanIncludeName = QDir::cleanPath(includeSrcDir);
+
#ifdef CONFIGURE_DEBUG_CP_DIR
qDebug() << "Attempt to cpdir " << cleanSrcName << "->" << cleanDstName;
#endif
@@ -421,21 +436,59 @@ bool Environment::cpdir(const QString &srcDir, const QString &destDir)
bool result = true;
QDir dir = QDir(cleanSrcName);
+ QDir destinationDir = QDir(cleanDstName);
QFileInfoList allEntries = dir.entryInfoList(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
for (int i = 0; result && (i < allEntries.count()); ++i) {
QFileInfo entry = allEntries.at(i);
bool intermediate = true;
if (entry.isDir()) {
+ QString newIncSrcDir;
+ if (!includeSrcDir.isEmpty())
+ newIncSrcDir = QString("%1/%2").arg(cleanIncludeName).arg(entry.fileName());
+
intermediate = cpdir(QString("%1/%2").arg(cleanSrcName).arg(entry.fileName()),
- QString("%1/%2").arg(cleanDstName).arg(entry.fileName()));
+ QString("%1/%2").arg(cleanDstName).arg(entry.fileName()),
+ newIncSrcDir);
} else {
QString destFile = QString("%1/%2").arg(cleanDstName).arg(entry.fileName());
#ifdef CONFIGURE_DEBUG_CP_DIR
qDebug() << "About to cp (file)" << entry.absoluteFilePath() << "->" << destFile;
#endif
QFile::remove(destFile);
- intermediate = QFile::copy(entry.absoluteFilePath(), destFile);
- SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL);
+ QString suffix = entry.suffix();
+ if (!includeSrcDir.isEmpty() && (suffix == "prf" || suffix == "conf" || suffix == "h")) {
+ QString relativeIncludeFilePath = QString("%1/%2").arg(cleanIncludeName).arg(entry.fileName());
+ relativeIncludeFilePath = destinationDir.relativeFilePath(relativeIncludeFilePath);
+#ifdef CONFIGURE_DEBUG_CP_DIR
+ qDebug() << "...instead generate relative include to" << relativeIncludeFilePath;
+#endif
+ QFile currentFile(destFile);
+ if (currentFile.open(QFile::WriteOnly | QFile::Text)) {
+ QTextStream fileStream;
+ fileStream.setDevice(&currentFile);
+
+ if (suffix == "prf" || suffix == "conf") {
+ if (entry.fileName() == "qmake.conf") {
+ // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the
+ // primary use of this variable by qmake to identify the original mkspec, the
+ // variable is also used for few special cases where the absolute path is required.
+ // Conversely, the include of the original qmake.conf must be done using relative path,
+ // as some Qt binary deployments are done in a manner that doesn't allow for patching
+ // the paths at the installation time.
+ fileStream << "QMAKESPEC_ORIGINAL=" << cleanSrcName << endl << endl;
+ }
+ fileStream << "include(" << relativeIncludeFilePath << ")" << endl << endl;
+ } else if (suffix == "h") {
+ fileStream << "#include \"" << relativeIncludeFilePath << "\"" << endl << endl;
+ }
+
+ fileStream.flush();
+ currentFile.close();
+ }
+ } else {
+ intermediate = QFile::copy(entry.absoluteFilePath(), destFile);
+ SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL);
+ }
}
if(!intermediate) {
qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir();
diff --git a/tools/configure/environment.h b/tools/configure/environment.h
index e3e8629..61e97eb 100644
--- a/tools/configure/environment.h
+++ b/tools/configure/environment.h
@@ -69,7 +69,9 @@ public:
static bool detectExecutable(const QString &executable);
static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv);
- static bool cpdir(const QString &srcDir, const QString &destDir);
+ static bool cpdir(const QString &srcDir,
+ const QString &destDir,
+ const QString &includeSrcDir = QString());
static bool rmdir(const QString &name);
static QString symbianEpocRoot();