summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorninerider <qt-info@nokia.com>2009-10-09 12:33:03 (GMT)
committerninerider <qt-info@nokia.com>2009-10-09 12:33:03 (GMT)
commitd788b9356fcf6cce041c021ae4dc5087a6ce40ce (patch)
tree379e9ce3aa94c2e3a511fb2db3f64b0efab853d9
parentb7a780e057642b2829238cd8e83b812ea963f687 (diff)
parent9ac420db693aecd5f9f1c51f305a0148f46636ba (diff)
downloadQt-d788b9356fcf6cce041c021ae4dc5087a6ce40ce.zip
Qt-d788b9356fcf6cce041c021ae4dc5087a6ce40ce.tar.gz
Qt-d788b9356fcf6cce041c021ae4dc5087a6ce40ce.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
-rw-r--r--demos/demos.pro2
-rw-r--r--demos/embedded/fluidlauncher/config_s60/config.xml2
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro6
-rw-r--r--demos/qmediaplayer/images/screen.png (renamed from demos/mediaplayer/images/screen.png)bin4358 -> 4358 bytes
-rw-r--r--demos/qmediaplayer/main.cpp (renamed from demos/mediaplayer/main.cpp)0
-rw-r--r--demos/qmediaplayer/mediaplayer.cpp (renamed from demos/mediaplayer/mediaplayer.cpp)0
-rw-r--r--demos/qmediaplayer/mediaplayer.h (renamed from demos/mediaplayer/mediaplayer.h)0
-rw-r--r--demos/qmediaplayer/mediaplayer.qrc (renamed from demos/mediaplayer/mediaplayer.qrc)0
-rw-r--r--demos/qmediaplayer/qmediaplayer.pro (renamed from demos/mediaplayer/mediaplayer.pro)3
-rw-r--r--demos/qmediaplayer/settings.ui (renamed from demos/mediaplayer/settings.ui)0
-rw-r--r--demos/qtdemo/xml/examples.xml4
-rw-r--r--doc/src/demos/mediaplayer.qdoc2
-rw-r--r--doc/src/examples/ftp.qdoc34
-rw-r--r--doc/src/examples/musicplayerexample.qdoc38
-rw-r--r--doc/src/getting-started/demos.qdoc2
-rw-r--r--doc/src/getting-started/examples.qdoc2
-rw-r--r--doc/src/howtos/exceptionsafety.qdoc8
-rw-r--r--doc/src/platforms/compiler-notes.qdoc14
-rw-r--r--doc/src/platforms/platform-notes.qdoc4
-rw-r--r--doc/src/platforms/s60-introduction.qdoc4
-rw-r--r--examples/network/network.pro4
-rw-r--r--examples/network/qftp/ftp.qrc (renamed from examples/network/ftp/ftp.qrc)0
-rw-r--r--examples/network/qftp/ftpwindow.cpp (renamed from examples/network/ftp/ftpwindow.cpp)0
-rw-r--r--examples/network/qftp/ftpwindow.h (renamed from examples/network/ftp/ftpwindow.h)0
-rw-r--r--examples/network/qftp/images/cdtoparent.png (renamed from examples/network/ftp/images/cdtoparent.png)bin139 -> 139 bytes
-rw-r--r--examples/network/qftp/images/dir.png (renamed from examples/network/ftp/images/dir.png)bin154 -> 154 bytes
-rw-r--r--examples/network/qftp/images/file.png (renamed from examples/network/ftp/images/file.png)bin129 -> 129 bytes
-rw-r--r--examples/network/qftp/main.cpp (renamed from examples/network/ftp/main.cpp)0
-rw-r--r--examples/network/qftp/qftp.pro (renamed from examples/network/ftp/ftp.pro)6
-rw-r--r--examples/network/qftp/sym_iap_util.h (renamed from examples/network/ftp/sym_iap_util.h)0
-rw-r--r--examples/phonon/phonon.pro2
-rw-r--r--examples/phonon/qmusicplayer/main.cpp (renamed from examples/phonon/musicplayer/main.cpp)0
-rw-r--r--examples/phonon/qmusicplayer/mainwindow.cpp (renamed from examples/phonon/musicplayer/mainwindow.cpp)0
-rw-r--r--examples/phonon/qmusicplayer/mainwindow.h (renamed from examples/phonon/musicplayer/mainwindow.h)0
-rw-r--r--examples/phonon/qmusicplayer/qmusicplayer.pro (renamed from examples/phonon/musicplayer/musicplayer.pro)4
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp15
-rw-r--r--src/corelib/tools/qdatetime.cpp32
-rw-r--r--src/gui/dialogs/qprintdialog_mac.mm6
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp53
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h6
-rw-r--r--src/gui/kernel/qwidget.cpp3
-rw-r--r--src/gui/painting/qpen.cpp14
-rw-r--r--src/gui/text/qfontengine_mac.mm7
-rw-r--r--src/network/access/qnetworkrequest.cpp30
-rw-r--r--src/network/access/qnetworkrequest.h3
-rw-r--r--src/network/access/qnetworkrequest_p.h2
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp40
-rw-r--r--src/network/kernel/qhostinfo_win.cpp40
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp2
-rw-r--r--tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp16
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp26
51 files changed, 252 insertions, 184 deletions
diff --git a/demos/demos.pro b/demos/demos.pro
index c4b8872..4a9d451 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -64,7 +64,7 @@ demos_arthurplugin.subdir = arthurplugin
demos_sqlbrowser.subdir = sqlbrowser
demos_undo.subdir = undo
demos_qtdemo.subdir = qtdemo
-demos_mediaplayer.subdir = mediaplayer
+demos_mediaplayer.subdir = qmediaplayer
demos_browser.subdir = browser
diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml
index fefa3dd..2c61baf 100644
--- a/demos/embedded/fluidlauncher/config_s60/config.xml
+++ b/demos/embedded/fluidlauncher/config_s60/config.xml
@@ -6,7 +6,7 @@
<example filename="deform" name="Vector Deformation" image="screenshots/deform.png" args="-small-screen"/>
<example filename="pathstroke" name="Path Stroking" image="screenshots/pathstroke.png" args="-small-screen"/>
<example filename="wiggly" name="Wiggly Text" image="screenshots/wiggly_s60.png" args="-small-screen"/>
- <example filename="ftp" name="Ftp Client" image="screenshots/ftp_s60.png"/>
+ <example filename="qftp" name="Ftp Client" image="screenshots/ftp_s60.png"/>
<example filename="context2d" name="Context2d" image="screenshots/context2d_s60.png" args="-small-screen"/>
<example filename="saxbookmarks" name="SaxBookmarks" image="screenshots/saxbookmarks_s60.png"/>
<example filename="desktopservices" name="Desktop Services" image="screenshots/desktopservices_s60.png"/>
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index f2abde6..dd931e6 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -66,7 +66,7 @@ symbian {
deform.exe \
pathstroke.exe \
wiggly.exe \
- ftp.exe \
+ qftp.exe \
saxbookmarks.exe \
desktopservices.exe \
fridgemagnets.exe \
@@ -85,7 +85,7 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/deform_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/pathstroke_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/wiggly_reg.rsc \
- $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/ftp_reg.rsc\
+ $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/qftp_reg.rsc\
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \
@@ -109,7 +109,7 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/deform.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.rsc \
- $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/ftp.rsc\
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qftp.rsc\
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \
diff --git a/demos/mediaplayer/images/screen.png b/demos/qmediaplayer/images/screen.png
index a15df92..a15df92 100644
--- a/demos/mediaplayer/images/screen.png
+++ b/demos/qmediaplayer/images/screen.png
Binary files differ
diff --git a/demos/mediaplayer/main.cpp b/demos/qmediaplayer/main.cpp
index 66aa445..66aa445 100644
--- a/demos/mediaplayer/main.cpp
+++ b/demos/qmediaplayer/main.cpp
diff --git a/demos/mediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp
index baac236..baac236 100644
--- a/demos/mediaplayer/mediaplayer.cpp
+++ b/demos/qmediaplayer/mediaplayer.cpp
diff --git a/demos/mediaplayer/mediaplayer.h b/demos/qmediaplayer/mediaplayer.h
index 40ffa40..40ffa40 100644
--- a/demos/mediaplayer/mediaplayer.h
+++ b/demos/qmediaplayer/mediaplayer.h
diff --git a/demos/mediaplayer/mediaplayer.qrc b/demos/qmediaplayer/mediaplayer.qrc
index bcdf404..bcdf404 100644
--- a/demos/mediaplayer/mediaplayer.qrc
+++ b/demos/qmediaplayer/mediaplayer.qrc
diff --git a/demos/mediaplayer/mediaplayer.pro b/demos/qmediaplayer/qmediaplayer.pro
index a420cc3..2f15c28 100644
--- a/demos/mediaplayer/mediaplayer.pro
+++ b/demos/qmediaplayer/qmediaplayer.pro
@@ -3,7 +3,6 @@
######################################################################
TEMPLATE = app
-TARGET = qmediaplayer
DEPENDPATH += . build src ui
QT += phonon
@@ -18,7 +17,7 @@ HEADERS += mediaplayer.h
target.path = $$[QT_INSTALL_DEMOS]/qmediaplayer
sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.html *.doc images
-sources.path = $$[QT_INSTALL_DEMOS]/mediaplayer
+sources.path = $$[QT_INSTALL_DEMOS]/qmediaplayer
INSTALLS += target sources
wince*{
diff --git a/demos/mediaplayer/settings.ui b/demos/qmediaplayer/settings.ui
index d2cedd4..d2cedd4 100644
--- a/demos/mediaplayer/settings.ui
+++ b/demos/qmediaplayer/settings.ui
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index 3f0cd25..2c31484 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -121,7 +121,7 @@
<example filename="network-chat" name="Network Chat Client" />
<example filename="fortuneclient" name="Fortune Client" />
<example filename="fortuneserver" name="Fortune Server" />
- <example filename="ftp" changedirectory="false" name="FTP Client" />
+ <example filename="qftp" changedirectory="false" name="FTP Client" />
<example filename="http" changedirectory="false" name="HTTP Client" />
<example filename="loopback" name="Loopback" />
<example filename="threadedfortuneserver" name="Threaded Fort. Server" />
@@ -152,7 +152,7 @@
<example filename="transformations" name="Transformations" />
</category>
<category dirname="phonon" name="Phonon">
- <example filename="musicplayer" name="Music Player" />
+ <example filename="qmusicplayer" name="Music Player" />
</category>
<category dirname="multimedia/audio" name="Multimedia">
<example filename="audiodevices" name="Audio Devices" />
diff --git a/doc/src/demos/mediaplayer.qdoc b/doc/src/demos/mediaplayer.qdoc
index 9e6b3f9..17ae79b 100644
--- a/doc/src/demos/mediaplayer.qdoc
+++ b/doc/src/demos/mediaplayer.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example demos/mediaplayer
+ \example demos/qmediaplayer
\title Media Player
The Media Player demonstration shows how \l{Phonon Module}{Phonon}
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index ec8584c..8fded88 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -78,13 +78,13 @@
\l{QFtp::Command}{commands} we request are finished, the progress
of current commands, and information about files on the server.
- \snippet examples/network/ftp/ftpwindow.h 0
+ \snippet examples/network/qftp/ftpwindow.h 0
We will look at each slot when we examine the \c FtpWindow
implementation in the next section. We also make use of a few
private variables:
- \snippet examples/network/ftp/ftpwindow.h 1
+ \snippet examples/network/qftp/ftpwindow.h 1
The \c isDirectory hash keeps a history of all entries explored on
the FTP server, and registers whether an entry represents a
@@ -98,7 +98,7 @@
We move on to the slots, starting with \c connectOrDisconnect().
- \snippet examples/network/ftp/ftpwindow.cpp 0
+ \snippet examples/network/qftp/ftpwindow.cpp 0
If \c ftp is already pointing to a QFtp object, we QFtp::Close its
FTP connection and delete the object it points to. Note that we do
@@ -106,7 +106,7 @@
to finish its abort operation.
\dots
- \snippet examples/network/ftp/ftpwindow.cpp 1
+ \snippet examples/network/qftp/ftpwindow.cpp 1
If we get here, \c connectOrDisconnect() was called to establish a
new FTP connection. We create a new QFtp for our new connection,
@@ -118,7 +118,7 @@
is emitted repeatedly during an FTP file transfer, giving us
progress reports.
- \snippet examples/network/ftp/ftpwindow.cpp 2
+ \snippet examples/network/qftp/ftpwindow.cpp 2
The \gui {Ftp Server} line edit contains the IP address or
hostname of the server to which we want to connect. We first check
@@ -134,39 +134,39 @@
We move on to the \c downloadFile() slot:
- \snippet examples/network/ftp/ftpwindow.cpp 3
+ \snippet examples/network/qftp/ftpwindow.cpp 3
\dots
- \snippet examples/network/ftp/ftpwindow.cpp 4
+ \snippet examples/network/qftp/ftpwindow.cpp 4
We first fetch the name of the file, which we find in the selected
item of \c fileList. We then start the download by using
QFtp::get(). QFtp will send progress signals during the download
and a signal when the download is completed.
- \snippet examples/network/ftp/ftpwindow.cpp 5
+ \snippet examples/network/qftp/ftpwindow.cpp 5
QFtp supports canceling the download of files.
- \snippet examples/network/ftp/ftpwindow.cpp 6
+ \snippet examples/network/qftp/ftpwindow.cpp 6
The \c ftpCommandFinished() slot is called when QFtp has
finished a QFtp::Command. If an error occurred during the
command, QFtp will set \c error to one of the values in
the QFtp::Error enum; otherwise, \c error is zero.
- \snippet examples/network/ftp/ftpwindow.cpp 7
+ \snippet examples/network/qftp/ftpwindow.cpp 7
After login, the QFtp::list() function will list the top-level
directory on the server. addToList() is connected to
QFtp::listInfo(), and will be invoked for each entry in that
directory.
- \snippet examples/network/ftp/ftpwindow.cpp 8
+ \snippet examples/network/qftp/ftpwindow.cpp 8
When a \l{QFtp::}{Get} command is finished, a file has finished
downloading (or an error occurred during the download).
- \snippet examples/network/ftp/ftpwindow.cpp 9
+ \snippet examples/network/qftp/ftpwindow.cpp 9
After a \l{QFtp::}{List} command is performed, we have to check if
no entries were found (in which case our \c addToList() function
@@ -174,7 +174,7 @@
Let's continue with the \c addToList() slot:
- \snippet examples/network/ftp/ftpwindow.cpp 10
+ \snippet examples/network/qftp/ftpwindow.cpp 10
When a new file has been resolved during a QFtp::List command,
this slot is invoked with a QUrlInfo describing the file. We
@@ -182,26 +182,26 @@
does not have a current item, we set the new item to be the
current item.
- \snippet examples/network/ftp/ftpwindow.cpp 11
+ \snippet examples/network/qftp/ftpwindow.cpp 11
The \c processItem() slot is called when an item is double clicked
in the \gui {File List}. If the item represents a directory, we
want to load the contents of that directory with QFtp::list().
- \snippet examples/network/ftp/ftpwindow.cpp 12
+ \snippet examples/network/qftp/ftpwindow.cpp 12
\c cdToParent() is invoked when the user requests to go to the
parent directory of the one displayed in the file list. After
changing the directory, we QFtp::List its contents.
- \snippet examples/network/ftp/ftpwindow.cpp 13
+ \snippet examples/network/qftp/ftpwindow.cpp 13
The \c updateDataTransferProgress() slot is called regularly by
QFtp::dataTransferProgress() when a file download is in progress.
We use a QProgressDialog to show the download progression to the
user.
- \snippet examples/network/ftp/ftpwindow.cpp 14
+ \snippet examples/network/qftp/ftpwindow.cpp 14
The \c enableDownloadButton() is called whenever the current item
in \c fileList changes. If the item represents a file, the \gui
diff --git a/doc/src/examples/musicplayerexample.qdoc b/doc/src/examples/musicplayerexample.qdoc
index 41c9f3a..7145583 100644
--- a/doc/src/examples/musicplayerexample.qdoc
+++ b/doc/src/examples/musicplayerexample.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example phonon/musicplayer
+ \example phonon/qmusicplayer
\title Music Player Example
The Music Player Example shows how to use Phonon - the multimedia
@@ -90,7 +90,7 @@
look at them when we walk through the \c MainWindow
implementation.
- \snippet examples/phonon/musicplayer/mainwindow.h 2
+ \snippet examples/phonon/qmusicplayer/mainwindow.h 2
We use the \l{Phonon::}{SeekSlider} to move the current playback
position in the media stream, and the \l{Phonon::}{VolumeSlider}
@@ -99,7 +99,7 @@
metaInformationProvider, to get the meta information from the
music files. More on this later.
- \snippet examples/phonon/musicplayer/mainwindow.h 1
+ \snippet examples/phonon/qmusicplayer/mainwindow.h 1
The \l{Phonon::}{MediaObject} informs us of the state of the playback and
properties of the media it is playing back through a series of
@@ -116,7 +116,7 @@
We start with the constructor:
- \snippet examples/phonon/musicplayer/mainwindow.cpp 0
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 0
We start by instantiating our media and audio output objects.
As mentioned, the media object knows how to playback
@@ -130,20 +130,20 @@
paths. Objects are connected using the \c createPath() function,
which is part of the Phonon namespace.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 1
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 1
We also connect signals of the media object to slots in our \c
MainWindow. We will examine them shortly.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 2
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 2
Finally, we call private helper functions to set up the GUI.
The \c setupUi() function contains code for setting up the seek
, and volume slider. We move on to \c setupUi():
- \snippet examples/phonon/musicplayer/mainwindow.cpp 3
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 3
\dots
- \snippet examples/phonon/musicplayer/mainwindow.cpp 4
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 4
After creating the widgets, they must be supplied with the
\l{Phonon::}{MediaObject} and \l{Phonon::}{AudioOutput} objects
@@ -152,12 +152,12 @@
In the \c setupActions(), we connect the actions for the play,
pause, and stop tool buttons, to slots of the media object.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 5
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 5
We move on to the slots of \c MainWindow, starting with \c
addFiles():
- \snippet examples/phonon/musicplayer/mainwindow.cpp 6
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 6
In the \c addFiles() slot, we add files selected by the user to
the \c sources list. We then set the first source selected on the
@@ -169,7 +169,7 @@
stateChanged() signal. The \c stateChanged() slot is connected
to this signal.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 9
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 9
The \l{Phonon::MediaObject::}{errorString()} function gives a
description of the error that is suitable for users of a Phonon
@@ -177,7 +177,7 @@
helps us determine whether it is possible to try to play the same
file again.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 10
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 10
We update the GUI when the playback state changes, i.e., when it
starts, pauses, stops, or resumes.
@@ -188,26 +188,26 @@
The \c tick() slot is connected to a \l{Phonon::}{MediaObject} signal which is
emitted when the playback position changes:
- \snippet examples/phonon/musicplayer/mainwindow.cpp 11
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 11
The \c time is given in milliseconds.
When the table is clicked on with the mouse, \c tableClick()
is invoked:
- \snippet examples/phonon/musicplayer/mainwindow.cpp 12
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 12
Since we stop the media object, we first check whether it is
currently playing. \c row contains the row in the table that was
clicked upon; the indices of \c sources follows the table, so we
can simply use \c row to find the new source.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 13
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 13
When the media source changes, we simply need to select the
corresponding row in the table.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 14
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 14
When \c metaStateChanged() is invoked, \c
metaInformationProvider has resolved the meta data for its current
@@ -220,7 +220,7 @@
music table. A file might not contain the meta data requested,
in which case an empty string is returned.
- \snippet examples/phonon/musicplayer/mainwindow.cpp 15
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 15
If we have media sources in \c sources of which meta information
is not resolved, we set a new source on the \c
@@ -229,7 +229,7 @@
We move on to the \c aboutToFinish() slot:
- \snippet examples/phonon/musicplayer/mainwindow.cpp 16
+ \snippet examples/phonon/qmusicplayer/mainwindow.cpp 16
When a file is finished playing, the Music Player will move on and
play the next file in the table. This slot is connected to the
@@ -244,5 +244,5 @@
\l{QCoreApplication::}{setApplicationName()}. This is because
D-Bus, which is used by Phonon on Linux systems, demands this.
- \snippet examples/phonon/musicplayer/main.cpp 1
+ \snippet examples/phonon/qmusicplayer/main.cpp 1
*/
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 532715e..8f2829a 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -157,7 +157,7 @@
\section1 Phonon
\list
- \o \l{demos/mediaplayer}{Media Player} demonstrates how the \l{Phonon Module} can be
+ \o \l{demos/qmediaplayer}{Media Player} demonstrates how the \l{Phonon Module} can be
used to implement a basic media player application.
\endlist
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 30dae88..2ad730a7 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -827,7 +827,7 @@
\list
\o \l{phonon/capabilities}{Capabilities}\raisedaster
- \o \l{phonon/musicplayer}{Music Player}\raisedaster
+ \o \l{phonon/qmusicplayer}{Music Player}\raisedaster
\endlist
*/
diff --git a/doc/src/howtos/exceptionsafety.qdoc b/doc/src/howtos/exceptionsafety.qdoc
index 23bedf5..fa1427b 100644
--- a/doc/src/howtos/exceptionsafety.qdoc
+++ b/doc/src/howtos/exceptionsafety.qdoc
@@ -144,12 +144,12 @@
\section1 Platform-Specific Exception Handling
- \section2 Symbian (Qt for S60)
+ \section2 The Symbian platform
The Symbian platform implements its own exception system that differs from the standard
- C++ mechanism. When using Qt for S60, and especially when writing code to access Symbian
- functionality directly, it may be necessary to know about the underlying implementation
- and how it interacts with Qt.
+ C++ mechanism. When using Qt for Symbian platform, and especially when writing code to
+ access Symbian functionality directly, it may be necessary to know about the underlying
+ implementation and how it interacts with Qt.
The \l{Exception Safety with Symbian} document shows how to use the facilities provided
by Qt to use exceptions as safely as possible.
diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc
index 5b5240a..4577bf0 100644
--- a/doc/src/platforms/compiler-notes.qdoc
+++ b/doc/src/platforms/compiler-notes.qdoc
@@ -204,10 +204,22 @@
\section2 Sun Studio
- Qt is tested using Sun Studio 8 (Sun CC 5.5). Go to
+ Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to
\l{Sun Studio Patches} page on Sun's Web site to download
the latest patches for your Sun compiler.
+ Please note that Qt 4.6 is stricter in its STL requirements and
+ that the default STL implementation used by Sun CC does not pass
+ those requirements. This does not affect binary compatibility and
+ you can continue to use STL in your own code, but Qt's
+ STL-compatibility functions will be disabled.
+
+ Sun CC ships with a secondary STL implementation (called stlport4)
+ which is standards-compliant and can be used by Qt. You can enable
+ it by passing the -library=stlport4 option to the compiler. Note
+ that this does not affect Qt's binary compatibility, but it may
+ affect that of other libraries and programs that use STL.
+
\section2 Sun WorkShop 5.0
Sun WorkShop 5.0 is not supported with Qt 4.
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 5be66f8..9896b08 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -67,6 +67,8 @@
\tableofcontents{1 Platform Notes - Windows}
\o \l{Platform Notes - Mac OS X}
\tableofcontents{1 Platform Notes - Mac OS X}
+ \o \l{Platform Notes - Symbian}
+ \tableofcontents{1 Platform Notes - Symbian}
\o \l{Platform Notes - Embedded Linux}
\tableofcontents{1 Platform Notes - Embedded Linux}
\o \l{Platform Notes - Windows CE}
@@ -409,7 +411,7 @@
to run on. More information about the combinations of platforms and compilers
supported by Qt can be found on the \l{Supported Platforms} page.
- For information about mixing exceptions with symbian leaves,
+ For information about mixing exceptions with Symbian leaves,
see \l{Exception Safety with Symbian}
\section1 Multimedia and Phonon Support
diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/s60-introduction.qdoc
index d145a82..d27eb39 100644
--- a/doc/src/platforms/s60-introduction.qdoc
+++ b/doc/src/platforms/s60-introduction.qdoc
@@ -122,8 +122,8 @@ build targets, as shown in the table below:
\row \o \c QT_SIS_OPTIONS \o Options accepted by \c .sis creation.
-i, install the package right away using PC suite.
-c=<file>, read certificate information from a file.
- Execute \c{perl createpackage.pl} for more information
- about options.
+ Execute \c{createpackage.pl} script without any
+ parameters 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
diff --git a/examples/network/network.pro b/examples/network/network.pro
index 38cdae8..0849271 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -6,7 +6,7 @@ SUBDIRS = blockingfortuneclient \
downloadmanager \
fortuneclient \
fortuneserver \
- ftp \
+ qftp \
http \
loopback \
threadedfortuneserver \
@@ -16,7 +16,7 @@ SUBDIRS = blockingfortuneclient \
# no QProcess
!vxworks:!qnx:SUBDIRS += network-chat
-symbian: SUBDIRS = ftp
+symbian: SUBDIRS = qftp
contains(QT_CONFIG, openssl):SUBDIRS += securesocketclient
diff --git a/examples/network/ftp/ftp.qrc b/examples/network/qftp/ftp.qrc
index b598ab8..b598ab8 100644
--- a/examples/network/ftp/ftp.qrc
+++ b/examples/network/qftp/ftp.qrc
diff --git a/examples/network/ftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index f3fc52b..f3fc52b 100644
--- a/examples/network/ftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
diff --git a/examples/network/ftp/ftpwindow.h b/examples/network/qftp/ftpwindow.h
index f92c36a..f92c36a 100644
--- a/examples/network/ftp/ftpwindow.h
+++ b/examples/network/qftp/ftpwindow.h
diff --git a/examples/network/ftp/images/cdtoparent.png b/examples/network/qftp/images/cdtoparent.png
index 24b6180..24b6180 100644
--- a/examples/network/ftp/images/cdtoparent.png
+++ b/examples/network/qftp/images/cdtoparent.png
Binary files differ
diff --git a/examples/network/ftp/images/dir.png b/examples/network/qftp/images/dir.png
index 0ce5ae7..0ce5ae7 100644
--- a/examples/network/ftp/images/dir.png
+++ b/examples/network/qftp/images/dir.png
Binary files differ
diff --git a/examples/network/ftp/images/file.png b/examples/network/qftp/images/file.png
index be6c530..be6c530 100644
--- a/examples/network/ftp/images/file.png
+++ b/examples/network/qftp/images/file.png
Binary files differ
diff --git a/examples/network/ftp/main.cpp b/examples/network/qftp/main.cpp
index d44ccd7..d44ccd7 100644
--- a/examples/network/ftp/main.cpp
+++ b/examples/network/qftp/main.cpp
diff --git a/examples/network/ftp/ftp.pro b/examples/network/qftp/qftp.pro
index ce2a97b..b3106c3 100644
--- a/examples/network/ftp/ftp.pro
+++ b/examples/network/qftp/qftp.pro
@@ -5,9 +5,9 @@ RESOURCES += ftp.qrc
QT += network
# install
-target.path = $$[QT_INSTALL_EXAMPLES]/network/ftp
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ftp.pro images
-sources.path = $$[QT_INSTALL_EXAMPLES]/network/ftp
+target.path = $$[QT_INSTALL_EXAMPLES]/network/qftp
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/qftp
INSTALLS += target sources
symbian {
diff --git a/examples/network/ftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h
index ebeae0a..ebeae0a 100644
--- a/examples/network/ftp/sym_iap_util.h
+++ b/examples/network/qftp/sym_iap_util.h
diff --git a/examples/phonon/phonon.pro b/examples/phonon/phonon.pro
index 0ddf767..aa6ac13 100644
--- a/examples/phonon/phonon.pro
+++ b/examples/phonon/phonon.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
CONFIG += ordered
-SUBDIRS = musicplayer \
+SUBDIRS = qmusicplayer \
capabilities
# install
diff --git a/examples/phonon/musicplayer/main.cpp b/examples/phonon/qmusicplayer/main.cpp
index fc7baa3..fc7baa3 100644
--- a/examples/phonon/musicplayer/main.cpp
+++ b/examples/phonon/qmusicplayer/main.cpp
diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/qmusicplayer/mainwindow.cpp
index 787ae53..787ae53 100644
--- a/examples/phonon/musicplayer/mainwindow.cpp
+++ b/examples/phonon/qmusicplayer/mainwindow.cpp
diff --git a/examples/phonon/musicplayer/mainwindow.h b/examples/phonon/qmusicplayer/mainwindow.h
index 41f8147..41f8147 100644
--- a/examples/phonon/musicplayer/mainwindow.h
+++ b/examples/phonon/qmusicplayer/mainwindow.h
diff --git a/examples/phonon/musicplayer/musicplayer.pro b/examples/phonon/qmusicplayer/qmusicplayer.pro
index a0c953a..25ab7eb 100644
--- a/examples/phonon/musicplayer/musicplayer.pro
+++ b/examples/phonon/qmusicplayer/qmusicplayer.pro
@@ -5,9 +5,9 @@ SOURCES += main.cpp \
mainwindow.cpp
# install
-target.path = $$[QT_INSTALL_EXAMPLES]/phonon/musicplayer
+target.path = $$[QT_INSTALL_EXAMPLES]/phonon/qmusicplayer
sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png images
-sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/musicplayer
+sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/qmusicplayer
INSTALLS += target sources
wince*{
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 114da3b..b0cddaa 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1255,8 +1255,19 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
int realOffset = offset / pagesSize;
int extra = offset % pagesSize;
- void *mapAddress = mmap((void*)0, (size_t)size + extra,
- access, MAP_SHARED, nativeHandle(), realOffset * pagesSize);
+#ifdef Q_OS_SYMBIAN
+ void *mapAddress;
+ TRAPD(err, mapAddress = mmap((void*)0, (size_t)size + extra,
+ access, MAP_SHARED, nativeHandle(), realOffset * pagesSize));
+ if (err != KErrNone) {
+ qWarning("OpenC bug: leave from mmap %d", err);
+ mapAddress = MAP_FAILED;
+ errno = EINVAL;
+ }
+#else
+ void *mapAddress = mmap((void*)0, (size_t)size + extra,
+ access, MAP_SHARED, nativeHandle(), realOffset * pagesSize);
+#endif
if (MAP_FAILED != mapAddress) {
uchar *address = extra + static_cast<uchar*>(mapAddress);
maps[address] = QPair<int,int>(extra, size);
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 1277623..1b559cf 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -54,6 +54,7 @@
#ifndef Q_WS_WIN
#include <locale.h>
#endif
+
#include <time.h>
#if defined(Q_OS_WINCE)
#include "qfunctions_wince.h"
@@ -68,31 +69,6 @@
# 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 <private/qcore_mac_p.h>
#endif
@@ -1162,7 +1138,6 @@ QDate QDate::currentDate()
// use the reentrant version of localtime() where available
tzset();
tm res;
- FIX_OPENC_DSTCACHE
t = localtime_r(&ltime, &res);
#else
t = localtime(&ltime);
@@ -1859,13 +1834,12 @@ QTime QTime::currentTime()
// use the reentrant version of localtime() where available
tzset();
tm res;
- FIX_OPENC_DSTCACHE
t = localtime_r(&ltime, &res);
#else
t = localtime(&ltime);
#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
@@ -2913,7 +2887,6 @@ QDateTime QDateTime::currentDateTime()
// use the reentrant version of localtime() where available
tzset();
tm res;
- FIX_OPENC_DSTCACHE
t = localtime_r(&ltime, &res);
#else
t = localtime(&ltime);
@@ -3731,7 +3704,6 @@ 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;
diff --git a/src/gui/dialogs/qprintdialog_mac.mm b/src/gui/dialogs/qprintdialog_mac.mm
index a7587b1..667fc40 100644
--- a/src/gui/dialogs/qprintdialog_mac.mm
+++ b/src/gui/dialogs/qprintdialog_mac.mm
@@ -166,6 +166,12 @@ QT_USE_NAMESPACE
}
// Keep us in sync with file output
PMDestinationType dest;
+
+ // If the user selected print to file, the session has been
+ // changed behind our back and our d->ep->session object is a
+ // dangling pointer. Update it based on the "current" session
+ d->ep->session = static_cast<PMPrintSession>([d->ep->printInfo PMPrintSession]);
+
PMSessionGetDestinationType(d->ep->session, d->ep->settings, &dest);
if (dest == kPMDestinationFile) {
QCFType<CFURLRef> file;
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index e3cd4f9..f9b5c8c 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -275,8 +275,8 @@ static qreal getFactor(qreal value, qreal min, qreal pref, qreal max)
}
}
-static qreal getExpandingFactor(qreal expSize, qreal sizeAtPreferred,
- qreal sizeAtExpanding, qreal sizeAtMaximum)
+static qreal getExpandingFactor(const qreal &expSize, const qreal &sizeAtPreferred,
+ const qreal &sizeAtExpanding, const qreal &sizeAtMaximum)
{
const qreal lower = qMin(sizeAtPreferred, sizeAtMaximum);
const qreal upper = qMax(sizeAtPreferred, sizeAtMaximum);
@@ -1842,10 +1842,10 @@ void QGraphicsAnchorLayoutPrivate::findPaths(Orientation orientation)
}
}
- // We will walk through every reachable items (non-float) and mark them
- // by keeping their references on m_nonFloatItems. With this we can easily
- // identify non-float and float items.
- identifyNonFloatItems(visited, orientation);
+ // We will walk through every reachable items (non-float) store them in a temporary set.
+ // We them create a set of all items and subtract the non-floating items from the set in
+ // order to get the floating items. The floating items is then stored in m_floatItems
+ identifyFloatItems(visited, orientation);
}
/*!
@@ -2008,14 +2008,20 @@ QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation)
Use all visited Anchors on findPaths() so we can identify non-float Items.
*/
-void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems(QSet<AnchorData *> visited, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::identifyFloatItems(const QSet<AnchorData *> &visited, Orientation orientation)
{
- m_nonFloatItems[orientation].clear();
+ QSet<QGraphicsLayoutItem *> nonFloating;
foreach (const AnchorData *ad, visited)
- identifyNonFloatItems_helper(ad, orientation);
+ identifyNonFloatItems_helper(ad, &nonFloating);
+
+ QSet<QGraphicsLayoutItem *> allItems;
+ foreach (QGraphicsLayoutItem *item, items)
+ allItems.insert(item);
+ m_floatItems[orientation] = allItems - nonFloating;
}
+
/*!
\internal
@@ -2023,22 +2029,22 @@ void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems(QSet<AnchorData *> visi
If the anchor is Sequential or Parallel, we must iterate on its children recursively until we reach
internal anchors (items).
*/
-void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems_helper(const AnchorData *ad, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems_helper(const AnchorData *ad, QSet<QGraphicsLayoutItem *> *nonFloatingItemsIdentifiedSoFar)
{
Q_Q(QGraphicsAnchorLayout);
switch(ad->type) {
case AnchorData::Normal:
if (ad->from->m_item == ad->to->m_item && ad->to->m_item != q)
- m_nonFloatItems[orientation].insert(ad->to->m_item);
+ nonFloatingItemsIdentifiedSoFar->insert(ad->to->m_item);
break;
case AnchorData::Sequential:
foreach (const AnchorData *d, static_cast<const SequentialAnchorData *>(ad)->m_edges)
- identifyNonFloatItems_helper(d, orientation);
+ identifyNonFloatItems_helper(d, nonFloatingItemsIdentifiedSoFar);
break;
case AnchorData::Parallel:
- identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->firstEdge, orientation);
- identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->secondEdge, orientation);
+ identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->firstEdge, nonFloatingItemsIdentifiedSoFar);
+ identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->secondEdge, nonFloatingItemsIdentifiedSoFar);
break;
}
}
@@ -2070,7 +2076,10 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom)
foreach (QGraphicsLayoutItem *item, items) {
QRectF newGeom;
QSizeF itemPreferredSize = item->effectiveSizeHint(Qt::PreferredSize);
- if (m_nonFloatItems[Horizontal].contains(item)) {
+ if (m_floatItems[Horizontal].contains(item)) {
+ newGeom.setLeft(0);
+ newGeom.setRight(itemPreferredSize.width());
+ } else {
firstH = internalVertex(item, Qt::AnchorLeft);
secondH = internalVertex(item, Qt::AnchorRight);
@@ -2081,20 +2090,17 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom)
newGeom.setLeft(right - secondH->distance);
newGeom.setRight(right - firstH->distance);
}
- } else {
- newGeom.setLeft(0);
- newGeom.setRight(itemPreferredSize.width());
}
- if (m_nonFloatItems[Vertical].contains(item)) {
+ if (m_floatItems[Vertical].contains(item)) {
+ newGeom.setTop(0);
+ newGeom.setBottom(itemPreferredSize.height());
+ } else {
firstV = internalVertex(item, Qt::AnchorTop);
secondV = internalVertex(item, Qt::AnchorBottom);
newGeom.setTop(top + firstV->distance);
newGeom.setBottom(top + secondV->distance);
- } else {
- newGeom.setTop(0);
- newGeom.setBottom(itemPreferredSize.height());
}
item->setGeometry(newGeom);
@@ -2554,8 +2560,7 @@ bool QGraphicsAnchorLayoutPrivate::hasConflicts() const
QGraphicsAnchorLayoutPrivate *that = const_cast<QGraphicsAnchorLayoutPrivate*>(this);
that->calculateGraphs();
- bool floatConflict = (m_nonFloatItems[0].size() < items.size())
- || (m_nonFloatItems[1].size() < items.size());
+ bool floatConflict = !m_floatItems[0].isEmpty() || !m_floatItems[1].isEmpty();
return graphHasConflicts[0] || graphHasConflicts[1] || floatConflict;
}
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 24b25de..9ac0e19 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -443,8 +443,8 @@ public:
void constraintsFromPaths(Orientation orientation);
QList<QSimplexConstraint *> constraintsFromSizeHints(const QList<AnchorData *> &anchors);
QList<QList<QSimplexConstraint *> > getGraphParts(Orientation orientation);
- void identifyNonFloatItems(QSet<AnchorData *> visited, Orientation orientation);
- void identifyNonFloatItems_helper(const AnchorData *ad, Orientation orientation);
+ void identifyFloatItems(const QSet<AnchorData *> &visited, Orientation orientation);
+ void identifyNonFloatItems_helper(const AnchorData *ad, QSet<QGraphicsLayoutItem *> *nonFloatingItemsIdentifiedSoFar);
inline AnchorVertex *internalVertex(const QPair<QGraphicsLayoutItem*, Qt::AnchorPoint> &itemEdge) const
{
@@ -511,7 +511,7 @@ public:
// ###
bool graphSimplified[2];
bool graphHasConflicts[2];
- QSet<QGraphicsLayoutItem *> m_nonFloatItems[2];
+ QSet<QGraphicsLayoutItem *> m_floatItems[2];
uint calculateGraphCacheDirty : 1;
};
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 4cbf762..56602f7 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -901,9 +901,8 @@ void QWidget::setAutoFillBackground(bool enabled)
\sa QEvent, QPainter, QGridLayout, QBoxLayout
\section1 Softkeys
- \since 4.6
- Softkeys are usually physical keys on a device that have a corresponding label or
+ Since Qt 4.6, Softkeys are usually physical keys on a device that have a corresponding label or
other visual representation on the screen that is generally located next to its
physical counterpart. They are most often found on mobile phone platforms. In
modern touch based user interfaces it is also possible to have softkeys that do
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index a050cb2..41efc80 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -411,6 +411,8 @@ Qt::PenStyle QPen::style() const
pattern using the setDashPattern() function which implicitly
converts the style of the pen to Qt::CustomDashLine.
+ \note This function resets the dash offset to zero.
+
\sa style(), {QPen#Pen Style}{Pen Style}
*/
@@ -420,7 +422,9 @@ void QPen::setStyle(Qt::PenStyle s)
return;
detach();
d->style = s;
- static_cast<QPenData *>(d)->dashPattern.clear();
+ QPenData *dd = static_cast<QPenData *>(d);
+ dd->dashPattern.clear();
+ dd->dashOffset = 0;
}
/*!
@@ -538,8 +542,12 @@ void QPen::setDashOffset(qreal offset)
if (qFuzzyCompare(offset, static_cast<QPenData *>(d)->dashOffset))
return;
detach();
- static_cast<QPenData *>(d)->dashOffset = offset;
- d->style = Qt::CustomDashLine;
+ QPenData *dd = static_cast<QPenData *>(d);
+ dd->dashOffset = offset;
+ if (d->style != Qt::CustomDashLine) {
+ dd->dashPattern = dashPattern();
+ d->style = Qt::CustomDashLine;
+ }
}
/*!
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 40db7b4..758d8af 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -138,9 +138,10 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con
QCFString name;
ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name);
- QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pointSize);
- QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pointSize, 0);
- ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pointSize, 0, symbolicTraits, symbolicTraits);
+
+ QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pixelSize);
+ QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pixelSize, 0);
+ ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pixelSize, 0, symbolicTraits, symbolicTraits);
// CTFontCreateCopyWithSymbolicTraits returns NULL if we ask for a trait that does
// not exist for the given font. (for example italic)
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index cde9858..33bc57b 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -481,6 +481,36 @@ void QNetworkRequest::setSslConfiguration(const QSslConfiguration &config)
}
#endif
+/*!
+ \since 4.6
+
+ Allows setting a reference to the \a object initiating
+ the request.
+
+ For example QtWebKit sets the originating object to the
+ QWebFrame that initiated the request.
+
+ \sa originatingObject()
+*/
+void QNetworkRequest::setOriginatingObject(QObject *object)
+{
+ d->originatingObject = object;
+}
+
+/*!
+ \since 4.6
+
+ Returns a reference to the object that initiated this
+ network request; returns 0 if not set or the object has
+ been destroyed.
+
+ \sa setOriginatingObject()
+*/
+QObject *QNetworkRequest::originatingObject() const
+{
+ return d->originatingObject.data();
+}
+
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
{
switch (header) {
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index 7b15237..62c6dda 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -120,6 +120,9 @@ public:
void setSslConfiguration(const QSslConfiguration &configuration);
#endif
+ void setOriginatingObject(QObject *object);
+ QObject *originatingObject() const;
+
private:
QSharedDataPointer<QNetworkRequestPrivate> d;
friend class QNetworkRequestPrivate;
diff --git a/src/network/access/qnetworkrequest_p.h b/src/network/access/qnetworkrequest_p.h
index 22b239f..9b3632f 100644
--- a/src/network/access/qnetworkrequest_p.h
+++ b/src/network/access/qnetworkrequest_p.h
@@ -58,6 +58,7 @@
#include "QtCore/qlist.h"
#include "QtCore/qhash.h"
#include "QtCore/qshareddata.h"
+#include "QtCore/qsharedpointer.h"
QT_BEGIN_NAMESPACE
@@ -73,6 +74,7 @@ public:
RawHeadersList rawHeaders;
CookedHeadersMap cookedHeaders;
AttributesMap attributes;
+ QWeakPointer<QObject> originatingObject;
RawHeadersList::ConstIterator findRawHeader(const QByteArray &key) const;
QList<QByteArray> rawHeadersKeys() const;
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index b4ac3d2..7e6e522 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -173,38 +173,28 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
#endif
char hbuf[NI_MAXHOST];
- if (!sa || getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) != 0) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(hbuf));
+ if (sa && getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) == 0)
+ results.setHostName(QString::fromLatin1(hbuf));
#else
in_addr_t inetaddr = qt_safe_inet_addr(hostName.toLatin1().constData());
struct hostent *ent = gethostbyaddr((const char *)&inetaddr, sizeof(inetaddr), AF_INET);
- if (!ent) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(ent->h_name));
+ if (ent)
+ results.setHostName(QString::fromLatin1(ent->h_name));
#endif
+
+ if (results.hostName().isEmpty())
+ results.setHostName(address.toString());
+ results.setAddresses(QList<QHostAddress>() << address);
+ return results;
}
// IDN support
- QByteArray aceHostname;
- if (results.hostName().isEmpty()) {
- // it's a hostname resolution
- aceHostname = QUrl::toAce(hostName);
- results.setHostName(hostName);
- if (aceHostname.isEmpty()) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(hostName.isEmpty() ? QObject::tr("No host name given") : QObject::tr("Invalid hostname"));
- return results;
- }
- } else {
- // it's an IP reverse resolution
- aceHostname = results.hostName().toLatin1();
+ QByteArray aceHostname = QUrl::toAce(hostName);
+ results.setHostName(hostName);
+ if (aceHostname.isEmpty()) {
+ results.setError(QHostInfo::HostNotFound);
+ results.setErrorString(hostName.isEmpty() ? QObject::tr("No host name given") : QObject::tr("Invalid hostname"));
+ return results;
}
#if !defined (QT_NO_GETADDRINFO)
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index d9d7234..720aaa5 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -160,38 +160,28 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
}
char hbuf[NI_MAXHOST];
- if (local_getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) != 0) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(hbuf));
+ if (local_getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) == 0)
+ results.setHostName(QString::fromLatin1(hbuf));
} else {
unsigned long addr = inet_addr(hostName.toLatin1().constData());
struct hostent *ent = gethostbyaddr((const char*)&addr, sizeof(addr), AF_INET);
- if (!ent) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(ent->h_name));
+ if (ent)
+ results.setHostName(QString::fromLatin1(ent->h_name));
}
+
+ if (results.hostName().isEmpty())
+ results.setHostName(address.toString());
+ results.setAddresses(QList<QHostAddress>() << address);
+ return results;
}
// IDN support
- QByteArray aceHostname;
- if (results.hostName().isEmpty()) {
- // it's a hostname resolution
- aceHostname = QUrl::toAce(hostName);
- results.setHostName(hostName);
- if (aceHostname.isEmpty()) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(hostName.isEmpty() ? tr("No host name given") : tr("Invalid hostname"));
- return results;
- }
- } else {
- // it's an IP reverse resolution
- aceHostname = results.hostName().toLatin1();
+ QByteArray aceHostname = QUrl::toAce(hostName);
+ results.setHostName(hostName);
+ if (aceHostname.isEmpty()) {
+ results.setError(QHostInfo::HostNotFound);
+ results.setErrorString(hostName.isEmpty() ? tr("No host name given") : tr("Invalid hostname"));
+ return results;
}
if (local_getaddrinfo && local_freeaddrinfo) {
diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
index 11c1f47..a19f865 100644
--- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
@@ -406,7 +406,7 @@ void tst_QButtonGroup::task106609()
QTestEventLoop::instance().enterLoop(1);
QApplication::setActiveWindow(&dlg);
- QTRY_COMPARE(QApplication::activeWindow(), &dlg);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&dlg));
//qDebug() << "int:" << spy2.count() << "QAbstractButton*:" << spy1.count();
QCOMPARE(spy2.count(), 2);
diff --git a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp
index 3f9632c..2e21087 100644
--- a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp
+++ b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp
@@ -66,6 +66,7 @@ private slots:
void setHeader();
void rawHeaderParsing_data();
void rawHeaderParsing();
+ void originatingObject();
void removeHeader();
};
@@ -476,5 +477,20 @@ void tst_QNetworkRequest::removeHeader()
QVERIFY(request.hasRawHeader("bar"));
}
+void tst_QNetworkRequest::originatingObject()
+{
+ QNetworkRequest request;
+
+ QVERIFY(!request.originatingObject());
+
+ {
+ QObject dummy;
+ request.setOriginatingObject(&dummy);
+ QCOMPARE(request.originatingObject(), &dummy);
+ }
+
+ QVERIFY(!request.originatingObject());
+}
+
QTEST_MAIN(tst_QNetworkRequest)
#include "tst_qnetworkrequest.moc"
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 58eaacb..ed9206c 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -812,8 +812,14 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr.data() == aData);
QVERIFY(aData == baseptr.data());
- QVERIFY(bool(operator==<Data,DiffPtrDerivedData>(baseptr, aData)));
+
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(aData == baseptr);
}
check();
@@ -829,6 +835,9 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr == baseptr);
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
}
check();
@@ -845,6 +854,9 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -865,6 +877,9 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -882,6 +897,9 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -1701,7 +1719,7 @@ void tst_QSharedPointer::invalidConstructs()
"struct DerivedData: public Data { int j; };\n"
"\n"
"extern int forwardDeclaredDestructorRunCount;\n"
- "struct ForwardDeclared;\n"
+ "class ForwardDeclared;\n"
"ForwardDeclared *forwardPointer();\n"
);
@@ -1730,6 +1748,10 @@ void tst_QSharedPointer::invalidConstructs()
bool result = (test.*testFunction)(body);
if (qgetenv("QTEST_EXTERNAL_DEBUG").toInt() > 0) {
qDebug("External test output:");
+#ifdef Q_CC_MSVC
+ // MSVC prints errors to stdout
+ printf("%s\n", test.standardOutput().constData());
+#endif
printf("%s\n", test.standardError().constData());
}
if (!result) {