summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog44
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog51
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp69
-rw-r--r--src/gui/dialogs/qprintdialog.h6
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp2
-rw-r--r--tests/benchmarks/benchmarks.pro1
-rw-r--r--tests/benchmarks/qfontmetrics/main.cpp112
-rw-r--r--tests/benchmarks/qfontmetrics/qfontmetrics.pro5
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp20
-rw-r--r--tools/configure/configureapp.cpp5
22 files changed, 323 insertions, 74 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 221c020..128df75 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1
+ ca7b2e1e1ca558050cf49dd8f7c9b35e4b9d4df5
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index fd5606b..40a2149 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,47 @@
+2010-01-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable scrolling optimization for pages with embedded widgets
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ Added a basic manual test for scrolling of embedded QWidgets.
+
+ * manual-tests/qt/qtplugin-scrolling.html: Added.
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::setParent):
+ * platform/ScrollView.h:
+ * platform/qt/ScrollViewQt.cpp:
+ (WebCore::ScrollView::platformInit):
+ (WebCore::ScrollView::platformAddChild):
+ (WebCore::ScrollView::platformRemoveChild):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::invalidateRect):
+
+2010-01-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Turn off websocket support by default for Qt 4.6.x
+ https://bugs.webkit.org/show_bug.cgi?id=34284
+
+ * WebCore.pro:
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken.
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ Remove the manual test case in favor of an automated
+ test case in WebKit/qt/tests/qwebpage.
+
+ * manual-tests/qt/java-script-prompt.html: Removed.
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index bf4d6f9..f364d3b 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -186,7 +186,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
}
# Web Socket support.
-!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=0
# XSLT support with QtXmlPatterns
!contains(DEFINES, ENABLE_XSLT=.) {
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
index 12edc42..d270e37 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
@@ -216,7 +216,6 @@
#include "JSWebKitCSSTransformValue.h"
#include "JSWebKitPoint.h"
#include "JSWebKitTransitionEvent.h"
-#include "JSWebSocket.h"
#include "JSWheelEvent.h"
#include "JSWorker.h"
#include "JSXMLHttpRequest.h"
@@ -247,7 +246,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow);
/* Hash table */
-static const HashTableValue JSDOMWindowTableValues[297] =
+static const HashTableValue JSDOMWindowTableValues[296] =
{
{ "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 },
{ "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 },
@@ -540,7 +539,6 @@ static const HashTableValue JSDOMWindowTableValues[297] =
{ "MessageChannel", DontDelete, (intptr_t)jsDOMWindowMessageChannelConstructor, (intptr_t)setJSDOMWindowMessageChannelConstructor },
{ "Worker", DontDelete, (intptr_t)jsDOMWindowWorkerConstructor, (intptr_t)setJSDOMWindowWorkerConstructor },
{ "SharedWorker", DontDelete, (intptr_t)jsDOMWindowSharedWorkerConstructor, (intptr_t)setJSDOMWindowSharedWorkerConstructor },
- { "WebSocket", DontDelete, (intptr_t)jsDOMWindowWebSocketConstructor, (intptr_t)setJSDOMWindowWebSocketConstructor },
{ "Plugin", DontDelete, (intptr_t)jsDOMWindowPluginConstructor, (intptr_t)setJSDOMWindowPluginConstructor },
{ "PluginArray", DontDelete, (intptr_t)jsDOMWindowPluginArrayConstructor, (intptr_t)setJSDOMWindowPluginArrayConstructor },
{ "MimeType", DontDelete, (intptr_t)jsDOMWindowMimeTypeConstructor, (intptr_t)setJSDOMWindowMimeTypeConstructor },
@@ -588,7 +586,7 @@ static JSC_CONST_HASHTABLE HashTable JSDOMWindowTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 65535, JSDOMWindowTableValues, 0 };
#else
- { 1068, 1023, JSDOMWindowTableValues, 0 };
+ { 1067, 1023, JSDOMWindowTableValues, 0 };
#endif
/* Hash table for prototype */
@@ -3275,14 +3273,6 @@ JSValue jsDOMWindowSharedWorkerConstructor(ExecState* exec, const Identifier&, c
return castedThis->sharedWorker(exec);
}
-JSValue jsDOMWindowWebSocketConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
-{
- JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
- if (!castedThis->allowsAccessFrom(exec))
- return jsUndefined();
- return castedThis->webSocket(exec);
-}
-
JSValue jsDOMWindowPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
@@ -5678,14 +5668,6 @@ void setJSDOMWindowSharedWorkerConstructor(ExecState* exec, JSObject* thisObject
static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "SharedWorker"), value);
}
-void setJSDOMWindowWebSocketConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
-{
- if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
- return;
- // Shadowing a built-in constructor
- static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "WebSocket"), value);
-}
-
void setJSDOMWindowPluginConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
{
if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
index afc8106..5a087e7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
@@ -82,7 +82,6 @@ public:
JSC::JSValue messageChannel(JSC::ExecState*) const;
JSC::JSValue worker(JSC::ExecState*) const;
JSC::JSValue sharedWorker(JSC::ExecState*) const;
- JSC::JSValue webSocket(JSC::ExecState*) const;
JSC::JSValue audio(JSC::ExecState*) const;
// Custom functions
@@ -679,8 +678,6 @@ JSC::JSValue jsDOMWindowWorkerConstructor(JSC::ExecState*, const JSC::Identifier
void setJSDOMWindowWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowSharedWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowSharedWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
-JSC::JSValue jsDOMWindowWebSocketConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
-void setJSDOMWindowWebSocketConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowPluginConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginArrayConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index ee8726a..e67daf9 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -507,7 +507,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
hostWindow()->repaint(panScrollIconDirtyRect, true);
}
- if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window
+ if (canBlitOnScroll()) { // The main frame can just blit the WebView window
// FIXME: Find a way to blit subframes without blitting overlapping content
hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect);
} else {
@@ -597,14 +597,6 @@ void ScrollView::setParent(ScrollView* parentView)
if (m_scrollbarsAvoidingResizer && parent())
parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer);
-#if PLATFORM(QT)
- if (m_widgetsPreventingBlitting && parent())
- parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting);
-
- if (m_widgetsPreventingBlitting && parentView)
- parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting);
-#endif
-
Widget::setParent(parentView);
if (m_scrollbarsAvoidingResizer && parent())
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 1950a54..5dacff5 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -305,16 +305,6 @@ private:
NSScrollView<WebCoreFrameScrollView>* scrollView() const;
#endif
-#if PLATFORM(QT)
-public:
- void adjustWidgetsPreventingBlittingCount(int delta);
-private:
- bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; }
- unsigned m_widgetsPreventingBlitting;
-#else
- bool rootPreventsBlitting() const { return false; }
-#endif
-
#if PLATFORM(GTK)
public:
void setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj);
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
index f7ebbc7..f6a8167 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
@@ -44,9 +44,16 @@ QWebPopup::QWebPopup(PopupMenuClient* client)
void QWebPopup::exec()
{
+ // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates
+ // as comboboxes with Qt on Maemo 5 come up in their full width on the screen.
+ // On the other platforms it's okay to use QCursor::pos().
+#if defined(Q_WS_MAEMO_5)
+ showPopup();
+#else
QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
QCoreApplication::sendEvent(this, &event);
+#endif
}
void QWebPopup::showPopup()
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
index ccbd751..17ad253 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
@@ -36,32 +36,19 @@ namespace WebCore {
void ScrollView::platformInit()
{
- m_widgetsPreventingBlitting = 0;
}
void ScrollView::platformDestroy()
{
}
-// Windowed plugins are using native windows and are thus preventing
-// us from doing any kind of scrolling optimization.
-
-void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
-{
- m_widgetsPreventingBlitting += delta;
- if (parent())
- parent()->adjustWidgetsPreventingBlittingCount(delta);
-}
-
void ScrollView::platformAddChild(Widget*)
{
- adjustWidgetsPreventingBlittingCount(1);
}
void ScrollView::platformRemoveChild(Widget* child)
{
child->hide();
- adjustWidgetsPreventingBlittingCount(-1);
}
}
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
index e61736b..476ab8a 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
@@ -126,6 +126,10 @@ void PluginView::updatePluginWidget()
// scroll, we need to move/resize immediately.
if (!m_windowRect.intersects(frameView->frameRect()))
setNPWindowIfNeeded();
+
+ // Make sure we get repainted afterwards. This is necessary for downward
+ // scrolling to move the plugin widget properly.
+ invalidate();
}
void PluginView::setFocus()
@@ -657,7 +661,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
void PluginView::invalidateRect(const IntRect& rect)
{
if (m_isWindowed) {
- platformWidget()->update(rect);
+ if (platformWidget())
+ platformWidget()->update(rect);
return;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 09acd47..697570f 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,54 @@
+2010-01-28 Trond Kjernåsen <trond@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix for endless print loop when printing web pages
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print):
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Show comboboxes on Maemo 5
+ https://bugs.webkit.org/show_bug.cgi?id=34088
+
+ Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
+ get the combobox position right. The position on Maemo 5 is independent from the mouse
+ and there's no QCursor::pos().
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ In r52152 a patch was landed to convert a null QString
+ to an empty WebCore::String in case the prompt was accepted
+ but the default implementation returned the null QString.
+
+ The patch tried to avoid assign to result twice and
+ was not checking the QString if it is null but the default
+ value. This lead to always returning an empty string on
+ successful prompts. Fix it by checking the variable 'x'
+ for isNull.
+
+ The manual test case used didn't cover the case of non
+ empty input, replace it with an automatic test case that
+ should cover all cases.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug.
+ * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case
+ (JSPromptPage::JSPromptPage):
+ (JSPromptPage::javaScriptPrompt):
+ (tst_QWebPage::testJSPrompt):
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index c5d2792..0c5df4a 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -281,7 +281,7 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const
// Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
// but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
- if (rc && result.isNull())
+ if (rc && x.isNull())
result = String("");
else
result = x;
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 ee1969d..0e04acc 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ Copyright (C) 2010 Holger Hans Peter Freyther
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -154,6 +155,7 @@ private slots:
void screenshot();
void originatingObjectInNetworkRequests();
+ void testJSPrompt();
private:
QWebView* m_view;
@@ -1781,5 +1783,72 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
#endif
}
+/**
+ * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914
+ *
+ * From JS we test the following conditions.
+ *
+ * OK + QString() => SUCCESS, empty string (but not null)
+ * OK + "text" => SUCCESS, "text"
+ * CANCEL + QString() => CANCEL, null string
+ * CANCEL + "text" => CANCEL, null string
+ */
+class JSPromptPage : public QWebPage {
+ Q_OBJECT
+public:
+ JSPromptPage()
+ {}
+
+ bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result)
+ {
+ if (msg == QLatin1String("test1")) {
+ *result = QString();
+ return true;
+ } else if (msg == QLatin1String("test2")) {
+ *result = QLatin1String("text");
+ return true;
+ } else if (msg == QLatin1String("test3")) {
+ *result = QString();
+ return false;
+ } else if (msg == QLatin1String("test4")) {
+ *result = QLatin1String("text");
+ return false;
+ }
+
+ qFatal("Unknown msg.");
+ return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result);
+ }
+};
+
+void tst_QWebPage::testJSPrompt()
+{
+ JSPromptPage page;
+ bool res;
+
+ // OK + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test1');"
+ "retval=='' && retval.length == 0;").toBool();
+ QVERIFY(res);
+
+ // OK + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test2');"
+ "retval=='text' && retval.length == 4;").toBool();
+ QVERIFY(res);
+
+ // Cancel + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test3');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+
+ // Cancel + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test4');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/gui/dialogs/qprintdialog.h b/src/gui/dialogs/qprintdialog.h
index 390a4a0..ecd50c1 100644
--- a/src/gui/dialogs/qprintdialog.h
+++ b/src/gui/dialogs/qprintdialog.h
@@ -97,9 +97,9 @@ public:
void done(int result);
#if defined (Q_OS_UNIX) && defined (QT3_SUPPORT)
- void setPrinter(QPrinter *, bool = false);
- QPrinter *printer() const;
- void addButton(QPushButton *button);
+ QT3_SUPPORT void setPrinter(QPrinter *, bool = false);
+ QT3_SUPPORT QPrinter *printer() const;
+ QT3_SUPPORT void addButton(QPushButton *button);
#endif
void setOption(PrintDialogOption option, bool on = true);
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index f61d2fe..d255604 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -644,6 +644,8 @@ extern "C" {
- (void)mouseEntered:(NSEvent *)event
{
+ if (qwidgetprivate->data.in_destructor)
+ return;
QEvent enterEvent(QEvent::Enter);
NSPoint windowPoint = [event locationInWindow];
NSPoint globalPoint = [[event window] convertBaseToScreen:windowPoint];
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index ebfab21..78c1562 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3510,6 +3510,8 @@ void QWidgetPrivate::hide_sys()
if (!QWidget::mouseGrabber()){
QWidget *enterWidget = QApplication::widgetAt(QCursor::pos());
+ if (enterWidget && enterWidget->data->in_destructor)
+ enterWidget = 0;
QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover);
qt_mouseover = enterWidget;
}
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 2aeabf0..ef960d0 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -2907,7 +2907,7 @@ void tst_QScriptValue::equals()
QScriptValue qobj1 = eng.newQObject(this);
QScriptValue qobj2 = eng.newQObject(this);
QScriptValue qobj3 = eng.newQObject(0);
- QScriptValue qobj4 = eng.newQObject(new QObject());
+ QScriptValue qobj4 = eng.newQObject(new QObject(), QScriptEngine::ScriptOwnership);
QVERIFY(qobj1.equals(qobj2)); // compares the QObject pointers
QVERIFY(!qobj2.equals(qobj4)); // compares the QObject pointers
QVERIFY(!qobj2.equals(obj2)); // compares the QObject pointers
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index 1c78f1f..7a27cc9 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -5,6 +5,7 @@ SUBDIRS = containers-associative \
qbytearray \
qfileinfo \
qfile_vs_qnetworkaccessmanager \
+ qfontmetrics \
qhostinfo \
qpainter \
qtestlib-simple events \
diff --git a/tests/benchmarks/qfontmetrics/main.cpp b/tests/benchmarks/qfontmetrics/main.cpp
new file mode 100644
index 0000000..d3f85ef
--- /dev/null
+++ b/tests/benchmarks/qfontmetrics/main.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+#include <QFont>
+#include <QFontMetrics>
+
+#include <qtest.h>
+
+//this test benchmarks the once-off (per font configuration) cost
+//associated with using QFontMetrics
+class tst_QFontMetrics : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QFontMetrics() {}
+private slots:
+ void fontmetrics_create();
+ void fontmetrics_create_once_loaded();
+
+ void fontmetrics_height();
+ void fontmetrics_height_once_loaded();
+
+private:
+ void testQFontMetrics(const QFontMetrics &fm);
+};
+
+void tst_QFontMetrics::testQFontMetrics( const QFontMetrics &fm )
+{
+ int fontHeight = fm.height();
+}
+
+void tst_QFontMetrics::fontmetrics_create()
+{
+ QBENCHMARK {
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+ }
+}
+
+void tst_QFontMetrics::fontmetrics_create_once_loaded()
+{
+ QBENCHMARK {
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+ }
+}
+
+void tst_QFontMetrics::fontmetrics_height()
+{
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+
+ QBENCHMARK { testQFontMetrics(bfm); }
+}
+
+void tst_QFontMetrics::fontmetrics_height_once_loaded()
+{
+ QFont boldfont = QApplication::font();
+ boldfont.setBold( true );
+ boldfont.setPointSize(boldfont.pointSize() * 1.5 );
+ QFontMetrics bfm( boldfont );
+ QBENCHMARK { testQFontMetrics(bfm); }
+}
+
+QTEST_MAIN(tst_QFontMetrics)
+
+#include "main.moc"
diff --git a/tests/benchmarks/qfontmetrics/qfontmetrics.pro b/tests/benchmarks/qfontmetrics/qfontmetrics.pro
new file mode 100644
index 0000000..b6c7b92
--- /dev/null
+++ b/tests/benchmarks/qfontmetrics/qfontmetrics.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_QFontMetrics
+
+SOURCES += main.cpp
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index b614cb4..f2bb816 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -122,17 +122,17 @@ private:
void retranslate()
{
- simpleSearchLabel->setText(tr("Search for:"));
- prevQueryButton->setToolTip(tr("Previous search"));
- nextQueryButton->setToolTip(tr("Next search"));
- searchButton->setText(tr("Search"));
+ simpleSearchLabel->setText(QHelpSearchQueryWidget::tr("Search for:"));
+ prevQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Previous search"));
+ nextQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Next search"));
+ searchButton->setText(QHelpSearchQueryWidget::tr("Search"));
#ifdef QT_CLUCENE_SUPPORT
- advancedSearchLabel->setText(tr("Advanced search"));
- similarLabel->setText(tr("words <B>similar</B> to:"));
- withoutLabel->setText(tr("<B>without</B> the words:"));
- exactLabel->setText(tr("with <B>exact phrase</B>:"));
- allLabel->setText(tr("with <B>all</B> of the words:"));
- atLeastLabel->setText(tr("with <B>at least one</B> of the words:"));
+ advancedSearchLabel->setText(QHelpSearchQueryWidget::tr("Advanced search"));
+ similarLabel->setText(QHelpSearchQueryWidget::tr("words <B>similar</B> to:"));
+ withoutLabel->setText(QHelpSearchQueryWidget::tr("<B>without</B> the words:"));
+ exactLabel->setText(QHelpSearchQueryWidget::tr("with <B>exact phrase</B>:"));
+ allLabel->setText(QHelpSearchQueryWidget::tr("with <B>all</B> of the words:"));
+ atLeastLabel->setText(QHelpSearchQueryWidget::tr("with <B>at least one</B> of the words:"));
#endif
}
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 7751143..abf81bd 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2535,8 +2535,11 @@ void Configure::generateOutputVars()
qtConfig += "phonon-backend";
}
- if (dictionary["MULTIMEDIA"] == "yes")
+ if (dictionary["MULTIMEDIA"] == "yes") {
qtConfig += "multimedia";
+ if (dictionary["AUDIO_BACKEND"] == "yes")
+ qtConfig += "audio-backend";
+ }
if (dictionary["WEBKIT"] == "yes")
qtConfig += "webkit";