summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-19 10:20:59 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-19 10:20:59 (GMT)
commit82b3f349d6cfe7cb54ee00701ac105c7c8e6d2ec (patch)
tree92678f8b6f54bfe51cf29f89f0bf03f3dd56962d /src
parent35dcea3f7813c7aa5bdb6e85f6fa827fac741cb7 (diff)
parent7e7fda589b86113e07953ed3a9a9a610b85f7987 (diff)
downloadQt-82b3f349d6cfe7cb54ee00701ac105c7c8e6d2ec.zip
Qt-82b3f349d6cfe7cb54ee00701ac105c7c8e6d2ec.tar.gz
Qt-82b3f349d6cfe7cb54ee00701ac105c7c8e6d2ec.tar.bz2
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/gstreamer/backend.cpp2
-rw-r--r--src/3rdparty/phonon/qt7/backend.mm2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2009-06-164
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/simple/main.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webpage/main.cpp2
-rw-r--r--src/corelib/animation/qanimationgroup.cpp7
-rw-r--r--src/corelib/arch/qatomic_symbian.h2
-rw-r--r--src/corelib/arch/symbian/qatomic_symbian.cpp29
-rw-r--r--src/corelib/global/qglobal.cpp9
-rw-r--r--src/corelib/global/qglobal.h19
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian_p.h2
-rw-r--r--src/corelib/io/qprocess_symbian.cpp2
-rw-r--r--src/corelib/io/qurl.cpp4
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp2
-rw-r--r--src/corelib/kernel/qcore_symbian_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h2
-rw-r--r--src/corelib/kernel/qsharedmemory_symbian.cpp2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_symbian.cpp2
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp2
-rw-r--r--src/corelib/tools/qscopedpointer.cpp2
-rw-r--r--src/corelib/tools/qscopedpointer.h2
-rw-r--r--src/corelib/xml/qxmlstream.cpp107
-rw-r--r--src/corelib/xml/qxmlstream.h10
-rw-r--r--src/dbus/qdbus_symbols.cpp10
-rw-r--r--src/gui/dialogs/qfscompleter_p.h2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h1
-rw-r--r--src/gui/image/qpixmap_s60.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp2
-rw-r--r--src/gui/itemviews/qheaderview.cpp3
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp22
-rw-r--r--src/gui/itemviews/qlistview.cpp4
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/kernel/qapplication_x11.cpp18
-rw-r--r--src/gui/kernel/qclipboard_s60.cpp2
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm10
-rw-r--r--src/gui/kernel/qcursor_s60.cpp2
-rw-r--r--src/gui/kernel/qdesktopwidget_s60.cpp2
-rw-r--r--src/gui/kernel/qdnd_s60.cpp2
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm2
-rw-r--r--src/gui/kernel/qeventdispatcher_s60.cpp2
-rw-r--r--src/gui/kernel/qeventdispatcher_s60_p.h2
-rw-r--r--src/gui/kernel/qkeymapper_s60.cpp2
-rw-r--r--src/gui/kernel/qsound_s60.cpp2
-rw-r--r--src/gui/kernel/qt_s60_p.h2
-rw-r--r--src/gui/kernel/qwidget_mac.mm71
-rw-r--r--src/gui/kernel/qwidget_s60.cpp2
-rw-r--r--src/gui/painting/qblendfunctions_armv6_rvct.s2
-rw-r--r--src/gui/painting/qcolormap_s60.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_armv6_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_armv6_rvct.inc2
-rw-r--r--src/gui/painting/qdrawhelper_armv6_rvct.s2
-rw-r--r--src/gui/painting/qpaintdevice.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp50
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp16
-rw-r--r--src/gui/painting/qregion_s60.cpp2
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp2
-rw-r--r--src/gui/painting/qwindowsurface_s60_p.h2
-rw-r--r--src/gui/styles/qs60style.cpp2
-rw-r--r--src/gui/styles/qs60style.h2
-rw-r--r--src/gui/styles/qs60style_p.h2
-rw-r--r--src/gui/styles/qs60style_s60.cpp2
-rw-r--r--src/gui/styles/qs60style_simulated.cpp2
-rw-r--r--src/gui/text/qfont_s60.cpp2
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp2
-rw-r--r--src/gui/text/qfontengine_s60.cpp2
-rw-r--r--src/gui/text/qfontengine_s60_p.h2
-rw-r--r--src/gui/text/qtextcursor.cpp3
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp2
-rw-r--r--src/gui/widgets/qactiontokeyeventmapper.cpp2
-rw-r--r--src/gui/widgets/qactiontokeyeventmapper_p.h2
-rw-r--r--src/gui/widgets/qlineedit.cpp2
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp2
-rw-r--r--src/network/access/qnetworkcookie.cpp7
-rw-r--r--src/network/kernel/qnetworkinterface_symbian.cpp2
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp1
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp26
-rw-r--r--src/network/socket/qudpsocket.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp10
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp65
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp26
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp51
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h6
-rw-r--r--src/plugins/s60/src/qdesktopservices_3_1.cpp2
-rw-r--r--src/plugins/s60/src/qdesktopservices_3_2.cpp2
-rw-r--r--src/plugins/s60/src/qlocale_3_1.cpp2
-rw-r--r--src/plugins/s60/src/qlocale_3_2.cpp2
-rw-r--r--src/s60installs/qt_libs.pro4
-rw-r--r--src/s60main/qts60main.cpp2
-rw-r--r--src/s60main/qts60main_mcrt0.cpp2
-rw-r--r--src/s60main/qts60mainapplication.cpp2
-rw-r--r--src/s60main/qts60mainapplication_p.h2
-rw-r--r--src/s60main/qts60mainappui.cpp2
-rw-r--r--src/s60main/qts60mainappui_p.h2
-rw-r--r--src/s60main/qts60maindocument.cpp2
-rw-r--r--src/s60main/qts60maindocument_p.h2
-rw-r--r--src/s60main/s60main.rss2
-rw-r--r--src/testlib/qtestcase.cpp9
-rw-r--r--src/testlib/qtestevent.h5
-rw-r--r--src/testlib/qtestkeyboard.h2
-rw-r--r--src/testlib/qtestmouse.h2
107 files changed, 537 insertions, 231 deletions
diff --git a/src/3rdparty/phonon/gstreamer/backend.cpp b/src/3rdparty/phonon/gstreamer/backend.cpp
index d05f6a6..cd49454 100644
--- a/src/3rdparty/phonon/gstreamer/backend.cpp
+++ b/src/3rdparty/phonon/gstreamer/backend.cpp
@@ -60,7 +60,7 @@ Backend::Backend(QObject *parent, const QVariantList &)
setProperty("backendName", QLatin1String("Gstreamer"));
setProperty("backendComment", QLatin1String("Gstreamer plugin for Phonon"));
setProperty("backendVersion", QLatin1String("0.2"));
- setProperty("backendWebsite", QLatin1String("http://qtsoftware.com/"));
+ setProperty("backendWebsite", QLatin1String("http://qt.nokia.com/"));
//check if we should enable debug output
QString debugLevelString = qgetenv("PHONON_GST_DEBUG");
diff --git a/src/3rdparty/phonon/qt7/backend.mm b/src/3rdparty/phonon/qt7/backend.mm
index 327ddd7..b3ca106 100644
--- a/src/3rdparty/phonon/qt7/backend.mm
+++ b/src/3rdparty/phonon/qt7/backend.mm
@@ -59,7 +59,7 @@ Backend::Backend(QObject *parent, const QStringList &) : QObject(parent)
setProperty("backendComment", QLatin1String("Developed by Trolltech"));
setProperty("backendVersion", QLatin1String("0.1"));
setProperty("backendIcon", QLatin1String(""));
- setProperty("backendWebsite", QLatin1String("http://qtsoftware.com/"));
+ setProperty("backendWebsite", QLatin1String("http://qt.nokia.com/"));
}
Backend::~Backend()
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog-2009-06-16 b/src/3rdparty/webkit/WebCore/ChangeLog-2009-06-16
index 1041c90..1f283d2 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog-2009-06-16
+++ b/src/3rdparty/webkit/WebCore/ChangeLog-2009-06-16
@@ -47996,7 +47996,7 @@
Rubber-stamped by Simon Hausmann.
- http://www.qtsoftware.com/developer/task-tracker/index_html?id=238662&method=entry
+ http://qt.nokia.com/developer/task-tracker/index_html?id=238662&method=entry
[Qt] Map function keys F1 to F24.
@@ -52735,7 +52735,7 @@
Reviewed by Simon Hausmann.
- http://www.qtsoftware.com/developer/task-tracker/index_html?id=211228&method=entry
+ http://qt.nokia.com/developer/task-tracker/index_html?id=211228&method=entry
[Qt] Show focus rect when a button gets the focus for the first time.
This is important at least for Windows style.
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
index e3b7efe..8506099 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
@@ -142,7 +142,7 @@ void QWebPluginFactory::refreshPlugins()
For example:
\code
- <object type="application/x-pdf" data="http://qtsoftware.com/document.pdf" width="500" height="400">
+ <object type="application/x-pdf" data="http://qt.nokia.com/document.pdf" width="500" height="400">
<param name="showTableOfContents" value="true" />
<param name="hideThumbnails" value="false" />
</object>
@@ -155,7 +155,7 @@ void QWebPluginFactory::refreshPlugins()
\row \o mimeType
\o "application/x-pdf"
\row \o url
- \o "http://qtsoftware.com/document.pdf"
+ \o "http://qt.nokia.com/document.pdf"
\row \o argumentNames
\o "showTableOfContents" "hideThumbnails"
\row \o argumentVaues
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 83808d2..e8f5ad0 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -2663,7 +2663,7 @@
Reviewed by Simon Hausmann.
- http://www.qtsoftware.com/developer/task-tracker/index_html?id=238391&method=entry
+ http://qt.nokia.com/developer/task-tracker/index_html?id=238391&method=entry
[Qt] If QPainter fails to start on a QPrinter instance, do not
continue printing.
@@ -2856,7 +2856,7 @@
Rubber-stamped by Simon Hausmann.
- http://www.qtsoftware.com/developer/task-tracker/index_html?id=219344&method=entry
+ http://qt.nokia.com/developer/task-tracker/index_html?id=219344&method=entry
[Qt] API documentation for QWebPage::WebAction enum.
@@ -2911,7 +2911,7 @@
Reviewed by Simon Hausmann.
- http://www.qtsoftware.com/developer/task-tracker/index_html?id=241144&method=entry
+ http://qt.nokia.com/developer/task-tracker/index_html?id=241144&method=entry
[Qt] Create actions for text selection and editing for QWebPage.
Also properly disable and enable them when contentEditable is toggled.
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/simple/main.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/simple/main.cpp
index 82f5b6c..408630e 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/simple/main.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/simple/main.cpp
@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
QWidget *parent = 0;
//! [Using QWebView]
QWebView *view = new QWebView(parent);
- view->load(QUrl("http://qtsoftware.com/"));
+ view->load(QUrl("http://qt.nokia.com/"));
view->show();
//! [Using QWebView]
return app.exec();
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webpage/main.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webpage/main.cpp
index b91bc30..393b16a 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webpage/main.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webpage/main.cpp
@@ -45,7 +45,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- Thumbnailer thumbnail(QUrl("http://qtsoftware.com"));
+ Thumbnailer thumbnail(QUrl("http://qt.nokia.com"));
QObject::connect(&thumbnail, SIGNAL(finished()),
&app, SLOT(quit()));
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp
index ab47b5a..78777f1 100644
--- a/src/corelib/animation/qanimationgroup.cpp
+++ b/src/corelib/animation/qanimationgroup.cpp
@@ -79,13 +79,6 @@
QAnimationGroup takes ownership of the animations it manages, and
ensures that they are deleted when the animation group is deleted.
- You can also use a \l{The State Machine Framework}{state machine}
- to create complex animations. The framework provides a special
- state, QAnimationState, that plays an animation upon entry and
- transitions to a new state when the animation has finished
- playing. This technique can also be combined with using animation
- groups.
-
\sa QAbstractAnimation, QVariantAnimation, {The Animation Framework}
*/
diff --git a/src/corelib/arch/qatomic_symbian.h b/src/corelib/arch/qatomic_symbian.h
index 74a0ca8..211c5f5 100644
--- a/src/corelib/arch/qatomic_symbian.h
+++ b/src/corelib/arch/qatomic_symbian.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp
index b08a468..57d0754 100644
--- a/src/corelib/arch/symbian/qatomic_symbian.cpp
+++ b/src/corelib/arch/symbian/qatomic_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,33 +44,40 @@
#include <e32debug.h>
-// Heap and handle info printer. This code is placed here as it happens to make it the very last static to be destroyed in a Qt app.
+QT_BEGIN_NAMESPACE
+
+// Heap and handle info printer.
// This way we can report on heap cells and handles that are really not owned by anything which still exists.
// This information can be used to detect whether memory leaks are happening, particularly if these numbers grow as the app is used more.
-struct SPrintExitInfo
+// This code is placed here as it happens to make it the very last static to be destroyed in a Qt app. The
+// reason assumed is that this file appears before any other file declaring static data in the generated
+// Symbian MMP file. This particular file was chosen as it is the earliest symbian specific file.
+struct QSymbianPrintExitInfo
{
- SPrintExitInfo()
+ QSymbianPrintExitInfo()
{
- RThread().HandleCount(initProcessHandleCount,initThreadHandleCount);
+ RThread().HandleCount(initProcessHandleCount, initThreadHandleCount);
initCells = User::CountAllocCells();
}
- ~SPrintExitInfo()
+ ~QSymbianPrintExitInfo()
{
RProcess myProc;
TFullName fullName = myProc.FileName();
TInt cells = User::CountAllocCells();
TInt processHandleCount=0;
TInt threadHandleCount=0;
- RThread().HandleCount(processHandleCount,threadHandleCount);
+ RThread().HandleCount(processHandleCount, threadHandleCount);
RDebug::Print(_L("%S exiting with %d allocated cells, %d handles"),
- &fullName,
- cells - initCells,
- (processHandleCount + threadHandleCount) - (initProcessHandleCount + initThreadHandleCount));
+ &fullName,
+ cells - initCells,
+ (processHandleCount + threadHandleCount) - (initProcessHandleCount + initThreadHandleCount));
}
TInt initCells;
TInt initProcessHandleCount;
TInt initThreadHandleCount;
-} printExitInfo;
+} symbian_printExitInfo;
+
+QT_END_NAMESPACE
#if defined(Q_CC_RVCT)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 73431e0..c4fbc49 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1169,9 +1169,9 @@ bool qSharedBuild()
QSysInfo::symbianVersion() function gives the version of the
system on which the application is run.
- \value SV_9_2 Symbian OS 9.2
- \value SV_9_3 Symbian OS 9.3
- \value SV_9_4 Symbian OS 9.4
+ \value SV_9_2 Symbian OS v9.2
+ \value SV_9_3 Symbian OS v9.3
+ \value SV_9_4 Symbian OS v9.4
\value SV_Unknown An unknown and currently unsupported platform
\sa S60Version, WinVersion, MacVersion
@@ -2189,7 +2189,8 @@ void qt_message_output(QtMsgType msgType, const char *buf)
TPtrC8 ptr(reinterpret_cast<const TUint8*>(buf));
TInt len = Min(tmp.MaxLength(), ptr.Length());
tmp.Copy(ptr.Left(len));
- User::Panic(tmp, 0); // Panic the current thread
+ // Panic the current thread. We don't use real panic codes, so 0 has no special meaning.
+ User::Panic(tmp, 0);
#elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
abort(); // trap; generates core dump
#else
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 36dd863..f38d7cc 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -186,7 +186,6 @@ namespace QT_NAMESPACE {}
#elif defined(__SYMBIAN32__) || defined(SYMBIAN)
# define Q_OS_SYMBIAN
# define Q_NO_POSIX_SIGNALS
-// TODO: should this be in qconfig.h
# define QT_NO_GETIFADDRS
#elif defined(__CYGWIN__)
# define Q_OS_CYGWIN
@@ -303,7 +302,7 @@ namespace QT_NAMESPACE {}
# ifdef MAC_OS_X_VERSION_MIN_REQUIRED
# undef MAC_OS_X_VERSION_MIN_REQUIRED
# endif
-# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3
+# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
# include <AvailabilityMacros.h>
# if !defined(MAC_OS_X_VERSION_10_3)
# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
@@ -726,7 +725,6 @@ namespace QT_NAMESPACE {}
#elif defined(__WINSCW__) && !defined(Q_CC_NOKIAX86)
# define Q_CC_NOKIAX86
-// # define Q_CC_MWERKS // May be required
#else
@@ -1156,9 +1154,7 @@ class QDataStream;
#define QT_SUPPORTS(FEATURE) (!defined(QT_NO_##FEATURE))
#ifndef Q_DECL_EXPORT
-# ifdef Q_OS_WIN
-# define Q_DECL_EXPORT __declspec(dllexport)
-# elif defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
+# if defined(Q_OS_WIN) || defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
# define Q_DECL_EXPORT __declspec(dllexport)
# elif defined(QT_VISIBILITY_AVAILABLE)
# define Q_DECL_EXPORT __attribute__((visibility("default")))
@@ -1168,9 +1164,7 @@ class QDataStream;
# endif
#endif
#ifndef Q_DECL_IMPORT
-# if defined(Q_OS_WIN)
-# define Q_DECL_IMPORT __declspec(dllimport)
-# elif defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
+# if defined(Q_OS_WIN) || defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
# define Q_DECL_IMPORT __declspec(dllimport)
# else
# define Q_DECL_IMPORT
@@ -1178,7 +1172,7 @@ class QDataStream;
#endif
/*
- Create Qt DLL if QT_DLL is defined (Windows only)
+ Create Qt DLL if QT_DLL is defined (Windows and Symbian only)
*/
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
@@ -1546,6 +1540,11 @@ inline void qUnused(T &x) { (void)x; }
Debugging and error handling
*/
+/*
+ On Symbian we do not know beforehand whether we are compiling in
+ release or debug mode, so check the Symbian build define here,
+ and set the QT_NO_DEBUG define appropriately.
+*/
#if defined(Q_OS_SYMBIAN) && defined(NDEBUG) && !defined(QT_NO_DEBUG)
# define QT_NO_DEBUG
#endif
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp
index 412372a..72b8b83 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian.cpp
+++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/io/qfilesystemwatcher_symbian_p.h b/src/corelib/io/qfilesystemwatcher_symbian_p.h
index 846541b..a1bd607 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian_p.h
+++ b/src/corelib/io/qfilesystemwatcher_symbian_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index 64519f6..a8c72d3 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index acbac36..4aae53d 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -5699,6 +5699,10 @@ QString QUrl::fromAce(const QByteArray &domain)
Applications (IDNA) specification, which allows for domain names
(like \c "example.com") to be written using international
characters.
+
+ This function return an empty QByteArra if \a domain is not a valid
+ hostname. Note, in particular, that IPv6 literals are not valid domain
+ names.
*/
QByteArray QUrl::toAce(const QString &domain)
{
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index c7264cf..a7d2694 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h
index 391774f..2a81b99 100644
--- a/src/corelib/kernel/qcore_symbian_p.h
+++ b/src/corelib/kernel/qcore_symbian_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index ed55ef6..d7b9d92 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
index 28fee9e..69912d0 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/kernel/qsharedmemory_symbian.cpp b/src/corelib/kernel/qsharedmemory_symbian.cpp
index d35c21f..fee6293 100644
--- a/src/corelib/kernel/qsharedmemory_symbian.cpp
+++ b/src/corelib/kernel/qsharedmemory_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
index a14db7e..3af441a 100644
--- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index dc9692b..a534560 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 5b8991e..ef6cc39 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h
index 344964b..7a3ee14 100644
--- a/src/corelib/tools/qscopedpointer.h
+++ b/src/corelib/tools/qscopedpointer.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 004e823..4eadc75 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -129,6 +129,21 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \enum QXmlStreamReader::ReadElementTextBehaviour
+
+ This enum specifies the different behaviours of readElementText().
+
+ \value ErrorOnUnexpectedElement Raise an UnexpectedElementError and return
+ what was read so far when a child element is encountered.
+
+ \value IncludeChildElements Recursively include the text from child elements.
+
+ \value SkipChildElements Skip child elements.
+
+ \since 4.6
+*/
+
+/*!
\enum QXmlStreamReader::Error
This enum specifies different error cases
@@ -621,6 +636,56 @@ QXmlStreamReader::TokenType QXmlStreamReader::tokenType() const
return d->type;
}
+/*!
+ Reads until the next start element within the current element. Returns true
+ when a start element was reached. When the end element was reached, or when
+ an error occurred, false is returned.
+
+ The current element is the element matching the most recently parsed start
+ element of which a matching end element has not yet been reached. When the
+ parser has reached the end element, the current element becomes the parent
+ element.
+
+ This is a convenience function for when you're only concerned with parsing
+ XML elements. The \l{QXmlStream Bookmarks Example} makes extensive use of
+ this function.
+
+ \since 4.6
+ \sa readNext()
+ */
+bool QXmlStreamReader::readNextStartElement()
+{
+ while (readNext() != Invalid) {
+ if (isEndElement())
+ return false;
+ else if (isStartElement())
+ return true;
+ }
+ return false;
+}
+
+/*!
+ Reads until the end of the current element, skipping any child nodes.
+ This function is useful for skipping unknown elements.
+
+ The current element is the element matching the most recently parsed start
+ element of which a matching end element has not yet been reached. When the
+ parser has reached the end element, the current element becomes the parent
+ element.
+
+ \since 4.6
+ */
+void QXmlStreamReader::skipCurrentElement()
+{
+ int depth = 1;
+ while (depth && readNext() != Invalid) {
+ if (isEndElement())
+ --depth;
+ else if (isStartElement())
+ ++depth;
+ }
+}
+
/*
* Use the following Perl script to generate the error string index list:
===== PERL SCRIPT ====
@@ -2022,12 +2087,17 @@ void QXmlStreamReader::addExtraNamespaceDeclarations(const QXmlStreamNamespaceDe
The function concatenates text() when it reads either \l Characters
or EntityReference tokens, but skips ProcessingInstruction and \l
- Comment. In case anything else is read before reaching EndElement,
- the function returns what it read so far and raises an
- UnexpectedElementError. If the current token is not StartElement, an
- empty string is returned.
+ Comment. If the current token is not StartElement, an empty string is
+ returned.
+
+ The \a behaviour defines what happens in case anything else is
+ read before reaching EndElement. The function can include the text from
+ child elements (useful for example for HTML), ignore child elements, or
+ raise an UnexpectedElementError and return what was read so far.
+
+ \since 4.6
*/
-QString QXmlStreamReader::readElementText()
+QString QXmlStreamReader::readElementText(ReadElementTextBehaviour behaviour)
{
Q_D(QXmlStreamReader);
if (isStartElement()) {
@@ -2043,16 +2113,37 @@ QString QXmlStreamReader::readElementText()
case ProcessingInstruction:
case Comment:
break;
+ case StartElement:
+ if (behaviour == SkipChildElements) {
+ skipCurrentElement();
+ break;
+ } else if (behaviour == IncludeChildElements) {
+ result += readElementText(behaviour);
+ break;
+ }
+ // Fall through (for ErrorOnUnexpectedElement)
default:
- if (!d->error)
- d->raiseError(UnexpectedElementError, QXmlStream::tr("Expected character data."));
- return result;
+ if (d->error || behaviour == ErrorOnUnexpectedElement) {
+ if (!d->error)
+ d->raiseError(UnexpectedElementError, QXmlStream::tr("Expected character data."));
+ return result;
+ }
}
}
}
return QString();
}
+/*!
+ \overload readElementText()
+
+ Calling this function is equivalent to calling readElementText(ErrorOnUnexpectedElement).
+ */
+QString QXmlStreamReader::readElementText()
+{
+ return readElementText(ErrorOnUnexpectedElement);
+}
+
/*! Raises a custom error with an optional error \a message.
\sa error(), errorString()
diff --git a/src/corelib/xml/qxmlstream.h b/src/corelib/xml/qxmlstream.h
index 89585bc..25c6efe 100644
--- a/src/corelib/xml/qxmlstream.h
+++ b/src/corelib/xml/qxmlstream.h
@@ -322,6 +322,9 @@ public:
bool atEnd() const;
TokenType readNext();
+ bool readNextStartElement();
+ void skipCurrentElement();
+
TokenType tokenType() const;
QString tokenString() const;
@@ -349,6 +352,13 @@ public:
qint64 characterOffset() const;
QXmlStreamAttributes attributes() const;
+
+ enum ReadElementTextBehaviour {
+ ErrorOnUnexpectedElement,
+ IncludeChildElements,
+ SkipChildElements
+ };
+ QString readElementText(ReadElementTextBehaviour behaviour);
QString readElementText();
QStringRef name() const;
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index ca0147a..356b14c 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include "qdbus_symbols_p.h"
#include <QtCore/qglobal.h>
#include <QtCore/qlibrary.h>
#include <QtCore/qmutex.h>
@@ -52,7 +53,7 @@ void *qdbus_resolve_me(const char *name);
static QLibrary *qdbus_libdbus = 0;
-void qdbus_unloadLibDBus()
+static void qdbus_unloadLibDBus()
{
delete qdbus_libdbus;
qdbus_libdbus = 0;
@@ -76,8 +77,11 @@ bool qdbus_loadLibDBus()
lib->setFileName(QLatin1String("dbus-1"));
for (uint i = 0; i < sizeof(majorversions) / sizeof(majorversions[0]); ++i) {
lib->setFileNameAndVersion(lib->fileName(), majorversions[i]);
- if (lib->load() && lib->resolve("dbus_connection_open_private"))
+ if (lib->load() && lib->resolve("dbus_connection_open_private")) {
+ struct Unloader { ~Unloader() { qdbus_unloadLibDBus(); } };
+ static Unloader unloader;
return true;
+ }
lib->unload();
}
@@ -107,8 +111,6 @@ void *qdbus_resolve_me(const char *name)
return ptr;
}
-Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus)
-
QT_END_NAMESPACE
#endif
diff --git a/src/gui/dialogs/qfscompleter_p.h b/src/gui/dialogs/qfscompleter_p.h
index f0fcdec..2e5a674 100644
--- a/src/gui/dialogs/qfscompleter_p.h
+++ b/src/gui/dialogs/qfscompleter_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index d34787d..176d719 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -517,6 +517,7 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint)
+ Q_INTERFACES(QGraphicsItem)
public:
QGraphicsObject(QGraphicsItem *parent = 0);
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index ab19924..a796066 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index 5e6450c..c9a9423 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
+++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 833e000..7c7bce3 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index 5d3bb12..60c31ad 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -1195,7 +1195,8 @@ QHeaderView::ResizeMode QHeaderView::resizeMode(int logicalIndex) const
{
Q_D(const QHeaderView);
int visual = visualIndex(logicalIndex);
- Q_ASSERT(visual != -1);
+ if (visual == -1)
+ return Fixed; //the default value
return d->headerSectionResizeMode(visual);
}
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp
index 98810a0..8414460 100644
--- a/src/gui/itemviews/qitemselectionmodel.cpp
+++ b/src/gui/itemviews/qitemselectionmodel.cpp
@@ -573,6 +573,7 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
int start, int end)
{
Q_Q(QItemSelectionModel);
+ finalize();
// update current index
if (currentIndex.isValid() && parent == currentIndex.parent()
@@ -591,8 +592,8 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
}
QItemSelection deselected;
- QItemSelection::iterator it = currentSelection.begin();
- while (it != currentSelection.end()) {
+ QItemSelection::iterator it = ranges.begin();
+ while (it != ranges.end()) {
if (it->topLeft().parent() != parent) { // Check parents until reaching root or contained in range
QModelIndex itParent = it->topLeft().parent();
while (itParent.isValid() && itParent.parent() != parent)
@@ -600,24 +601,22 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
if (parent.isValid() && start <= itParent.row() && itParent.row() <= end) {
deselected.append(*it);
- it = currentSelection.erase(it);
+ it = ranges.erase(it);
} else {
++it;
}
} else if (start <= it->bottom() && it->bottom() <= end // Full inclusion
&& start <= it->top() && it->top() <= end) {
deselected.append(*it);
- it = currentSelection.erase(it);
+ it = ranges.erase(it);
} else if (start <= it->top() && it->top() <= end) { // Top intersection
deselected.append(QItemSelectionRange(it->topLeft(), model->index(end, it->left(), it->parent())));
- it = currentSelection.insert(it, QItemSelectionRange(model->index(end + 1, it->left(), it->parent()),
- it->bottomRight()));
- it = currentSelection.erase(++it);
+ *it = QItemSelectionRange(model->index(end + 1, it->left(), it->parent()), it->bottomRight());
+ ++it;
} else if (start <= it->bottom() && it->bottom() <= end) { // Bottom intersection
deselected.append(QItemSelectionRange(model->index(start, it->right(), it->parent()), it->bottomRight()));
- it = currentSelection.insert(it, QItemSelectionRange(it->topLeft(),
- model->index(start - 1, it->right(), it->parent())));
- it = currentSelection.erase(++it);
+ *it = QItemSelectionRange(it->topLeft(), model->index(start - 1, it->right(), it->parent()));
+ ++it;
} else {
if (it->top() < start && end < it->bottom()) // Middle intersection (do nothing)
deselected.append(QItemSelectionRange(model->index(start, it->right(), it->parent()),
@@ -626,7 +625,8 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
}
}
- emit q->selectionChanged(QItemSelection(), deselected);
+ if (!deselected.isEmpty())
+ emit q->selectionChanged(QItemSelection(), deselected);
}
/*!
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index ea38f5f..e9e365f 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -458,6 +458,8 @@ QSize QListView::gridSize() const
void QListView::setViewMode(ViewMode mode)
{
Q_D(QListView);
+ if (d->viewMode == mode)
+ return;
d->viewMode = mode;
if (mode == ListMode) {
@@ -1963,7 +1965,7 @@ QListViewPrivate::QListViewPrivate()
movement(QListView::Static),
resizeMode(QListView::Fixed),
layoutMode(QListView::SinglePass),
- viewMode(QListView::ListMode),
+ viewMode(QListView::IconMode), //this will ensure the first initialization to ListView
modeProperties(0),
column(0),
uniformItemSizes(false),
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 00e16af..648a5d5 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index db349f0..d942519 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1851,10 +1851,20 @@ void qt_init(QApplicationPrivate *priv, int,
QX11InfoData *screen = X11->screens + s;
screen->ref = 1; // ensures it doesn't get deleted
screen->screen = s;
- screen->dpiX = (DisplayWidth(X11->display, s) * 254 + DisplayWidthMM(X11->display, s)*5)
- / (DisplayWidthMM(X11->display, s)*10);
- screen->dpiY = (DisplayHeight(X11->display, s) * 254 + DisplayHeightMM(X11->display, s)*5)
- / (DisplayHeightMM(X11->display, s)*10);
+
+ int widthMM = DisplayWidthMM(X11->display, s);
+ if (widthMM != 0) {
+ screen->dpiX = (DisplayWidth(X11->display, s) * 254 + widthMM * 5) / (widthMM * 10);
+ } else {
+ screen->dpiX = 72;
+ }
+
+ int heightMM = DisplayHeightMM(X11->display, s);
+ if (heightMM != 0) {
+ screen->dpiY = (DisplayHeight(X11->display, s) * 254 + heightMM * 5) / (heightMM * 10);
+ } else {
+ screen->dpiY = 72;
+ }
X11->argbVisuals[s] = 0;
X11->argbColormaps[s] = 0;
diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp
index 3c14b93..f409b12 100644
--- a/src/gui/kernel/qclipboard_s60.cpp
+++ b/src/gui/kernel/qclipboard_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 45b0ada..7ac0d89 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -872,7 +872,7 @@ extern "C" {
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
qNGEvent.percentage = [event magnification];
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)rotateWithEvent:(NSEvent *)event;
@@ -885,7 +885,7 @@ extern "C" {
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
qNGEvent.percentage = [event rotation];
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)swipeWithEvent:(NSEvent *)event;
@@ -898,7 +898,7 @@ extern "C" {
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
qNGEvent.direction = QSize(-[event deltaX], -[event deltaY]);
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)beginGestureWithEvent:(NSEvent *)event;
@@ -910,7 +910,7 @@ extern "C" {
qNGEvent.gestureType = QNativeGestureEvent::GestureBegin;
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)endGestureWithEvent:(NSEvent *)event;
@@ -922,7 +922,7 @@ extern "C" {
qNGEvent.gestureType = QNativeGestureEvent::GestureEnd;
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp
index bc4fdd1..1f89430 100644
--- a/src/gui/kernel/qcursor_s60.cpp
+++ b/src/gui/kernel/qcursor_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp
index 5734ddd..4127302 100644
--- a/src/gui/kernel/qdesktopwidget_s60.cpp
+++ b/src/gui/kernel/qdesktopwidget_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp
index 8db2e93..e014940 100644
--- a/src/gui/kernel/qdnd_s60.cpp
+++ b/src/gui/kernel/qdnd_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index efe6375..113362a 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -500,7 +500,7 @@ static bool IsMouseOrKeyEvent( NSEvent* event )
static inline void qt_mac_waitForMoreEvents()
{
#ifndef QT_MAC_USE_COCOA
- while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e20, true) == kCFRunLoopRunTimedOut);
+ while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e20, true) == kCFRunLoopRunTimedOut) ;
#else
// If no event exist in the cocoa event que, wait
// (and free up cpu time) until at least one event occur.
diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp
index a176ede..8dc063e 100644
--- a/src/gui/kernel/qeventdispatcher_s60.cpp
+++ b/src/gui/kernel/qeventdispatcher_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qeventdispatcher_s60_p.h b/src/gui/kernel/qeventdispatcher_s60_p.h
index 6a63875..ed1cb36 100644
--- a/src/gui/kernel/qeventdispatcher_s60_p.h
+++ b/src/gui/kernel/qeventdispatcher_s60_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp
index b68c244..6063ee4 100644
--- a/src/gui/kernel/qkeymapper_s60.cpp
+++ b/src/gui/kernel/qkeymapper_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp
index 5eae4de..b654567 100644
--- a/src/gui/kernel/qsound_s60.cpp
+++ b/src/gui/kernel/qsound_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 4d05f11..1523bcf 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index fbb05c4..3dd2e65 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -107,6 +107,7 @@
#include <private/qcocoapanel_mac_p.h>
#include "qwidget_p.h"
+#include "qevent_p.h"
#include "qdnd_p.h"
#include <QtGui/qgraphicsproxywidget.h>
@@ -729,6 +730,13 @@ static EventTypeSpec window_events[] = {
{ kEventClassWindow, kEventWindowGetRegion },
{ kEventClassWindow, kEventWindowGetClickModality },
{ kEventClassWindow, kEventWindowTransitionCompleted },
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ { kEventClassGesture, kEventGestureStarted },
+ { kEventClassGesture, kEventGestureEnded },
+ { kEventClassGesture, kEventGestureMagnify },
+ { kEventClassGesture, kEventGestureSwipe },
+ { kEventClassGesture, kEventGestureRotate },
+#endif
{ kEventClassMouse, kEventMouseDown }
};
static EventHandlerUPP mac_win_eventUPP = 0;
@@ -1013,6 +1021,69 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
return SendEventToApplication(event);
handled_event = false;
break; }
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ case kEventClassGesture: {
+ // First, find the widget that was under
+ // the mouse when the gesture happened:
+ HIPoint screenLocation;
+ if (GetEventParameter(event, kEventParamMouseLocation, typeHIPoint, 0,
+ sizeof(screenLocation), 0, &screenLocation) != noErr) {
+ handled_event = false;
+ break;
+ }
+ QWidget *widget = QApplication::widgetAt(screenLocation.x, screenLocation.y);
+ if (!widget) {
+ handled_event = false;
+ break;
+ }
+
+ QNativeGestureEvent qNGEvent;
+ qNGEvent.position = QPoint(screenLocation.x, screenLocation.y);
+
+ switch (ekind) {
+ case kEventGestureStarted:
+ qNGEvent.gestureType = QNativeGestureEvent::GestureBegin;
+ break;
+ case kEventGestureEnded:
+ qNGEvent.gestureType = QNativeGestureEvent::GestureEnd;
+ break;
+ case kEventGestureRotate: {
+ CGFloat amount;
+ if (GetEventParameter(event, kEventParamRotationAmount, typeCGFloat, 0,
+ sizeof(amount), 0, &amount) != noErr) {
+ handled_event = false;
+ break;
+ }
+ qNGEvent.gestureType = QNativeGestureEvent::Zoom;
+ qNGEvent.percentage = float(amount);
+ break; }
+ case kEventGestureSwipe: {
+ HIPoint swipeDirection;
+ if (GetEventParameter(event, kEventParamSwipeDirection, typeHIPoint, 0,
+ sizeof(swipeDirection), 0, &swipeDirection) != noErr) {
+ handled_event = false;
+ break;
+ }
+ qNGEvent.gestureType = QNativeGestureEvent::Swipe;
+ qNGEvent.direction = QSize(-swipeDirection.x, -swipeDirection.y);
+ break; }
+ case kEventGestureMagnify: {
+ CGFloat amount;
+ if (GetEventParameter(event, kEventParamMagnificationAmount, typeCGFloat, 0,
+ sizeof(amount), 0, &amount) != noErr) {
+ handled_event = false;
+ break;
+ }
+ qNGEvent.gestureType = QNativeGestureEvent::Zoom;
+ qNGEvent.percentage = float(amount);
+ break; }
+ }
+
+ QApplication::sendSpontaneousEvent(widget, &qNGEvent);
+ break; }
+#endif // gestures
+
default:
handled_event = false;
}
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index f8a5be5..d28e2c0 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qblendfunctions_armv6_rvct.s b/src/gui/painting/qblendfunctions_armv6_rvct.s
index 1027548..0d413cb 100644
--- a/src/gui/painting/qblendfunctions_armv6_rvct.s
+++ b/src/gui/painting/qblendfunctions_armv6_rvct.s
@@ -34,7 +34,7 @@
;** met: http://www.gnu.org/copyleft/gpl.html.
;**
;** If you are unsure which license is appropriate for your use, please
-;** contact the sales department at http://www.qtsoftware.com/contact.
+;** contact the sales department at http://qt.nokia.com/contact.
;** $QT_END_LICENSE$
;**
;****************************************************************************/
diff --git a/src/gui/painting/qcolormap_s60.cpp b/src/gui/painting/qcolormap_s60.cpp
index 01d12d1..7a27c94 100644
--- a/src/gui/painting/qcolormap_s60.cpp
+++ b/src/gui/painting/qcolormap_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qdrawhelper_armv6_p.h b/src/gui/painting/qdrawhelper_armv6_p.h
index 2ab63eb..9f3e062 100644
--- a/src/gui/painting/qdrawhelper_armv6_p.h
+++ b/src/gui/painting/qdrawhelper_armv6_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.inc b/src/gui/painting/qdrawhelper_armv6_rvct.inc
index f6c23d0..1aabbf5 100644
--- a/src/gui/painting/qdrawhelper_armv6_rvct.inc
+++ b/src/gui/painting/qdrawhelper_armv6_rvct.inc
@@ -34,7 +34,7 @@
;** met: http://www.gnu.org/copyleft/gpl.html.
;**
;** If you are unsure which license is appropriate for your use, please
-;** contact the sales department at http://www.qtsoftware.com/contact.
+;** contact the sales department at http://qt.nokia.com/contact.
;** $QT_END_LICENSE$
;**
;****************************************************************************/
diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.s b/src/gui/painting/qdrawhelper_armv6_rvct.s
index 215bdaf..51b67a4 100644
--- a/src/gui/painting/qdrawhelper_armv6_rvct.s
+++ b/src/gui/painting/qdrawhelper_armv6_rvct.s
@@ -34,7 +34,7 @@
;** met: http://www.gnu.org/copyleft/gpl.html.
;**
;** If you are unsure which license is appropriate for your use, please
-;** contact the sales department at http://www.qtsoftware.com/contact.
+;** contact the sales department at http://qt.nokia.com/contact.
;** $QT_END_LICENSE$
;**
;****************************************************************************/
diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp
index 6477952..6a2a4c4 100644
--- a/src/gui/painting/qpaintdevice.cpp
+++ b/src/gui/painting/qpaintdevice.cpp
@@ -64,3 +64,5 @@ int QPaintDevice::metric(PaintDeviceMetric) const
qWarning("QPaintDevice::metrics: Device has no metric information");
return 0;
}
+
+QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index ef4904f..8679e15 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2541,12 +2541,44 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
const bool aa = s->flags.antialiased || s->flags.bilinear;
- if (!aa && sr.size() == QSize(1, 1)) {
+ int sr_l = qFloor(sr.left());
+ int sr_r = qCeil(sr.right()) - 1;
+ int sr_t = qFloor(sr.top());
+ int sr_b = qCeil(sr.bottom()) - 1;
+
+ if (!aa && sr_l == sr_r && sr_t == sr_b) {
// as fillRect will apply the aliased coordinate delta we need to
// subtract it here as we don't use it for image drawing
QTransform old = s->matrix;
s->matrix = s->matrix * QTransform::fromTranslate(-aliasedCoordinateDelta, -aliasedCoordinateDelta);
- fillRect(r, QColor::fromRgba(img.pixel(sr.x(), sr.y())));
+
+ // Do whatever fillRect() does, but without premultiplying the color if it's already premultiplied.
+ QRgb color = img.pixel(sr_l, sr_t);
+ switch (img.format()) {
+ case QImage::Format_ARGB32_Premultiplied:
+ case QImage::Format_ARGB8565_Premultiplied:
+ case QImage::Format_ARGB6666_Premultiplied:
+ case QImage::Format_ARGB8555_Premultiplied:
+ case QImage::Format_ARGB4444_Premultiplied:
+ // Combine premultiplied color with the opacity set on the painter.
+ d->solid_color_filler.solid.color =
+ ((((color & 0x00ff00ff) * s->intOpacity) >> 8) & 0x00ff00ff)
+ | ((((color & 0xff00ff00) >> 8) * s->intOpacity) & 0xff00ff00);
+ break;
+ default:
+ d->solid_color_filler.solid.color = PREMUL(ARGB_COMBINE_ALPHA(color, s->intOpacity));
+ break;
+ }
+
+ if ((d->solid_color_filler.solid.color & 0xff000000) == 0
+ && s->composition_mode == QPainter::CompositionMode_SourceOver) {
+ return;
+ }
+
+ d->solid_color_filler.clip = d->clip();
+ d->solid_color_filler.adjustSpanMethods();
+ fillRect(r, &d->solid_color_filler);
+
s->matrix = old;
return;
}
@@ -5218,6 +5250,13 @@ static void drawLine_midpoint_i(int x1, int y1, int x2, int y2, ProcessSpans spa
dy = -dy;
}
+ int x_lower_limit = - 128;
+ if (x1 < x_lower_limit) {
+ int cy = dy * (x_lower_limit - x1) / dx + y1;
+ drawLine_midpoint_i(x_lower_limit, cy, x2, y2, span_func, data, style, devRect);
+ return;
+ }
+
if (style == LineDrawNormal)
--x2;
@@ -5355,6 +5394,13 @@ static void drawLine_midpoint_i(int x1, int y1, int x2, int y2, ProcessSpans spa
dx = -dx;
}
+ int y_lower_limit = - 128;
+ if (y1 < y_lower_limit) {
+ int cx = dx * (y_lower_limit - y1) / dy + x1;
+ drawLine_midpoint_i(cx, y_lower_limit, x2, y2, span_func, data, style, devRect);
+ return;
+ }
+
if (style == LineDrawNormal)
--y2;
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 115f599..b8781b1 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -2459,15 +2459,23 @@ void QX11PaintEngine::drawFreetype(const QPointF &p, const QTextItemInt &ti)
XRectangle rects[rectcount];
int num_rects = 0;
+ QPoint delta(qRound(d->matrix.dx()), qRound(d->matrix.dy()));
+ QRect clip(d->polygonClipper.boundingRect());
for (int i=0; i < path.elementCount(); i+=5) {
int x = qRound(path.elementAt(i).x);
int y = qRound(path.elementAt(i).y);
int w = qRound(path.elementAt(i+1).x) - x;
int h = qRound(path.elementAt(i+2).y) - y;
- rects[num_rects].x = x + qRound(d->matrix.dx());
- rects[num_rects].y = y + qRound(d->matrix.dy());
- rects[num_rects].width = w;
- rects[num_rects].height = h;
+
+ QRect rect = QRect(x + delta.x(), y + delta.y(), w, h);
+ rect = rect.intersected(clip);
+ if (rect.isEmpty())
+ continue;
+
+ rects[num_rects].x = short(rect.x());
+ rects[num_rects].y = short(rect.y());
+ rects[num_rects].width = ushort(rect.width());
+ rects[num_rects].height = ushort(rect.height());
++num_rects;
if (num_rects == rectcount) {
XFillRectangles(d->dpy, d->hd, d->gc, rects, num_rects);
diff --git a/src/gui/painting/qregion_s60.cpp b/src/gui/painting/qregion_s60.cpp
index 2d85f10..5600ece 100644
--- a/src/gui/painting/qregion_s60.cpp
+++ b/src/gui/painting/qregion_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 714c9e8..622b8de 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qwindowsurface_s60_p.h b/src/gui/painting/qwindowsurface_s60_p.h
index 54b2035..87dfd5e 100644
--- a/src/gui/painting/qwindowsurface_s60_p.h
+++ b/src/gui/painting/qwindowsurface_s60_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 0efc5b4..2a88c9a 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h
index 7711b19..a03803b 100644
--- a/src/gui/styles/qs60style.h
+++ b/src/gui/styles/qs60style.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 680d787..2e661c0 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 45be2eb..85f0ae4 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 5ceb875..350ef51 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp
index 4bc81f8..9541fe8 100644
--- a/src/gui/text/qfont_s60.cpp
+++ b/src/gui/text/qfont_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 3fc3744..058041b 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index ebff9c8..eba21e8 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index a5bd0c8..0c1be8c 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 88ab9d0..5a938e3 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -84,7 +84,8 @@ QTextCursorPrivate::QTextCursorPrivate(const QTextCursorPrivate &rhs)
QTextCursorPrivate::~QTextCursorPrivate()
{
- priv->removeCursor(this);
+ if (priv)
+ priv->removeCursor(this);
}
QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int positionOfChange, int charsAddedOrRemoved, QTextUndoCommand::Operation op)
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index 09411e1..f171390 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/widgets/qactiontokeyeventmapper.cpp b/src/gui/widgets/qactiontokeyeventmapper.cpp
index 0e1e1bb..cf4ffd2 100644
--- a/src/gui/widgets/qactiontokeyeventmapper.cpp
+++ b/src/gui/widgets/qactiontokeyeventmapper.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/widgets/qactiontokeyeventmapper_p.h b/src/gui/widgets/qactiontokeyeventmapper_p.h
index 57b81af..2cc1698 100644
--- a/src/gui/widgets/qactiontokeyeventmapper_p.h
+++ b/src/gui/widgets/qactiontokeyeventmapper_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 9e15e80..6b73e21 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1394,6 +1394,7 @@ bool QLineEdit::event(QEvent * e)
if (QApplication::keypadNavigationEnabled()) {
if (e->type() == QEvent::EnterEditFocus) {
end(false);
+ d->setCursorVisible(true);
int cft = QApplication::cursorFlashTime();
d->control->setCursorBlinkPeriod(cft/2);
} else if (e->type() == QEvent::LeaveEditFocus) {
@@ -1402,7 +1403,6 @@ bool QLineEdit::event(QEvent * e)
if (d->control->hasAcceptableInput() || d->control->fixup())
emit editingFinished();
}
- return true;
}
#endif
return QWidget::event(e);
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index b0cd7c8..e4079c5 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -33,7 +33,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 0c13286..6884bee 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -504,7 +504,12 @@ QByteArray QNetworkCookie::toRawForm(RawForm form) const
}
if (!d->domain.isEmpty()) {
result += "; domain=";
- result += QUrl::toAce(d->domain);
+ QString domainNoDot = d->domain;
+ if (domainNoDot.startsWith(QLatin1Char('.'))) {
+ result += '.';
+ domainNoDot = domainNoDot.mid(1);
+ }
+ result += QUrl::toAce(domainNoDot);
}
if (!d->path.isEmpty()) {
result += "; path=";
diff --git a/src/network/kernel/qnetworkinterface_symbian.cpp b/src/network/kernel/qnetworkinterface_symbian.cpp
index 2ba5350..32b51b1 100644
--- a/src/network/kernel/qnetworkinterface_symbian.cpp
+++ b/src/network/kernel/qnetworkinterface_symbian.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 2cf8ef6..9211d63 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -306,7 +306,6 @@ void QLocalSocketPrivate::_q_connectToSocket()
case ETIMEDOUT:
errorOccurred(QLocalSocket::SocketTimeoutError, function);
break;
- case EINPROGRESS:
case EAGAIN:
// Try again later, all of the sockets listening are full
if (!delayConnect) {
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index df9b7b4..4388382 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -610,7 +610,7 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
// the data written to udpMessagePeekBuffer is discarded, so
// this function is still reentrant although it might not look
// so.
- recvResult = qt_socket_recv(socketDescriptor, udpMessagePeekBuffer.data(),
+ recvResult = ::recv(socketDescriptor, udpMessagePeekBuffer.data(),
udpMessagePeekBuffer.size(), MSG_PEEK);
if (recvResult == -1 && errno == EINTR)
continue;
@@ -897,9 +897,9 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co
tv.tv_usec = (timeout % 1000) * 1000;
#ifdef Q_OS_SYMBIAN
- fd_set fdexec;
- FD_ZERO(&fdexec);
- FD_SET(socketDescriptor, &fdexec);
+ fd_set fdexception;
+ FD_ZERO(&fdexception);
+ FD_SET(socketDescriptor, &fdexception);
#endif
int retval;
@@ -907,13 +907,13 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co
#ifndef Q_OS_SYMBIAN
retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);
#else
- retval = qt_safe_select(socketDescriptor + 1, &fds, 0, &fdexec, timeout < 0 ? 0 : &tv);
+ retval = qt_safe_select(socketDescriptor + 1, &fds, 0, &fdexception, timeout < 0 ? 0 : &tv);
#endif
else
#ifndef Q_OS_SYMBIAN
retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);
#else
- retval = qt_safe_select(socketDescriptor + 1, 0, &fds, &fdexec, timeout < 0 ? 0 : &tv);
+ retval = qt_safe_select(socketDescriptor + 1, 0, &fds, &fdexception, timeout < 0 ? 0 : &tv);
#endif
@@ -923,10 +923,10 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co
if(retval < 0) {
qWarning("nativeSelect(....) returned < 0 for socket %d", socketDescriptor);
}
- selectForExec = FD_ISSET(socketDescriptor, &fdexec);
+ selectForExec = FD_ISSET(socketDescriptor, &fdexception);
}
if(selectForExec) {
- qWarning("nativeSelect (selectForRead %d, retVal %d, errno %d) Unexpected expectfds ready in fd %d",
+ qWarning("nativeSelect (selectForRead %d, retVal %d, errno %d) Unexpected exception for fd %d",
selectForRead, retval, errno, socketDescriptor);
}
#endif
@@ -948,9 +948,9 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool c
FD_SET(socketDescriptor, &fdwrite);
#ifdef Q_OS_SYMBIAN
- fd_set fdexec;
- FD_ZERO(&fdexec);
- FD_SET(socketDescriptor, &fdexec);
+ fd_set fdexception;
+ FD_ZERO(&fdexception);
+ FD_SET(socketDescriptor, &fdexception);
#endif
struct timeval tv;
@@ -965,13 +965,13 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool c
timer.start();
do {
- ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, &fdexec, timeout < 0 ? 0 : &tv);
+ ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, &fdexception, timeout < 0 ? 0 : &tv);
bool selectForExec = false;
if(ret != 0) {
if(ret < 0) {
qWarning("nativeSelect(....) returned < 0 for socket %d", socketDescriptor);
}
- selectForExec = FD_ISSET(socketDescriptor, &fdexec);
+ selectForExec = FD_ISSET(socketDescriptor, &fdexception);
}
if(selectForExec) {
qWarning("nativeSelect (checkRead %d, checkWrite %d, ret %d, errno %d): Unexpected expectfds ready in fd %d",
diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp
index 5483ece..aeb525c 100644
--- a/src/network/socket/qudpsocket.cpp
+++ b/src/network/socket/qudpsocket.cpp
@@ -97,7 +97,7 @@
\note On Symbian OS bind flags behaviour depends on process capabilties.
If process has NetworkControl capability, the bind attempt with
- ReuseAddressHint will always succeed even the address and port is already
+ ReuseAddressHint will always succeed even if the address and port is already
bound by another socket with any flags. If process does not have
NetworkControl capability, the bind attempt to address and port already
bound by another socket will always fail.
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
index d2fadcb..3979a8c 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
@@ -47,7 +47,7 @@
QDirectFBPaintDevice::QDirectFBPaintDevice(QDirectFBScreen *scr)
: QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), screen(scr),
- lock(DFBSurfaceLockFlags(0)), mem(0), engine(0)
+ bpl(-1), lockFlgs(DFBSurfaceLockFlags(0)), mem(0), engine(0)
{}
QDirectFBPaintDevice::~QDirectFBPaintDevice()
@@ -65,15 +65,15 @@ IDirectFBSurface *QDirectFBPaintDevice::directFBSurface() const
void QDirectFBPaintDevice::lockDirectFB(DFBSurfaceLockFlags flags)
{
- if (!(lock & flags)) {
- if (lock)
+ if (!(lockFlgs & flags)) {
+ if (lockFlgs)
unlockDirectFB();
mem = QDirectFBScreen::lockSurface(dfbSurface, flags, &bpl);
Q_ASSERT(mem);
const QSize s = size();
lockedImage = new QImage(mem, s.width(), s.height(), bpl,
QDirectFBScreen::getImageFormat(dfbSurface));
- lock = flags;
+ lockFlgs = flags;
}
}
@@ -87,7 +87,7 @@ void QDirectFBPaintDevice::unlockDirectFB()
delete lockedImage;
lockedImage = 0;
mem = 0;
- lock = DFBSurfaceLockFlags(0);
+ lockFlgs = DFBSurfaceLockFlags(0);
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
index 3932403..688fd7b 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h
@@ -68,7 +68,7 @@ public:
int bytesPerLine() const;
QSize size() const;
int metric(QPaintDevice::PaintDeviceMetric metric) const;
- DFBSurfaceLockFlags lockFlags() const { return lock; }
+ DFBSurfaceLockFlags lockFlags() const { return lockFlgs; }
QPaintEngine *paintEngine() const;
protected:
@@ -86,7 +86,7 @@ protected:
QImage *lockedImage;
QDirectFBScreen *screen;
int bpl;
- DFBSurfaceLockFlags lock;
+ DFBSurfaceLockFlags lockFlgs;
uchar *mem;
QDirectFBPaintEngine *engine;
private:
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 131ff4b..ba715c3 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -119,13 +119,14 @@ private:
IDirectFB *fb;
quint8 opacity;
- bool dirtyClip;
ClipType clipType;
QDirectFBPaintDevice *dfbDevice;
uint compositionModeStatus;
- QDirectFBPaintEngine *q;
+ bool inClip;
QRect currentClip;
+
+ QDirectFBPaintEngine *q;
friend class QDirectFBPaintEngine;
};
@@ -236,7 +237,7 @@ static inline void drawRects(const T *rects, int n, const QTransform &transform,
d->surface->SetClip(d->surface, &clipRegion); \
operation; \
} \
- d->dirtyClip = true; \
+ d->updateClip(); \
break; } \
case QDirectFBPaintEnginePrivate::ComplexClip: \
case QDirectFBPaintEnginePrivate::ClipUnset: \
@@ -297,8 +298,8 @@ bool QDirectFBPaintEngine::end()
void QDirectFBPaintEngine::clipEnabledChanged()
{
Q_D(QDirectFBPaintEngine);
- d->dirtyClip = true;
QRasterPaintEngine::clipEnabledChanged();
+ d->updateClip();
}
void QDirectFBPaintEngine::penChanged()
@@ -341,26 +342,49 @@ void QDirectFBPaintEngine::setState(QPainterState *state)
{
Q_D(QDirectFBPaintEngine);
QRasterPaintEngine::setState(state);
- d->dirtyClip = true;
d->setPen(state->pen);
d->opacity = quint8(state->opacity * 255);
d->setCompositionMode(state->compositionMode());
d->setTransform(state->transform());
d->setRenderHints(state->renderHints);
+ if (d->surface)
+ d->updateClip();
}
void QDirectFBPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
{
Q_D(QDirectFBPaintEngine);
- d->dirtyClip = true;
+ const bool wasInClip = d->inClip;
+ d->inClip = true;
QRasterPaintEngine::clip(path, op);
+ if (!wasInClip) {
+ d->inClip = false;
+ d->updateClip();
+ }
+}
+
+void QDirectFBPaintEngine::clip(const QRegion &region, Qt::ClipOperation op)
+{
+ Q_D(QDirectFBPaintEngine);
+ const bool wasInClip = d->inClip;
+ d->inClip = true;
+ QRasterPaintEngine::clip(region, op);
+ if (!wasInClip) {
+ d->inClip = false;
+ d->updateClip();
+ }
}
void QDirectFBPaintEngine::clip(const QRect &rect, Qt::ClipOperation op)
{
Q_D(QDirectFBPaintEngine);
- d->dirtyClip = true;
+ const bool wasInClip = d->inClip;
+ d->inClip = true;
QRasterPaintEngine::clip(rect, op);
+ if (!wasInClip) {
+ d->inClip = false;
+ d->updateClip();
+ }
}
void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
@@ -371,7 +395,6 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
if (brush == Qt::NoBrush && pen == Qt::NoPen)
return;
- d->updateClip();
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
|| !d->simplePen
@@ -401,7 +424,6 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
if (brush == Qt::NoBrush && pen == Qt::NoPen)
return;
- d->updateClip();
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
|| !d->simplePen
@@ -426,7 +448,6 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
{
Q_D(QDirectFBPaintEngine);
- d->updateClip();
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
|| !d->simplePen
@@ -448,7 +469,6 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount)
{
Q_D(QDirectFBPaintEngine);
- d->updateClip();
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
|| !d->simplePen
@@ -491,7 +511,6 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image,
than the max image cache size we fall back to raster engine.
*/
- d->updateClip();
#if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
@@ -534,7 +553,6 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap,
{
Q_D(QDirectFBPaintEngine);
- d->updateClip();
if (pixmap.pixmapData()->classId() != QPixmapData::DirectFBClass) {
RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr);
d->lock();
@@ -569,7 +587,6 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r,
const QPointF &offset)
{
Q_D(QDirectFBPaintEngine);
- d->updateClip();
if (pixmap.pixmapData()->classId() != QPixmapData::DirectFBClass) {
RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset);
d->lock();
@@ -586,7 +603,7 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r,
QRasterPaintEngine::drawTiledPixmap(r, pix, offset);
} else {
d->unlock();
- d->drawTiledPixmap(r, pixmap, offset);
+ CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset));
}
}
@@ -674,7 +691,6 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
Q_D(QDirectFBPaintEngine);
if (brush.style() == Qt::NoBrush)
return;
- d->updateClip();
if (d->clipType != QDirectFBPaintEnginePrivate::ComplexClip) {
switch (brush.style()) {
case Qt::SolidPattern: {
@@ -718,7 +734,6 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color)
if (!color.isValid())
return;
Q_D(QDirectFBPaintEngine);
- d->updateClip();
if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedPrimitives)
|| (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported)
|| d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) {
@@ -729,8 +744,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color)
d->unlock();
d->setDFBColor(color);
const QRect r = state()->matrix.mapRect(rect).toRect();
- d->surface->FillRectangle(d->surface, r.x(), r.y(),
- r.width(), r.height());
+ CLIPPED_PAINT(d->surface->FillRectangle(d->surface, r.x(), r.y(), r.width(), r.height()));
}
}
@@ -765,9 +779,9 @@ void QDirectFBPaintEngine::initImageCache(int size)
QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p)
: surface(0), antialiased(false), simplePen(false),
- transformationType(0), opacity(255), dirtyClip(true),
+ transformationType(0), opacity(255),
clipType(ClipUnset), dfbDevice(0),
- compositionModeStatus(0), q(p)
+ compositionModeStatus(0), inClip(false), q(p)
{
fb = QDirectFBScreen::instance()->dfb();
surfaceCache = new SurfaceCache;
@@ -978,7 +992,6 @@ static inline qreal fixCoord(qreal rect_pos, qreal pixmapSize, qreal offset)
void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &off)
{
- Q_ASSERT(!dirtyClip);
Q_ASSERT(!(transformationType & Matrix_BlitsUnsupported));
const QTransform &transform = q->state()->matrix;
const QRect destinationRect = transform.mapRect(dest).toRect().normalized();
@@ -1071,9 +1084,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix
void QDirectFBPaintEnginePrivate::updateClip()
{
- if (!dirtyClip)
- return;
-
+ Q_ASSERT(surface);
currentClip = QRect();
const QClipData *clipData = clip();
if (!clipData || !clipData->enabled) {
@@ -1095,14 +1106,12 @@ void QDirectFBPaintEnginePrivate::updateClip()
} else {
clipType = ComplexClip;
}
-
- dirtyClip = false;
}
void QDirectFBPaintEnginePrivate::systemStateChanged()
{
- dirtyClip = true;
QRasterPaintEnginePrivate::systemStateChanged();
+ updateClip();
}
IDirectFBSurface *SurfaceCache::getSurface(const uint *buf, int size)
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
index b939b68..80108b2 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h
@@ -101,6 +101,7 @@ public:
virtual void setState(QPainterState *state);
virtual void clip(const QVectorPath &path, Qt::ClipOperation op);
+ virtual void clip(const QRegion &region, Qt::ClipOperation op);
virtual void clip(const QRect &rect, Qt::ClipOperation op);
static void initImageCache(int size);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 774162c..dc53847 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -56,13 +56,18 @@
class QDirectFBScreenPrivate : public QObject, public QWSGraphicsSystem
{
+ Q_OBJECT
public:
QDirectFBScreenPrivate(QDirectFBScreen *qptr);
~QDirectFBScreenPrivate();
void setFlipFlags(const QStringList &args);
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
-
+public slots:
+#ifdef QT_DIRECTFB_WM
+ void onWindowEvent(QWSWindow *window, QWSServer::WindowEvent event);
+#endif
+public:
IDirectFB *dfb;
DFBSurfaceFlipFlags flipFlags;
QDirectFBScreen::DirectFBFlags directFBFlags;
@@ -86,6 +91,8 @@ public:
QDirectFBScreen *q;
};
+#include "qdirectfbscreen.moc"
+
QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr)
: QWSGraphicsSystem(qptr), dfb(0), flipFlags(DSFLIP_NONE),
directFBFlags(QDirectFBScreen::NoFlags), alphaPixmapFormat(QImage::Format_Invalid),
@@ -107,6 +114,10 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr)
#ifndef QT_NO_QWS_SIGNALHANDLER
QWSSignalHandler::instance()->addObject(this);
#endif
+#ifdef QT_DIRECTFB_WM
+ connect(QWSServer::instance(), SIGNAL(windowEvent(QWSWindow*, QWSServer::WindowEvent)),
+ this, SLOT(onWindowEvent(QWSWindow*, QWSServer::WindowEvent)));
+#endif
}
QDirectFBScreenPrivate::~QDirectFBScreenPrivate()
@@ -578,6 +589,7 @@ QDirectFBScreenCursor::QDirectFBScreenCursor()
void QDirectFBScreenCursor::move(int x, int y)
{
+ pos = QPoint(x, y);
layer->WarpCursor(layer, x, y);
}
@@ -746,6 +758,18 @@ void QDirectFBScreenPrivate::setFlipFlags(const QStringList &args)
}
}
+#ifdef QT_DIRECTFB_WM
+void QDirectFBScreenPrivate::onWindowEvent(QWSWindow *window, QWSServer::WindowEvent event)
+{
+ if (event == QWSServer::Raise) {
+ QWSWindowSurface *windowSurface = window->windowSurface();
+ if (windowSurface && windowSurface->key() == QLatin1String("directfb")) {
+ static_cast<QDirectFBWindowSurface*>(windowSurface)->raise();
+ }
+ }
+}
+#endif
+
QPixmapData *QDirectFBScreenPrivate::createPixmapData(QPixmapData::PixelType type) const
{
if (type == QPixmapData::BitmapType)
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 584f334..441bac9 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -54,6 +54,7 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect
: QDirectFBPaintDevice(scr)
#ifndef QT_NO_DIRECTFB_WM
, dfbWindow(0)
+ , sibling(0)
#endif
, flipFlags(flip)
, boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip)
@@ -72,6 +73,7 @@ QDirectFBWindowSurface::QDirectFBWindowSurface(DFBSurfaceFlipFlags flip, QDirect
: QWSWindowSurface(widget), QDirectFBPaintDevice(scr)
#ifndef QT_NO_DIRECTFB_WM
, dfbWindow(0)
+ , sibling(0)
#endif
, flipFlags(flip)
, boundingRectFlip(scr->directFBFlags() & QDirectFBScreen::BoundingRectFlip)
@@ -98,6 +100,17 @@ QDirectFBWindowSurface::~QDirectFBWindowSurface()
{
}
+#ifdef QT_DIRECTFB_WM
+void QDirectFBWindowSurface::raise()
+{
+ if (dfbWindow) {
+ dfbWindow->RaiseToTop(dfbWindow);
+ } else if (sibling && (!sibling->sibling || sibling->dfbWindow)) {
+ sibling->raise();
+ }
+}
+#endif
+
bool QDirectFBWindowSurface::isValid() const
{
return true;
@@ -126,6 +139,7 @@ void QDirectFBWindowSurface::createWindow()
description.surface_caps = DSCAPS_PREMULTIPLIED;
DFBResult result = layer->CreateWindow(layer, &description, &dfbWindow);
+
if (result != DFB_OK)
DirectFBErrorFatal("QDirectFBWindowSurface::createWindow", result);
@@ -231,34 +245,25 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect)
QByteArray QDirectFBWindowSurface::permanentState() const
{
- QByteArray array;
-#ifdef QT_NO_DIRECTFB_WM
- array.resize(sizeof(SurfaceFlags) + sizeof(IDirectFBSurface*));
-#else
- array.resize(sizeof(SurfaceFlags));
-#endif
- char *ptr = array.data();
-
- *reinterpret_cast<SurfaceFlags*>(ptr) = surfaceFlags();
- ptr += sizeof(SurfaceFlags);
-
-#ifdef QT_NO_DIRECTFB_WM
- *reinterpret_cast<IDirectFBSurface**>(ptr) = dfbSurface;
+ QByteArray state;
+#ifdef QT_DIRECTFB_WM
+ QDataStream ds(&state, QIODevice::WriteOnly);
+ ds << reinterpret_cast<quintptr>(this);
#endif
- return array;
+ return state;
}
void QDirectFBWindowSurface::setPermanentState(const QByteArray &state)
{
- SurfaceFlags flags;
- const char *ptr = state.constData();
-
- flags = *reinterpret_cast<const SurfaceFlags*>(ptr);
- setSurfaceFlags(flags);
-
-#ifdef QT_NO_DIRECTFB_WM
- ptr += sizeof(SurfaceFlags);
- dfbSurface = *reinterpret_cast<IDirectFBSurface* const*>(ptr);
+#ifdef QT_DIRECTFB_WM
+ if (state.size() == sizeof(quintptr)) {
+ QDataStream ds(state);
+ quintptr ptr;
+ ds >> ptr;
+ sibling = reinterpret_cast<QDirectFBWindowSurface*>(ptr);
+ }
+#else
+ Q_UNUSED(state);
#endif
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
index 64b1920..2c4bcdf 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h
@@ -65,6 +65,9 @@ public:
QDirectFBWindowSurface(DFBSurfaceFlipFlags flipFlags, QDirectFBScreen *scr, QWidget *widget);
~QDirectFBWindowSurface();
+#ifdef QT_DIRECTFB_WM
+ void raise();
+#endif
bool isValid() const;
void setGeometry(const QRect &rect);
@@ -87,9 +90,10 @@ public:
QImage *buffer(const QWidget *widget);
private:
-#ifndef QT_NO_DIRECTFB_WM
+#ifdef QT_DIRECTFB_WM
void createWindow();
IDirectFBWindow *dfbWindow;
+ QDirectFBWindowSurface *sibling;
#endif
#ifdef QT_NO_DIRECTFB_WM
diff --git a/src/plugins/s60/src/qdesktopservices_3_1.cpp b/src/plugins/s60/src/qdesktopservices_3_1.cpp
index 508009c..a651c03 100644
--- a/src/plugins/s60/src/qdesktopservices_3_1.cpp
+++ b/src/plugins/s60/src/qdesktopservices_3_1.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp
index a2e8cce..fab1237 100644
--- a/src/plugins/s60/src/qdesktopservices_3_2.cpp
+++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/s60/src/qlocale_3_1.cpp b/src/plugins/s60/src/qlocale_3_1.cpp
index fb148ab..ed3c8ce 100644
--- a/src/plugins/s60/src/qlocale_3_1.cpp
+++ b/src/plugins/s60/src/qlocale_3_1.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/s60/src/qlocale_3_2.cpp b/src/plugins/s60/src/qlocale_3_2.cpp
index 087d29d..835f46b 100644
--- a/src/plugins/s60/src/qlocale_3_2.cpp
+++ b/src/plugins/s60/src/qlocale_3_2.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/qt_libs.pro
index cb03a05..7ce9597 100644
--- a/src/s60installs/qt_libs.pro
+++ b/src/s60installs/qt_libs.pro
@@ -40,10 +40,10 @@ symbian: {
vendorinfo = \
"; Localised Vendor name" \
- "%{\"Nokia, Qt Software\"}" \
+ "%{\"Nokia, Qt\"}" \
" " \
"; Unique Vendor name" \
- ":\"Nokia, Qt Software\"" \
+ ":\"Nokia, Qt\"" \
" "
diff --git a/src/s60main/qts60main.cpp b/src/s60main/qts60main.cpp
index e3ab46d..4112424 100644
--- a/src/s60main/qts60main.cpp
+++ b/src/s60main/qts60main.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp
index ae29260..c250b61 100644
--- a/src/s60main/qts60main_mcrt0.cpp
+++ b/src/s60main/qts60main_mcrt0.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60mainapplication.cpp b/src/s60main/qts60mainapplication.cpp
index 52b15d6..11ade1b 100644
--- a/src/s60main/qts60mainapplication.cpp
+++ b/src/s60main/qts60mainapplication.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60mainapplication_p.h b/src/s60main/qts60mainapplication_p.h
index b35b38e..0d662ff 100644
--- a/src/s60main/qts60mainapplication_p.h
+++ b/src/s60main/qts60mainapplication_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60mainappui.cpp b/src/s60main/qts60mainappui.cpp
index 4567350..2f3d925 100644
--- a/src/s60main/qts60mainappui.cpp
+++ b/src/s60main/qts60mainappui.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60mainappui_p.h b/src/s60main/qts60mainappui_p.h
index 943d61d..737dcda 100644
--- a/src/s60main/qts60mainappui_p.h
+++ b/src/s60main/qts60mainappui_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60maindocument.cpp b/src/s60main/qts60maindocument.cpp
index 1fd3e3e..a42fe59 100644
--- a/src/s60main/qts60maindocument.cpp
+++ b/src/s60main/qts60maindocument.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/qts60maindocument_p.h b/src/s60main/qts60maindocument_p.h
index a7e1fd2..dfdac5f 100644
--- a/src/s60main/qts60maindocument_p.h
+++ b/src/s60main/qts60maindocument_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/s60main/s60main.rss b/src/s60main/s60main.rss
index b2998ac..e8b9abc 100644
--- a/src/s60main/s60main.rss
+++ b/src/s60main/s60main.rss
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index a7aa81b..9a09c19 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -813,12 +813,12 @@ namespace QTest
{
static QObject *currentTestObject = 0;
- struct TestFunction {
+ static struct TestFunction {
TestFunction():function(0), data(0) {}
~TestFunction() { delete [] data; }
int function;
char *data;
- } testFuncs[512];
+ } *testFuncs;
/**
* Contains the count of test functions that was supplied
@@ -1125,6 +1125,11 @@ static void qParseArgs(int argc, char *argv[])
exit(1);
}
++QTest::lastTestFuncIdx;
+ if (!QTest::testFuncs) {
+ struct Cleanup { ~Cleanup() { delete[] QTest::testFuncs; } };
+ static Cleanup cleanup;
+ QTest::testFuncs = new TestFunction[512];
+ }
QTest::testFuncs[QTest::lastTestFuncIdx].function = idx;
QTest::testFuncs[QTest::lastTestFuncIdx].data = data;
QTEST_ASSERT(QTest::lastTestFuncIdx < 512);
diff --git a/src/testlib/qtestevent.h b/src/testlib/qtestevent.h
index a8376ee..dfbba33 100644
--- a/src/testlib/qtestevent.h
+++ b/src/testlib/qtestevent.h
@@ -71,6 +71,7 @@ public:
virtual ~QTestEvent() {}
};
+#ifdef QT_GUI_LIB
class QTestKeyEvent: public QTestEvent
{
public:
@@ -135,6 +136,8 @@ private:
QPoint _pos;
int _delay;
};
+#endif //QT_GUI_LIB
+
class QTestDelayEvent: public QTestEvent
{
@@ -159,6 +162,7 @@ public:
inline void clear()
{ qDeleteAll(*this); QList<QTestEvent *>::clear(); }
+#ifdef QT_GUI_LIB
inline void addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
{ addKeyEvent(QTest::Click, qtKey, modifiers, msecs); }
inline void addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
@@ -194,6 +198,7 @@ public:
{ append(new QTestMouseEvent(QTest::MouseDClick, button, stateKey, pos, delay)); }
inline void addMouseMove(QPoint pos = QPoint(), int delay=-1)
{ append(new QTestMouseEvent(QTest::MouseMove, Qt::NoButton, 0, pos, delay)); }
+#endif //QT_GUI_LIB
inline void addDelay(int msecs)
{ append(new QTestDelayEvent(msecs)); }
diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h
index 2e475b2..af81075 100644
--- a/src/testlib/qtestkeyboard.h
+++ b/src/testlib/qtestkeyboard.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifndef QTESTKEYBOARD_H
+#if !defined(QTESTKEYBOARD_H) && defined(QT_GUI_LIB)
#define QTESTKEYBOARD_H
#if 0
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h
index 2825c58..7ea927c 100644
--- a/src/testlib/qtestmouse.h
+++ b/src/testlib/qtestmouse.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifndef QTESTMOUSE_H
+#if !defined(QTESTMOUSE_H) && defined(QT_GUI_LIB)
#define QTESTMOUSE_H
#if 0