summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-02 16:36:37 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-02 16:36:37 (GMT)
commit84df4fc9dc922bb29e3c432b215275b30b6cffd0 (patch)
tree7bde645bbebb5c798008c9572e4d6c54b34e4b64
parent2282a77f4e4be2fef4b78a3557cb88fb86cdcf34 (diff)
parent4b7346a4bd30705ab5910d448ec56daa6568aa90 (diff)
downloadQt-84df4fc9dc922bb29e3c432b215275b30b6cffd0.zip
Qt-84df4fc9dc922bb29e3c432b215275b30b6cffd0.tar.gz
Qt-84df4fc9dc922bb29e3c432b215275b30b6cffd0.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix remote crash in delivering D-Bus calls with too few arguments Ensure that OpenGL contexts are attached to an NSView before first paint Reduce memory consumption of QtScript/JSC on Symbian Doc: Changed the default URL to avoid a Flash plugin crash on x86-64. Doc: Updated Supported Platforms page. Finished New binary of configure.exe with -mp/-no-mp option Turn Makefile.win32 into batch-mode, enable /MP and PCH Add option to enable -MP compile option for MSVC Rewrite ucstrcmp in terms of ucstrncmp Reorganise qelapsedtimer_unix.cpp for better inlining performance. Update the cpuid code to be better Revert "Restore default if to system default on session close."
-rwxr-xr-xconfigure.exebin1320960 -> 1320960 bytes
-rw-r--r--demos/browser/settings.cpp2
-rw-r--r--doc/src/platforms/supported-platforms.qdoc42
-rw-r--r--mkspecs/features/win32/msvc_mp.prf2
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf2
-rw-r--r--mkspecs/win32-msvc2010/qmake.conf2
-rw-r--r--qmake/Makefile.win32357
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog36
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri1
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h33
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp111
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h69
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h42
-rw-r--r--src/corelib/tools/qelapsedtimer_unix.cpp129
-rw-r--r--src/corelib/tools/qsimd.cpp106
-rw-r--r--src/corelib/tools/qstring.cpp23
-rw-r--r--src/dbus/qdbusintegrator.cpp3
-rw-r--r--src/gui/kernel/qapplication_mac.mm3
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h13
-rw-r--r--src/opengl/qgl_mac.mm14
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp42
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h1
-rw-r--r--src/script/script.pro5
-rw-r--r--tools/configure/configureapp.cpp14
25 files changed, 546 insertions, 508 deletions
diff --git a/configure.exe b/configure.exe
index 982e038..aba5872 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/browser/settings.cpp b/demos/browser/settings.cpp
index 5ceca67..fba781b 100644
--- a/demos/browser/settings.cpp
+++ b/demos/browser/settings.cpp
@@ -89,7 +89,7 @@ void SettingsDialog::loadFromSettings()
{
QSettings settings;
settings.beginGroup(QLatin1String("MainWindow"));
- QString defaultHome = QLatin1String("http://qt.nokia.com");
+ QString defaultHome = QLatin1String("http://doc.qt.nokia.com");
homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString());
settings.endGroup();
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index bb80ae5..6e9fb3d 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -64,18 +64,22 @@
\row \o Linux (32 and 64-bit)
\o gcc 4.2
\row \o Microsoft Windows XP
- \o gcc 4.4 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit)
+ \o gcc 4.4 (MinGW) (32-bit), MSVC 2005 (32 and 64-bit)
\row \o Microsoft Windows Vista
\o MSVC 2005, 2008
\row \o Microsoft Windows Vista 64bit
\o MSVC 2008
- \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Carbon, Cocoa 32 and 64bit)
+ \row \o Microsoft Windows 7
+ \o MSVC 2008
+ \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \o As provided by Apple
+ \row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Cocoa 32 and 64bit)
\o As provided by Apple
\row \o Embedded Linux QWS (ARM)
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
- \row \o Symbian (Symbian/S60 3.1, 3.2 and 5.0)
+ \row \o Symbian (Symbian/S60 5.0)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
@@ -90,19 +94,15 @@
\table
\header \o Platform
\o Compilers
- \row \o Windows XP, Vista
- \o gcc 3.4.2 (MinGW)
\row \o Windows 7
- \o MSVC 2008
- \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \o MSVC 2010
+ \row \o Apple Mac OS X 10.4 "Tiger" (Carbon)
\o As provided by Apple
- \row \o Apple Mac OS X 10.4 "Tiger"
+ \row \o Apple Mac OS X 10.5 "Leopard" (Carbon)
\o As provided by Apple
- \row \o HPUXi 11.11
- \o aCC 3.57, gcc 3.4
\row \o HPUXi 11.23
\o aCC 6.10
- \row \o Solaris 10 (UltraSparc, x86)
+ \row \o Solaris 10 UltraSparc
\o Sun Studio 12
\row \o AIX 6
\o Power5 xlC 7
@@ -114,8 +114,14 @@
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Embedded Linux X11 (ARM)
\o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
+ \row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
+ \o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
\row \o Windows CE 6.0 (ARMv4i, x86, MIPS)
\o MSVC 2008 WinCE 6.0 Professional
+ \row \o Maemo 5(Linux, ARM, X11)
+ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
+ \row \o Symbian (Symbian/S60 3.1, 3.2)
+ \o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
\section1 Tier 3 Platforms (Not supported by Nokia)
@@ -142,20 +148,12 @@
implied warranties of merchantability, fitness for a particular purpose, title and
non-infringement with regard to the Licensed Software.
- \section1 Planned Changes for Qt 4.7
+ \section1 Planned Changes for Qt 4.8
The following changes to the list of supported platforms are at time of publishing
- planned for Qt 4.7:
+ planned for Qt 4.8:
\list
- \o Upgrade Windows 7 to Tier 1
- \o Upgrade Mac OS X 10.6 to Tier 1
- \o Add support for Visual Studio 2010 (Tier 2)
- \o Move support for Carbon implementation of Qt on Mac OS X from Tier 1 to Tier 2
- \o Drop support for MinGW 3.4
- \o Drop support for Visual Studio 2003
- \o Drop support for HP-UX on PA-RISC
- \o Drop support for Windows Mobile 5
- \o Drop support for OpenGL ES Common Lite 1.0
+ \o Plans not yet released
\endlist
*/
diff --git a/mkspecs/features/win32/msvc_mp.prf b/mkspecs/features/win32/msvc_mp.prf
new file mode 100644
index 0000000..d6dea14
--- /dev/null
+++ b/mkspecs/features/win32/msvc_mp.prf
@@ -0,0 +1,2 @@
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_MP
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MP
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
index 9805e90..9a69aaa 100644
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ b/mkspecs/win32-msvc2008/qmake.conf
@@ -23,6 +23,7 @@ QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL
+QMAKE_CFLAGS_MP = -MP
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -32,6 +33,7 @@ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf
index 28d4d3c..8331c14 100644
--- a/mkspecs/win32-msvc2010/qmake.conf
+++ b/mkspecs/win32-msvc2010/qmake.conf
@@ -23,6 +23,7 @@ QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL
+QMAKE_CFLAGS_MP = -MP
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -32,6 +33,7 @@ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index b58757c..01387bf 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -24,9 +24,11 @@ LINK = link
#
!if "$(QMAKESPEC)" == "win32-msvc2005"
CFLAGS = /Zc:wchar_t-
+!elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010"
+CFLAGS = /MP
!endif
-CFLAGS = -c -Fo$@ \
+CFLAGS_BARE = -c -Fo./ \
-W3 -nologo -O2 \
-I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \
-I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \
@@ -37,42 +39,23 @@ CFLAGS = -c -Fo$@ \
-I$(SOURCE_PATH)\tools\shared \
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \
-DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \
- -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED \
- $(CFLAGS)
-CXXFLAGS = $(CFLAGS)
+ -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED
+CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS)
+
+CXXFLAGS_BARE = $(CFLAGS_BARE)
+CXXFLAGS = $(CFLAGS)
+
LFLAGS =
LIBS = ole32.lib advapi32.lib
LINKQMAKE = $(LINK) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN = vc60.pdb vc70.pdb qmake.pdb qmake.ilk
-!ELSE
-#
-# specific stuff for Borland make
-#
-!if !$d(BCB)
-BCB = $(MAKEDIR)\..
-!endif
-CXX = bcc32
-CFLAGS = -c -o$@ \
- -tWR -w -w-hid -w-use -O1 \
- -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian \
- -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \
- -I$(SOURCE_PATH)\include -I$(SOURCE_PATH)\include\QtCore \
- -I$(BUILD_PATH)\src\corelib\global \
- -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \
- -I$(SOURCE_PATH)\tools\shared \
- -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \
- -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \
- -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT
-CXXFLAGS = $(CFLAGS)
-LFLAGS = -L$(BCB)\lib -c -x -Gn -ap -Tpe c0x32.obj
-LIBS = import32.lib cw32i.lib
-LINKQMAKE = ilink32 $(LFLAGS) $(OBJS) $(QTOBJS), qmake.exe,,$(LIBS)
-ADDCLEAN = qmake.tds
+!ELSE
+!ERROR Unsupported compiler for this Makefile
!ENDIF
#qmake code
-OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
+OBJS = qmake_pch.obj project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_make.obj \
option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \
borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \
@@ -137,77 +120,9 @@ qmake.exe: $(OBJS) $(QTOBJS)
-copy qmake.exe $(BUILD_PATH)\bin\qmake.exe
clean::
- -del qbitarray.obj
- -del qbuffer.obj
- -del qcryptographichash.obj
- -del qlinkedlist.obj
- -del qfsfileengine.obj
- -del qfsfileengine_iterator.obj
- -del qbytearray.obj
- -del qvsnprintf.obj
- -del qbytearraymatcher.obj
- -del qdatetime.obj
- -del qdir.obj
- -del qdiriterator.obj
- -del qfile.obj
- -del qtemporaryfile.obj
- -del qabstractfileengine.obj
- -del qfsfileengine_win.obj
- -del qfsfileengine_iterator_win.obj
- -del qfileinfo.obj
- -del qglobal.obj
- -del qhash.obj
- -del qiodevice.obj
- -del qlist.obj
- -del qlocale.obj
- -del qmalloc.obj
- -del qmap.obj
- -del qregexp.obj
- -del qtextcodec.obj
- -del qutfcodec.obj
- -del qstring.obj
- -del qstringlist.obj
- -del qtextstream.obj
- -del qdatastream.obj
- -del quuid.obj
- -del qvector.obj
- -del qsettings.obj
- -del qlibraryinfo.obj
- -del qvariant.obj
- -del qurl.obj
- -del qsettings_win.obj
- -del qmetatype.obj
- -del project.obj
- -del main.obj
- -del makefile.obj
- -del unixmake.obj
- -del unixmake2.obj
- -del mingw_make.obj
- -del option.obj
- -del winmakefile.obj
- -del projectgenerator.obj
- -del property.obj
- -del meta.obj
- -del makefiledeps.obj
- -del metamakefile.obj
- -del xmloutput.obj
- -del borland_bmake.obj
- -del msvc_nmake.obj
- -del msvc_vcproj.obj
- -del msvc_vcxproj.obj
- -del msvc_objectmodel.obj
- -del msbuild_objectmodel.obj
- -del symmake.obj
- -del symmake_abld.obj
- -del symmake_sbsv2.obj
- -del symbiancommon.obj
- -del initprojectdeploy_symbian.obj
- -del registry.obj
- -del epocroot.obj
- -del pbuilder_pbx.obj
- -del qxmlstream.obj
- -del qxmlutils.obj
- -del qnumeric.obj
+ -del $(QTOBJS)
+ -del $(OBJS)
+ -del qmake_pch.pch
-del vc60.pdb
-del vc70.pdb
-del qmake.pdb
@@ -229,227 +144,53 @@ distclean:: clean
.cxx.obj:
$(CXX) $(CXXFLAGS) $<
-qsettings_win.obj: $(SOURCE_PATH)\src\corelib\io\qsettings_win.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qsettings_win.cpp
-
-qsettings.obj: $(SOURCE_PATH)\src\corelib\io\qsettings.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qsettings.cpp
-
-qlibraryinfo.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
-
-qnumeric.obj: $(SOURCE_PATH)\src\corelib\global\qnumeric.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qnumeric.cpp
-
-qvariant.obj: $(SOURCE_PATH)\src\corelib\kernel\qvariant.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\kernel\qvariant.cpp
-
-qurl.obj: $(SOURCE_PATH)\src\corelib\io\qurl.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qurl.cpp
-
-qtextstream.obj: $(SOURCE_PATH)\src\corelib\io\qtextstream.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qtextstream.cpp
-
-qdatastream.obj: $(SOURCE_PATH)\src\corelib\io\qdatastream.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdatastream.cpp
-
-qiodevice.obj: $(SOURCE_PATH)\src\corelib\io\qiodevice.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qiodevice.cpp
-
-qmalloc.obj: $(SOURCE_PATH)\src\corelib\global\qmalloc.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qmalloc.cpp
-
-qglobal.obj: $(SOURCE_PATH)\src\corelib\global\qglobal.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\global\qglobal.cpp
-
-qhash.obj: $(SOURCE_PATH)\src\corelib\tools\qhash.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qhash.cpp
-
-qbytearray.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearray.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbytearray.cpp
-
-qcryptographichash.obj: $(SOURCE_PATH)\src\corelib\tools\qcryptographichash.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qcryptographichash.cpp
-
-qvsnprintf.obj: $(SOURCE_PATH)\src\corelib\tools\qvsnprintf.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qvsnprintf.cpp
-
-qbytearraymatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp
-
-qchar.obj: $(SOURCE_PATH)\src\corelib\tools\qchar.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qchar.cpp
-
-qutfcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp
-
-qstring.obj: $(SOURCE_PATH)\src\corelib\tools\qstring.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstring.cpp
-
-qstringmatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qstringmatcher.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstringmatcher.cpp
-
-qlocale.obj: $(SOURCE_PATH)\src\corelib\tools\qlocale.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlocale.cpp
-
-quuid.obj: $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\plugin\quuid.cpp
-
-qbuffer.obj: $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qbuffer.cpp
-
-qlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlist.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlist.cpp
-
-qlinkedlist.obj: $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qlinkedlist.cpp
-
-qfile.obj: $(SOURCE_PATH)\src\corelib\io\qfile.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfile.cpp
-
-qtemporaryfile.obj: $(SOURCE_PATH)\src\corelib\io\qtemporaryfile.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qtemporaryfile.cpp
-
-qfsfileengine_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_win.cpp
-
-qfsfileengine_iterator_win.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator_win.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator_win.cpp
-
-qfsfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine.cpp
-
-qfsfileengine_iterator.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator.cpp
-
-qabstractfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp
-
-qtextcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp
-
-qregexp.obj: $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp
-
-qvector.obj: $(SOURCE_PATH)\src\corelib\tools\qvector.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qvector.cpp
+qmake_pch.obj:
+ $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP qmake_pch.h
-qbitarray.obj: $(SOURCE_PATH)\src\corelib\tools\qbitarray.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qbitarray.cpp
-
-qdir.obj: $(SOURCE_PATH)\src\corelib\io\qdir.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdir.cpp
-
-qdiriterator.obj: $(SOURCE_PATH)\src\corelib\io\qdiriterator.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qdiriterator.cpp
-
-qmetatype.obj: $(SOURCE_PATH)\src\corelib\kernel\qmetatype.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\kernel\qmetatype.cpp
-
-qfileinfo.obj: $(SOURCE_PATH)\src\corelib\io\qfileinfo.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qfileinfo.cpp
-
-qdatetime.obj: $(SOURCE_PATH)\src\corelib\tools\qdatetime.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qdatetime.cpp
-
-qstringlist.obj: $(SOURCE_PATH)\src\corelib\tools\qstringlist.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstringlist.cpp
-
-qmap.obj: $(SOURCE_PATH)\src\corelib\tools\qmap.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qmap.cpp
-
-qunicodetables.obj: $(SOURCE_PATH)\src\corelib\tools\qunicodetables.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qunicodetables.cpp
-
-makefile.obj: $(SOURCE_PATH)/qmake/generators\makefile.cpp
- $(CXX) $(CXXFLAGS) generators\makefile.cpp
-
-unixmake.obj: $(SOURCE_PATH)/qmake/generators\unix\unixmake.cpp
- $(CXX) $(CXXFLAGS) generators\unix\unixmake.cpp
-
-unixmake2.obj: $(SOURCE_PATH)/qmake/generators\unix\unixmake2.cpp
- $(CXX) $(CXXFLAGS) generators\unix\unixmake2.cpp
-
-winmakefile.obj: $(SOURCE_PATH)/qmake/generators/win32/winmakefile.cpp
- $(CXX) $(CXXFLAGS) generators/win32/winmakefile.cpp
-
-borland_bmake.obj: $(SOURCE_PATH)/qmake/generators/win32/borland_bmake.cpp
- $(CXX) $(CXXFLAGS) generators/win32/borland_bmake.cpp
-
-mingw_make.obj: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp
- $(CXX) $(CXXFLAGS) generators/win32/mingw_make.cpp
-
-msvc_nmake.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp
-
-msvc_vcproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp
-
-msvc_vcxproj.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcxproj.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_vcxproj.cpp
-
-msvc_objectmodel.obj: $(SOURCE_PATH)/qmake/generators/win32/msvc_objectmodel.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msvc_objectmodel.cpp
-
-msbuild_objectmodel.obj: $(SOURCE_PATH)/qmake/generators/win32/msbuild_objectmodel.cpp
- $(CXX) $(CXXFLAGS) generators/win32/msbuild_objectmodel.cpp
-
-symmake.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symmake.cpp
-
-symmake_abld.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symmake_abld.cpp
-
-symmake_sbsv2.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
-
-symbiancommon.obj: $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/symbiancommon.cpp
-
-initprojectdeploy_symbian.obj: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
- $(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
+{$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-registry.obj: $(SOURCE_PATH)/tools/shared/windows/registry.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp
+{$(SOURCE_PATH)\qmake\generators\symbian}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-epocroot.obj: $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp
+{$(SOURCE_PATH)\qmake\generators\unix}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-md5.obj: $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp
+{$(SOURCE_PATH)\qmake\generators\win32}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-project.obj: $(SOURCE_PATH)/qmake/project.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) project.cpp
+{$(SOURCE_PATH)\qmake\generators}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-meta.obj: $(SOURCE_PATH)/qmake/meta.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) meta.cpp
+{$(SOURCE_PATH)\qmake}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-main.obj: $(SOURCE_PATH)/qmake/main.cpp $(SOURCE_PATH)/qmake/project.h
- $(CXX) $(CXXFLAGS) main.cpp
+{$(SOURCE_PATH)\src\3rdparty\md5}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-option.obj: $(SOURCE_PATH)/qmake/option.cpp $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) option.cpp
+{$(SOURCE_PATH)\src\corelib\codecs}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-property.obj: $(SOURCE_PATH)/qmake/property.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h
- $(CXX) $(CXXFLAGS) property.cpp
+{$(SOURCE_PATH)\src\corelib\global}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-projectgenerator.obj: $(SOURCE_PATH)/qmake/generators/projectgenerator.cpp
- $(CXX) $(CXXFLAGS) generators/projectgenerator.cpp
+{$(SOURCE_PATH)\src\corelib\io}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-pbuilder_pbx.obj: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp
- $(CXX) $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp
+{$(SOURCE_PATH)\src\corelib\kernel}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-makefiledeps.obj: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp
- $(CXX) $(CXXFLAGS) generators/makefiledeps.cpp
+{$(SOURCE_PATH)\src\corelib\plugin}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp
- $(CXX) $(CXXFLAGS) generators/metamakefile.cpp
+{$(SOURCE_PATH)\src\corelib\tools}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-xmloutput.obj: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp
- $(CXX) $(CXXFLAGS) generators/xmloutput.cpp
+{$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-qxmlstream.obj: $(SOURCE_PATH)\src\corelib\xml\qxmlstream.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\xml\qxmlstream.cpp
+{$(SOURCE_PATH)\tools\shared\symbian}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
-qxmlutils.obj: $(SOURCE_PATH)\src\corelib\xml\qxmlutils.cpp
- $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\xml\qxmlutils.cpp
+{$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj::
+ $(CXX) $(CXXFLAGS) $<
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
index 93431df..fbaf5d2 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-06-18 Tucker Jay <jay.tucker@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ [Symbian] Lazy commit of memory required in JSC register file
+ https://bugs.webkit.org/show_bug.cgi?id=34349
+
+ * JavaScriptCore.pro: Added 1 new Symbian source file
+ * interpreter/RegisterFile.cpp:
+ (JSC::RegisterFile::~RegisterFile):
+ * interpreter/RegisterFile.h:
+ (JSC::RegisterFile::):
+ (JSC::RegisterFile::start):
+ (JSC::RegisterFile::end):
+ (JSC::RegisterFile::size):
+ (JSC::RegisterFile::setNumGlobals):
+ (JSC::RegisterFile::numGlobals):
+ (JSC::RegisterFile::maxGlobals):
+ (JSC::RegisterFile::lastGlobal):
+ (JSC::RegisterFile::markGlobals):
+ (JSC::RegisterFile::markCallFrames):
+ (JSC::isPageAligned):
+ (JSC::RegisterFile::RegisterFile):
+ (JSC::RegisterFile::shrink):
+ (JSC::RegisterFile::grow):
+ * wtf/symbian/RegisterFileAllocatorSymbian.cpp: Added.
+ (WTF::RegisterFileAllocator::RegisterFileAllocator):
+ Helper class to allocate memory required by RegisterFile
+ more efficiently.
+ (WTF::RegisterFileAllocator::~RegisterFileAllocator):
+ (WTF::RegisterFileAllocator::buffer):
+ (WTF::RegisterFileAllocator::grow):
+ (WTF::RegisterFileAllocator::shrink):
+ * wtf/symbian/RegisterFileAllocatorSymbian.h: Added.
+ * wtf/symbian/SymbianDefines.h: Added.
+
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
index 75737ae..d75bd31 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
@@ -211,6 +211,7 @@ SOURCES += \
wtf/qt/ThreadingQt.cpp \
wtf/RandomNumber.cpp \
wtf/RefCountedLeakCounter.cpp \
+ wtf/symbian/RegisterFileAllocatorSymbian.cpp \
wtf/ThreadingNone.cpp \
wtf/Threading.cpp \
wtf/TypeTraits.cpp \
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp
index 939573b..293fc38 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.cpp
@@ -40,6 +40,8 @@ RegisterFile::~RegisterFile()
VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT);
#endif
VirtualFree(m_buffer, 0, MEM_RELEASE);
+#elif OS(SYMBIAN)
+ delete m_registerFileAllocator;
#else
fastFree(m_buffer);
#endif
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h
index 34e2504..49304d9 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h
@@ -41,6 +41,10 @@
#include <sys/mman.h>
#endif
+#if OS(SYMBIAN)
+#include <wtf/symbian/RegisterFileAllocatorSymbian.h>
+#endif
+
namespace JSC {
/*
@@ -152,12 +156,21 @@ namespace JSC {
#if HAVE(VIRTUALALLOC)
Register* m_commitEnd;
#endif
+#if OS(SYMBIAN)
+ // Commits and frees a continguous chunk of memory as required
+ WTF::RegisterFileAllocator* m_registerFileAllocator;
+#endif
JSGlobalObject* m_globalObject; // The global object whose vars are currently stored in the register file.
};
// FIXME: Add a generic getpagesize() to WTF, then move this function to WTF as well.
- inline bool isPageAligned(size_t size) { return size != 0 && size % (8 * 1024) == 0; }
+ // This is still a hack that should be fixed later. We know that a Symbian page size is 4K.
+ #if OS(SYMBIAN)
+ inline bool isPageAligned(size_t size) { return size && !(size % (4 * 1024)); }
+ #else
+ inline bool isPageAligned(size_t size) { return size && !(size % (8 * 1024)); }
+ #endif
inline RegisterFile::RegisterFile(size_t capacity, size_t maxGlobals)
: m_numGlobals(0)
@@ -204,7 +217,13 @@ namespace JSC {
CRASH();
}
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_buffer) + committedSize);
- #else
+ #elif OS(SYMBIAN)
+ m_registerFileAllocator = new WTF::RegisterFileAllocator(bufferLength);
+ m_buffer = (Register*)(m_registerFileAllocator->buffer());
+ // start by committing enough space to hold maxGlobals
+ void* newEnd = (void*)((int)m_buffer + (maxGlobals * sizeof(Register)));
+ m_registerFileAllocator->grow(newEnd);
+ #else
/*
* If neither MMAP nor VIRTUALALLOC are available - use fastMalloc instead.
*
@@ -226,8 +245,13 @@ namespace JSC {
if (newEnd >= m_end)
return;
m_end = newEnd;
- if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity)
+ if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) {
+#if OS(SYMBIAN)
+ m_registerFileAllocator->shrink(newEnd);
+#endif
+
releaseExcessCapacity();
+ }
}
inline bool RegisterFile::grow(Register* newEnd)
@@ -252,6 +276,9 @@ namespace JSC {
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_commitEnd) + size);
}
#endif
+#if OS(SYMBIAN)
+ m_registerFileAllocator->grow((void*)newEnd);
+#endif
if (newEnd > m_maxUsed)
m_maxUsed = newEnd;
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
new file mode 100644
index 0000000..baa7841
--- /dev/null
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if OS(SYMBIAN)
+
+#include "RegisterFileAllocatorSymbian.h"
+
+namespace WTF {
+
+/** Efficiently allocates memory pools of size poolSize.
+ * Primarily designed for JSC RegisterFile's needs.
+ * Not thread-safe.
+ */
+RegisterFileAllocator::RegisterFileAllocator(TUint32 reservationSize, TUint32 poolSize) :
+ m_reserved(reservationSize), m_poolSize(poolSize)
+{
+ // Get system's page size value.
+ SYMBIAN_PAGESIZE(m_pageSize);
+
+ // We only accept multiples of system page size for both initial reservation
+ // and the alignment/pool size
+ m_reserved = SYMBIAN_ROUNDUPTOMULTIPLE(m_reserved, m_pageSize);
+ __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_poolSize, m_pageSize),
+ User::Panic(_L("RegisterFileAllocator1"), KErrArgument));
+
+ // Open a Symbian RChunk, and reserve requested virtual address range
+ // Any thread in this process can operate this RChunk due to EOwnerProcess access rights.
+ TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reserved , EOwnerProcess);
+ if (ret != KErrNone)
+ User::Panic(_L("RegisterFileAllocator2"), ret);
+
+ m_buffer = (void*)m_chunk.Base();
+ m_resEnd = (void*)(m_chunk.Base() + m_chunk.MaxSize());
+ m_comEnd = m_buffer;
+}
+
+RegisterFileAllocator::~RegisterFileAllocator()
+{
+ // release everything!
+ m_chunk.Decommit(0, m_chunk.MaxSize());
+ m_chunk.Close();
+}
+
+void* RegisterFileAllocator::buffer() const
+{
+ return m_buffer;
+}
+
+void RegisterFileAllocator::grow(void* newEnd)
+{
+ // trying to commit more memory than reserved!
+ if (newEnd > m_resEnd)
+ return;
+
+ if (newEnd > m_comEnd) {
+ TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd);
+ nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize);
+ TInt offset = (TInt)m_comEnd - (TInt)m_buffer;
+
+ TInt ret = m_chunk.Commit(offset, nBytes);
+ if (ret == KErrNone)
+ m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
+ }
+}
+
+void RegisterFileAllocator::shrink(void* newEnd)
+{
+ if (newEnd < m_comEnd) {
+ TInt nBytes = (TInt)newEnd - (TInt)m_comEnd;
+ if (nBytes >= m_poolSize) {
+ TInt offset = SYMBIAN_ROUNDUPTOMULTIPLE((TUint)newEnd, m_poolSize) - (TInt)m_buffer;
+ nBytes = (TInt)m_comEnd - offset - (TInt)m_buffer;
+ if (nBytes > 0) {
+ TInt ret = m_chunk.Decommit(offset, nBytes);
+ if (ret == KErrNone)
+ m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
+ }
+ }
+ }
+}
+
+} // end of namespace
+
+#endif // SYMBIAN
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h
new file mode 100644
index 0000000..4cfc8c5
--- /dev/null
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RegisterFileAllocatorSymbian_h
+#define RegisterFileAllocatorSymbian_h
+
+#include "SymbianDefines.h"
+
+namespace WTF {
+
+/**
+ * Allocates contiguous regions of size poolSize.
+ * poolSize must be a multiple of system page size (typically 4K on Symbian/ARM)
+ *
+ * @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes).
+ * @param poolSize Size of a single allocation.
+ */
+class RegisterFileAllocator {
+
+public:
+ RegisterFileAllocator(
+ TUint32 reservationSize, TUint32 poolSize = SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE);
+ ~RegisterFileAllocator();
+ void* buffer() const;
+ void grow(void* newEnd);
+ void shrink(void* newEnd);
+
+private:
+ RChunk m_chunk; // Symbian chunk that lets us reserve/commit/decommit
+
+ // all following values are in numbers of bytes
+ TInt m_pageSize; // cached value of system page size, typically 4K on Symbian
+ TUint32 m_reserved; // total number of reserved bytes in virtual memory
+ TUint32 m_poolSize; // size of one memory pool, set by default to 64K in wtf/symbian/SymbianDefines.h
+
+ void* m_buffer; // pointer to base of the chunk
+ void* m_comEnd; // pointer to end of currently committed memory
+ void* m_resEnd; // pointer to end of reserved memory
+
+};
+
+} // end of namespace
+
+#endif // RegisterFileAllocatorSymbian_h
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h
new file mode 100644
index 0000000..43e22b3
--- /dev/null
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SymbianDefines_h
+#define SymbianDefines_h
+
+#include <e32cmn.h>
+#include <e32std.h>
+#include <hal.h>
+
+#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x));
+#define SYMBIAN_FREERAM(x) (HAL::Get(HALData::EMemoryRAMFree, x));
+#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof) ( (x + multipleof - 1) & ~(multipleof - 1) )
+
+#define SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE 65536 // 64K
+
+#endif // SymbianDefines_h
diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp
index 2c4ea58..633fa00 100644
--- a/src/corelib/tools/qelapsedtimer_unix.cpp
+++ b/src/corelib/tools/qelapsedtimer_unix.cpp
@@ -40,22 +40,58 @@
****************************************************************************/
#include "qelapsedtimer.h"
-#include "qpair.h"
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
-#if !defined(QT_NO_CLOCK_MONOTONIC)
-# if defined(QT_BOOTSTRAPPED)
-# define QT_NO_CLOCK_MONOTONIC
+#if defined(QT_NO_CLOCK_MONOTONIC) || defined(QT_BOOTSTRAPPED)
+// turn off the monotonic clock
+# ifdef _POSIX_MONOTONIC_CLOCK
+# undef _POSIX_MONOTONIC_CLOCK
# endif
+# define _POSIX_MONOTONIC_CLOCK -1
#endif
QT_BEGIN_NAMESPACE
-static qint64 fractionAdjustment()
+#if (_POSIX_MONOTONIC_CLOCK-0 != 0)
+static const bool monotonicClockChecked = true;
+static const bool monotonicClockAvailable = _POSIX_MONOTONIC_CLOCK > 0;
+#else
+static int monotonicClockChecked = false;
+static int monotonicClockAvailable = false;
+#endif
+
+#ifdef Q_CC_GNU
+# define is_likely(x) __builtin_expect((x), 1)
+#else
+# define is_likely(x) (x)
+#endif
+#define load_acquire(x) ((volatile const int&)(x))
+#define store_release(x,v) ((volatile int&)(x) = (v))
+
+static void unixCheckClockType()
+{
+#if (_POSIX_MONOTONIC_CLOCK-0 == 0)
+ if (is_likely(load_acquire(monotonicClockChecked)))
+ return;
+
+# if defined(_SC_MONOTONIC_CLOCK)
+ // detect if the system support monotonic timers
+ long x = sysconf(_SC_MONOTONIC_CLOCK);
+ store_release(monotonicClockAvailable, x >= 200112L);
+# endif
+
+ store_release(monotonicClockChecked, true);
+#endif
+}
+
+static inline qint64 fractionAdjustment()
{
- if (QElapsedTimer::isMonotonic()) {
+ // disabled, but otherwise indicates bad usage of QElapsedTimer
+ //Q_ASSERT(monotonicClockChecked);
+
+ if (monotonicClockAvailable) {
// the monotonic timer is measured in nanoseconds
// 1 ms = 1000000 ns
return 1000*1000ull;
@@ -68,90 +104,73 @@ static qint64 fractionAdjustment()
bool QElapsedTimer::isMonotonic()
{
-#if (_POSIX_MONOTONIC_CLOCK-0 > 0)
- return true;
-#else
- static int returnValue = 0;
-
- if (returnValue == 0) {
-# if (_POSIX_MONOTONIC_CLOCK-0 < 0) || !defined(_SC_MONOTONIC_CLOCK)
- returnValue = -1;
-# elif (_POSIX_MONOTONIC_CLOCK == 0)
- // detect if the system support monotonic timers
- long x = sysconf(_SC_MONOTONIC_CLOCK);
- returnValue = (x >= 200112L) ? 1 : -1;
-# endif
- }
-
- return returnValue != -1;
-#endif
+ unixCheckClockType();
+ return monotonicClockAvailable;
}
QElapsedTimer::ClockType QElapsedTimer::clockType()
{
- return isMonotonic() ? MonotonicClock : SystemTime;
+ unixCheckClockType();
+ return monotonicClockAvailable ? MonotonicClock : SystemTime;
}
-static inline QPair<long, long> do_gettime()
+static inline void do_gettime(qint64 *sec, qint64 *frac)
{
-#if (_POSIX_MONOTONIC_CLOCK-0 > 0)
- timespec ts;
- clock_gettime(CLOCK_MONOTONIC, &ts);
- return qMakePair<long,long>(ts.tv_sec, ts.tv_nsec);
-#else
-# if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED)
- if (QElapsedTimer::isMonotonic()) {
+#if (_POSIX_MONOTONIC_CLOCK-0 >= 0)
+ unixCheckClockType();
+ if (is_likely(monotonicClockAvailable)) {
timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
- return qMakePair<long,long>(ts.tv_sec, ts.tv_nsec);
+ *sec = ts.tv_sec;
+ *frac = ts.tv_nsec;
+ return;
}
-# endif
+#endif
// use gettimeofday
timeval tv;
::gettimeofday(&tv, 0);
- return qMakePair<long,long>(tv.tv_sec, tv.tv_usec);
-#endif
+ *sec = tv.tv_sec;
+ *frac = tv.tv_usec;
}
// used in qcore_unix.cpp and qeventdispatcher_unix.cpp
timeval qt_gettime()
{
- QPair<long, long> r = do_gettime();
+ qint64 sec, frac;
+ do_gettime(&sec, &frac);
timeval tv;
- tv.tv_sec = r.first;
- tv.tv_usec = r.second;
- if (QElapsedTimer::isMonotonic())
+ tv.tv_sec = sec;
+ tv.tv_usec = frac;
+ if (monotonicClockAvailable)
tv.tv_usec /= 1000;
return tv;
}
+static qint64 elapsedAndRestart(qint64 sec, qint64 frac,
+ qint64 *nowsec, qint64 *nowfrac)
+{
+ do_gettime(nowsec, nowfrac);
+ sec = *nowsec - sec;
+ frac = *nowfrac - frac;
+ return sec * Q_INT64_C(1000) + frac / fractionAdjustment();
+}
+
void QElapsedTimer::start()
{
- QPair<long, long> r = do_gettime();
- t1 = r.first;
- t2 = r.second;
+ do_gettime(&t1, &t2);
}
qint64 QElapsedTimer::restart()
{
- QPair<long, long> r = do_gettime();
- qint64 oldt1 = t1;
- qint64 oldt2 = t2;
- t1 = r.first;
- t2 = r.second;
-
- r.first -= oldt1;
- r.second -= oldt2;
- return r.first * Q_INT64_C(1000) + r.second / fractionAdjustment();
+ return elapsedAndRestart(t1, t2, &t1, &t2);
}
qint64 QElapsedTimer::elapsed() const
{
- QElapsedTimer now;
- now.start();
- return msecsTo(now);
+ qint64 sec, frac;
+ return elapsedAndRestart(t1, t2, &sec, &frac);
}
qint64 QElapsedTimer::msecsSinceReference() const
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 68ab033..7349432 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -140,56 +140,41 @@ static inline uint detectProcessorFeatures()
uint result = 0;
/* see p. 118 of amd64 instruction set manual Vol3 */
#if defined(Q_CC_GNU)
- asm ("push %%ebx\n"
- "pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
- "popf\n"
- "pushf\n"
- "pop %%eax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 1f\n"
-
- "mov $0x00000001, %%eax\n"
- "cpuid\n"
- "1:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- "mov %%ecx, %1\n"
- : "=r" (result), "=r" (feature_result)
- :
- : "%eax", "%ecx", "%edx"
- );
-
- asm ("push %%ebx\n"
- "pushf\n"
- "pop %%eax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%eax\n"
+ long cpuid_supported, tmp1;
+ asm ("pushf\n"
+ "pop %0\n"
+ "mov %0, %1\n"
+ "xor $0x00200000, %0\n"
+ "push %0\n"
"popf\n"
"pushf\n"
- "pop %%eax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 2f\n"
-
- "mov $0x80000000, %%eax\n"
- "cpuid\n"
- "cmp $0x80000000, %%eax\n"
- "jbe 2f\n"
- "mov $0x80000001, %%eax\n"
- "cpuid\n"
- "2:\n"
- "pop %%ebx\n"
- "mov %%edx, %0\n"
- : "=r" (extended_result)
- :
- : "%eax", "%ecx", "%edx"
- );
+ "pop %0\n"
+ "xor %1, %0\n" // %eax is now 0 if CPUID is not supported
+ : "=a" (cpuid_supported), "=r" (tmp1)
+ );
+ if (cpuid_supported) {
+ asm ("xchg %%ebx, %2\n"
+ "cpuid\n"
+ "xchg %%ebx, %2\n"
+ : "=c" (feature_result), "=d" (result), "=&r" (tmp1)
+ : "a" (1));
+
+ asm ("xchg %%ebx, %1\n"
+ "cpuid\n"
+ "cmp $0x80000000, %%eax\n"
+ "jnbe 1f\n"
+ "xor %0, %0\n"
+ "jmp 2f\n"
+ "1:\n"
+ "mov $0x80000001, %%eax\n"
+ "cpuid\n"
+ "2:\n"
+ "xchg %%ebx, %1\n"
+ : "=d" (extended_result), "=&r" (tmp1)
+ : "a" (0x80000000)
+ : "%ecx"
+ );
+ }
#elif defined (Q_OS_WIN)
_asm {
@@ -289,27 +274,10 @@ static inline uint detectProcessorFeatures()
uint feature_result = 0;
#if defined(Q_CC_GNU)
- asm ("push %%rbx\n"
- "pushf\n"
- "pop %%rax\n"
- "mov %%eax, %%ebx\n"
- "xor $0x00200000, %%eax\n"
- "push %%rax\n"
- "popf\n"
- "pushf\n"
- "pop %%rax\n"
- "xor %%edx, %%edx\n"
- "xor %%ebx, %%eax\n"
- "jz 1f\n"
-
- "mov $0x00000001, %%eax\n"
- "cpuid\n"
- "1:\n"
- "pop %%rbx\n"
- "mov %%ecx, %0\n"
- : "=r" (feature_result)
- :
- : "%eax", "%ecx", "%edx"
+ asm ("cpuid"
+ : "=c" (feature_result)
+ : "a" (1)
+ : "%ebx", "%edx"
);
#elif defined (Q_OS_WIN64)
{
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index d940bf8..2813b29 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -173,19 +173,6 @@ static int ucstricmp(const ushort *a, const ushort *ae, const uchar *b)
return 1;
}
-// Unicode case-sensitive comparison
-static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen)
-{
- if (a == b && alen == blen)
- return 0;
- int l = qMin(alen, blen);
- while (l-- && *a == *b)
- a++,b++;
- if (l == -1)
- return (alen-blen);
- return a->unicode() - b->unicode();
-}
-
// Unicode case-sensitive compare two same-sized strings
static int ucstrncmp(const QChar *a, const QChar *b, int l)
{
@@ -196,6 +183,16 @@ static int ucstrncmp(const QChar *a, const QChar *b, int l)
return a->unicode() - b->unicode();
}
+// Unicode case-sensitive comparison
+static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen)
+{
+ if (a == b && alen == blen)
+ return 0;
+ int l = qMin(alen, blen);
+ int cmp = ucstrncmp(a, b, l);
+ return cmp ? cmp : (alen-blen);
+}
+
// Unicode case-insensitive compare two same-sized strings
static int ucstrnicmp(const ushort *a, const ushort *b, int l)
{
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 7951177..3833874 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -714,6 +714,9 @@ QDBusCallDeliveryEvent* QDBusConnectionPrivate::prepareReply(QDBusConnectionPriv
if (metaTypes[n] == QDBusMetaTypeId::message)
--n;
+ if (msg.arguments().count() < n)
+ return 0; // too few arguments
+
// check that types match
for (int i = 0; i < n; ++i)
if (metaTypes.at(i + 1) != msg.arguments().at(i).userType() &&
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 321492d..dd819e5 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -737,9 +737,6 @@ static void qt_post_window_change_event(QWidget *widget)
*/
static void qt_mac_update_child_gl_widgets(QWidget *widget)
{
- if (widget->isWindow())
- return;
-
// Update all OpenGL child widgets for the given widget.
QList<QWidgetPrivate::GlWidgetInfo> &glWidgets = qt_widget_private(widget)->glWidgets;
QList<QWidgetPrivate::GlWidgetInfo>::iterator end = glWidgets.end();
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 6795149..16f5bd6 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE
extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm
extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp
+extern void qt_event_request_window_change(QWidget *); // qapplication_mac.mm
+extern void qt_mac_send_posted_gl_updates(QWidget *widget); // qapplication_mac.mm
Q_GLOBAL_STATIC(QPointer<QWidget>, currentDragTarget);
@@ -227,6 +229,17 @@ QT_END_NAMESPACE
[self release];
}
+- (void)setInitialFirstResponder:(NSView *)view
+{
+ // This method is called the first time the window is placed on screen and
+ // is the earliest point in time we can connect OpenGL contexts to NSViews.
+ QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+ qt_event_request_window_change(qwidget);
+ qt_mac_send_posted_gl_updates(qwidget);
+
+ [super setInitialFirstResponder:view];
+}
+
- (BOOL)makeFirstResponder:(NSResponder *)responder
{
// For some reason Cocoa wants to flip the first responder
diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm
index 66fe7d3..f023a97 100644
--- a/src/opengl/qgl_mac.mm
+++ b/src/opengl/qgl_mac.mm
@@ -697,9 +697,17 @@ void QGLContext::updatePaintDevice()
QWidget *w = (QWidget *)d->paintDevice;
NSView *view = qt_mac_nativeview_for(w);
- // ideally we would use QWidget::isVisible(), but we get "invalid drawable" errors
- if (![(NSWindow *)qt_mac_window_for(w) isVisible])
- return;
+ // Trying to attach the GL context to the NSView will fail with
+ // "invalid drawable" if done too soon, but we have to make sure
+ // the connection is made before the first paint event. Using
+ // the NSView do to this check fails as the NSView is visible
+ // before it's safe to connect, and using the NSWindow fails as
+ // the NSWindow will become visible after the first paint event.
+ // This leaves us with the QWidget, who's visible state seems
+ // to match the point in time when it's safe to connect.
+ if (!w || !w->isVisible())
+ return; // Not safe to attach GL context to view yet
+
if ([static_cast<NSOpenGLContext *>(d->cx) view] != view && ![view isHidden])
[static_cast<NSOpenGLContext *>(d->cx) setView:view];
} else if (d->paintDevice->devType() == QInternal::Pixmap) {
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 19f13c2..2091898 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -111,13 +111,15 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
Cancel();
iSocketServ.Close();
- // Restore default interface to system default
- restoreDefaultIf();
+ // Close global 'Open C' RConnection
+ // Clears also possible unsetdefaultif() flags.
+ setdefaultif(0);
iConnectionMonitor.Close();
iOpenCLibrary.Close();
#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
- qDebug() << "QNS this : " << QString::number((uint)this) << " - destroyed (and restoreDefaultIf())";
+ qDebug() << "QNS this : " << QString::number((uint)this)
+ << " - destroyed (and setdefaultif(0))";
#endif
}
@@ -533,8 +535,15 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
Cancel(); // closes iConnection
iSocketServ.Close();
- // Restore default interface to system default
- restoreDefaultIf();
+ // Close global 'Open C' RConnection. If OpenC supports,
+ // close the defaultif for good to avoid difficult timing
+ // and bouncing issues of network going immediately back up
+ // because of e.g. select() thread etc.
+ if (iDynamicUnSetdefaultif) {
+ iDynamicUnSetdefaultif();
+ } else {
+ setdefaultif(0);
+ }
// If UserChoice, go down immediately. If some other configuration,
// go down immediately if there is no reports expected from the platform;
@@ -1459,29 +1468,6 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
}
}
-void QNetworkSessionPrivateImpl::restoreDefaultIf()
-{
- QNetworkConfigurationPrivatePointer config = engine->defaultConfiguration();
-
- QMutexLocker locker(&config->mutex);
-
- ifreq ifr;
- memset(&ifr, 0, sizeof(ifreq));
-
- switch (config->type) {
- case QNetworkConfiguration::InternetAccessPoint:
- strcpy(ifr.ifr_name, config->name.toUtf8().constData());
- break;
- case QNetworkConfiguration::ServiceNetwork:
- ifr.ifr_ifru.snap_id = toSymbianConfig(config)->numericId;
- break;
- default:
- ;
- };
-
- setdefaultif(&ifr);
-}
-
#if defined(SNAP_FUNCTIONALITY_AVAILABLE)
bool QNetworkSessionPrivateImpl::easyWlanTrueIapId(TUint32 &trueIapId) const
{
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 51f2e70..8e3e997 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -141,7 +141,6 @@ private:
void handleSymbianConnectionStatusChange(TInt aConnectionStatus, TInt aError, TUint accessPointId = 0);
QNetworkConfiguration bestConfigFromSNAP(const QNetworkConfiguration& snapConfig) const;
QNetworkConfiguration activeConfiguration(TUint32 iapId = 0) const;
- void restoreDefaultIf();
#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface(TUint iapId) const;
#endif
diff --git a/src/script/script.pro b/src/script/script.pro
index 55217e0..4ee86d7 100644
--- a/src/script/script.pro
+++ b/src/script/script.pro
@@ -79,7 +79,10 @@ INCLUDEPATH += $$PWD
include(script.pri)
-symbian:TARGET.UID3=0x2001B2E1
+symbian {
+ TARGET.UID3=0x2001B2E1
+ LIBS += -lhal
+}
# WebKit doesn't compile in C++0x mode
*-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 09da581..89d3ef0 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -381,6 +381,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
dictionary[ "LTCG" ] = "no";
dictionary[ "NATIVE_GESTURES" ] = "yes";
+ dictionary[ "MSVC_MP" ] = "no";
}
Configure::~Configure()
@@ -534,6 +535,13 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-ltcg") {
dictionary[ "LTCG" ] = "no";
}
+ else if (configCmdLine.at(i) == "-mp") {
+ dictionary[ "MSVC_MP" ] = "yes";
+ }
+ else if (configCmdLine.at(i) == "-no-mp") {
+ dictionary[ "MSVC_MP" ] = "no";
+ }
+
#endif
else if (configCmdLine.at(i) == "-platform") {
@@ -1848,6 +1856,8 @@ bool Configure::displayHelp()
desc("STYLE_S60" , "yes", "", " s60\n", ' ');
desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7.");
desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7.");
+ desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC");
+ desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)");
/* We do not support -qconfig on Windows yet
@@ -2822,7 +2832,7 @@ void Configure::generateCachefile()
for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) {
cacheStream << (*var) << endl;
}
- cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental create_prl link_prl depend_includepath QTDIR_build" << endl;
+ cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl;
QStringList buildParts;
buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations";
@@ -2885,6 +2895,8 @@ void Configure::generateCachefile()
if (dictionary[ "LTCG" ] == "yes")
configStream << " ltcg";
+ if (dictionary[ "MSVC_MP" ] == "yes")
+ configStream << " msvc_mp";
if (dictionary[ "STL" ] == "yes")
configStream << " stl";
if (dictionary[ "EXCEPTIONS" ] == "yes")