diff options
author | aavit <qt-info@nokia.com> | 2010-05-05 08:28:16 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2010-05-05 08:28:16 (GMT) |
commit | 39c6ad12f97ca024ef4340edadb43c7f92327964 (patch) | |
tree | 3520ec3c8cfaf3a644bcee806792dfa89aaa060f /src | |
parent | 87f7444d2af1299460bdbfc1cbfa903ea504b7e3 (diff) | |
parent | 44144cf60e978f7d5d70aec49d114d57832a78c3 (diff) | |
download | Qt-39c6ad12f97ca024ef4340edadb43c7f92327964.zip Qt-39c6ad12f97ca024ef4340edadb43c7f92327964.tar.gz Qt-39c6ad12f97ca024ef4340edadb43c7f92327964.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/.tag | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/VERSION | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/ChangeLog | 33 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/WebCore.pro | 6 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp | 1 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 348 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/ChangeLog | 52 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri | 4 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 35 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/qdockwidget.cpp | 6 |
11 files changed, 320 insertions, 176 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index c750e67..b6feeb1 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -8941bee5706ef2171ed5def63834deefc7440d11 +992e57ee469bd8c6a2afef6b15896a161ab8aeb3 diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 23cae67..c3d6314 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - 540ae4ccd25609e1bfe1673195ce126255e36774 + 3f0f51f4c87e65bfe04165c6af4c00934b0ca1e2 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index b8825bd..05fc2af 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,36 @@ +2010-05-03 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix qtlibraryinfix not to contain space + + List catenation with += adds whitespace cutting the infix + from the final target. + + * WebCore.pro: + +2010-05-03 Thomas Zander <t.zander@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix library infix usage when compiling inside of Qt + + Don't apply the infix when building inside Qt, as that's done through the + inclusion of qbase.pri. + + * WebCore.pro: + +2010-04-29 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Simon Hausmann. + + [Qt] QtWebKit versioning added + https://bugs.webkit.org/show_bug.cgi?id=37207 + + QtWebkit releases separated from Qt release cycle. + + * WebCore.pro: + 2010-03-27 Robert Hogan <robert@webkit.org> Reviewed by nobody, fix typo in previous commit. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 2a64982..3d57562 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -69,13 +69,13 @@ CONFIG(standalone_package) { CONFIG(QTDIR_build) { include($$QT_SOURCE_TREE/src/qbase.pri) - # Qt will set the version for us when building in Qt's tree } else { - VERSION = $${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} DESTDIR = $$OUTPUT_DIR/lib !static: DEFINES += QT_MAKEDLL - symbian: TARGET +=$${QT_LIBINFIX} + symbian: TARGET =$$TARGET$${QT_LIBINFIX} } +include($$PWD/../WebKit/qt/qtwebkit_version.pri) +VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION} unix { QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtNetwork diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 3c86770..1efae16 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -292,6 +292,7 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect) if (overlay) overlay->update(QRectF(dirtyRect)); #if USE(ACCELERATED_COMPOSITING) + updateCompositingScrollPosition(); syncLayers(); #endif } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index f28524a..b8b50b7 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -3191,233 +3191,255 @@ QWebPluginFactory *QWebPage::pluginFactory() const \o %AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version. \endlist */ -QString QWebPage::userAgentForUrl(const QUrl& url) const +QString QWebPage::userAgentForUrl(const QUrl&) const { - Q_UNUSED(url) - QString ua = QLatin1String("Mozilla/5.0 (" + // splitting the string in three and user QStringBuilder is better than using QString::arg() + static QString firstPart; + static QString secondPart; + static QString thirdPart; + + if (firstPart.isNull() || secondPart.isNull() || thirdPart.isNull()) { + QString firstPartTemp; + firstPartTemp.reserve(150); + firstPartTemp += QString::fromLatin1("Mozilla/5.0 (" // Platform #ifdef Q_WS_MAC - "Macintosh" + "Macintosh" #elif defined Q_WS_QWS - "QtEmbedded" + "QtEmbedded" #elif defined Q_WS_WIN - "Windows" + "Windows" #elif defined Q_WS_X11 - "X11" + "X11" #elif defined Q_OS_SYMBIAN - "SymbianOS" + "SymbianOS" #else - "Unknown" + "Unknown" #endif - // Placeholder for Platform Version - "%1; " + ); + + firstPartTemp += QString::fromLatin1("; "); - // Placeholder for security strength (N or U) - "%2; " + // SSL support +#if !defined(QT_NO_OPENSSL) + // we could check QSslSocket::supportsSsl() here, but this makes + // OpenSSL, certificates etc being loaded in all cases were QWebPage + // is used. This loading is not needed for non-https. + firstPartTemp += QString::fromLatin1("U; "); + // this may lead to a false positive: We indicate SSL since it is + // compiled in even though supportsSsl() might return false +#else + firstPartTemp += QString::fromLatin1("N; "); +#endif - // Subplatform" + // Operating system #ifdef Q_OS_AIX - "AIX" + firstPartTemp += QString::fromLatin1("AIX"); #elif defined Q_OS_WIN32 - "%3" + + switch (QSysInfo::WindowsVersion) { + case QSysInfo::WV_32s: + firstPartTemp += QString::fromLatin1("Windows 3.1"); + break; + case QSysInfo::WV_95: + firstPartTemp += QString::fromLatin1("Windows 95"); + break; + case QSysInfo::WV_98: + firstPartTemp += QString::fromLatin1("Windows 98"); + break; + case QSysInfo::WV_Me: + firstPartTemp += QString::fromLatin1("Windows 98; Win 9x 4.90"); + break; + case QSysInfo::WV_NT: + firstPartTemp += QString::fromLatin1("WinNT4.0"); + break; + case QSysInfo::WV_2000: + firstPartTemp += QString::fromLatin1("Windows NT 5.0"); + break; + case QSysInfo::WV_XP: + firstPartTemp += QString::fromLatin1("Windows NT 5.1"); + break; + case QSysInfo::WV_2003: + firstPartTemp += QString::fromLatin1("Windows NT 5.2"); + break; + case QSysInfo::WV_VISTA: + firstPartTemp += QString::fromLatin1("Windows NT 6.0"); + break; + case QSysInfo::WV_WINDOWS7: + firstPartTemp += QString::fromLatin1("Windows NT 6.1"); + break; + case QSysInfo::WV_CE: + firstPartTemp += QString::fromLatin1("Windows CE"); + break; + case QSysInfo::WV_CENET: + firstPartTemp += QString::fromLatin1("Windows CE .NET"); + break; + case QSysInfo::WV_CE_5: + firstPartTemp += QString::fromLatin1("Windows CE 5.x"); + break; + case QSysInfo::WV_CE_6: + firstPartTemp += QString::fromLatin1("Windows CE 6.x"); + break; + } + #elif defined Q_OS_DARWIN #ifdef __i386__ || __x86_64__ - "Intel Mac OS X" + firstPartTemp += QString::fromLatin1("Intel Mac OS X"); #else - "PPC Mac OS X" + firstPartTemp += QString::fromLatin1("PPC Mac OS X"); #endif #elif defined Q_OS_BSDI - "BSD" + firstPartTemp += QString::fromLatin1("BSD"); #elif defined Q_OS_BSD4 - "BSD Four" + firstPartTemp += QString::fromLatin1("BSD Four"); #elif defined Q_OS_CYGWIN - "Cygwin" + firstPartTemp += QString::fromLatin1("Cygwin"); #elif defined Q_OS_DGUX - "DG/UX" + firstPartTemp += QString::fromLatin1("DG/UX"); #elif defined Q_OS_DYNIX - "DYNIX/ptx" + firstPartTemp += QString::fromLatin1("DYNIX/ptx"); #elif defined Q_OS_FREEBSD - "FreeBSD" + firstPartTemp += QString::fromLatin1("FreeBSD"); #elif defined Q_OS_HPUX - "HP-UX" + firstPartTemp += QString::fromLatin1("HP-UX"); #elif defined Q_OS_HURD - "GNU Hurd" + firstPartTemp += QString::fromLatin1("GNU Hurd"); #elif defined Q_OS_IRIX - "SGI Irix" + firstPartTemp += QString::fromLatin1("SGI Irix"); #elif defined Q_OS_LINUX - "Linux" + +#if defined(__x86_64__) + firstPartTemp += QString::fromLatin1("Linux x86_64"); +#elif defined(__i386__) + firstPartTemp += QString::fromLatin1("Linux i686"); +#else + firstPartTemp += QString::fromLatin1("Linux"); +#endif + #elif defined Q_OS_LYNX - "LynxOS" + firstPartTemp += QString::fromLatin1("LynxOS"); #elif defined Q_OS_NETBSD - "NetBSD" + firstPartTemp += QString::fromLatin1("NetBSD"); #elif defined Q_OS_OS2 - "OS/2" + firstPartTemp += QString::fromLatin1("OS/2"); #elif defined Q_OS_OPENBSD - "OpenBSD" + firstPartTemp += QString::fromLatin1("OpenBSD"); #elif defined Q_OS_OS2EMX - "OS/2" + firstPartTemp += QString::fromLatin1("OS/2"); #elif defined Q_OS_OSF - "HP Tru64 UNIX" + firstPartTemp += QString::fromLatin1("HP Tru64 UNIX"); #elif defined Q_OS_QNX6 - "QNX RTP Six" + firstPartTemp += QString::fromLatin1("QNX RTP Six"); #elif defined Q_OS_QNX - "QNX" + firstPartTemp += QString::fromLatin1("QNX"); #elif defined Q_OS_RELIANT - "Reliant UNIX" + firstPartTemp += QString::fromLatin1("Reliant UNIX"); #elif defined Q_OS_SCO - "SCO OpenServer" + firstPartTemp += QString::fromLatin1("SCO OpenServer"); #elif defined Q_OS_SOLARIS - "Sun Solaris" + firstPartTemp += QString::fromLatin1("Sun Solaris"); #elif defined Q_OS_ULTRIX - "DEC Ultrix" -#elif defined Q_WS_S60 - "Series60" -#elif defined Q_OS_UNIX - "UNIX BSD/SYSV system" -#elif defined Q_OS_UNIXWARE - "UnixWare Seven, Open UNIX Eight" -#else - "Unknown" -#endif - // Placeholder for SubPlatform Version - "%4; "); - - // Platform Version - QString osVer; -#ifdef Q_OS_SYMBIAN - QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); - switch (symbianVersion) { - case QSysInfo::SV_9_2: - osVer = "/9.2"; - break; - case QSysInfo::SV_9_3: - osVer = "/9.3"; - break; - case QSysInfo::SV_9_4: - osVer = "/9.4"; - break; - default: - osVer = "Unknown"; - } -#endif - ua = ua.arg(osVer); - - QChar securityStrength(QLatin1Char('N')); -#if !defined(QT_NO_OPENSSL) - // we could check QSslSocket::supportsSsl() here, but this makes - // OpenSSL, certificates etc being loaded in all cases were QWebPage - // is used. This loading is not needed for non-https. - securityStrength = QLatin1Char('U'); - // this may lead to a false positive: We indicate SSL since it is - // compiled in even though supportsSsl() might return false -#endif - ua = ua.arg(securityStrength); - -#if defined Q_OS_WIN32 - QString ver; - switch (QSysInfo::WindowsVersion) { - case QSysInfo::WV_32s: - ver = "Windows 3.1"; - break; - case QSysInfo::WV_95: - ver = "Windows 95"; - break; - case QSysInfo::WV_98: - ver = "Windows 98"; - break; - case QSysInfo::WV_Me: - ver = "Windows 98; Win 9x 4.90"; - break; - case QSysInfo::WV_NT: - ver = "WinNT4.0"; + firstPartTemp += QString::fromLatin1("DEC Ultrix"); +#elif defined Q_OS_SYMBIAN + firstPartTemp += QString::fromLatin1("SymbianOS"); + QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); + switch (symbianVersion) { + case QSysInfo::SV_9_2: + firstPartTemp += QString::fromLatin1("/9.2"); break; - case QSysInfo::WV_2000: - ver = "Windows NT 5.0"; + case QSysInfo::SV_9_3: + firstPartTemp += QString::fromLatin1("/9.3"); break; - case QSysInfo::WV_XP: - ver = "Windows NT 5.1"; + case QSysInfo::SV_9_4: + firstPartTemp += QString::fromLatin1("/9.4"); break; - case QSysInfo::WV_2003: - ver = "Windows NT 5.2"; + default: + firstPartTemp += QString::fromLatin1("/Unknown"); + } + +#if defined Q_WS_S60 + firstPartTemp += QLatin1Char(' '); + firstPartTemp += QString::fromLatin1("Series60"); + QSysInfo::S60Version s60Version = QSysInfo::s60Version(); + switch (s60Version) { + case QSysInfo::SV_S60_3_1: + firstPartTemp += QString::fromLatin1("/3.1"); break; - case QSysInfo::WV_VISTA: - ver = "Windows NT 6.0"; + case QSysInfo::SV_S60_3_2: + firstPartTemp += QString::fromLatin1("/3.2"); break; -#if QT_VERSION > 0x040500 - case QSysInfo::WV_WINDOWS7: - ver = "Windows NT 6.1"; + case QSysInfo::SV_S60_5_0: + firstPartTemp += QString::fromLatin1("/5.0"); break; + default: + firstPartTemp += QString::fromLatin1("/Unknown"); + } #endif - case QSysInfo::WV_CE: - ver = "Windows CE"; - break; - case QSysInfo::WV_CENET: - ver = "Windows CE .NET"; - break; - case QSysInfo::WV_CE_5: - ver = "Windows CE 5.x"; - break; - case QSysInfo::WV_CE_6: - ver = "Windows CE 6.x"; - break; - } - ua = QString(ua).arg(ver); + +#elif defined Q_OS_UNIX + firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system"); +#elif defined Q_OS_UNIXWARE + firstPartTemp += QString::fromLatin1("UnixWare Seven, Open UNIX Eight"); +#else + firstPartTemp += QString::fromLatin1("Unknown"); #endif - // SubPlatform Version - QString subPlatformVer; -#ifdef Q_OS_SYMBIAN - QSysInfo::S60Version s60Version = QSysInfo::s60Version(); - switch (s60Version) { - case QSysInfo::SV_S60_3_1: - subPlatformVer = "/3.1"; - break; - case QSysInfo::SV_S60_3_2: - subPlatformVer = "/3.2"; - break; - case QSysInfo::SV_S60_5_0: - subPlatformVer = "/5.0"; - break; - default: - subPlatformVer = " Unknown"; - } + // language is the split + firstPartTemp += QString::fromLatin1("; "); + firstPartTemp.squeeze(); + firstPart = firstPartTemp; + + QString secondPartTemp; + secondPartTemp.reserve(150); + secondPartTemp += QString::fromLatin1(") "); + + // webkit/qt version + secondPartTemp += QString::fromLatin1("AppleWebKit/"); + secondPartTemp += qWebKitVersion(); + secondPartTemp += QString::fromLatin1(" (KHTML, like Gecko) "); + + + // Application name split the third part + secondPartTemp.squeeze(); + secondPart = secondPartTemp; + + QString thirdPartTemp; + thirdPartTemp.reserve(150); +#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) + thirdPartTemp + QLatin1String(" Mobile Safari/"); +#else + thirdPartTemp += QLatin1String(" Safari/"); #endif - ua = ua.arg(subPlatformVer); + thirdPartTemp += qWebKitVersion(); + thirdPartTemp.squeeze(); + thirdPart = thirdPartTemp; + Q_ASSERT(!firstPart.isNull()); + Q_ASSERT(!secondPart.isNull()); + Q_ASSERT(!thirdPart.isNull()); + } // Language - QLocale locale; + QString languageName; if (d->client && d->client->ownerWidget()) - locale = d->client->ownerWidget()->locale(); - QString name = locale.name(); - name[2] = QLatin1Char('-'); - ua.append(name); - ua.append(QLatin1String(") ")); - - // webkit/qt version - ua.append(QString(QLatin1String("AppleWebKit/%1 (KHTML, like Gecko) ")) - .arg(QString(qWebKitVersion()))); + languageName = d->client->ownerWidget()->locale().name(); + else + languageName = QLocale().name(); + languageName[2] = QLatin1Char('-'); // Application name/version QString appName = QCoreApplication::applicationName(); if (!appName.isEmpty()) { - ua.append(appName); QString appVer = QCoreApplication::applicationVersion(); if (!appVer.isEmpty()) - ua.append(QLatin1Char('/') + appVer); + appName.append(QLatin1Char('/') + appVer); } else { // Qt version - ua.append(QLatin1String("Qt/")); - ua.append(QLatin1String(qVersion())); + appName = QString::fromLatin1("Qt/") + QString::fromLatin1(qVersion()); } -#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) - ua.append(QString(QLatin1String(" Mobile Safari/%1")).arg(qWebKitVersion())); -#else - ua.append(QString(QLatin1String(" Safari/%1")).arg(qWebKitVersion())); -#endif - return ua; + return firstPart + languageName + secondPart + appName + thirdPart; } diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 8594f09..6e450c2 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,55 @@ +2010-04-29 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Simon Hausmann. + + [Qt] QtWebKit versioning added + https://bugs.webkit.org/show_bug.cgi?id=37207 + + QtWebkit releases separated from Qt release cycle. + + * qtwebkit_version.pri: Added. + +2010-05-02 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] QWebPage::userAgentForUrl is terrible API + https://bugs.webkit.org/show_bug.cgi?id=33875 + + Simplify the creation of the user agent string to avoid some + overhead for each loaded url. + + The static part of the user agent is cached so it only have + to be made once. + This creation has been made in order to simplify the code. + + The two variable: application name and current language are + set dynamically when needed. + The default locale is non longer created if the widget locale + is used. + + * Api/qwebpage.cpp: + (QWebPage::userAgentForUrl): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::userAgentApplicationName): + (tst_QWebPage::userAgentLocaleChange): + +2010-05-02 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] GraphicsLayer: animation incorrect when scrolling + https://bugs.webkit.org/show_bug.cgi?id=38371 + + This is a regression introduced with the invalidate-on-scroll code path, that uses QGraphicsWebViewPrivate::update() + instead of QGraphicsWebViewPrivate::scroll(). The patch makes sure that the scrolling position is correct on + each content update - this shouldn't have a performance impact - the only overhead is an additional value-test on each update. + + Tested by http://www.the-art-of-web.com/css/css-animation/ + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::update): + 2010-04-29 Andreas Kling <andreas.kling@nokia.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri new file mode 100644 index 0000000..ffd192c --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri @@ -0,0 +1,4 @@ +QT_WEBKIT_VERSION = 4.7.0 +QT_WEBKIT_MAJOR_VERSION = 4 +QT_WEBKIT_MINOR_VERSION = 7 +QT_WEBKIT_PATCH_VERSION = 0 diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 85d4b60..f7eddd5 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -23,6 +23,7 @@ #include <QDir> #include <QGraphicsWidget> #include <QLineEdit> +#include <QLocale> #include <QMenu> #include <QPushButton> #include <QtTest/QtTest> @@ -106,6 +107,8 @@ private slots: void errorPageExtension(); void errorPageExtensionInIFrames(); void errorPageExtensionInFrameset(); + void userAgentApplicationName(); + void userAgentLocaleChange(); void crashTests_LazyInitializationOfMainFrame(); @@ -1748,6 +1751,38 @@ void tst_QWebPage::errorPageExtensionInFrameset() m_view->setPage(0); } +class FriendlyWebPage : public QWebPage +{ +public: + friend class tst_QWebPage; +}; + +void tst_QWebPage::userAgentApplicationName() +{ + const QString oldApplicationName = QCoreApplication::applicationName(); + FriendlyWebPage page; + + const QString applicationNameMarker = QString::fromUtf8("StrangeName\342\210\236"); + QCoreApplication::setApplicationName(applicationNameMarker); + QVERIFY(page.userAgentForUrl(QUrl()).contains(applicationNameMarker)); + + QCoreApplication::setApplicationName(oldApplicationName); +} + +void tst_QWebPage::userAgentLocaleChange() +{ + FriendlyWebPage page; + m_view->setPage(&page); + + const QString markerString = QString::fromLatin1(" nn-NO)"); + + if (page.userAgentForUrl(QUrl()).contains(markerString)) + QSKIP("marker string already present", SkipSingle); + + m_view->setLocale(QLocale(QString::fromLatin1("nn_NO"))); + QVERIFY(page.userAgentForUrl(QUrl()).contains(markerString)); +} + void tst_QWebPage::crashTests_LazyInitializationOfMainFrame() { { diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 326f130..81138d9 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -5635,8 +5635,9 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect) // Adjust with 2 pixel margin. Notice the loss of precision // when converting to QRect. int adjust = 2; + QRectF scrollRect = !rect.isNull() ? rect : boundingRect(); QRectF br = boundingRect().adjusted(-adjust, -adjust, adjust, adjust); - QRect irect = rect.toRect().translated(-br.x(), -br.y()); + QRect irect = scrollRect.toRect().translated(-br.x(), -br.y()); pix.scroll(dx, dy, irect); @@ -5644,11 +5645,11 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect) // Translate the existing expose. foreach (QRectF exposedRect, c->exposed) - c->exposed += exposedRect.translated(dx, dy) & rect; + c->exposed += exposedRect.translated(dx, dy) & scrollRect; // Calculate exposure. QRegion exposed; - QRect r = rect.toRect(); + QRect r = scrollRect.toRect(); exposed += r; exposed -= r.translated(dx, dy); foreach (QRect rect, exposed.rects()) diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp index 54189de..ae00710 100644 --- a/src/gui/widgets/qdockwidget.cpp +++ b/src/gui/widgets/qdockwidget.cpp @@ -1270,11 +1270,7 @@ void QDockWidget::setFloating(bool floating) d->setWindowState(floating, false, floating ? r : QRect()); if (floating && r.isNull()) { - QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(this->layout()); - QRect titleArea = layout->titleArea(); - int h = layout->verticalTitleBar ? titleArea.width() : titleArea.height(); - QPoint p = mapToGlobal(QPoint(h, h)); - move(p); + setAttribute(Qt::WA_Moved, false); //we want it at the default position } } |