summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp10
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/main.cpp34
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro69
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog12
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog15
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog29
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp7
-rw-r--r--src/corelib/io/qiodevice.cpp3
-rw-r--r--src/corelib/kernel/qtcore_eval.cpp26
-rw-r--r--src/gui/kernel/kernel.pri3
-rw-r--r--src/gui/kernel/qapplication.cpp76
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qevent.h3
-rw-r--r--src/gui/kernel/qmultitouch_mac.mm1
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp5
-rw-r--r--src/qt3support/dialogs/q3filedialog.h4
-rw-r--r--src/qt3support/dialogs/q3filedialog_mac.cpp23
-rw-r--r--src/script/api/qscriptengine.cpp6
22 files changed, 205 insertions, 139 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
index 3008fca..3c9df93 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
@@ -1551,6 +1551,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
| PreSubstProperty
| BelowSubstProperty
| AboveSubstProperty
+ | PostSubstProperty
| HalantProperty
| PositioningProperties);
@@ -1608,14 +1609,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
// pres always applies
// blws always applies
// abvs always applies
-
- // psts
- // ### this looks slightly different from before, but I believe it's correct
- if (reordered[len-1] != halant || base != len-2)
- properties[base] &= ~PostSubstProperty;
- for (i = base+1; i < len; ++i)
- properties[i] &= ~PostSubstProperty;
-
+ // psts always applies
// halant always applies
#ifdef INDIC_DEBUG
diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
index 12fa7c4..827ac30 100644
--- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp
+++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp
@@ -686,7 +686,7 @@ void tst_QScriptEngine::bengali()
void tst_QScriptEngine::gurmukhi()
{
{
- FT_Face face = loadFace("lohit.punjabi.1.1.ttf");
+ FT_Face face = loadFace("lohit_pa.ttf");
if (face) {
const ShapeTable shape_table [] = {
{ { 0xA15, 0xA4D, 0xa39, 0x0 },
@@ -998,6 +998,36 @@ void tst_QScriptEngine::malayalam()
QSKIP("couln't find AkrutiMal2Normal.ttf", SkipAll);
}
}
+
+ {
+ FT_Face face = loadFace("Rachana.ttf");
+ if (face) {
+ const ShapeTable shape_table [] = {
+ { { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0x0 },
+ { 0x385, 0xa3, 0x0 } },
+ { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
+ { 0x2ff, 0x0 } },
+ { { 0xd33, 0xd4d, 0xd33, 0x0 },
+ { 0x3f8, 0x0 } },
+ { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 },
+ { 0x2ff, 0x0 } },
+
+ { {0}, {0} }
+ };
+
+
+ const ShapeTable *s = shape_table;
+ while (s->unicode[0]) {
+ QVERIFY( shaping(face, s, HB_Script_Malayalam) );
+ ++s;
+ }
+
+ FT_Done_Face(face);
+ } else {
+ QSKIP("couln't find Rachana.ttf", SkipAll);
+ }
+ }
+
}
void tst_QScriptEngine::sinhala()
@@ -1113,7 +1143,7 @@ void tst_QScriptEngine::nko()
void tst_QScriptEngine::linearB()
{
{
- FT_Face face = loadFace("PENUTURE.TTF");
+ FT_Face face = loadFace("penuture.ttf");
if (face) {
const ShapeTable shape_table [] = {
{ { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03, 0 },
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro
deleted file mode 100644
index 0cd2e1a..0000000
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro
+++ /dev/null
@@ -1,69 +0,0 @@
-# JavaScriptCore - qmake build info
-CONFIG += building-libs
-include($$PWD/../WebKit.pri)
-
-TEMPLATE = lib
-CONFIG += staticlib
-TARGET = JavaScriptCore
-
-CONFIG += depend_includepath
-
-contains(QT_CONFIG, embedded):CONFIG += embedded
-
-CONFIG(QTDIR_build) {
- GENERATED_SOURCES_DIR = $$PWD/generated
- OLDDESTDIR = $$DESTDIR
- include($$QT_SOURCE_TREE/src/qbase.pri)
- INSTALLS =
- DESTDIR = $$OLDDESTDIR
- PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h
- DEFINES *= NDEBUG
-}
-
-isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
-GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
-
-INCLUDEPATH += $$GENERATED_SOURCES_DIR
-
-!CONFIG(QTDIR_build) {
- CONFIG(debug, debug|release) {
- OBJECTS_DIR = obj/debug
- } else { # Release
- OBJECTS_DIR = obj/release
- }
-}
-
-CONFIG(release):!CONFIG(QTDIR_build) {
- contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
- unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
-}
-
-linux-*: DEFINES += HAVE_STDINT_H
-freebsd-*: DEFINES += HAVE_PTHREAD_NP_H
-
-DEFINES += BUILD_WEBKIT
-
-win32-*: DEFINES += _HAS_TR1=0
-
-# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC
-win32-g++ {
- TMPPATH = $$quote($$(INCLUDE))
- QMAKE_INCDIR_POST += $$split(TMPPATH,";")
- TMPPATH = $$quote($$(LIB))
- QMAKE_LIBDIR_POST += $$split(TMPPATH,";")
-}
-
-DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1
-
-DEFINES += WTF_CHANGES=1
-
-include(JavaScriptCore.pri)
-
-QMAKE_EXTRA_TARGETS += generated_files
-
-lessThan(QT_MINOR_VERSION, 4) {
- DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE=""
-}
-
-*-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
-*-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
index 188b68f..be74e2a 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
@@ -328,6 +328,16 @@
#define WTF_PLATFORM_BIG_ENDIAN 1
#endif
+/* PLATFORM(SPARC32) */
+#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
+#define WTF_PLATFORM_SPARC32 1
+#define WTF_PLATFORM_BIG_ENDIAN 1
+#endif
+
+#if PLATFORM(SPARC32) || PLATFORM(SPARC64)
+#define WTF_PLATFORM_SPARC
+#endif
+
/* PLATFORM(HPPA) */
/* a.k.a. PA-RISC */
#if defined(__hppa) || defined(__hppa__)
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 0cbb3a5..304f9ef 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-18 Harald Fernengel <harald.fernengel@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix detection of linux-g++
+
+ Never use "linux-g++*" to check for linux-g++, since this will break embedded
+ builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
+ g++ on linux mkspec.
+
+ * JavaScriptCore.pri:
+
2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 2653e83..f40dda4 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
- ca38203fba92cf48d59328403f64036907fd3433
+ 7bdf90f753d25fb1b5628b0980827df11110ad5a
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index abb372a..6daf411 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-18 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] WebKit crashes when loading certain SVG images
+
+ Check if the familly exist before creating the PlatformData from it.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29443
+
+ Test: svg/text/text-font-invalid.html
+
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ (WebCore::FontFallbackList::fontDataAt):
+
2009-11-14 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Antti Koivisto.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
index 8e1e4f6..0306abf 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
@@ -102,7 +102,7 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne
const FontDescription& description = _font->fontDescription();
const FontFamily* family = &description.family();
while (family) {
- if (m_fontSelector) {
+ if (family->family().length() && m_fontSelector) {
FontData* data = m_fontSelector->getFontData(description, family->family());
if (data) {
if (data->isLoading())
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 1294d66..457e9c2 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,32 @@
+2009-11-18 Paul Olav Tvete <paul.tvete@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make the QWebElement::render() test pass when pixmaps aren't 32 bit.
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::render):
+
+2009-11-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Clarify and simplify the legal section in the overview documentation,
+ after review with our legal team.
+
+ * docs/qtwebkit.qdoc:
+
+2009-11-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed and suggested by Tor Arne Vestbø.
+
+ Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f
+ to compare the Qt::ImFont property's family against an explicitly
+ previously configured family.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
2009-11-16 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index a04e661..e9dae18 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -995,7 +995,7 @@ void tst_QWebElement::render()
QImage testImage(resource.width(), resource.height(), QImage::Format_ARGB32);
QPainter painter0(&testImage);
painter0.fillRect(imageRect, Qt::white);
- //render() uses pixmaps internally, and pixmaps might have bit depths
+ // render() uses pixmaps internally, and pixmaps might have bit depths
// other than 32, giving different pixel values due to rounding.
QPixmap pix = QPixmap::fromImage(resource);
painter0.drawPixmap(0, 0, pix);
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 a445d70..32002e7 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1371,6 +1371,7 @@ void tst_QWebPage::inputMethods()
else
QVERIFY2(false, "Unknown view type");
+ page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont");
page->mainFrame()->setHtml("<html><body>" \
"<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \
"<input type='password'/>" \
@@ -1404,9 +1405,9 @@ void tst_QWebPage::inputMethods()
QVERIFY(inputs.at(0).geometry().contains(variant.toRect().topLeft()));
//ImFont
- //variant = page->inputMethodQuery(Qt::ImFont);
- //QFont font = variant.value<QFont>();
- //QCOMPARE(QString("-webkit-serif"), font.family());
+ variant = page->inputMethodQuery(Qt::ImFont);
+ QFont font = variant.value<QFont>();
+ QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family());
QList<QInputMethodEvent::Attribute> inputAttributes;
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index e4e6a15..b84961f 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1404,6 +1404,9 @@ bool QIODevicePrivate::putCharHelper(char c)
*/
bool QIODevice::getChar(char *c)
{
+ Q_D(QIODevice);
+ CHECK_READABLE(getChar, false);
+
char ch;
return (1 == read(c ? c : &ch, 1));
}
diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp
index fe47a30..d5eb8c2 100644
--- a/src/corelib/kernel/qtcore_eval.cpp
+++ b/src/corelib/kernel/qtcore_eval.cpp
@@ -88,23 +88,12 @@ static const char will_shutdown_now[] =
"timeout and will shut down.\n"
"Contact http://qt.nokia.com/about/contact-us for pricing and purchasing information.\n";
-static int qt_eval_days_left()
+static int qt_eval_is_supported()
{
const char *const license_key = qt_eval_key_data + 12;
// fast fail
if (!qt_eval_key_data[0] || !*license_key)
- return -2;
-
- QDate today = QDate::currentDate();
- QDate build = QLibraryInfo::buildDate();
- return qMax(-1, today.daysTo(build) + 30);
-}
-
-static int qt_eval_is_supported()
-{
- const char *const license_key = qt_eval_key_data + 12;
- if (!qt_eval_key_data[0] || !*license_key)
return -1;
// is this an unsupported evaluation?
@@ -123,6 +112,16 @@ static int qt_eval_is_supported()
return -1;
}
+static int qt_eval_days_left()
+{
+ if (qt_eval_is_supported() < 0)
+ return -2;
+
+ QDate today = QDate::currentDate();
+ QDate build = QLibraryInfo::buildDate();
+ return qMax(-1, today.daysTo(build) + 30);
+}
+
static QString qt_eval_string()
{
const char *msg;
@@ -178,6 +177,9 @@ public:
void qt_core_eval_init(uint type)
{
+ if (!type)
+ return; // GUI app
+
switch (qt_eval_days_left()) {
case -2:
return;
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 8859358..7d0e5c7 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -188,9 +188,8 @@ embedded {
HEADERS += \
kernel/qeventdispatcher_glib_qws_p.h
QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
+ LIBS_PRIVATE +=$$QT_LIBS_GLIB
}
-
-
}
!embedded:!x11:mac {
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 4b8f6a0..4764a2d 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -4105,8 +4105,17 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
} else if (widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) {
break;
}
+ QPoint offset = widget->pos();
widget = widget->parentWidget();
- d->updateTouchPointsForWidget(widget, touchEvent);
+ touchEvent->setWidget(widget);
+ for (int i = 0; i < touchEvent->_touchPoints.size(); ++i) {
+ QTouchEvent::TouchPoint &pt = touchEvent->_touchPoints[i];
+ QRectF rect = pt.rect();
+ rect.moveCenter(offset);
+ pt.d->rect = rect;
+ pt.d->startPos = pt.startPos() + offset;
+ pt.d->lastPos = pt.lastPos() + offset;
+ }
}
touchEvent->setAccepted(eventAccepted);
@@ -5417,9 +5426,11 @@ void QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEven
const QPointF delta = screenPos - screenPos.toPoint();
rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta);
- touchPoint.setRect(rect);
- touchPoint.setStartPos(widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta);
- touchPoint.setLastPos(widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta);
+ touchPoint.d->rect = rect;
+ if (touchPoint.state() == Qt::TouchPointPressed) {
+ touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta;
+ touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta;
+ }
}
}
@@ -5463,16 +5474,20 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
for (int i = 0; i < touchPoints.count(); ++i) {
QTouchEvent::TouchPoint touchPoint = touchPoints.at(i);
+ // explicitly detach from the original touch point that we got, so even
+ // if the touchpoint structs are reused, we will make a copy that we'll
+ // deliver to the user (which might want to store the struct for later use).
+ touchPoint.d = touchPoint.d->detach();
// update state
- QWidget *widget = 0;
+ QWeakPointer<QWidget> widget;
switch (touchPoint.state()) {
case Qt::TouchPointPressed:
{
if (deviceType == QTouchEvent::TouchPad) {
// on touch-pads, send all touch points to the same widget
widget = d->widgetForTouchPointId.isEmpty()
- ? 0
+ ? QWeakPointer<QWidget>()
: d->widgetForTouchPointId.constBegin().value();
}
@@ -5489,20 +5504,21 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
if (deviceType == QTouchEvent::TouchScreen) {
int closestTouchPointId = d->findClosestTouchPointId(touchPoint.screenPos());
- QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId);
+ QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId).data();
if (closestWidget
- && (widget->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget))) {
+ && (widget.data()->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget.data()))) {
widget = closestWidget;
}
}
d->widgetForTouchPointId[touchPoint.id()] = widget;
- touchPoint.setStartScreenPos(touchPoint.screenPos());
- touchPoint.setLastScreenPos(touchPoint.screenPos());
- touchPoint.setStartNormalizedPos(touchPoint.normalizedPos());
- touchPoint.setLastNormalizedPos(touchPoint.normalizedPos());
+ touchPoint.d->startScreenPos = touchPoint.screenPos();
+ touchPoint.d->lastScreenPos = touchPoint.screenPos();
+ touchPoint.d->startNormalizedPos = touchPoint.normalizedPos();
+ touchPoint.d->lastNormalizedPos = touchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
- touchPoint.setPressure(qreal(1.));
+ touchPoint.d->pressure = qreal(1.);
+
d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint);
break;
}
@@ -5513,12 +5529,14 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
continue;
QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id());
- touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos());
- touchPoint.setLastScreenPos(previousTouchPoint.screenPos());
- touchPoint.setStartNormalizedPos(previousTouchPoint.startNormalizedPos());
- touchPoint.setLastNormalizedPos(previousTouchPoint.normalizedPos());
+ touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
+ touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
+ touchPoint.d->startPos = previousTouchPoint.startPos();
+ touchPoint.d->lastPos = previousTouchPoint.pos();
+ touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();
+ touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
- touchPoint.setPressure(qreal(0.));
+ touchPoint.d->pressure = qreal(0.);
break;
}
default:
@@ -5528,23 +5546,25 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
Q_ASSERT(d->appCurrentTouchPoints.contains(touchPoint.id()));
QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id());
- touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos());
- touchPoint.setLastScreenPos(previousTouchPoint.screenPos());
- touchPoint.setStartNormalizedPos(previousTouchPoint.startNormalizedPos());
- touchPoint.setLastNormalizedPos(previousTouchPoint.normalizedPos());
+ touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos();
+ touchPoint.d->lastScreenPos = previousTouchPoint.screenPos();
+ touchPoint.d->startPos = previousTouchPoint.startPos();
+ touchPoint.d->lastPos = previousTouchPoint.pos();
+ touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos();
+ touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos();
if (touchPoint.pressure() < qreal(0.))
- touchPoint.setPressure(qreal(1.));
+ touchPoint.d->pressure = qreal(1.);
d->appCurrentTouchPoints[touchPoint.id()] = touchPoint;
break;
}
- Q_ASSERT(widget != 0);
+ Q_ASSERT(widget.data() != 0);
// make the *scene* functions return the same as the *screen* functions
- touchPoint.setSceneRect(touchPoint.screenRect());
- touchPoint.setStartScenePos(touchPoint.startScreenPos());
- touchPoint.setLastScenePos(touchPoint.lastScreenPos());
+ touchPoint.d->sceneRect = touchPoint.screenRect();
+ touchPoint.d->startScenePos = touchPoint.startScreenPos();
+ touchPoint.d->lastScenePos = touchPoint.lastScreenPos();
- StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget];
+ StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget.data()];
maskAndPoints.first |= touchPoint.state();
if (touchPoint.isPrimary())
maskAndPoints.first |= Qt::TouchPointPrimary;
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 992e4be..14d7215 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -511,7 +511,7 @@ public:
QWidget *gestureWidget;
- QMap<int, QWidget *> widgetForTouchPointId;
+ QMap<int, QWeakPointer<QWidget> > widgetForTouchPointId;
QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints;
static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent);
void initializeMultitouch();
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 9839269..461cc92 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -787,6 +787,8 @@ public:
private:
QTouchEventTouchPointPrivate *d;
+ friend class QApplication;
+ friend class QApplicationPrivate;
};
enum DeviceType {
@@ -818,6 +820,7 @@ protected:
Qt::TouchPointStates _touchPointStates;
QList<QTouchEvent::TouchPoint> _touchPoints;
+ friend class QApplication;
friend class QApplicationPrivate;
};
diff --git a/src/gui/kernel/qmultitouch_mac.mm b/src/gui/kernel/qmultitouch_mac.mm
index 2f6f9ca..f736146 100644
--- a/src/gui/kernel/qmultitouch_mac.mm
+++ b/src/gui/kernel/qmultitouch_mac.mm
@@ -180,7 +180,6 @@ QCocoaTouch::getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch)
if (_touchCount != _currentTouches.size()) {
// Remove all instances, and basically start from scratch:
touchPoints.clear();
- QList<QCocoaTouch *> list = _currentTouches.values();
foreach (QCocoaTouch *qcocoaTouch, _currentTouches.values()) {
if (!_updateInternalStateOnly) {
qcocoaTouch->_touchPoint.setState(Qt::TouchPointReleased);
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index c14ff5c..22bec63 100644
--- a/src/qt3support/dialogs/q3filedialog.cpp
+++ b/src/qt3support/dialogs/q3filedialog.cpp
@@ -116,8 +116,6 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_MAC_USE_COCOA
-
/* XPM */
static const char * const start_xpm[]={
"16 15 8 1",
@@ -6053,8 +6051,7 @@ Q3FilePreview::Q3FilePreview()
function to provide file previewing.
*/
-#endif // QT_MAC_USE_COCOA
-
+
QT_END_NAMESPACE
#include "moc_q3filedialog.cpp"
diff --git a/src/qt3support/dialogs/q3filedialog.h b/src/qt3support/dialogs/q3filedialog.h
index 8644b4c..f6a7950 100644
--- a/src/qt3support/dialogs/q3filedialog.h
+++ b/src/qt3support/dialogs/q3filedialog.h
@@ -69,8 +69,6 @@ class QUrlInfo;
#ifndef QT_NO_FILEDIALOG
-#ifndef QT_MAC_USE_COCOA
-
class Q_COMPAT_EXPORT Q3FileIconProvider : public QObject
{
Q_OBJECT
@@ -339,8 +337,6 @@ private:
#endif
};
-#endif // QT_MAC_USE_COCOA
-
#endif // QT_NO_FILEDIALOG
QT_END_NAMESPACE
diff --git a/src/qt3support/dialogs/q3filedialog_mac.cpp b/src/qt3support/dialogs/q3filedialog_mac.cpp
index 585fa8f..6c5675b 100644
--- a/src/qt3support/dialogs/q3filedialog_mac.cpp
+++ b/src/qt3support/dialogs/q3filedialog_mac.cpp
@@ -56,11 +56,32 @@
#include "qstringlist.h"
#include "qtextcodec.h"
#include "qdesktopwidget.h"
+#include "qfiledialog.h"
#include <stdlib.h>
QT_BEGIN_NAMESPACE
-#ifndef QT_MAC_USE_COCOA
+#ifdef QT_MAC_USE_COCOA
+
+QStringList Q3FileDialog::macGetOpenFileNames(const QString &filter, QString *pwd,
+ QWidget *parent, const char* /*name*/,
+ const QString& caption, QString *selectedFilter,
+ bool /*multi*/, bool /*directory*/)
+{
+ return QFileDialog::getOpenFileNames(filter, *pwd, parent, 0,
+ caption);
+}
+
+
+QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &filter,
+ QString *, QWidget *parent, const char* /*name*/,
+ const QString& caption, QString *selectedFilter)
+{
+ return QFileDialog::getSaveFileName(start, filter, parent, 0,
+ caption, selectedFilter);
+}
+
+#else
/*****************************************************************************
Externals
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index b06ff0c..dc0e0d0 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -776,7 +776,11 @@ QScriptEnginePrivate::QScriptEnginePrivate()
qMetaTypeId<QObjectList>();
#endif
- JSC::initializeThreading(); // ### hmmm
+ if (!QCoreApplication::instance()) {
+ qFatal("QScriptEngine: Must construct a Q(Core)Application before a QScriptEngine");
+ return;
+ }
+ JSC::initializeThreading();
globalData = JSC::JSGlobalData::create().releaseRef();
globalData->clientData = new QScript::GlobalClientData(this);