Compare commits

..

39 Commits

Author SHA1 Message Date
Kevin Kofler
c2b1db7067 - use find_lang to package the qm files (#609749)
- put the qm files into the correct subpackages
- remove qvfb translations, we don't ship qvfb
2010-07-01 14:07:35 +00:00
Rex Dieter
a97307be01 - workaround glib_eventloop crasher induced by gdal/grass (bug #498111)
Fri Jun 20 2010 Rex Dieter <rdieter@fedoraproject.org> 4.6.3-5
- avoid timestamps in uic-generated files to be multilib-friendly
2010-06-29 22:38:45 +00:00
Rex Dieter
d57753c02c - QtWebKit does not search correct plugin path(s) (#568860)
- QtWebKit browsers crash with flash-plugin (rh#605677,webkit#40567)
2010-06-18 15:57:12 +00:00
Jaroslav Reznik
3675bc4f5a sync to F13 - security patches 2010-06-15 15:42:06 +00:00
Than Ngo
c84063a22d 4.6.3 2010-06-09 13:57:41 +00:00
Than Ngo
d69903646d Unsafe use of rand() in X11 (QTBUG-9793) 2010-06-07 13:40:38 +00:00
Rex Dieter
04ae9da23b - support QT_GRAPHICSSYSTEM env 2010-05-21 12:13:53 +00:00
Rex Dieter
26835b2d19 - +Provides: qt4-webkit(-devel) 2010-05-07 03:58:45 +00:00
Than Ngo
b5bf5ad14d - bz#589169, fix multiple flaws in webkit CVE-2010-0047, CVE-2010-0648,
CVE-2010-0656
2010-05-06 16:02:46 +00:00
Kevin Kofler
7b2dc6e532 Sync from F-13:
Thu Apr 29 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.2-16
- restore qt-everywhere-opensource-src-4.6.2-cups.patch (#586725)
Wed Apr 28 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.6.2-15
- own %%{_qt4_plugindir}/crypto
2010-04-29 07:50:21 +00:00
Rex Dieter
c8bc3519ac - backport from 4.7 branch to get the printDialog to check for default
paperSize via CUPS, it replaces the patch
    qt-everywhere-opensource-src-4.6.2-cups.patch
2010-04-15 16:12:10 +00:00
Than Ngo
c5e74df90d backport from 4.7 branch to fix s390(x) atomic ops crashes 2010-04-06 14:56:40 +00:00
Rex Dieter
c0a03f9a24 - Associate text/vnd.trolltech.linguist with linguist (#579082) 2010-04-02 16:37:57 +00:00
Than Ngo
bf821bf62c - fix type cast issue on sparc64
- fix type cast issue on s390x
- drop "recreate .qm file", it's not needed anymore
2010-03-25 10:56:38 +00:00
Tom Callaway
ec11cb1031 fix type cast in webkit bundled copy for sparc64 2010-03-23 14:57:24 +00:00
Than Ngo
520181c4ff - backport patch to fix ix a crash when reparenting an item in
QGraphicsView, QTBUG-6932
- drop dangling reference(s) to %%buildroot in *.pc
2010-03-22 10:46:22 +00:00
Jaroslav Reznik
6aec805cce - WebKit security update: CVE-2010-0046, CVE-2010-0049, CVE-2010-0050,
CVE-2010-0051, CVE-2010-0052, CVE-2010-0054
2010-03-17 13:16:38 +00:00
Kevin Kofler
2b737fbd9f Sync from devel:
Sat Mar 13 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.2-7
- BR alsa-lib-devel (for QtMultimedia)
Sat Mar 13 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.2-6
- Provides: qt-assistant-adp(-devel)
2010-03-14 00:16:22 +00:00
Than Ngo
b4dd757e2a Make tablet detection work with new wacom drivers (#569132) 2010-03-05 14:10:32 +00:00
Kevin Kofler
0a814aab28 Sync from devel:
Sun Feb 28 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.2-3
- fix CUPS patch not to crash if currentPPD is NULL (#566304)
Tue Feb 16 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.6.2-2
- macros.qt4: s/qt45/qt46/
2010-02-28 13:27:25 +00:00
Rex Dieter
421a7010ea - 4.6.2 2010-02-15 16:34:35 +00:00
Rex Dieter
fe7c362aab sync w/devel branch for qt-4.6.1 goodness 2010-02-05 16:40:23 +00:00
Bill Nottingham
7a9a94424f Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:17:51 +00:00
Rex Dieter
88bcfd0a90 - -tds: Add package with TDS sqldriver (#537586)
- add arch'd provides for sql drivers
2009-11-15 00:04:43 +00:00
Jaroslav Reznik
d8427aecb2 - CVE-2009-3384 - WebKit, ftp listing handling (#525788)
- CVE-2009-2816 - WebKit, MITM Cross-Origin Resource Sharing (#525789)
2009-11-12 14:26:08 +00:00
Rex Dieter
a14a744ce4 - -x11: Requires: %{name}-sqlite%{?_isa} 2009-11-08 17:10:01 +00:00
Rex Dieter
991b877472 revert qeventdispatcher_glib_fix , than reports it doesn't fix 3star echo 2009-10-30 13:02:09 +00:00
Rex Dieter
c3defef042 - use upstream qeventdispatcher_glib_fix.diff (kde#210171) 2009-10-30 12:01:23 +00:00
Than Ngo
f47f9459f4 - fix glib-even-loop issue, regression which causes password dialogs get
stuck
2009-10-29 15:40:22 +00:00
Rex Dieter
8369052ada comment about Phonon symlink needed by qtscriptgenerator 2009-10-19 15:47:59 +00:00
Than Ngo
696b9b5698 - subpackage sqlite plugin, add Require on qt-sqlite in qt-x11 for
assistant
2009-10-16 08:26:03 +00:00
Rex Dieter
68e79c4091 - drop needless Prereq: /etc/ld.so.conf.d 2009-10-14 18:18:36 +00:00
Rex Dieter
4101233f14 sync w/devel branch (for 4.5.3) 2009-10-10 20:14:41 +00:00
Rex Dieter
9a5bc66ccf - qt webkit crash on drag (#528094) 2009-10-09 15:04:45 +00:00
Rex Dieter
a045a0a262 - disable JavaScriptCore JIT, SE Linux crashes (#527079) 2009-10-09 13:57:16 +00:00
Than Ngo
6e2acfbfa9 rhel cleanup 2009-10-04 07:24:11 +00:00
Rex Dieter
3d411228a7 buildfixes from devel/ branch 2009-10-03 16:30:46 +00:00
Rex Dieter
b722a23936 - if ! phonon_internal, exclude more/all phonon headers
- qt-devel must Requires: phonon-devel (#520323)
Tue Sep 29 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.5.2-21
- switch to external/kde phonon
2009-10-03 15:29:14 +00:00
Jesse Keating
878ccfceae Initialize branch F-12 for qt 2009-09-29 06:40:58 +00:00
101 changed files with 5281 additions and 6679 deletions

11
.cvsignore Normal file
View File

@ -0,0 +1,11 @@
hi128-app-qt4-logo.png
hi48-app-qt4-logo.png
gstreamer-logo.svg
hi128-phonon-gstreamer.png
hi16-phonon-gstreamer.png
hi22-phonon-gstreamer.png
hi32-phonon-gstreamer.png
hi48-phonon-gstreamer.png
hi64-phonon-gstreamer.png
qt-everywhere-opensource-src-4.6.2.tar.gz
qt-everywhere-opensource-src-4.6.3.tar.gz

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
/hi128-app-qt4-logo.png
/hi48-app-qt4-logo.png
/qt-everywhere-opensource-src-4.8.7.tar.gz

View File

@ -0,0 +1,117 @@
From b48e2091871516496cf0b133249fbf5326a55831 Mon Sep 17 00:00:00 2001
From: Lubos Lunak <l.lunak@kde.org>
Date: Sat, 23 Feb 2008 16:44:52 +0100
Subject: [PATCH 01/13] This patch uses object name as a fallback for window role if no window
role is set explicitly using setWindowRole(). Since Qt3 always used
the object name as the window role and most Qt3/KDE3 code is ported to
call setObjectName(),
this makes the window role set in many cases (which KWin uses for window identifying).
NOTE: It is suggested to apply patch #0209 as well when this patch is used.
qt-bugs@ issue : 167704
Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused)
---
src/corelib/kernel/qobject.cpp | 8 ++++++++
src/corelib/kernel/qobject_p.h | 3 +++
src/gui/kernel/qwidget_p.h | 1 +
src/gui/kernel/qwidget_x11.cpp | 27 +++++++++++++++++++++------
4 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 6487194..ef0369e 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -993,8 +993,16 @@ void QObject::setObjectName(const QString &name)
{
Q_D(QObject);
d->objectName = name;
+#if defined(Q_WS_X11)
+ d->checkWindowRole();
+#endif
}
+#if defined(Q_WS_X11)
+void QObjectPrivate::checkWindowRole()
+{
+}
+#endif
#ifdef QT3_SUPPORT
/*! \internal
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 0bcccba..6ab9e10 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -144,6 +144,9 @@ public:
mutable quint32 connectedSignals;
QString objectName;
+#if defined(Q_WS_X11)
+ virtual void checkWindowRole();
+#endif
// Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions
struct Connection
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 774e390..176d6fa 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -358,6 +358,7 @@ public:
#if defined(Q_WS_X11)
void setWindowRole();
+ virtual void checkWindowRole();
void sendStartupMessage(const char *message) const;
void setNetWmWindowTypes();
void x11UpdateIsOpaque();
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 79ee8c9..b56849c 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -778,13 +778,17 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
data.fstrut_dirty = 1;
// declare the widget's window role
+ QByteArray windowRole;
if (QTLWExtra *topData = maybeTopData()) {
- if (!topData->role.isEmpty()) {
- QByteArray windowRole = topData->role.toUtf8();
- XChangeProperty(dpy, id,
- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
- (unsigned char *)windowRole.constData(), windowRole.length());
- }
+ if (!topData->role.isEmpty())
+ windowRole = topData->role.toUtf8();
+ }
+ if (windowRole.isEmpty()) // use object name as a fallback
+ windowRole = objectName.toUtf8();
+ if (!windowRole.isEmpty()) {
+ XChangeProperty(dpy, id,
+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
+ (unsigned char *)windowRole.constData(), windowRole.length());
}
// set client leader property
@@ -2768,6 +2772,17 @@ void QWidgetPrivate::setWindowRole()
(unsigned char *)windowRole.constData(), windowRole.length());
}
+void QWidgetPrivate::checkWindowRole()
+{
+ Q_Q(QWidget);
+ if( !q->windowRole().isEmpty() || !q->internalWinId())
+ return;
+ QByteArray windowRole = objectName.toUtf8(); // use as a fallback
+ XChangeProperty(X11->display, q->internalWinId(),
+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
+ (unsigned char *)windowRole.constData(), windowRole.length());
+}
+
Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine)
QPaintEngine *QWidget::paintEngine() const
{
--
1.6.5.1

View File

@ -0,0 +1,67 @@
From 339e220e29ff39b86705438b4be6f90e5618d27b Mon Sep 17 00:00:00 2001
From: Lubos Lunak <l.lunak@kde.org>
Date: Tue, 2 Oct 2007 16:08:32 +0200
Subject: [PATCH 02/13] This patch makes override-redirect windows (popup menu, dropdown menu,
tooltip, combobox, etc.) also have more window properties like WM_CLASS,
so they can be used when compositing.
qt-bugs@ issue : none
bugs.kde.org number : none
---
src/gui/kernel/qwidget_x11.cpp | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 79ee8c9..a74a849 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -719,6 +719,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
Q_ASSERT(id);
XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder,
&wsa);
+ XClassHint class_hint;
+ QByteArray appName = qAppName().toLatin1();
+ class_hint.res_name = appName.data(); // application name
+ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class
+ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint);
} else if (topLevel && !desktop) { // top-level widget
if (!X11->wm_client_leader)
create_wm_client_leader();
@@ -769,13 +774,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
// set EWMH window types
setNetWmWindowTypes();
+ // when we create a toplevel widget, the frame strut should be dirty
+ data.fstrut_dirty = 1;
+
+ } else {
+ // non-toplevel widgets don't have a frame, so no need to
+ // update the strut
+ data.fstrut_dirty = 0;
+ }
+
+ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
// set _NET_WM_PID
long curr_pid = getpid();
XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace,
(unsigned char *) &curr_pid, 1);
- // when we create a toplevel widget, the frame strut should be dirty
- data.fstrut_dirty = 1;
// declare the widget's window role
if (QTLWExtra *topData = maybeTopData()) {
@@ -791,10 +804,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER),
XA_WINDOW, 32, PropModeReplace,
(unsigned char *)&X11->wm_client_leader, 1);
- } else {
- // non-toplevel widgets don't have a frame, so no need to
- // update the strut
- data.fstrut_dirty = 0;
}
if (initializeWindow && q->internalWinId()) {
--
1.6.5.1

View File

@ -0,0 +1,37 @@
From 68eaa07de69e873b89d4aba341c6ed1ca81f6819 Mon Sep 17 00:00:00 2001
From: Lubos Lunak <l.lunak@kde.org>
Date: Wed, 30 Jan 2008 14:24:01 +0100
Subject: [PATCH 03/13] This patch changes QObjectPrivateVersion, thus preventing mixing
parts of upstream Qt and qt-copy. In general it is a bad idea to mix
e.g. libQtCore from one build and libQtGui from another one, and other
qt-copy patches could make changes in Qt internal structures that could
cause problems when mixed with upstream Qt.
This patch does not make qt-copy binary incompatible with upstream Qt.
It only further enforces using the same sources for the whole Qt build.
qt-bugs@ issue : none
Trolltech task ID : none
bugs.kde.org number : none
---
src/corelib/kernel/qobject_p.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 0bcccba..88192fd 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -83,7 +83,9 @@ extern QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set;
inline QObjectData::~QObjectData() {}
-enum { QObjectPrivateVersion = QT_VERSION };
+// add 0x1000000 to mark it as qt-copy version, with possible modifications
+// in some Q*Private class
+enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 };
class Q_CORE_EXPORT QObjectPrivate : public QObjectData
{
--
1.6.5.1

View File

@ -0,0 +1,56 @@
From 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 Mon Sep 17 00:00:00 2001
From: Benjamin Reed <rangerrick@befunk.com>
Date: Tue, 19 Feb 2008 17:37:37 +0100
Subject: [PATCH 04/13] This patch adds support for using -isystem to allow putting an include
directory at the end of the compiler's header search path.
I don't have the exact output anymore (I've since patched Qt's configure) but
essentially, since I have pcre.h in /opt/kde4-deps/include, it was
conflicting with Qt's (modified) pcre.h in the WebKit bits, since
-I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it
comes *before* the specific locations in INCPATH on the compile line, and you
end up with a conflict with the system-installed pcre.h.
Presumably, if your pcre.h is in /usr/include as on most Linux systems, you
wouldn't notice this issue since /usr/include's already in your include path
and people likely don't pass -I /usr/include to configure. I suspect that on
any platform with a regular, system-installed pcre.h (or clucene headers),
adding -I /usr/include would exhibit this bug, just as a custom-installed
pcre/clucene in another root would.
qt-bugs@ issue : 199610
Trolltech task ID :
bugs.kde.org number :
---
configure | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 2c108ad..610a201 100755
--- a/configure
+++ b/configure
@@ -927,6 +927,11 @@ while [ "$#" -gt 0 ]; do
VAL=`echo $1 | sed 's,-D,,'`
fi
;;
+ -isystem)
+ VAR="add_isystempath"
+ shift
+ VAL="$1"
+ ;;
-I?*|-I)
VAR="add_ipath"
if [ "$1" = "-I" ]; then
@@ -1890,6 +1895,9 @@ while [ "$#" -gt 0 ]; do
add_ipath)
I_FLAGS="$I_FLAGS -I\"${VAL}\""
;;
+ add_isystempath)
+ I_FLAGS="$I_FLAGS -isystem \"${VAL}\""
+ ;;
add_lpath)
L_FLAGS="$L_FLAGS -L\"${VAL}\""
;;
--
1.6.5.1

View File

@ -0,0 +1,47 @@
From 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 Mon Sep 17 00:00:00 2001
From: Robert Knight <robertknight@gmail.com>
Date: Sun, 20 Apr 2008 16:28:31 +0200
Subject: [PATCH 05/13] When tabs are inserted or removed in a QTabBar,
QTabBarPrivate::refresh() is called to update the layout. If the
tabbar widget is hidden, this just sets a boolean variable
(layoutDirty) and returns, so the parent widget's layout is not
notified about the possible geometry change.
Prior to Qt 4.4 this was not a problem because the geometry was
recalculated in QTabBar::sizeHint() if the layoutDirty variable was
set. In Qt 4.4 however the layout caches size hint information in
QWidgetItemV2. Since the cache information is not invalidated, the
layout may end up using out-of-date size hint information to compute
the widget size.
If the QTabBar is empty when QTabBar::sizeHint() is called, it will
return a size with a height of 0, which will be kept in the cache and
so the tab bar will never be shown.
This patch fixes the problem by calling updateGeometry() whenever the
tab bar's layout is refreshed.
qt-bugs@ issue : 208185
Trolltech task ID : 208349
bugs.kde.org number : 159014
---
src/gui/widgets/qtabbar.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 419d456..41107a0 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh()
layoutTabs();
makeVisible(currentIndex);
q->update();
- q->updateGeometry();
}
+ q->updateGeometry();
}
/*!
--
1.6.5.1

View File

@ -0,0 +1,67 @@
From 8e28e0603a900e1b18ebfd14c4f87b16dabf4cf6 Mon Sep 17 00:00:00 2001
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Date: Fri, 19 Sep 2008 17:41:26 +0200
Subject: [PATCH 06/13] Fix configure.exe to do an out-of-source build on windows
qt-bugs@ issue : N227213
Trolltech task ID : none yet
---
bin/syncqt | 6 +++++-
projects.pro | 3 +++
src/tools/moc/main.cpp | 6 ++++++
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/bin/syncqt b/bin/syncqt
index 7a9f1d3..b5a8e1c 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -365,9 +365,13 @@ sub fixPaths {
$match_dir = $tmp;
$i = $slash;
}
+ my $cnt_ofs = 0;
+ if($match_dir =~ /^[a-zA-Z]:$/) {
+ $cnt_ofs = 1;
+ }
if($match_dir) {
my $after = substr($dir, length($match_dir));
- my $count = ($after =~ tr,/,,);
+ my $count = ($after =~ tr,/,,) - $cnt_ofs;
my $dots = "";
for(my $i = 0; $i < $count; $i++) {
$dots .= "../";
diff --git a/projects.pro b/projects.pro
index 2596c0a..3ba0688 100644
--- a/projects.pro
+++ b/projects.pro
@@ -127,6 +127,9 @@ unix {
DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
}
+win32 {
+ mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
+}
INSTALLS += mkspecs
false:macx { #mac install location
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
index d519b09..7979836 100644
--- a/src/tools/moc/main.cpp
+++ b/src/tools/moc/main.cpp
@@ -94,7 +94,13 @@ static QByteArray combinePath(const char *infile, const char *outfile)
inSplitted.prepend(QLatin1String(".."));
}
inSplitted.append(inFileInfo.fileName());
+#ifdef Q_WS_WIN
+ const QString rel = inSplitted.join(QLatin1String("/"));
+ const QString abs = inFileInfo.absoluteFilePath();
+ return QFile::encodeName(rel.length() < abs.length() ? rel : abs);
+#else
return QFile::encodeName(inSplitted.join(QLatin1String("/")));
+#endif
}
--
1.6.5.1

View File

@ -0,0 +1,73 @@
From 0afcf33127c6ccbe5dfaae4f4c5e02f28dc10ae1 Mon Sep 17 00:00:00 2001
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Date: Thu, 8 May 2008 21:25:49 +0200
Subject: [PATCH 07/13] When using qmake outside qt src tree, it sometimes generates wrong
paths (wrong path separator)
qt-bugs@ issue : none
Trolltech task ID : 214661
---
qmake/property.cpp | 29 ++++++++++++++++-------------
1 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 8ba89f9..dd78349 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -81,29 +81,32 @@ QMakeProperty::keyBase(bool version) const
QString
QMakeProperty::value(QString v, bool just_check)
{
+ QString ret;
if(v == "QT_INSTALL_PREFIX")
- return QLibraryInfo::location(QLibraryInfo::PrefixPath);
+ ret = QLibraryInfo::location(QLibraryInfo::PrefixPath);
else if(v == "QT_INSTALL_DATA")
- return QLibraryInfo::location(QLibraryInfo::DataPath);
+ ret = QLibraryInfo::location(QLibraryInfo::DataPath);
else if(v == "QT_INSTALL_DOCS")
- return QLibraryInfo::location(QLibraryInfo::DocumentationPath);
+ ret = QLibraryInfo::location(QLibraryInfo::DocumentationPath);
else if(v == "QT_INSTALL_HEADERS")
- return QLibraryInfo::location(QLibraryInfo::HeadersPath);
+ ret = QLibraryInfo::location(QLibraryInfo::HeadersPath);
else if(v == "QT_INSTALL_LIBS")
- return QLibraryInfo::location(QLibraryInfo::LibrariesPath);
+ ret = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
else if(v == "QT_INSTALL_BINS")
- return QLibraryInfo::location(QLibraryInfo::BinariesPath);
+ ret = QLibraryInfo::location(QLibraryInfo::BinariesPath);
else if(v == "QT_INSTALL_PLUGINS")
- return QLibraryInfo::location(QLibraryInfo::PluginsPath);
+ ret = QLibraryInfo::location(QLibraryInfo::PluginsPath);
else if(v == "QT_INSTALL_TRANSLATIONS")
- return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ ret = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
else if(v == "QT_INSTALL_CONFIGURATION")
- return QLibraryInfo::location(QLibraryInfo::SettingsPath);
+ ret = QLibraryInfo::location(QLibraryInfo::SettingsPath);
else if(v == "QT_INSTALL_EXAMPLES")
- return QLibraryInfo::location(QLibraryInfo::ExamplesPath);
+ ret = QLibraryInfo::location(QLibraryInfo::ExamplesPath);
else if(v == "QT_INSTALL_DEMOS")
- return QLibraryInfo::location(QLibraryInfo::DemosPath);
- else if(v == "QMAKE_MKSPECS")
+ ret = QLibraryInfo::location(QLibraryInfo::DemosPath);
+ if(!ret.isEmpty())
+ return QDir::toNativeSeparators(ret);
+ if(v == "QMAKE_MKSPECS")
return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
else if(v == "QMAKE_VERSION")
return qmake_version();
@@ -116,7 +119,7 @@ QMakeProperty::value(QString v, bool just_check)
int slash = v.lastIndexOf('/');
QVariant var = settings->value(keyBase(slash == -1) + v);
bool ok = var.isValid();
- QString ret = var.toString();
+ ret = var.toString();
if(!ok) {
QString version = qmake_version();
if(slash != -1) {
--
1.6.5.1

View File

@ -0,0 +1,93 @@
From 8731ab999b849dac4716e3d29f5f55ed8e56438e Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@nokia.com>
Date: Thu, 25 Jun 2009 13:50:29 +0200
Subject: [PATCH 08/13] This patch makes the raster graphics system use shared images instead
of shared pixmaps.
Shared memory pixmaps are deprecated since they are slower than shared
images with modern graphics hardware. They are also not supported by EXA
drivers and can be disabled in the latest version of the NVidia driver.
qt-bugs@ issue : none
Qt Software task ID : none
bugs.kde.org number : none
---
src/gui/image/qnativeimage.cpp | 10 ----------
src/gui/image/qnativeimage_p.h | 1 -
src/gui/painting/qwindowsurface_raster.cpp | 13 ++++++++++---
3 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 3745708..3c21fce 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -147,7 +147,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
{
if (!X11->use_mitshm) {
xshmimg = 0;
- xshmpm = 0;
image = QImage(width, height, format);
return;
}
@@ -191,11 +190,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
shmctl(xshminfo.shmid, IPC_RMID, 0);
return;
}
- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data,
- &xshminfo, width, height, dd);
- if (!xshmpm) {
- qWarning() << "QNativeImage: Unable to create shared Pixmap.";
- }
}
@@ -204,10 +198,6 @@ QNativeImage::~QNativeImage()
if (!xshmimg)
return;
- if (xshmpm) {
- XFreePixmap(X11->display, xshmpm);
- xshmpm = 0;
- }
XShmDetach(X11->display, &xshminfo);
xshmimg->data = 0;
XDestroyImage(xshmimg);
diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h
index 07d5dfe..ba01854 100644
--- a/src/gui/image/qnativeimage_p.h
+++ b/src/gui/image/qnativeimage_p.h
@@ -90,7 +90,6 @@ public:
#elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
XImage *xshmimg;
- Pixmap xshmpm;
XShmSegmentInfo xshminfo;
#elif defined(Q_WS_MAC)
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index d6fb03b..09963d9 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
QRect br = rgn.boundingRect().translated(offset);
#ifndef QT_NO_MITSHM
- if (d_ptr->image->xshmpm) {
- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc,
- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y());
+ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) {
+ const QImage &src = d->image->image;
+ br = br.intersected(src.rect());
+ // Hack to make sure we satisify the PutImage() constraints in the X server,
+ // since the doShmPutImage() route currently forces a migration to system ram.
+ wbr.setX(wbr.x() - br.x());
+ br.setX(0);
+ br.setWidth(src.width());
+ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg,
+ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False);
XSync(X11->display, False);
} else
#endif
--
1.6.5.1

View File

@ -0,0 +1,30 @@
From bb8255da422470c5012b6b1c4c24eb2afb6804dc Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@nokia.com>
Date: Fri, 26 Jun 2009 11:41:45 +0200
Subject: [PATCH 09/13] Restore a section of the file that got removed due to conflict resolution.
Thanks to Kevin Kofler for pointing this out
---
src/gui/kernel/qapplication_x11.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 33aec9e..53f020b 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1955,9 +1955,9 @@ void qt_init(QApplicationPrivate *priv, int,
bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000
- && defaultVisual->green_mask == 0xff00
- && defaultVisual->blue_mask == 0xff);
+ X11->use_mitshm = defaultVisual->red_mask == 0xff0000
+ && defaultVisual->green_mask == 0xff00
+ && defaultVisual->blue_mask == 0xff;
}
}
#endif // QT_NO_MITSHM
--
1.6.5.1

View File

@ -0,0 +1,70 @@
From 9eb3560cfd5cd0bc9c7bf79f2c27657ee07b8f95 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Sat, 8 Aug 2009 14:40:25 +0200
Subject: [PATCH 12/13] Add context to tr calls in QShortcut
Some languages have special rules for using "+" to concatenate strings and
for example it needs to be Ctrl + Shift instead of Ctrl+Shift, adding
context to these strings helps creating a more correct translation
---
src/gui/kernel/qkeysequence.cpp | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 894f663..c17f253 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -991,10 +991,10 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
QList<QModifKeyName> modifs;
if (nativeText) {
- modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl").toLower().append(QLatin1Char('+')))
- << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift").toLower().append(QLatin1Char('+')))
- << QModifKeyName(Qt::ALT, QShortcut::tr("Alt").toLower().append(QLatin1Char('+')))
- << QModifKeyName(Qt::META, QShortcut::tr("Meta").toLower().append(QLatin1Char('+')));
+ modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts").toLower().append(QLatin1Char('+')))
+ << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift", "Shift key, used for shortcuts").toLower().append(QLatin1Char('+')))
+ << QModifKeyName(Qt::ALT, QShortcut::tr("Alt", "Alt key, used for shortcuts").toLower().append(QLatin1Char('+')))
+ << QModifKeyName(Qt::META, QShortcut::tr("Meta", "Meta key, used for shortcuts").toLower().append(QLatin1Char('+')));
}
modifs += *gmodifs; // Test non-translated ones last
@@ -1086,7 +1086,7 @@ QString QKeySequence::encodeString(int key)
static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format)
{
if (!str.isEmpty())
- str += (format == QKeySequence::NativeText) ? QShortcut::tr("+")
+ str += (format == QKeySequence::NativeText) ? QShortcut::tr("+", "Symbol used to concatenate keys in shortcuts")
: QString::fromLatin1("+");
str += theKey;
}
@@ -1111,13 +1111,13 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
{
// On other systems the order is Meta, Control, Alt, Shift
if ((key & Qt::META) == Qt::META)
- s = nativeText ? QShortcut::tr("Meta") : QString::fromLatin1("Meta");
+ s = nativeText ? QShortcut::tr("Meta", "Meta key, used for shortcuts") : QString::fromLatin1("Meta");
if ((key & Qt::CTRL) == Qt::CTRL)
- addKey(s, nativeText ? QShortcut::tr("Ctrl") : QString::fromLatin1("Ctrl"), format);
+ addKey(s, nativeText ? QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts") : QString::fromLatin1("Ctrl"), format);
if ((key & Qt::ALT) == Qt::ALT)
- addKey(s, nativeText ? QShortcut::tr("Alt") : QString::fromLatin1("Alt"), format);
+ addKey(s, nativeText ? QShortcut::tr("Alt", "Alt key, used for shortcuts") : QString::fromLatin1("Alt"), format);
if ((key & Qt::SHIFT) == Qt::SHIFT)
- addKey(s, nativeText ? QShortcut::tr("Shift") : QString::fromLatin1("Shift"), format);
+ addKey(s, nativeText ? QShortcut::tr("Shift", "Shift key, used for shortcuts") : QString::fromLatin1("Shift"), format);
}
@@ -1132,7 +1132,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
p += QChar((key-0x10000)%400+0xdc00);
}
} else if (key >= Qt::Key_F1 && key <= Qt::Key_F35) {
- p = nativeText ? QShortcut::tr("F%1").arg(key - Qt::Key_F1 + 1)
+ p = nativeText ? QShortcut::tr("F%1", "Fx key, used for shortcuts").arg(key - Qt::Key_F1 + 1)
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
} else if (key) {
int i=0;
--
1.6.5.1

View File

@ -0,0 +1,44 @@
From 0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c Mon Sep 17 00:00:00 2001
From: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Tue, 4 May 2010 16:25:18 +0200
Subject: [PATCH] Use qrand() instead of rand()
This only affects X11 code, and are the only 2 places in Qt where rand() is
used instead of qrand().
Task-number: QTBUG-9793
Reviewed-by: TrustMe
---
src/gui/kernel/qwidget_x11.cpp | 2 +-
src/gui/painting/qpaintengine_x11.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 37ac6bf..43f510c 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -3000,7 +3000,7 @@ Picture QX11Data::getSolidFill(int screen, const QColor &c)
return X11->solid_fills[i].picture;
}
// none found, replace one
- int i = rand() % 16;
+ int i = qrand() % 16;
if (X11->solid_fills[i].screen != screen && X11->solid_fills[i].picture) {
XRenderFreePicture (X11->display, X11->solid_fills[i].picture);
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index da48fcb..aef8b80 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -315,7 +315,7 @@ static Picture getPatternFill(int screen, const QBrush &b)
return X11->pattern_fills[i].picture;
}
// none found, replace one
- int i = rand() % 16;
+ int i = qrand() % 16;
if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) {
XRenderFreePicture (X11->display, X11->pattern_fills[i].picture);
--
1.6.1

View File

@ -0,0 +1,28 @@
From 55ef01d93f8257b5927660290fc1ead0b2b74ec9 Mon Sep 17 00:00:00 2001
From: Andreas Hartmetz <ahartmetz@gmail.com>
Date: Thu, 18 Mar 2010 02:41:14 +0100
Subject: [PATCH] Add environment variable switch for graphicssystem so distros and
non-developers can more easily pick a different default.
---
src/gui/kernel/qapplication.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 49713cf..af83047 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -763,6 +763,10 @@ void QApplicationPrivate::construct(
qt_is_gui_used = (qt_appType != QApplication::Tty);
process_cmdline();
+ // the environment variable has the lowest precedence of runtime graphicssystem switches
+ if (graphics_system_name.isEmpty()) {
+ graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM"));
+ }
// Must be called before initialize()
qt_init(this, qt_appType
#ifdef Q_WS_X11
--
1.6.1

21
Makefile Normal file
View File

@ -0,0 +1,21 @@
# Makefile for source rpm: qt
# $Id$
NAME := qt
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,9 +1,9 @@
[Desktop Entry]
Name=Qt4 Assistant
GenericName=Documentation viewer
Comment=Shows Qt4 documentation and examples
Exec=assistant-qt4
Icon=assistant
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;

1
branch Normal file
View File

@ -0,0 +1 @@
F-12

View File

@ -6,5 +6,6 @@ Exec=designer-qt4
Icon=designer
MimeType=application/x-designer;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;

6
kde-qt-patches.sh Normal file
View File

@ -0,0 +1,6 @@
# quick-n-dirty method to fetch patches from -patched git branch
# unfortunately, requires an already checked-out copy of the git repo
# when switching branches, use something like: git checkout --track remotes/origin/4.6-stable-patched
git format-patch --output-directory kde-qt-patches v4.6.1..origin/4.6.1-patched

View File

@ -1,10 +1,10 @@
[Desktop Entry]
Name=Qt4 Linguist
GenericName=Translation tool
Comment=Add translations to Qt4 applications
Exec=linguist-qt4
Icon=linguist
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;

View File

@ -1,33 +0,0 @@
%_qt4 @@NAME@@
%_qt4_epoch @@EPOCH@@
%_qt4_version @@VERSION@@
%_qt4_evr @@EVR@@
%_qt48 %{_qt4_version}
%_qt4_prefix %{_libdir}/qt4
%_qt4_bindir %{_qt4_prefix}/bin
%_qt4_datadir %{_qt4_prefix}
%_qt4_demosdir %{_qt4_prefix}/demos
%_qt4_docdir %{_docdir}/qt4
%_qt4_examples %{_qt4_prefix}/examples
%_qt4_examplesdir %{_qt4_prefix}/examples
%_qt4_headerdir %{_includedir}
%_qt4_importdir %{_qt4_prefix}/imports
%_qt4_libdir %{_libdir}
%_qt4_plugindir %{_qt4_prefix}/plugins
%_qt4_qmake %{_qt4_bindir}/qmake
%_qt4_sysconfdir %{_sysconfdir}
%_qt4_translationdir %{_datadir}/qt4/translations
%_qt4_ldflags %{?__global_ldflags}
%_qt4_optflags %{optflags}
%_qt4_qmake_flags \\\
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%{_qt4_optflags}}" \\\
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{_qt4_ldflags}}" \\\
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{_qt4_ldflags}}" \\\
QMAKE_STRIP=
%qmake_qt4 %{_qt4_qmake} %{_qt4_qmake_flags}

View File

@ -4,20 +4,24 @@
*
* DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */
#ifndef QCONFIG_MULTILIB_H
#define QCONFIG_MULTILIB_H
#ifndef __WORDSIZE
#include <bits/wordsize.h>
#endif
#if __WORDSIZE == 32
#include "QtCore/qconfig-32.h"
#elif __WORDSIZE == 64
#include "QtCore/qconfig-64.h"
#if defined(__x86_64__)
# include <QtCore/qconfig-x86_64.h>
#elif defined(__i386__)
# include <QtCore/qconfig-i386.h>
#elif defined(__powerpc64__)
# include <QtCore/qconfig-ppc64.h>
#elif defined(__powerpc__)
# include <QtCore/qconfig-ppc.h>
#elif defined(__s390x__)
# include <QtCore/qconfig-s390x.h>
#elif defined(__s390__)
# include <QtCore/qconfig-s390.h>
#elif defined(__sparc__) && defined (__arch64__)
# include <QtCore/qconfig-sparc64.h>
#elif defined(__sparc__)
# include <QtCore/qconfig-sparc.h>
#else
#error "unexpected value for __WORDSIZE macro"
#endif
/* Should never reach this point, if so see bugzilla.redhat.com/223663 */
#error "This qt4-devel package does not work your architecture?"
#endif

View File

@ -1,10 +0,0 @@
[Desktop Entry]
Name=Qt4 QDbusViewer
GenericName=D-Bus Debugger
Comment=Debug D-Bus applications
Exec=qdbusviewer
Icon=qdbusviewer
Terminal=false
Type=Application
Categories=Qt;Development;Debugger;

View File

@ -1,812 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp.poll 2014-03-30 15:36:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp 2014-03-31 18:04:05.958260978 -0500
@@ -158,13 +158,6 @@ static void qt_sa_sigchld_sigaction(int
}
}
-static inline void add_fd(int &nfds, int fd, fd_set *fdset)
-{
- FD_SET(fd, fdset);
- if ((fd) > nfds)
- nfds = fd;
-}
-
struct QProcessInfo {
QProcess *process;
int deathPipe;
@@ -256,9 +249,9 @@ QProcessManager::~QProcessManager()
void QProcessManager::run()
{
forever {
- fd_set readset;
- FD_ZERO(&readset);
- FD_SET(qt_qprocess_deadChild_pipe[0], &readset);
+ pollfd fd;
+ fd.fd = qt_qprocess_deadChild_pipe[0];
+ fd.events = POLLIN;
#if defined (QPROCESS_DEBUG)
qDebug() << "QProcessManager::run() waiting for children to die";
@@ -267,8 +260,8 @@ void QProcessManager::run()
// block forever, or until activity is detected on the dead child
// pipe. the only other peers are the SIGCHLD signal handler, and the
// QProcessManager destructor.
- int nselect = select(qt_qprocess_deadChild_pipe[0] + 1, &readset, 0, 0, 0);
- if (nselect < 0) {
+ int ret = qt_safe_poll(&fd, 1, -1, /* retry_eintr */ false);
+ if (ret < 0) {
if (errno == EINTR)
continue;
break;
@@ -1027,17 +1020,6 @@ void QProcessPrivate::killProcess()
::kill(pid_t(pid), SIGKILL);
}
-static int select_msecs(int nfds, fd_set *fdread, fd_set *fdwrite, int timeout)
-{
- if (timeout < 0)
- return qt_safe_select(nfds, fdread, fdwrite, 0, 0);
-
- struct timeval tv;
- tv.tv_sec = timeout / 1000;
- tv.tv_usec = (timeout % 1000) * 1000;
- return qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
-}
-
/*
Returns the difference between msecs and elapsed. If msecs is -1,
however, -1 is returned.
@@ -1060,10 +1042,10 @@ bool QProcessPrivate::waitForStarted(int
childStartedPipe[0]);
#endif
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(childStartedPipe[0], &fds);
- if (select_msecs(childStartedPipe[0] + 1, &fds, 0, msecs) == 0) {
+ pollfd fd;
+ fd.fd = childStartedPipe[0];
+ fd.events = POLLIN;
+ if (qt_safe_poll(&fd, 1, msecs) == 0) {
processError = QProcess::Timedout;
q->setErrorString(QProcess::tr("Process operation timed out"));
#if defined (QPROCESS_DEBUG)
@@ -1079,6 +1061,47 @@ bool QProcessPrivate::waitForStarted(int
return startedEmitted;
}
+class QProcessFDSet {
+ pollfd fds[5];
+
+ static size_t size()
+ {
+ return sizeof(fds)/sizeof(fds[0]);
+ }
+
+public:
+ QProcessFDSet(QProcessPrivate &proc)
+ {
+ for (size_t i = 0; i < size(); ++i) {
+ fds[i].fd = -1;
+ fds[i].events = POLLIN;
+ }
+ death().fd = proc.deathPipe[0];
+
+ if (proc.processState == QProcess::Starting)
+ started().fd = proc.childStartedPipe[0];
+
+ stdout().fd = proc.stdoutChannel.pipe[0];
+ stderr().fd = proc.stderrChannel.pipe[0];
+
+ if (!proc.writeBuffer.isEmpty()) {
+ stdin().fd = proc.stdinChannel.pipe[1];
+ stdin().events = POLLOUT;
+ }
+ }
+
+ int poll(int timeout)
+ {
+ return qt_safe_poll(fds, size(), timeout);
+ }
+
+ pollfd &death() { return fds[0]; }
+ pollfd &started() { return fds[1]; }
+ pollfd &stdout() { return fds[2]; }
+ pollfd &stderr() { return fds[3]; }
+ pollfd &stdin() { return fds[4]; }
+};
+
bool QProcessPrivate::waitForReadyRead(int msecs)
{
Q_Q(QProcess);
@@ -1090,28 +1113,9 @@ bool QProcessPrivate::waitForReadyRead(i
stopWatch.start();
forever {
- fd_set fdread;
- fd_set fdwrite;
-
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
-
- int nfds = deathPipe[0];
- FD_SET(deathPipe[0], &fdread);
-
- if (processState == QProcess::Starting)
- add_fd(nfds, childStartedPipe[0], &fdread);
-
- if (stdoutChannel.pipe[0] != -1)
- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
- if (stderrChannel.pipe[0] != -1)
- add_fd(nfds, stderrChannel.pipe[0], &fdread);
-
- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
-
+ QProcessFDSet fdset(*this);
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
+ int ret = fdset.poll(timeout);
if (ret < 0) {
break;
}
@@ -1121,18 +1125,18 @@ bool QProcessPrivate::waitForReadyRead(i
return false;
}
- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
+ if (qt_readable(fdset.started())) {
if (!_q_startupNotification())
return false;
}
bool readyReadEmitted = false;
- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread)) {
+ if (qt_readable(fdset.stdout())) {
bool canRead = _q_canReadStandardOutput();
if (processChannel == QProcess::StandardOutput && canRead)
readyReadEmitted = true;
}
- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread)) {
+ if (qt_readable(fdset.stderr())) {
bool canRead = _q_canReadStandardError();
if (processChannel == QProcess::StandardError && canRead)
readyReadEmitted = true;
@@ -1140,13 +1144,13 @@ bool QProcessPrivate::waitForReadyRead(i
if (readyReadEmitted)
return true;
- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
+ if (qt_writable(fdset.stdin()))
_q_canWrite();
- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
+ if (qt_readable(fdset.death())) {
if (_q_processDied())
return false;
- }
+ }
}
return false;
}
@@ -1162,29 +1166,9 @@ bool QProcessPrivate::waitForBytesWritte
stopWatch.start();
while (!writeBuffer.isEmpty()) {
- fd_set fdread;
- fd_set fdwrite;
-
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
-
- int nfds = deathPipe[0];
- FD_SET(deathPipe[0], &fdread);
-
- if (processState == QProcess::Starting)
- add_fd(nfds, childStartedPipe[0], &fdread);
-
- if (stdoutChannel.pipe[0] != -1)
- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
- if (stderrChannel.pipe[0] != -1)
- add_fd(nfds, stderrChannel.pipe[0], &fdread);
-
-
- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
-
+ QProcessFDSet fdset(*this);
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
+ int ret = fdset.poll(timeout);
if (ret < 0) {
break;
}
@@ -1195,24 +1179,24 @@ bool QProcessPrivate::waitForBytesWritte
return false;
}
- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
+ if (qt_readable(fdset.started())) {
if (!_q_startupNotification())
return false;
}
- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
+ if (qt_writable(fdset.stdin()))
return _q_canWrite();
- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))
+ if (qt_readable(fdset.stdout()))
_q_canReadStandardOutput();
- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))
+ if (qt_readable(fdset.stderr()))
_q_canReadStandardError();
- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
- if (_q_processDied())
- return false;
- }
+ if (qt_readable(fdset.death())) {
+ if (_q_processDied())
+ return false;
+ }
}
return false;
@@ -1229,29 +1213,9 @@ bool QProcessPrivate::waitForFinished(in
stopWatch.start();
forever {
- fd_set fdread;
- fd_set fdwrite;
- int nfds = -1;
-
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
-
- if (processState == QProcess::Starting)
- add_fd(nfds, childStartedPipe[0], &fdread);
-
- if (stdoutChannel.pipe[0] != -1)
- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
- if (stderrChannel.pipe[0] != -1)
- add_fd(nfds, stderrChannel.pipe[0], &fdread);
-
- if (processState == QProcess::Running)
- add_fd(nfds, deathPipe[0], &fdread);
-
- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
-
+ QProcessFDSet fdset(*this);
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
+ int ret = fdset.poll(timeout);
if (ret < 0) {
break;
}
@@ -1261,20 +1225,20 @@ bool QProcessPrivate::waitForFinished(in
return false;
}
- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
+ if (qt_readable(fdset.started())) {
if (!_q_startupNotification())
return false;
}
- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
+ if (qt_writable(fdset.stdin()))
_q_canWrite();
- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))
+ if (qt_readable(fdset.stdout()))
_q_canReadStandardOutput();
- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))
+ if (qt_readable(fdset.stderr()))
_q_canReadStandardError();
- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
+ if (qt_readable(fdset.death())) {
if (_q_processDied())
return true;
}
@@ -1284,10 +1248,10 @@ bool QProcessPrivate::waitForFinished(in
bool QProcessPrivate::waitForWrite(int msecs)
{
- fd_set fdwrite;
- FD_ZERO(&fdwrite);
- FD_SET(stdinChannel.pipe[1], &fdwrite);
- return select_msecs(stdinChannel.pipe[1] + 1, 0, &fdwrite, msecs < 0 ? 0 : msecs) == 1;
+ pollfd fd;
+ fd.fd = stdinChannel.pipe[1];
+ fd.events = POLLIN;
+ return qt_safe_poll(&fd, 1, msecs);
}
void QProcessPrivate::findExitCode()
diff -up qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp.poll 2014-03-30 15:36:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp 2014-03-31 18:01:59.369715403 -0500
@@ -99,4 +99,165 @@ int qt_safe_select(int nfds, fd_set *fdr
}
}
+#ifndef Q_OS_VXWORKS
+
+int qt_safe_poll(struct pollfd *fds, int nfds, int timeout_ms, bool retry_eintr)
+{
+ if (nfds == 0)
+ return 0;
+ if (nfds < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ // Retry on ret == 0 if the deadline has not yet passed because
+ // Linux can return early from the syscall, without setting EINTR.
+ if (timeout_ms < 0) {
+ forever {
+ int ret = ::poll(fds, nfds, -1);
+ if (ret > 0)
+ return ret;
+ if (retry_eintr) {
+ if (ret == 0 || ret == -1 && errno == EINTR) {
+ continue;
+ } else {
+ return -1;
+ }
+ }
+ if (ret == 0) {
+ errno = EINTR;
+ return -1;
+ }
+ return ret;
+ }
+ }
+
+ timeval previous = qt_gettime();
+ timeval deadline = previous;
+ deadline.tv_sec += timeout_ms / 1000;
+ deadline.tv_usec += (timeout_ms % 1000) * 1000;
+ if (deadline.tv_usec >= 1000000) {
+ ++deadline.tv_sec;
+ deadline.tv_usec -= 1000000;
+ }
+ int remaining = timeout_ms;
+
+ forever {
+ int ret = ::poll(fds, nfds, remaining);
+ if (ret > 0)
+ return ret;
+ timeval now = qt_gettime();
+ if ((now.tv_sec > deadline.tv_sec // past deadline
+ || (now.tv_sec == deadline.tv_sec
+ && now.tv_usec >= deadline.tv_usec))
+ || (now.tv_sec < previous.tv_sec // time warp
+ || (now.tv_sec == previous.tv_sec
+ && now.tv_usec < previous.tv_usec))
+ || (ret < 0 && (errno != EINTR || !retry_eintr))) // other error
+ return ret;
+ if (ret == 0 && !retry_eintr) {
+ errno = EINTR;
+ return -1;
+ }
+ remaining = (deadline.tv_sec - now.tv_sec) * 1000
+ + (deadline.tv_usec - now.tv_usec) / 1000;
+ previous = now;
+ }
+}
+
+#else
+
+// Poll emulation for VxWorks.
+
+static int mark_bad_descriptors(pollfd *fds, int nfds)
+{
+ fd_set r;
+ FD_ZERO(&r);
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ int ret = 0;
+
+ // Check each descriptor invidually for badness.
+ for (int i = 0; i < nfds; ++i) {
+ pollfd &fd(fds[i]);
+ if (fd.fd >= 0) {
+ FD_SET(fd.fd, &r);
+ int ret = qt_safe_select(fd.fd + 1, &r, NULL, NULL, &tv);
+ FD_CLR(fd.fd, &r);
+ if (ret < 0 && errno == EBADF) {
+ fd.revents = POLLNVAL;
+ ++ret;
+ }
+ }
+ }
+ Q_ASSERT(ret > 0);
+ return ret;
+}
+
+int qt_safe_poll(pollfd *fds, int nfds, int timeout, bool retry_eintr)
+{
+ fd_set r, w;
+ FD_ZERO(&r);
+ FD_ZERO(&w);
+ int maxfd = -1;
+
+ // Extract the watched descriptors.
+ for (int i = 0; i < nfds; ++i) {
+ pollfd &fd(fds[i]);
+ if (fd.fd >= 0 && fd.fd < FD_SETSIZE) {
+ if (fd.events & POLLIN) {
+ FD_SET(fd.fd, &r);
+ if (fd.fd > maxfd)
+ maxfd = fd.fd;
+ }
+ if (fd.events & POLLOUT) {
+ FD_SET(fd.fd, &w);
+ if (fd.fd > maxfd)
+ maxfd = fd.fd;
+ }
+ }
+ }
+
+ // If timeout is negative, wait indefinitely for activity.
+ timeval tv;
+ timeval *ptv;
+ if (timeout >= 0) {
+ tv.tv_sec = timeout / 1000;
+ tv.tv_usec = (timeout % 1000) * 1000;
+ ptv = &tv;
+ } else
+ ptv = NULL;
+
+ int ret;
+ if (retry_eintr)
+ ret = qt_safe_select(maxfd + 1, &r, &w, NULL, ptv);
+ else
+ ret = ::select(maxfd + 1, &r, &w, NULL, ptv);
+ if (ret < 0 && errno == EBADF) {
+ return mark_bad_descriptors(fds, nfds);
+ }
+ if (ret <= 0)
+ return ret;
+
+ // Set the revents flags.
+ ret = 0;
+ for (int i = 0; i < nfds; ++i) {
+ pollfd &fd(fds[i]);
+ fd.revents = 0;
+ if (fd.fd >= 0 && fd.fd < FD_SETSIZE) {
+ if ((fd.events & POLLIN) && FD_ISSET(fd.fd, &r))
+ fd.revents |= POLLIN;
+ if ((fd.events & POLLOUT) && FD_ISSET(fd.fd, &w))
+ fd.revents |= POLLOUT;
+ if (fd.revents)
+ ++ret;
+ }
+ }
+ Q_ASSERT(ret > 0);
+ return ret;
+}
+
+#endif
+
QT_END_NAMESPACE
diff -up qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h.poll qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h
--- qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h.poll 2014-03-30 15:36:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h 2014-03-31 18:01:59.370715392 -0500
@@ -345,9 +345,42 @@ static inline pid_t qt_safe_waitpid(pid_
timeval qt_gettime(); // in qelapsedtimer_mac.cpp or qtimestamp_unix.cpp
+// Deprecated due to FD_SETSIZE limitation, use qt_safe_poll instead.
Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
const struct timeval *tv);
+#ifndef Q_OS_VXWORKS
+#include <poll.h>
+#else
+
+// Poll emulation for VxWorks.
+
+struct pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+
+#define POLLIN 1
+#define POLLOUT 2
+#define POLLERR 4
+#define POLLHUP 8
+#define POLLNVAL 16
+#endif
+
+inline bool qt_readable(const pollfd &fd)
+{
+ return fd.fd >= 0 && (fd.revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL)) != 0;
+}
+
+inline bool qt_writable(const pollfd &fd)
+{
+ return fd.fd >= 0 && (fd.revents & (POLLOUT | POLLHUP | POLLERR | POLLNVAL)) != 0;
+}
+
+Q_CORE_EXPORT int qt_safe_poll(pollfd *fds, int nfds, int timeout,
+ bool retry_eintr = true);
+
// according to X/OPEN we have to define semun ourselves
// we use prefix as on some systems sem.h will have it
struct semid_ds;
diff -up qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp 2014-03-31 18:01:59.370715392 -0500
@@ -208,16 +208,11 @@ void QLocalServerPrivate::_q_onNewConnec
void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
{
- fd_set readfds;
- FD_ZERO(&readfds);
- FD_SET(listenSocket, &readfds);
+ struct pollfd fd;
+ fd.fd = listenSocket;
+ fd.events = POLLIN;
- timeval timeout;
- timeout.tv_sec = msec / 1000;
- timeout.tv_usec = (msec % 1000) * 1000;
-
- int result = -1;
- result = qt_safe_select(listenSocket + 1, &readfds, 0, 0, (msec == -1) ? 0 : &timeout);
+ int result = qt_safe_poll(&fd, 1, msec);
if (-1 == result) {
setError(QLatin1String("QLocalServer::waitForNewConnection"));
closeServer();
diff -up qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp 2014-03-31 18:01:59.370715392 -0500
@@ -56,10 +56,6 @@
#include <qdebug.h>
#include <qelapsedtimer.h>
-#ifdef Q_OS_VXWORKS
-# include <selectLib.h>
-#endif
-
#define QT_CONNECT_TIMEOUT 30000
QT_BEGIN_NAMESPACE
@@ -520,32 +516,17 @@ bool QLocalSocket::waitForConnected(int
if (state() != ConnectingState)
return (state() == ConnectedState);
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(d->connectingSocket, &fds);
-
- timeval timeout;
- timeout.tv_sec = msec / 1000;
- timeout.tv_usec = (msec % 1000) * 1000;
-
- // timeout can not be 0 or else select will return an error.
- if (0 == msec)
- timeout.tv_usec = 1000;
+ pollfd fd;
+ fd.fd = d->connectingSocket;
+ fd.events = POLLIN | POLLOUT;
int result = -1;
// on Linux timeout will be updated by select, but _not_ on other systems.
QElapsedTimer timer;
+ int remaining = msec;
timer.start();
- while (state() == ConnectingState
- && (-1 == msec || timer.elapsed() < msec)) {
-#ifdef Q_OS_SYMBIAN
- // On Symbian, ready-to-write is signaled when non-blocking socket
- // connect is finised. Is ready-to-read really used on other
- // UNIX paltforms when using non-blocking AF_UNIX socket?
- result = ::select(d->connectingSocket + 1, 0, &fds, 0, &timeout);
-#else
- result = ::select(d->connectingSocket + 1, &fds, 0, 0, &timeout);
-#endif
+ while (state() == ConnectingState) {
+ result = qt_safe_poll(&fd, 1, remaining, /* retry_eintr */ false);
if (-1 == result && errno != EINTR) {
d->errorOccurred( QLocalSocket::UnknownSocketError,
QLatin1String("QLocalSocket::waitForConnected"));
@@ -553,6 +534,11 @@ bool QLocalSocket::waitForConnected(int
}
if (result > 0)
d->_q_connectToSocket();
+ if (msec >= 0) {
+ remaining = timer.elapsed() - msec;
+ if (remaining < 0)
+ break;
+ }
}
return (state() == ConnectedState);
diff -up qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp 2014-03-31 18:01:59.371715381 -0500
@@ -1068,48 +1068,40 @@ qint64 QNativeSocketEnginePrivate::nativ
int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) const
{
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(socketDescriptor, &fds);
-
- struct timeval tv;
- tv.tv_sec = timeout / 1000;
- tv.tv_usec = (timeout % 1000) * 1000;
-
- int retval;
- if (selectForRead)
- retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);
- else
- retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);
-
- return retval;
+ struct pollfd fd;
+ fd.fd = socketDescriptor;
+ if (selectForRead) {
+ fd.events = POLLIN;
+ } else {
+ fd.events = POLLOUT;
+ }
+ return qt_safe_poll(&fd, 1, timeout);
}
int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool checkWrite,
bool *selectForRead, bool *selectForWrite) const
{
- fd_set fdread;
- FD_ZERO(&fdread);
+ struct pollfd fd;
+ fd.fd = socketDescriptor;
if (checkRead)
- FD_SET(socketDescriptor, &fdread);
-
- fd_set fdwrite;
- FD_ZERO(&fdwrite);
+ fd.events = POLLIN;
+ else
+ fd.events = 0;
if (checkWrite)
- FD_SET(socketDescriptor, &fdwrite);
-
- struct timeval tv;
- tv.tv_sec = timeout / 1000;
- tv.tv_usec = (timeout % 1000) * 1000;
-
- int ret;
- ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv);
-
+ fd.events |= POLLOUT;
+ int ret = qt_safe_poll(&fd, 1, timeout);
if (ret <= 0)
- return ret;
- *selectForRead = FD_ISSET(socketDescriptor, &fdread);
- *selectForWrite = FD_ISSET(socketDescriptor, &fdwrite);
-
+ return ret;
+ bool r = (fd.revents & (POLLIN | POLLHUP | POLLERR)) != 0;
+ bool w = (fd.revents & (POLLOUT | POLLHUP | POLLERR)) != 0;
+ // Emulate the return value from select(2).
+ ret = 0;
+ if (r)
+ ++ret;
+ if (w)
+ ++ret;
+ *selectForRead = r;
+ *selectForWrite = w;
return ret;
}
diff -up qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp 2014-03-31 18:01:59.371715381 -0500
@@ -68,6 +68,7 @@ static inline int qt_socket_socket(int d
#endif
#include "q3socketdevice.h"
+#include "private/qcore_unix_p.h"
#ifndef QT_NO_NETWORK
@@ -588,19 +589,10 @@ Q_LONG Q3SocketDevice::waitForMore( int
{
if ( !isValid() )
return -1;
- if ( fd >= FD_SETSIZE )
- return -1;
-
- fd_set fds;
- struct timeval tv;
-
- FD_ZERO( &fds );
- FD_SET( fd, &fds );
-
- tv.tv_sec = msecs / 1000;
- tv.tv_usec = (msecs % 1000) * 1000;
- int rv = select( fd+1, &fds, 0, 0, msecs < 0 ? 0 : &tv );
+ pollfd pfd;
+ pfd.fd = fd;
+ int rv = qt_safe_poll(&pfd, 1, msecs, /* retry_eintr */ false);
if ( rv < 0 )
return -1;
diff -up qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp
--- qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp 2014-03-31 18:01:59.372715370 -0500
@@ -981,13 +981,10 @@ bool Q3Process::isRunning() const
// On heavy processing, the socket notifier for the sigchild might not
// have found time to fire yet.
if ( d->procManager && d->procManager->sigchldFd[1] < FD_SETSIZE ) {
- fd_set fds;
- struct timeval tv;
- FD_ZERO( &fds );
- FD_SET( d->procManager->sigchldFd[1], &fds );
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- if ( ::select( d->procManager->sigchldFd[1]+1, &fds, 0, 0, &tv ) > 0 )
+ pollfd fd;
+ fd.fd = d->procManager->sigchldFd[1];
+ fd.events = POLLIN;
+ if ( qt_safe_poll(&fd, 1, 0, /* retry_eintr */ false) > 0 )
d->procManager->sigchldHnd( d->procManager->sigchldFd[1] );
}
@@ -1124,29 +1121,21 @@ void Q3Process::socketRead( int fd )
}
}
- if ( fd < FD_SETSIZE ) {
- fd_set fds;
- struct timeval tv;
- FD_ZERO( &fds );
- FD_SET( fd, &fds );
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- while ( ::select( fd+1, &fds, 0, 0, &tv ) > 0 ) {
- // prepare for the next round
- FD_ZERO( &fds );
- FD_SET( fd, &fds );
- // read data
- ba = new QByteArray( basize );
- n = ::read( fd, ba->data(), basize );
- if ( n > 0 ) {
- ba->resize( n );
- buffer->append( ba );
- ba = 0;
- } else {
- delete ba;
- ba = 0;
- break;
- }
+ pollfd pfd;
+ pfd.fd = fd;
+ pfd.events = POLLIN;
+ while (qt_safe_poll(&pfd, 1, 0)) {
+ // read data
+ ba = new QByteArray( basize );
+ n = ::read( fd, ba->data(), basize );
+ if ( n > 0 ) {
+ ba->resize( n );
+ buffer->append( ba );
+ ba = 0;
+ } else {
+ delete ba;
+ ba = 0;
+ break;
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,41 @@
diff -ur qt-all-opensource-src-4.4.0-rc1/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp qt-all-opensource-src-4.4.0-rc1-as_IN-437440/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
--- qt-all-opensource-src-4.4.0-rc1/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2008-04-02 18:33:48.000000000 +0200
+++ qt-all-opensource-src-4.4.0-rc1-as_IN-437440/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2008-04-08 04:37:45.000000000 +0200
@@ -552,7 +552,7 @@
None, None, None, None,
None, None, None, None,
- None, None, None, None,
+ Below, None, None, None,
None, None, None, None,
None, None, None, None,
None, None, None, None,
@@ -1169,7 +1169,7 @@
HB_Script script = item->item.script;
assert(script >= HB_Script_Devanagari && script <= HB_Script_Sinhala);
const unsigned short script_base = 0x0900 + 0x80*(script-HB_Script_Devanagari);
- const unsigned short ra = script_base + 0x30;
+ unsigned short ra = script_base + 0x30;
const unsigned short halant = script_base + 0x4d;
const unsigned short nukta = script_base + 0x3c;
bool control = false;
@@ -1212,6 +1212,19 @@
HB_UChar16 *uc = reordered;
bool beginsWithRa = false;
+ // Exception in Bengali Script
+ //
+ // Bengali script supports two languages bengali and assamese
+ // Unfortunately for both languages there is different ra defined in same script chart
+ // for Bengali it ra is 'Base+ 0x30' and for assamese 'Base+0x70'
+ // Base is same 0x0980
+ // To handle this exception we need to change ra to from const to normal variable
+ // and aslo need to change ra to 'Base+0x70' whenever we will get assamese language
+ //character in data
+ if((script == HB_Script_Bengali) && (*uc==0x09F0)){
+ ra = script_base + 0x70;
+ }
+
// Rule 1: find base consonant
//
// The shaping engine finds the base consonant of the

View File

@ -1,238 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp.cupsEnumDests qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp
--- qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp.cupsEnumDests 2012-11-23 10:09:53.000000000 +0000
+++ qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp 2013-07-03 15:30:06.232936976 +0100
@@ -50,9 +50,19 @@
QT_BEGIN_NAMESPACE
+typedef int (*CupsEnumDests)(unsigned flags, int msec, int *cancel,
+ cups_ptype_t type, cups_ptype_t mask,
+ cups_dest_cb_t cb, void *user_data);
+typedef http_t * (*CupsConnectDest)(cups_dest_t *dest, unsigned flags,
+ int msec, int *cancel,
+ char *resource, size_t resourcesize,
+ cups_dest_cb_t cb, void *user_data);
+typedef int (*CupsCopyDest)(cups_dest_t *dest, int num_dests,
+ cups_dest_t **dests);
typedef int (*CupsGetDests)(cups_dest_t **dests);
typedef void (*CupsFreeDests)(int num_dests, cups_dest_t *dests);
typedef const char* (*CupsGetPPD)(const char *printer);
+typedef const char* (*CupsGetPPD2)(http_t *http, const char *printer);
typedef int (*CupsMarkOptions)(ppd_file_t *ppd, int num_options, cups_option_t *options);
typedef ppd_file_t* (*PPDOpenFile)(const char *filename);
typedef void (*PPDMarkDefaults)(ppd_file_t *ppd);
@@ -66,12 +76,24 @@ typedef const char* (*CupsLangEncoding)(
typedef int (*CupsAddOption)(const char *name, const char *value, int num_options, cups_option_t **options);
typedef int (*CupsTempFd)(char *name, int len);
typedef int (*CupsPrintFile)(const char * name, const char * filename, const char * title, int num_options, cups_option_t * options);
+typedef int (*CupsPrintFile2)(http_t *http, const char *name, const char *filename, const char *title, int num_options, cups_option_t *options);
+
+typedef struct
+{
+ cups_dest_t *printers;
+ int num_printers;
+} EnumDestsContext;
static bool cupsLoaded = false;
static int qt_cups_num_printers = 0;
+static cups_dest_t *qt_cups_printers = 0;
+static CupsEnumDests _cupsEnumDests = 0;
+static CupsConnectDest _cupsConnectDest = 0;
+static CupsCopyDest _cupsCopyDest = 0;
static CupsGetDests _cupsGetDests = 0;
static CupsFreeDests _cupsFreeDests = 0;
static CupsGetPPD _cupsGetPPD = 0;
+static CupsGetPPD2 _cupsGetPPD2 = 0;
static PPDOpenFile _ppdOpenFile = 0;
static PPDMarkDefaults _ppdMarkDefaults = 0;
static PPDClose _ppdClose = 0;
@@ -84,14 +106,35 @@ static CupsLangEncoding _cupsLangEncodin
static CupsAddOption _cupsAddOption = 0;
static CupsTempFd _cupsTempFd = 0;
static CupsPrintFile _cupsPrintFile = 0;
+static CupsPrintFile2 _cupsPrintFile2 = 0;
+
+static int enum_dest_cb (void *user_data, unsigned flags, cups_dest_t *dest)
+{
+ EnumDestsContext *context = (EnumDestsContext *) user_data;
+
+ if ((flags & (CUPS_DEST_FLAGS_UNCONNECTED |
+ CUPS_DEST_FLAGS_REMOVED |
+ CUPS_DEST_FLAGS_ERROR |
+ CUPS_DEST_FLAGS_RESOLVING |
+ CUPS_DEST_FLAGS_CONNECTING |
+ CUPS_DEST_FLAGS_CANCELED)) == 0)
+ context->num_printers = _cupsCopyDest (dest, context->num_printers,
+ &context->printers);
+
+ return 1;
+}
static void resolveCups()
{
QLibrary cupsLib(QLatin1String("cups"), 2);
if(cupsLib.load()) {
+ _cupsEnumDests = (CupsEnumDests) cupsLib.resolve("cupsEnumDests");
+ _cupsConnectDest = (CupsConnectDest) cupsLib.resolve("cupsConnectDest");
+ _cupsCopyDest = (CupsCopyDest) cupsLib.resolve("cupsCopyDest");
_cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests");
_cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests");
_cupsGetPPD = (CupsGetPPD) cupsLib.resolve("cupsGetPPD");
+ _cupsGetPPD2 = (CupsGetPPD2) cupsLib.resolve("cupsGetPPD2");
_cupsLangGet = (CupsLangGet) cupsLib.resolve("cupsLangGet");
_cupsLangEncoding = (CupsLangEncoding) cupsLib.resolve("cupsLangEncoding");
_ppdOpenFile = (PPDOpenFile) cupsLib.resolve("ppdOpenFile");
@@ -104,14 +147,27 @@ static void resolveCups()
_cupsAddOption = (CupsAddOption) cupsLib.resolve("cupsAddOption");
_cupsTempFd = (CupsTempFd) cupsLib.resolve("cupsTempFd");
_cupsPrintFile = (CupsPrintFile) cupsLib.resolve("cupsPrintFile");
+ _cupsPrintFile2 = (CupsPrintFile2) cupsLib.resolve("cupsPrintFile2");
- if (_cupsGetDests && _cupsFreeDests) {
- cups_dest_t *printers;
+ if (_cupsEnumDests && _cupsCopyDest &&
+ _cupsConnectDest && _cupsGetPPD2 &&
+ _cupsPrintFile2) {
+ EnumDestsContext context;
+ context.printers = 0;
+ context.num_printers = 0;
+ _cupsEnumDests(0, -1, 0, 0, 0,
+ enum_dest_cb, &context);
+
+ qt_cups_printers = context.printers;
+ qt_cups_num_printers = context.num_printers;
+ } else if (_cupsGetDests && _cupsFreeDests) {
+ cups_dest_t *printers;
int num_printers = _cupsGetDests(&printers);
- if (num_printers)
- _cupsFreeDests(num_printers, printers);
- qt_cups_num_printers = num_printers;
- }
+
+ if (num_printers)
+ _cupsFreeDests(num_printers, printers);
+ qt_cups_num_printers = num_printers;
+ }
}
cupsLoaded = true;
}
@@ -134,7 +190,15 @@ QCUPSSupport::QCUPSSupport()
return;
// Update the available printer count
- qt_cups_num_printers = prnCount = _cupsGetDests(&printers);
+ if (qt_cups_printers && _cupsCopyDest) {
+ int i;
+ for (i = 0; i < qt_cups_num_printers; ++i) {
+ prnCount = _cupsCopyDest (&qt_cups_printers[i],
+ prnCount,
+ &printers);
+ }
+ } else
+ qt_cups_num_printers = prnCount = _cupsGetDests(&printers);
for (int i = 0; i < prnCount; ++i) {
if (printers[i].is_default) {
@@ -188,7 +252,19 @@ const ppd_file_t* QCUPSSupport::setCurre
currPPD = 0;
page_sizes = 0;
- const char *ppdFile = _cupsGetPPD(printers[index].name);
+ const char *ppdFile = 0;
+ if (_cupsConnectDest && _cupsGetPPD2) {
+ char resource[HTTP_MAX_URI];
+ http_t *http = _cupsConnectDest (&printers[index], 0, -1, 0,
+ resource, sizeof (resource),
+ 0, 0);
+ if (http) {
+ char *name = strrchr (resource, '/');
+ if (name)
+ ppdFile = _cupsGetPPD2 (http, ++name);
+ }
+ } else
+ ppdFile = _cupsGetPPD(printers[index].name);
if (!ppdFile)
return 0;
@@ -343,7 +419,29 @@ bool QCUPSSupport::printerHasPPD(const c
{
if (!isAvailable())
return false;
- const char *ppdFile = _cupsGetPPD(printerName);
+
+ const char *ppdFile = 0;
+ if (_cupsConnectDest && _cupsGetPPD2) {
+ int i;
+ for (i = 0; i < prnCount; ++i)
+ if (!strcmp (printers[i].name, printerName))
+ break;
+
+ if (i == prnCount)
+ return false;
+
+ char resource[HTTP_MAX_URI];
+ http_t *http = _cupsConnectDest (&printers[i], 0, -1, 0,
+ resource, sizeof (resource),
+ 0, 0);
+ if (http) {
+ char *name = strrchr (resource, '/');
+ if (name)
+ ppdFile = _cupsGetPPD2 (http, ++name);
+ }
+ } else
+ ppdFile = _cupsGetPPD(printerName);
+
if (ppdFile)
unlink(ppdFile);
return (ppdFile != 0);
@@ -394,6 +492,26 @@ QPair<int, QString> QCUPSSupport::tempFd
int QCUPSSupport::printFile(const char * printerName, const char * filename, const char * title,
int num_options, cups_option_t * options)
{
+ if (_cupsConnectDest && _cupsPrintFile2) {
+ int i;
+ for (i = 0; i < prnCount; ++i)
+ if (!strcmp (printers[i].name, printerName))
+ break;
+
+ if (i != prnCount) {
+ char resource[HTTP_MAX_URI];
+ http_t *http = _cupsConnectDest (&printers[i], 0, -1, 0,
+ resource, sizeof (resource),
+ 0, 0);
+ if (http) {
+ char *name = strrchr (resource, '/');
+ if (name)
+ return _cupsPrintFile2 (http, ++name, filename, title,
+ num_options, options);
+ }
+ }
+ }
+
return _cupsPrintFile(printerName, filename, title, num_options, options);
}
diff -up qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h.cupsEnumDests qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h
--- qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h.cupsEnumDests 2012-11-23 10:09:53.000000000 +0000
+++ qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h 2013-07-03 15:27:24.733343017 +0100
@@ -92,7 +92,7 @@ public:
QStringList options() const;
- static bool printerHasPPD(const char *printerName);
+ bool printerHasPPD(const char *printerName);
QString unicodeString(const char *s);
diff -up qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp.cupsEnumDests qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp
--- qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp.cupsEnumDests 2013-07-03 15:27:24.531342277 +0100
+++ qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp 2013-07-03 15:27:24.733343017 +0100
@@ -844,7 +844,7 @@ void QPrinter::setPrinterName(const QStr
if(d->use_default_engine
&& d->outputFormat == QPrinter::NativeFormat) {
if (QCUPSSupport::cupsVersion() >= 10200
- && QCUPSSupport::printerHasPPD(name.toLocal8Bit().constData()))
+ && QCUPSSupport().printerHasPPD(name.toLocal8Bit().constData()))
setOutputFormat(QPrinter::PdfFormat);
else
setOutputFormat(QPrinter::PostScriptFormat);

View File

@ -0,0 +1,21 @@
diff -up qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro.qdoc3 qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro
--- qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro.qdoc3 2009-10-13 10:34:08.000000000 -0500
+++ qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro 2009-10-16 14:55:27.024789581 -0500
@@ -105,3 +105,6 @@ SOURCES += apigenerator.cpp \
webxmlgenerator.cpp \
yyindent.cpp
+TARGET= qdoc3
+target.path = $$[QT_INSTALL_BINS]
+INSTALLS += target
diff -up qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro.qdoc3 qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro
--- qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro.qdoc3 2009-10-13 10:34:08.000000000 -0500
+++ qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro 2009-10-16 14:57:49.699789384 -0500
@@ -14,6 +14,7 @@ no-png {
SUBDIRS += designer
}
SUBDIRS += linguist
+ SUBDIRS += qdoc3
symbian: SUBDIRS = designer
wince*: SUBDIRS = qtestlib designer
unix:!mac:!embedded:contains(QT_CONFIG, qt3support):SUBDIRS += qtconfig

View File

@ -0,0 +1,60 @@
diff -up qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp.gst-pulsaudio qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp
--- qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp.gst-pulsaudio 2009-11-27 02:27:50.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp 2009-12-01 13:36:43.000000000 +0100
@@ -148,7 +148,9 @@ bool AudioOutput::setOutputDevice(int ne
// Save previous state
GstState oldState = GST_STATE(m_audioSink);
const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device");
- const QByteArray deviceId = deviceList.at(deviceIdx).gstId;
+ const QByteArray deviceId = (deviceList.at(deviceIdx).gstId == "PulseAudio"
+ ? "default"
+ : deviceList.at(deviceIdx).gstId);
m_device = newDevice;
// We test if the device can be opened by checking if it can go from NULL to READY state
diff -up qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp.gst-pulsaudio qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp
--- qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp.gst-pulsaudio 2009-11-27 02:27:50.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp 2009-12-01 13:04:18.000000000 +0100
@@ -50,6 +50,8 @@ AudioDevice::AudioDevice(DeviceManager *
//get name from device
if (gstId == "default") {
description = "Default audio device";
+ } else if (gstId == "PulseAudio") {
+ description = QObject::tr("Pass all audio through the PulseAudio Sound Server.\n").toUtf8();
} else {
GstElement *aSink= manager->createAudioSink();
@@ -178,6 +180,18 @@ GstElement *DeviceManager::createAudioSi
}
}
+ if (!sink) {
+ sink = gst_element_factory_make ("pulsesink", NULL);
+ if (canOpenDevice(sink)) {
+ m_backend->logMessage("AudioOutput using pulse audio sink");
+ m_audioSink = "pulsesink";
+ }
+ else if (sink) {
+ gst_object_unref(sink);
+ sink = 0;
+ }
+ }
+
#ifdef USE_ALSASINK2
if (!sink) {
sink = gst_element_factory_make ("_k_alsasink", NULL);
@@ -311,8 +325,12 @@ void DeviceManager::updateDeviceList()
QList<QByteArray> list;
if (audioSink) {
- list = GstHelper::extractProperties(audioSink, "device");
- list.prepend("default");
+ if (m_audioSink == "pulsesink") {
+ list.append("PulseAudio");
+ } else {
+ list = GstHelper::extractProperties(audioSink, "device");
+ list.prepend("default");
+ }
for (int i = 0 ; i < list.size() ; ++i) {
QByteArray gstId = list.at(i);

View File

@ -0,0 +1,267 @@
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y 2010-02-25 17:07:29.114742034 +0100
@@ -416,7 +416,9 @@ valid_rule:
;
rule:
- valid_rule
+ valid_rule {
+ static_cast<CSSParser*>(parser)->m_hadSyntacticallyValidCSSRule = true;
+ }
| invalid_rule
| invalid_at
| invalid_import
@@ -1517,8 +1519,12 @@ invalid_rule:
;
invalid_block:
- '{' error invalid_block_list error closing_brace
- | '{' error closing_brace
+ '{' error invalid_block_list error closing_brace {
+ static_cast<CSSParser*>(parser)->invalidBlockHit();
+ }
+ | '{' error closing_brace {
+ static_cast<CSSParser*>(parser)->invalidBlockHit();
+ }
;
invalid_block_list:
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp 2010-02-25 17:13:34.292803953 +0100
@@ -25,6 +25,7 @@
#include "CachedCSSStyleSheet.h"
#include "DocLoader.h"
#include "Document.h"
+#include "SecurityOrigin.h"
#include "MediaList.h"
#include "Settings.h"
#include <wtf/StdLibExtras.h>
@@ -60,11 +61,21 @@ void CSSImportRule::setCSSStyleSheet(con
m_styleSheet->setParent(0);
m_styleSheet = CSSStyleSheet::create(this, url, charset);
+ bool crossOriginCSS = false;
+ bool validMIMEType = false;
CSSStyleSheet* parent = parentStyleSheet();
bool strict = !parent || parent->useStrictParsing();
- String sheetText = sheet->sheetText(strict);
+ bool enforceMIMEType = strict;
+
+ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
m_styleSheet->parseString(sheetText, strict);
+ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
+ crossOriginCSS = true;
+
+ if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader())
+ m_styleSheet = CSSStyleSheet::create(this, url, charset);
+
if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-25 17:07:29.101741771 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp 2010-02-25 17:07:29.117741744 +0100
@@ -139,6 +139,7 @@ CSSParser::CSSParser(bool strictParsing)
, m_currentShorthand(0)
, m_implicitShorthand(false)
, m_hasFontFaceOnlyValues(false)
+ , m_hadSyntacticallyValidCSSRule(false)
, m_defaultNamespace(starAtom)
, m_data(0)
, yy_start(1)
@@ -5175,6 +5176,12 @@ WebKitCSSKeyframeRule* CSSParser::create
return keyframePtr;
}
+void CSSParser::invalidBlockHit()
+{
+ if (m_styleSheet && !m_hadSyntacticallyValidCSSRule)
+ m_styleSheet->setHasSyntacticallyValidCSSHeader(false);
+}
+
static int cssPropertyID(const UChar* propertyName, unsigned length)
{
if (!length)
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h 2010-02-25 17:07:29.117741744 +0100
@@ -191,6 +191,7 @@ namespace WebCore {
bool addVariableDeclarationBlock(const CSSParserString&);
bool checkForVariables(CSSParserValueList*);
void addUnresolvedProperty(int propId, bool important);
+ void invalidBlockHit();
Vector<CSSSelector*>* reusableSelectorVector() { return &m_reusableSelectorVector; }
@@ -212,6 +213,7 @@ namespace WebCore {
bool m_implicitShorthand;
bool m_hasFontFaceOnlyValues;
+ bool m_hadSyntacticallyValidCSSRule;
Vector<String> m_variableNames;
Vector<RefPtr<CSSValue> > m_variableValues;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp 2010-02-25 17:07:29.118741824 +0100
@@ -41,6 +41,7 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleShe
, m_loadCompleted(false)
, m_strictParsing(!parentSheet || parentSheet->useStrictParsing())
, m_isUserStyleSheet(parentSheet ? parentSheet->isUserStyleSheet() : false)
+ , m_hasSyntacticallyValidCSSHeader(true)
{
}
@@ -52,6 +53,7 @@ CSSStyleSheet::CSSStyleSheet(Node* paren
, m_loadCompleted(false)
, m_strictParsing(false)
, m_isUserStyleSheet(false)
+ , m_hasSyntacticallyValidCSSHeader(true)
{
}
@@ -61,6 +63,7 @@ CSSStyleSheet::CSSStyleSheet(CSSRule* ow
, m_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(!ownerRule || ownerRule->useStrictParsing())
+ , m_hasSyntacticallyValidCSSHeader(true)
{
CSSStyleSheet* parentSheet = ownerRule ? ownerRule->parentStyleSheet() : 0;
m_doc = parentSheet ? parentSheet->doc() : 0;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h 2010-02-25 17:07:29.118741824 +0100
@@ -95,6 +95,8 @@ public:
void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; }
bool isUserStyleSheet() const { return m_isUserStyleSheet; }
+ void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSHeader = b; }
+ bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
private:
CSSStyleSheet(Node* ownerNode, const String& href, const String& charset);
@@ -110,6 +112,7 @@ private:
bool m_loadCompleted : 1;
bool m_strictParsing : 1;
bool m_isUserStyleSheet : 1;
+ bool m_hasSyntacticallyValidCSSHeader : 1;
};
} // namespace
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp 2010-02-25 17:07:29.118741824 +0100
@@ -203,7 +203,10 @@ void ProcessingInstruction::setCSSStyleS
#endif
RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, url, charset);
m_sheet = newSheet;
- parseStyleSheet(sheet->sheetText());
+ // We don't need the cross-origin security check here because we are
+ // getting the sheet text in "strict" mode. This enforces a valid CSS MIME
+ // type.
+ parseStyleSheet(sheet->sheetText(true));
newSheet->setTitle(m_title);
newSheet->setMedia(MediaList::create(newSheet.get(), m_media));
newSheet->setDisabled(m_alternate);
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp 2010-02-25 17:07:29.119741915 +0100
@@ -260,14 +260,27 @@ void HTMLLinkElement::setCSSStyleSheet(c
bool strictParsing = !document()->inCompatMode();
bool enforceMIMEType = strictParsing;
+ bool crossOriginCSS = false;
+ bool validMIMEType = false;
// Check to see if we should enforce the MIME type of the CSS resource in strict mode.
// Running in iWeb 2 is one example of where we don't want to - <rdar://problem/6099748>
if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInStrictMode())
enforceMIMEType = false;
- String sheetText = sheet->sheetText(enforceMIMEType);
+ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
m_sheet->parseString(sheetText, strictParsing);
+ // If we're loading a stylesheet cross-origin, and the MIME type is not
+ // standard, require the CSS to at least start with a syntactically
+ // valid CSS rule.
+ // This prevents an attacker playing games by injecting CSS strings into
+ // HTML, XML, JSON, etc. etc.
+ if (!document()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
+ crossOriginCSS = true;
+
+ if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader())
+ m_sheet = CSSStyleSheet::create(this, url, charset);
+
if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) {
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp 2010-02-25 17:07:29.119741915 +0100
@@ -71,11 +71,11 @@ String CachedCSSStyleSheet::encoding() c
return m_decoder->encoding().name();
}
-const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType) const
+const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType, bool* hasValidMIMEType) const
{
ASSERT(!isPurgeable());
- if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType))
+ if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType, hasValidMIMEType))
return String();
if (!m_decodedSheetText.isNull())
@@ -122,12 +122,12 @@ void CachedCSSStyleSheet::error()
checkNotify();
}
-bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType) const
+bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const
{
if (errorOccurred())
return false;
- if (!enforceMIMEType)
+ if (!enforceMIMEType && !hasValidMIMEType)
return true;
// This check exactly matches Firefox. Note that we grab the Content-Type
@@ -138,7 +138,12 @@ bool CachedCSSStyleSheet::canUseSheet(bo
// This code defaults to allowing the stylesheet for non-HTTP protocols so
// folks can use standards mode for local HTML documents.
String mimeType = extractMIMETypeFromMediaType(response().httpHeaderField("Content-Type"));
- return mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type");
+ bool typeOK = mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type");
+ if (hasValidMIMEType)
+ *hasValidMIMEType = typeOK;
+ if (!enforceMIMEType)
+ return true;
+ return typeOK;
}
}
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h 2010-02-25 17:07:29.120741848 +0100
@@ -40,7 +40,7 @@ namespace WebCore {
CachedCSSStyleSheet(const String& URL, const String& charset);
virtual ~CachedCSSStyleSheet();
- const String sheetText(bool enforceMIMEType = true) const;
+ const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const;
virtual void didAddClient(CachedResourceClient*);
@@ -56,7 +56,7 @@ namespace WebCore {
void checkNotify();
private:
- bool canUseSheet(bool enforceMIMEType) const;
+ bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const;
protected:
RefPtr<TextResourceDecoder> m_decoder;

View File

@ -0,0 +1,782 @@
diff -U0 qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog 2010-05-03 15:55:37.703101680 +0200
@@ -0,0 +1,90 @@
+2010-01-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Stylesheet href property shows redirected URL unlike other browsers
+ https://bugs.webkit.org/show_bug.cgi?id=33683
+
+ Teach StyleSheet the difference between original and final URLs in
+ redirect chains. Unfortunately, StyleSheet needs to know both of these
+ URLs. The original URL is needed for the href property and the final
+ URL is needed as the baseURL.
+
+ This change required touching a lot of lines of code because we need to
+ plumb this information to the StyleSheet object. I audited all
+ existing clients of href() and setHref() to see whether they wanted the
+ original or final URLs. I then updated the clients (except the JS
+ bindings themselves) to use the correct accessor.
+
+ Test: http/tests/security/stylesheet-href-redirect.html
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::setCSSStyleSheet):
+ (WebCore::CSSImportRule::insertedIntoParent):
+ * css/CSSImportRule.h:
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::CSSStyleSheet):
+ * css/CSSStyleSheet.h:
+ (WebCore::CSSStyleSheet::create):
+ (WebCore::CSSStyleSheet::createInline): Added a new constructor to deal
+ with "inline" style sheets that don't have a distinct original and
+ final URL.
+ * css/StyleBase.cpp:
+ (WebCore::StyleBase::baseURL): This code wants to use the final URL,
+ not the original URL. Updated it to grab the baseURL directly.
+ * css/StyleSheet.cpp:
+ (WebCore::StyleSheet::StyleSheet):
+ * css/StyleSheet.h:
+ (WebCore::StyleSheet::href):
+ (WebCore::StyleSheet::setBaseURL): This function really just updates
+ the base URL of the style sheet, so I made it more explicit.
+ (WebCore::StyleSheet::putativeBaseURL): We need an accessor for the
+ base URL, but baseURL is already taken.
+ * dom/Document.cpp:
+ (WebCore::Document::updateBaseURL):
+ (WebCore::Document::pageUserSheet):
+ (WebCore::Document::pageGroupUserSheets):
+ (WebCore::Document::elementSheet):
+ (WebCore::Document::mappedElementSheet):
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::checkStyleSheet):
+ (WebCore::ProcessingInstruction::setCSSStyleSheet):
+ (WebCore::ProcessingInstruction::setXSLStyleSheet):
+ * dom/ProcessingInstruction.h:
+ * dom/StyleElement.cpp:
+ (WebCore::StyleElement::createSheet):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet):
+ * html/HTMLLinkElement.h:
+ * loader/CachedCSSStyleSheet.cpp:
+ (WebCore::CachedCSSStyleSheet::didAddClient):
+ (WebCore::CachedCSSStyleSheet::checkNotify): This code now passes both
+ the original and final URL into setCSSStyleSheet so that the style
+ sheet can have both.
+ * loader/CachedResourceClient.h:
+ (WebCore::CachedResourceClient::setCSSStyleSheet):
+ (WebCore::CachedResourceClient::setXSLStyleSheet):
+ * loader/CachedXSLStyleSheet.cpp:
+ (WebCore::CachedXSLStyleSheet::didAddClient):
+ (WebCore::CachedXSLStyleSheet::checkNotify): I don't have any direct
+ evidence that we need to change the XSLStyleSheet behavior, which is
+ why I wasn't able to add a test for the behavior. However, the objects
+ are parallel enough that it seemed like the right thing to do.
+ * xml/XSLImportRule.cpp:
+ (WebCore::XSLImportRule::setXSLStyleSheet):
+ (WebCore::XSLImportRule::loadSheet):
+ * xml/XSLImportRule.h:
+ * xml/XSLStyleSheet.h:
+ (WebCore::XSLStyleSheet::create):
+ (WebCore::XSLStyleSheet::createEmbedded):
+ * xml/XSLStyleSheetLibxslt.cpp:
+ (WebCore::XSLStyleSheet::XSLStyleSheet):
+ (WebCore::XSLStyleSheet::parseString):
+ (WebCore::XSLStyleSheet::loadChildSheets):
+ * xml/XSLStyleSheetQt.cpp:
+ (WebCore::XSLStyleSheet::XSLStyleSheet):
+ * xml/XSLTProcessorLibxslt.cpp:
+ (WebCore::xsltStylesheetPointer):
+ * xml/XSLTProcessorQt.cpp:
+ (WebCore::XSLTProcessor::transformToString):
+
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.652102626 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp 2010-05-03 16:49:14.631038884 +0200
@@ -55,11 +55,11 @@ CSSImportRule::~CSSImportRule()
m_cachedSheet->removeClient(this);
}
-void CSSImportRule::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
+void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
{
if (m_styleSheet)
m_styleSheet->setParent(0);
- m_styleSheet = CSSStyleSheet::create(this, url, charset);
+ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset);
bool crossOriginCSS = false;
bool validMIMEType = false;
@@ -70,17 +70,17 @@ void CSSImportRule::setCSSStyleSheet(con
String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
m_styleSheet->parseString(sheetText, strict);
- if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
+ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(baseURL))
crossOriginCSS = true;
if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader())
- m_styleSheet = CSSStyleSheet::create(this, url, charset);
+ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset);
if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
- if (url.endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
+ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
ASSERT(m_styleSheet->length() == 1);
ExceptionCode ec;
m_styleSheet->deleteRule(0, ec);
@@ -109,15 +109,16 @@ void CSSImportRule::insertedIntoParent()
return;
String absHref = m_strHref;
- if (!parentSheet->href().isNull())
+ if (!parentSheet->putativeBaseURL().isNull())
// use parent styleheet's URL as the base URL
- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string();
+ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
// Check for a cycle in our import chain. If we encounter a stylesheet
// in our parent chain with the same URL, then just bail.
StyleBase* root = this;
for (StyleBase* curr = parent(); curr; curr = curr->parent()) {
- if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->href())
+ // FIXME: This is wrong if the putativeBaseURL was updated via document::updateBaseURL.
+ if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->putativeBaseURL().string())
return;
root = curr;
}
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h 2010-05-03 15:55:37.740976769 +0200
@@ -63,7 +63,7 @@ private:
virtual unsigned short type() const { return IMPORT_RULE; }
// from CachedResourceClient
- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*);
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
String m_strHref;
RefPtr<MediaList> m_lstMedia;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.660977242 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp 2010-05-03 15:55:37.740976769 +0200
@@ -33,8 +33,8 @@
namespace WebCore {
-CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset)
- : StyleSheet(parentSheet, href)
+CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset)
+ : StyleSheet(parentSheet, href, baseURL)
, m_doc(parentSheet ? parentSheet->doc() : 0)
, m_namespaces(0)
, m_charset(charset)
@@ -45,8 +45,8 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleShe
{
}
-CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const String& charset)
- : StyleSheet(parentNode, href)
+CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, const String& charset)
+ : StyleSheet(parentNode, href, baseURL)
, m_doc(parentNode->document())
, m_namespaces(0)
, m_charset(charset)
@@ -57,8 +57,8 @@ CSSStyleSheet::CSSStyleSheet(Node* paren
{
}
-CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset)
- : StyleSheet(ownerRule, href)
+CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
+ : StyleSheet(ownerRule, href, baseURL)
, m_namespaces(0)
, m_charset(charset)
, m_loadCompleted(false)
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.660977242 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h 2010-05-03 15:55:37.745101706 +0200
@@ -38,27 +38,31 @@ class CSSStyleSheet : public StyleSheet
public:
static PassRefPtr<CSSStyleSheet> create()
{
- return adoptRef(new CSSStyleSheet(static_cast<CSSStyleSheet*>(0), String(), String()));
+ return adoptRef(new CSSStyleSheet(static_cast<CSSStyleSheet*>(0), String(), KURL(), String()));
}
static PassRefPtr<CSSStyleSheet> create(Node* ownerNode)
{
- return adoptRef(new CSSStyleSheet(ownerNode, String(), String()));
+ return adoptRef(new CSSStyleSheet(ownerNode, String(), KURL(), String()));
}
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href)
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL)
{
- return adoptRef(new CSSStyleSheet(ownerNode, href, String()));
+ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, String()));
}
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const String& charset)
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset)
{
- return adoptRef(new CSSStyleSheet(ownerNode, href, charset));
+ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, charset));
}
- static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const String& charset)
+ static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
{
- return adoptRef(new CSSStyleSheet(ownerRule, href, charset));
+ return adoptRef(new CSSStyleSheet(ownerRule, href, baseURL, charset));
+ }
+ static PassRefPtr<CSSStyleSheet> createInline(Node* ownerNode, const KURL& baseURL)
+ {
+ return adoptRef(new CSSStyleSheet(ownerNode, baseURL.string(), baseURL, String()));
}
virtual ~CSSStyleSheet();
-
+
CSSRule* ownerRule() const;
PassRefPtr<CSSRuleList> cssRules(bool omitCharsetRules = false);
unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
@@ -72,7 +76,7 @@ public:
void addNamespace(CSSParser*, const AtomicString& prefix, const AtomicString& uri);
const AtomicString& determineNamespace(const AtomicString& prefix);
-
+
virtual void styleSheetChanged();
virtual bool parseString(const String&, bool strict = true);
@@ -99,10 +103,10 @@ public:
bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
private:
- CSSStyleSheet(Node* ownerNode, const String& href, const String& charset);
- CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset);
- CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset);
-
+ CSSStyleSheet(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset);
+ CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset);
+ CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset);
+
virtual bool isCSSStyleSheet() const { return true; }
virtual String type() const { return "text/css"; }
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp 2010-05-03 15:55:37.757976382 +0200
@@ -56,9 +56,9 @@ KURL StyleBase::baseURL() const
StyleSheet* sheet = const_cast<StyleBase*>(this)->stylesheet();
if (!sheet)
return KURL();
- if (!sheet->href().isNull())
- return KURL(ParsedURLString, sheet->href());
- if (sheet->parent())
+ if (!sheet->putativeBaseURL().isNull())
+ return sheet->putativeBaseURL();
+ if (sheet->parent())
return sheet->parent()->baseURL();
if (!sheet->ownerNode())
return KURL();
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp 2010-05-03 15:55:37.758976847 +0200
@@ -26,27 +26,30 @@
namespace WebCore {
-StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href)
+StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL)
: StyleList(parentSheet)
, m_parentNode(0)
- , m_strHref(href)
+ , m_href(href)
+ , m_baseURL(baseURL)
, m_disabled(false)
{
}
-StyleSheet::StyleSheet(Node* parentNode, const String& href)
+StyleSheet::StyleSheet(Node* parentNode, const String& href, const KURL& baseURL)
: StyleList(0)
, m_parentNode(parentNode)
- , m_strHref(href)
+ , m_href(href)
+ , m_baseURL(baseURL)
, m_disabled(false)
{
}
-StyleSheet::StyleSheet(StyleBase* owner, const String& href)
+StyleSheet::StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL)
: StyleList(owner)
, m_parentNode(0)
- , m_strHref(href)
+ , m_href(href)
+ , m_baseURL(baseURL)
, m_disabled(false)
{
}
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h 2010-05-03 15:55:37.758976847 +0200
@@ -41,8 +41,18 @@ public:
Node* ownerNode() const { return m_parentNode; }
StyleSheet *parentStyleSheet() const;
- const String& href() const { return m_strHref; }
- void setHref(const String& href) { m_strHref = href; }
+
+ // Note that href is the URL that started the redirect chain that led to
+ // this style sheet. This property probably isn't useful for much except
+ // the JavaScript binding (which needs to use this value for security).
+ const String& href() const { return m_href; }
+
+ void setBaseURL(const KURL& baseURL) { m_baseURL = baseURL; }
+
+ // Notice that this object inherits a baseURL function from StyleBase that
+ // crawls the parent() relation looking for a non-0 putativeBaseURL.
+ const KURL& putativeBaseURL() const { return m_baseURL; }
+
const String& title() const { return m_strTitle; }
void setTitle(const String& s) { m_strTitle = s; }
MediaList* media() const { return m_media.get(); }
@@ -58,15 +68,16 @@ public:
virtual bool parseString(const String&, bool strict = true) = 0;
protected:
- StyleSheet(Node* ownerNode, const String& href);
- StyleSheet(StyleSheet* parentSheet, const String& href);
- StyleSheet(StyleBase* owner, const String& href);
+ StyleSheet(Node* ownerNode, const String& href, const KURL& baseURL);
+ StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL);
+ StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL);
private:
virtual bool isStyleSheet() const { return true; }
Node* m_parentNode;
- String m_strHref;
+ String m_href;
+ KURL m_baseURL;
String m_strTitle;
RefPtr<MediaList> m_media;
bool m_disabled;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp 2010-05-03 15:55:37.760977901 +0200
@@ -1920,9 +1920,9 @@ void Document::updateBaseURL()
m_baseURL = KURL();
if (m_elemSheet)
- m_elemSheet->setHref(m_baseURL.string());
+ m_elemSheet->setBaseURL(m_baseURL);
if (m_mappedElementSheet)
- m_mappedElementSheet->setHref(m_baseURL.string());
+ m_mappedElementSheet->setBaseURL(m_baseURL);
}
String Document::userAgent(const KURL& url) const
@@ -1944,7 +1944,7 @@ CSSStyleSheet* Document::pageUserSheet()
return 0;
// Parse the sheet and cache it.
- m_pageUserSheet = CSSStyleSheet::create(this, settings()->userStyleSheetLocation());
+ m_pageUserSheet = CSSStyleSheet::createInline(this, settings()->userStyleSheetLocation());
m_pageUserSheet->setIsUserStyleSheet(true);
m_pageUserSheet->parseString(userSheetText, !inCompatMode());
return m_pageUserSheet.get();
@@ -1979,7 +1979,7 @@ const Vector<RefPtr<CSSStyleSheet> >* Do
const UserStyleSheet* sheet = sheets->at(i).get();
if (!UserContentURLPattern::matchesPatterns(url(), sheet->whitelist(), sheet->blacklist()))
continue;
- RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(const_cast<Document*>(this), sheet->url());
+ RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::createInline(const_cast<Document*>(this), sheet->url());
parsedSheet->setIsUserStyleSheet(true);
parsedSheet->parseString(sheet->source(), !inCompatMode());
if (!m_pageGroupUserSheets)
@@ -2001,14 +2001,14 @@ void Document::clearPageGroupUserSheets(
CSSStyleSheet* Document::elementSheet()
{
if (!m_elemSheet)
- m_elemSheet = CSSStyleSheet::create(this, m_baseURL.string());
+ m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL);
return m_elemSheet.get();
}
CSSStyleSheet* Document::mappedElementSheet()
{
if (!m_mappedElementSheet)
- m_mappedElementSheet = CSSStyleSheet::create(this, m_baseURL.string());
+ m_mappedElementSheet = CSSStyleSheet::createInline(this, m_baseURL);
return m_mappedElementSheet.get();
}
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp 2010-05-03 15:55:37.761977599 +0200
@@ -138,7 +138,8 @@ void ProcessingInstruction::checkStyleSh
// We need to make a synthetic XSLStyleSheet that is embedded. It needs to be able
// to kick off import/include loads that can hang off some parent sheet.
if (m_isXSL) {
- m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref);
+ KURL baseURL = KURL(ParsedURLString, m_localHref);
+ m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref, baseURL);
m_loading = false;
}
#endif
@@ -196,12 +197,12 @@ bool ProcessingInstruction::sheetLoaded(
return false;
}
-void ProcessingInstruction::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
+void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
{
#if ENABLE(XSLT)
ASSERT(!m_isXSL);
#endif
- RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, url, charset);
+ RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, href, baseURL, charset);
m_sheet = newSheet;
// We don't need the cross-origin security check here because we are
// getting the sheet text in "strict" mode. This enforces a valid CSS MIME
@@ -213,10 +214,10 @@ void ProcessingInstruction::setCSSStyleS
}
#if ENABLE(XSLT)
-void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sheet)
+void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
{
ASSERT(m_isXSL);
- m_sheet = XSLStyleSheet::create(this, url);
+ m_sheet = XSLStyleSheet::create(this, href, baseURL);
parseStyleSheet(sheet);
}
#endif
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h 2010-05-03 15:55:37.761977599 +0200
@@ -68,9 +68,9 @@ private:
virtual void removedFromDocument();
void checkStyleSheet();
- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*);
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
#if ENABLE(XSLT)
- virtual void setXSLStyleSheet(const String& url, const String& sheet);
+ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
#endif
bool isLoading() const;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp 2010-05-03 15:55:37.762976937 +0200
@@ -103,7 +103,7 @@ void StyleElement::createSheet(Element*
if (screenEval.eval(mediaList.get()) || printEval.eval(mediaList.get())) {
document->addPendingSheet();
setLoading(true);
- m_sheet = CSSStyleSheet::create(e, String(), document->inputEncoding());
+ m_sheet = CSSStyleSheet::create(e, String(), KURL(), document->inputEncoding());
m_sheet->parseString(text, !document->inCompatMode());
m_sheet->setMedia(mediaList.get());
m_sheet->setTitle(e->title());
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp 2010-05-03 17:02:45.528101154 +0200
@@ -253,9 +253,9 @@ void HTMLLinkElement::finishParsingChild
HTMLElement::finishParsingChildren();
}
-void HTMLLinkElement::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
+void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
{
- m_sheet = CSSStyleSheet::create(this, url, charset);
+ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
bool strictParsing = !document()->inCompatMode();
bool enforceMIMEType = strictParsing;
@@ -275,11 +275,11 @@ void HTMLLinkElement::setCSSStyleSheet(c
// valid CSS rule.
// This prevents an attacker playing games by injecting CSS strings into
// HTML, XML, JSON, etc. etc.
- if (!document()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
+ if (!document()->securityOrigin()->canRequest(baseURL))
crossOriginCSS = true;
if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader())
- m_sheet = CSSStyleSheet::create(this, url, charset);
+ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) {
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
@@ -287,7 +287,7 @@ void HTMLLinkElement::setCSSStyleSheet(c
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
// There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet,
// while the other lacks the second trailing newline.
- if (url.endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
+ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
&& sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1) {
ASSERT(m_sheet->length() == 1);
ExceptionCode ec;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h 2010-05-03 15:55:37.773083096 +0200
@@ -79,7 +79,7 @@ public:
virtual void removedFromDocument();
// from CachedResourceClient
- virtual void setCSSStyleSheet(const String &url, const String& charset, const CachedCSSStyleSheet* sheet);
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
bool isLoading() const;
virtual bool sheetLoaded();
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp 2010-05-03 15:55:37.774976529 +0200
@@ -52,9 +52,9 @@ CachedCSSStyleSheet::~CachedCSSStyleShee
void CachedCSSStyleSheet::didAddClient(CachedResourceClient *c)
{
if (!m_loading)
- c->setCSSStyleSheet(m_url, m_decoder->encoding().name(), this);
+ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this);
}
-
+
void CachedCSSStyleSheet::allClientsRemoved()
{
if (isSafeToMakePurgeable())
@@ -112,7 +112,7 @@ void CachedCSSStyleSheet::checkNotify()
CachedResourceClientWalker w(m_clients);
while (CachedResourceClient *c = w.next())
- c->setCSSStyleSheet(m_response.url().string(), m_decoder->encoding().name(), this);
+ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this);
}
void CachedCSSStyleSheet::error()
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h 2010-05-03 15:55:37.775976911 +0200
@@ -42,6 +42,7 @@ namespace WebCore {
class String;
class Image;
class IntRect;
+ class KURL;
/**
* @internal
@@ -65,8 +66,8 @@ namespace WebCore {
// e.g., in the b/f cache or in a background tab).
virtual bool willRenderImage(CachedImage*) { return false; }
- virtual void setCSSStyleSheet(const String& /*URL*/, const String& /*charset*/, const CachedCSSStyleSheet*) { }
- virtual void setXSLStyleSheet(const String& /*URL*/, const String& /*sheet*/) { }
+ virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* charset */, const CachedCSSStyleSheet*) { }
+ virtual void setXSLStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* sheet */) { }
virtual void fontLoaded(CachedFont*) {};
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp 2010-05-03 15:55:37.789038977 +0200
@@ -48,7 +48,7 @@ CachedXSLStyleSheet::CachedXSLStyleSheet
void CachedXSLStyleSheet::didAddClient(CachedResourceClient* c)
{
if (!m_loading)
- c->setXSLStyleSheet(m_url, m_sheet);
+ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet);
}
void CachedXSLStyleSheet::setEncoding(const String& chs)
@@ -83,10 +83,9 @@ void CachedXSLStyleSheet::checkNotify()
CachedResourceClientWalker w(m_clients);
while (CachedResourceClient *c = w.next())
- c->setXSLStyleSheet(m_url, m_sheet);
+ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet);
}
-
void CachedXSLStyleSheet::error()
{
m_loading = false;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp 2010-05-03 15:55:37.789038977 +0200
@@ -52,13 +52,13 @@ XSLStyleSheet* XSLImportRule::parentStyl
return (parent() && parent()->isXSLStyleSheet()) ? static_cast<XSLStyleSheet*>(parent()) : 0;
}
-void XSLImportRule::setXSLStyleSheet(const String& url, const String& sheet)
+void XSLImportRule::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
{
if (m_styleSheet)
m_styleSheet->setParent(0);
-
- m_styleSheet = XSLStyleSheet::create(this, url);
-
+
+ m_styleSheet = XSLStyleSheet::create(this, href, baseURL);
+
XSLStyleSheet* parent = parentStyleSheet();
if (parent)
m_styleSheet->setParentStyleSheet(parent);
@@ -87,14 +87,14 @@ void XSLImportRule::loadSheet()
String absHref = m_strHref;
XSLStyleSheet* parentSheet = parentStyleSheet();
- if (!parentSheet->href().isNull())
+ if (!parentSheet->putativeBaseURL().isNull())
// use parent styleheet's URL as the base URL
- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string();
+ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
// Check for a cycle in our import chain. If we encounter a stylesheet
// in our parent chain with the same URL, then just bail.
for (parent = this->parent(); parent; parent = parent->parent()) {
- if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->href())
+ if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->putativeBaseURL().string())
return;
}
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h 2010-05-03 15:55:37.789981560 +0200
@@ -57,7 +57,7 @@ private:
virtual bool isImportRule() { return true; }
// from CachedResourceClient
- virtual void setXSLStyleSheet(const String& url, const String& sheet);
+ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
String m_strHref;
RefPtr<XSLStyleSheet> m_styleSheet;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h 2010-05-03 15:55:37.827976887 +0200
@@ -43,18 +43,18 @@ class XSLImportRule;
class XSLStyleSheet : public StyleSheet {
public:
#if !USE(QXMLQUERY)
- static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href)
+ static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href, const KURL& baseURL)
{
- return adoptRef(new XSLStyleSheet(parentImport, href));
+ return adoptRef(new XSLStyleSheet(parentImport, href, baseURL));
}
#endif
- static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href)
+ static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href, const KURL& baseURL)
{
- return adoptRef(new XSLStyleSheet(parentNode, href, false));
+ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, false));
}
- static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href)
+ static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href, const KURL& baseURL)
{
- return adoptRef(new XSLStyleSheet(parentNode, href, true));
+ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, true));
}
virtual ~XSLStyleSheet();
@@ -90,9 +90,9 @@ public:
bool processed() const { return m_processed; }
private:
- XSLStyleSheet(Node* parentNode, const String& href, bool embedded);
+ XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded);
#if !USE(QXMLQUERY)
- XSLStyleSheet(XSLImportRule* parentImport, const String& href);
+ XSLStyleSheet(XSLImportRule* parentImport, const String& href, const KURL& baseURL);
#endif
Document* m_ownerDocument;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp 2010-05-03 15:55:37.837079694 +0200
@@ -55,8 +55,8 @@ SOFT_LINK(libxslt, xsltLoadStylesheetPI,
namespace WebCore {
-XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href)
- : StyleSheet(parentRule, href)
+XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, const KURL& baseURL)
+ : StyleSheet(parentRule, href, baseURL)
, m_ownerDocument(0)
, m_embedded(false)
, m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them.
@@ -66,8 +66,8 @@ XSLStyleSheet::XSLStyleSheet(XSLImportRu
{
}
-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded)
- : StyleSheet(parentNode, href)
+XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded)
+ : StyleSheet(parentNode, href, baseURL)
, m_ownerDocument(parentNode->document())
, m_embedded(embedded)
, m_processed(true) // The root sheet starts off processed.
@@ -168,7 +168,7 @@ bool XSLStyleSheet::parseString(const St
}
m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size,
- href().utf8().data(),
+ putativeBaseURL().string().utf8().data(),
BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE",
XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
xmlFreeParserCtxt(ctxt);
@@ -192,7 +192,7 @@ void XSLStyleSheet::loadChildSheets()
if (m_embedded) {
// We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the
// import/include list.
- xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data()));
+ xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(putativeBaseURL().string().utf8().data()));
if (!idNode)
return;
stylesheetRoot = idNode->parent;
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp 2010-05-03 15:55:37.837977083 +0200
@@ -33,8 +33,8 @@
namespace WebCore {
-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded)
- : StyleSheet(parentNode, href)
+XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded)
+ : StyleSheet(parentNode, href, baseURL)
, m_ownerDocument(parentNode->document())
, m_embedded(embedded)
{
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp 2010-05-03 15:55:37.837977083 +0200
@@ -226,7 +226,8 @@ static xsltStylesheetPtr xsltStylesheetP
{
if (!cachedStylesheet && stylesheetRootNode) {
cachedStylesheet = XSLStyleSheet::create(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode,
- stylesheetRootNode->document()->url().string());
+ stylesheetRootNode->document()->url().string(),
+ stylesheetRootNode->document()->url()); // FIXME: Should we use baseURL here?
cachedStylesheet->parseString(createMarkup(stylesheetRootNode));
}
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp 2010-05-03 15:55:37.915979873 +0200
@@ -120,7 +120,9 @@ bool XSLTProcessor::transformToString(No
RefPtr<XSLStyleSheet> stylesheet = m_stylesheet;
if (!stylesheet && m_stylesheetRootNode) {
Node* node = m_stylesheetRootNode.get();
- stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node, node->document()->url().string());
+ stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node,
+ node->document()->url().string(),
+ node->document()->url()); // FIXME: Should we use baseURL here?
stylesheet->parseString(createMarkup(node));
}

View File

@ -0,0 +1,25 @@
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp.me qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp.me 2010-05-06 11:29:24.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp 2010-05-06 11:43:29.000000000 +0200
@@ -112,7 +112,11 @@ SecurityOrigin::SecurityOrigin(const KUR
// By default, only local SecurityOrigins can load local resources.
m_canLoadLocalResources = isLocal();
-
+ if (m_canLoadLocalResources) {
+ // Directories should never be readable.
+ if (!url.hasPath() || url.path().endsWith("/"))
+ m_noAccess = true;
+ }
if (isDefaultPortForProtocol(m_port, m_protocol))
m_port = 0;
}
@@ -207,6 +211,8 @@ bool SecurityOrigin::canRequest(const KU
return false;
RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url);
+ if (targetOrigin->m_noAccess)
+ return false;
// We call isSameSchemeHostPort here instead of canAccess because we want
// to ignore document.domain effects.

View File

@ -0,0 +1,48 @@
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.than qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.than 2010-02-11 16:55:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2010-03-23 14:29:41.000000000 +0100
@@ -345,6 +345,11 @@
#define WTF_PLATFORM_BIG_ENDIAN 1
#endif
+/* PLATFORM(S390X) */
+#if defined(__s390x__) || defined(__s390x)
+#define WTF_PLATFORM_S390X 1
+#endif
+
/* PLATFORM(IA64) */
/* a.k.a. Itanium Processor Family, IPF */
#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
@@ -730,6 +735,8 @@
/* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg
on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WTF_USE_JSVALUE32 1
+#elif PLATFORM(S390X)
+#define WTF_USE_JSVALUE64 1
#else
#define WTF_USE_JSVALUE32_64 1
#endif
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.than qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.than 2010-02-11 16:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 14:19:00.000000000 +0100
@@ -362,6 +362,11 @@
#define WTF_PLATFORM_IA64 1
#endif
+/* PLATFORM(S390X) */
+#if defined(__s390x__) || defined(__s390x)
+#define WTF_PLATFORM_S390X 1
+#endif
+
/* PLATFORM(ALPHA) */
#if defined(__alpha__)
#define WTF_PLATFORM_ALPHA 1
@@ -729,7 +734,7 @@
#endif
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
-#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA)
+#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA) || PLATFORM(S390X)
#define WTF_USE_JSVALUE64 1
#elif PLATFORM(ARM) || PLATFORM(PPC64)
#define WTF_USE_JSVALUE32 1

View File

@ -0,0 +1,16 @@
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.sparc qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.sparc 2010-03-23 10:45:57.076490991 -0400
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 10:47:37.044618125 -0400
@@ -734,7 +734,11 @@
#endif
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
-#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA) || PLATFORM(S390X)
+#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) \
+ || PLATFORM(IA64) \
+ || PLATFORM(ALPHA) \
+ || PLATFORM(SPARC64) \
+ || PLATFORM(S390X)
#define WTF_USE_JSVALUE64 1
#elif PLATFORM(ARM) || PLATFORM(PPC64)
#define WTF_USE_JSVALUE32 1

View File

@ -0,0 +1,15 @@
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp.CVE-2010-1119 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp.CVE-2010-1119 2010-06-02 04:03:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp 2010-06-15 13:11:55.974470742 +0200
@@ -910,7 +910,10 @@ void Node::notifyLocalNodeListsAttribute
if (!data->nodeLists())
return;
- data->nodeLists()->invalidateCachesThatDependOnAttributes();
+ if (!isAttributeNode())
+ data->nodeLists()->invalidateCachesThatDependOnAttributes();
+ else
+ data->nodeLists()->invalidateCaches();
if (data->nodeLists()->isEmpty()) {
data->clearNodeLists();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1392/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1392/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp 2010-06-10 20:24:02.864193022 +0200
@@ -4484,7 +4484,7 @@
// Drill into inlines looking for our first text child.
RenderObject* currChild = firstLetterBlock->firstChild();
- while (currChild && currChild->needsLayout() && (!currChild->isReplaced() || currChild->isFloatingOrPositioned()) && !currChild->isText()) {
+ while (currChild && currChild->needsLayout() && ((!currChild->isReplaced() && !currChild->isRenderButton() && !currChild->isMenuList()) || currChild->isFloatingOrPositioned()) && !currChild->isText()) {
if (currChild->isFloatingOrPositioned()) {
if (currChild->style()->styleType() == FIRST_LETTER)
break;

View File

@ -0,0 +1,56 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1396/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp 2010-06-02 04:03:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1396/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp 2010-06-10 20:34:00.316318866 +0200
@@ -395,33 +395,43 @@
document()->removeFocusedNodeOfSubtree(this, true);
forbidEventDispatch();
- int childCountDelta = 0;
+ Vector<RefPtr<Node> > removedChildren;
while (RefPtr<Node> n = m_firstChild) {
- childCountDelta--;
-
Node* next = n->nextSibling();
- // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744)
+ // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744).
+ // removeChild() does this after calling detach(). There is no explanation for
+ // this discrepancy between removeChild() and its optimized version removeChildren().
n->setPreviousSibling(0);
n->setNextSibling(0);
n->setParent(0);
-
+
m_firstChild = next;
if (n == m_lastChild)
m_lastChild = 0;
if (n->attached())
n->detach();
-
- if (n->inDocument())
- n->removedFromDocument();
+
+ removedChildren.append(n.release());
}
allowEventDispatch();
+ size_t removedChildrenCount = removedChildren.size();
+
// Dispatch a single post-removal mutation event denoting a modified subtree.
- childrenChanged(false, 0, 0, childCountDelta);
+ childrenChanged(false, 0, 0, -static_cast<int>(removedChildrenCount));
dispatchSubtreeModifiedEvent();
+ for (size_t i = 0; i < removedChildrenCount; ++i) {
+ Node* removedChild = removedChildren[i].get();
+ if (removedChild->inDocument())
+ removedChild->removedFromDocument();
+ // removeChild() calls removedFromTree(true) if the child was not in the
+ // document. There is no explanation for this discrepancy between removeChild()
+ // and its optimized version removeChildren().
+ }
+
return true;
}

View File

@ -0,0 +1,53 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.cpp 2010-06-10 20:41:45.295318418 +0200
@@ -552,12 +552,6 @@
toRenderTextControl(renderer)->selectionChanged(userTriggered);
}
-void Frame::invalidateSelection()
-{
- selection()->setNeedsLayout();
- selectionLayoutChanged();
-}
-
void Frame::setCaretVisible(bool flag)
{
if (m_caretVisible == flag)
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.h qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.h
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.h 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.h 2010-06-10 20:41:45.291318453 +0200
@@ -259,8 +259,6 @@
void selectionLayoutChanged();
void notifyRendererOfSelectionChange(bool userTriggered);
- void invalidateSelection();
-
void setCaretVisible(bool = true);
void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/FrameView.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-10 20:41:45.293318191 +0200
@@ -642,7 +642,8 @@
root->view()->popLayoutState();
m_layoutRoot = 0;
- m_frame->invalidateSelection();
+ m_frame->selection()->setNeedsLayout();
+ m_frame->selectionLayoutChanged();
m_layoutSchedulingEnabled = true;
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-10 20:41:45.297318506 +0200
@@ -1170,7 +1170,7 @@
// The caret rect needs to be invalidated after scrolling
Frame* frame = renderer()->document()->frame();
if (frame)
- frame->invalidateSelection();
+ frame->selection()->setNeedsLayout();
// Just schedule a full repaint of our object.
if (repaint)

View File

@ -0,0 +1,244 @@
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp.CVE-2010-1398 2010-06-02 04:03:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp 2010-06-11 16:12:55.750525354 +0200
@@ -35,6 +35,7 @@
#include "ClientRect.h"
#include "ClientRectList.h"
#include "Document.h"
+#include "DocumentFragment.h"
#include "ElementRareData.h"
#include "ExceptionCode.h"
#include "FocusController.h"
@@ -42,6 +43,7 @@
#include "FrameView.h"
#include "HTMLElement.h"
#include "HTMLNames.h"
+#include "HTMLTokenizer.h"
#include "NamedNodeMap.h"
#include "NodeList.h"
#include "NodeRenderStyle.h"
@@ -49,6 +51,7 @@
#include "RenderView.h"
#include "TextIterator.h"
#include "XMLNames.h"
+#include "XMLTokenizer.h"
#if ENABLE(SVG)
#include "SVGNames.h"
@@ -91,6 +94,51 @@ NodeRareData* Element::createRareData()
{
return new ElementRareData;
}
+
+PassRefPtr<DocumentFragment> Element::createContextualFragment(const String& markup)
+{
+ RefPtr<DocumentFragment> fragment = DocumentFragment::create(document());
+
+ if (document()->isHTMLDocument())
+ parseHTMLDocumentFragment(markup, fragment.get());
+ else {
+ if (!parseXMLDocumentFragment(markup, fragment.get(), this))
+ // FIXME: We should propagate a syntax error exception out here.
+ return 0;
+ }
+
+ // Exceptions are ignored because none ought to happen here.
+ ExceptionCode ignoredExceptionCode;
+
+ // We need to pop <html> and <body> elements and remove <head> to
+ // accommodate folks passing complete HTML documents to make the
+ // child of an element.
+
+ RefPtr<Node> nextNode;
+ for (RefPtr<Node> node = fragment->firstChild(); node; node = nextNode) {
+ nextNode = node->nextSibling();
+ if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) {
+ Node* firstChild = node->firstChild();
+ if (firstChild)
+ nextNode = firstChild;
+ RefPtr<Node> nextChild;
+ for (RefPtr<Node> child = firstChild; child; child = nextChild) {
+ nextChild = child->nextSibling();
+ node->removeChild(child.get(), ignoredExceptionCode);
+ ASSERT(!ignoredExceptionCode);
+ fragment->insertBefore(child, node.get(), ignoredExceptionCode);
+ ASSERT(!ignoredExceptionCode);
+ }
+ fragment->removeChild(node.get(), ignoredExceptionCode);
+ ASSERT(!ignoredExceptionCode);
+ } else if (node->hasTagName(headTag)) {
+ fragment->removeChild(node.get(), ignoredExceptionCode);
+ ASSERT(!ignoredExceptionCode);
+ }
+ }
+
+ return fragment.release();
+}
PassRefPtr<Node> Element::cloneNode(bool deep)
{
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h.CVE-2010-1398 2010-06-02 04:03:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h 2010-06-14 16:54:57.639394749 +0200
@@ -28,6 +28,7 @@
#include "ContainerNode.h"
#include "QualifiedName.h"
#include "ScrollTypes.h"
+#include "DocumentFragment.h"
namespace WebCore {
@@ -89,6 +90,8 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(search);
DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart);
+ virtual PassRefPtr<DocumentFragment> createContextualFragment(const String&);
+
const AtomicString& getIDAttribute() const;
bool hasAttribute(const QualifiedName&) const;
const AtomicString& getAttribute(const QualifiedName&) const;
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp.CVE-2010-1398 2010-06-02 04:03:10.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp 2010-06-11 16:12:55.752525451 +0200
@@ -1054,11 +1054,7 @@ String createMarkup(const Range* range,
PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document* document, const String& markup, const String& baseURL)
{
- ASSERT(document->documentElement()->isHTMLElement());
- // FIXME: What if the document element is not an HTML element?
- HTMLElement *element = static_cast<HTMLElement*>(document->documentElement());
-
- RefPtr<DocumentFragment> fragment = element->createContextualFragment(markup);
+ RefPtr<DocumentFragment> fragment = document->documentElement()->createContextualFragment(markup);
if (fragment && !baseURL.isEmpty() && baseURL != blankURL() && baseURL != document->baseURL())
completeURLs(fragment.get(), baseURL);
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp.CVE-2010-1398 2010-06-02 04:03:10.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp 2010-06-11 16:12:55.753537613 +0200
@@ -235,9 +235,9 @@ String HTMLElement::outerHTML() const
return createMarkup(this);
}
-PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String &html)
+PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String &markup)
{
- // the following is in accordance with the definition as used by IE
+ // The following is in accordance with the definition as used by IE.
if (endTagRequirement() == TagStatusForbidden)
return 0;
@@ -245,47 +245,7 @@ PassRefPtr<DocumentFragment> HTMLElement
hasLocalName(headTag) || hasLocalName(styleTag) || hasLocalName(titleTag))
return 0;
- RefPtr<DocumentFragment> fragment = DocumentFragment::create(document());
-
- if (document()->isHTMLDocument())
- parseHTMLDocumentFragment(html, fragment.get());
- else {
- if (!parseXMLDocumentFragment(html, fragment.get(), this))
- // FIXME: We should propagate a syntax error exception out here.
- return 0;
- }
-
- // Exceptions are ignored because none ought to happen here.
- int ignoredExceptionCode;
-
- // we need to pop <html> and <body> elements and remove <head> to
- // accommodate folks passing complete HTML documents to make the
- // child of an element.
-
- RefPtr<Node> nextNode;
- for (RefPtr<Node> node = fragment->firstChild(); node; node = nextNode) {
- nextNode = node->nextSibling();
- if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) {
- Node *firstChild = node->firstChild();
- if (firstChild)
- nextNode = firstChild;
- RefPtr<Node> nextChild;
- for (RefPtr<Node> child = firstChild; child; child = nextChild) {
- nextChild = child->nextSibling();
- node->removeChild(child.get(), ignoredExceptionCode);
- ASSERT(!ignoredExceptionCode);
- fragment->insertBefore(child, node.get(), ignoredExceptionCode);
- ASSERT(!ignoredExceptionCode);
- }
- fragment->removeChild(node.get(), ignoredExceptionCode);
- ASSERT(!ignoredExceptionCode);
- } else if (node->hasTagName(headTag)) {
- fragment->removeChild(node.get(), ignoredExceptionCode);
- ASSERT(!ignoredExceptionCode);
- }
- }
-
- return fragment.release();
+ return Element::createContextualFragment(markup);
}
static inline bool hasOneChild(ContainerNode* node)
@@ -371,7 +331,7 @@ void HTMLElement::setOuterHTML(const Str
void HTMLElement::setInnerText(const String& text, ExceptionCode& ec)
{
- // follow the IE specs about when this is allowed
+ // Follow the IE specs about when this is allowed.
if (endTagRequirement() == TagStatusForbidden) {
ec = NO_MODIFICATION_ALLOWED_ERR;
return;
@@ -441,7 +401,7 @@ void HTMLElement::setInnerText(const Str
void HTMLElement::setOuterText(const String &text, ExceptionCode& ec)
{
- // follow the IE specs about when this is allowed
+ // Follow the IE specs about when this is allowed.
if (endTagRequirement() == TagStatusForbidden) {
ec = NO_MODIFICATION_ALLOWED_ERR;
return;
@@ -469,7 +429,7 @@ void HTMLElement::setOuterText(const Str
if (ec)
return;
- // is previous node a text node? if so, merge into it
+ // Is previous node a text node? If so, merge into it.
Node* prev = t->previousSibling();
if (prev && prev->isTextNode()) {
Text* textPrev = static_cast<Text*>(prev);
@@ -482,7 +442,7 @@ void HTMLElement::setOuterText(const Str
t = textPrev;
}
- // is next node a text node? if so, merge it in
+ // Is next node a text node? If so, merge it in.
Node* next = t->nextSibling();
if (next && next->isTextNode()) {
Text* textNext = static_cast<Text*>(next);
@@ -522,7 +482,7 @@ Node* HTMLElement::insertAdjacent(const
return 0;
}
- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative
+ // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
ec = NOT_SUPPORTED_ERR;
return 0;
}
@@ -530,7 +490,7 @@ Node* HTMLElement::insertAdjacent(const
Element* HTMLElement::insertAdjacentElement(const String& where, Element* newChild, ExceptionCode& ec)
{
if (!newChild) {
- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative
+ // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
ec = TYPE_MISMATCH_ERR;
return 0;
}
@@ -567,8 +527,8 @@ void HTMLElement::addHTMLAlignment(Mappe
void HTMLElement::addHTMLAlignmentToStyledElement(StyledElement* element, MappedAttribute* attr)
{
- // vertical alignment with respect to the current baseline of the text
- // right or left means floating images
+ // Vertical alignment with respect to the current baseline of the text
+ // right or left means floating images.
int floatValue = CSSValueInvalid;
int verticalAlignValue = CSSValueInvalid;

View File

@ -0,0 +1,32 @@
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp 2010-06-15 13:55:36.853463455 +0200
@@ -1611,7 +1611,7 @@ void RenderObject::styleWillChange(Style
}
}
-void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*)
+void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
if (s_affectsParentBlock)
handleDynamicFloatPositionChange();
@@ -1619,9 +1619,17 @@ void RenderObject::styleDidChange(StyleD
if (!m_parent)
return;
- if (diff == StyleDifferenceLayout)
+ if (diff == StyleDifferenceLayout) {
+ // If the object already needs layout, then setNeedsLayout won't do
+ // any work. But if the containing block has changed, then we may need
+ // to make the new containing blocks for layout. The change that can
+ // directly affect the containing block of this object is a change to
+ // the position style.
+ if (m_needsLayout && oldStyle->position() != m_style->position())
+ markContainingBlocksForLayout();
+
setNeedsLayoutAndPrefWidthsRecalc();
- else if (diff == StyleDifferenceLayoutPositionedMovementOnly)
+ } else if (diff == StyleDifferenceLayoutPositionedMovementOnly)
setNeedsPositionedMovementLayout();
// Don't check for repaint here; we need to wait until the layer has been

View File

@ -0,0 +1,45 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp qt-everywhere-opensource-src-4.6.3-2010-1412/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-2010-1412/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-11 00:09:43.741191104 +0200
@@ -3039,22 +3039,33 @@
// Locate the common ancestor render object for the two renderers.
RenderObject* ancestor = commonAncestor(oldHoverObj, newHoverObj);
+ Vector<Node*, 32> nodesToRemoveFromChain;
+ Vector<Node*, 32> nodesToAddToChain;
+
if (oldHoverObj != newHoverObj) {
// The old hover path only needs to be cleared up to (and not including) the common ancestor;
for (RenderObject* curr = oldHoverObj; curr && curr != ancestor; curr = curr->hoverAncestor()) {
- if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) {
- curr->node()->setActive(false);
- curr->node()->setHovered(false);
- }
+ if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain()))
+ nodesToRemoveFromChain.append(curr->node());
}
}
// Now set the hover state for our new object up to the root.
for (RenderObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) {
- if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) {
- curr->node()->setActive(request.active());
- curr->node()->setHovered(true);
- }
+ if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain()))
+ nodesToAddToChain.append(curr->node());
+ }
+
+ size_t removeCount = nodesToRemoveFromChain.size();
+ for (size_t i = 0; i < removeCount; ++i) {
+ nodesToRemoveFromChain[i]->setActive(false);
+ nodesToRemoveFromChain[i]->setHovered(false);
+ }
+
+ size_t addCount = nodesToAddToChain.size();
+ for (size_t i = 0; i < addCount; ++i) {
+ nodesToAddToChain[i]->setActive(request.active());
+ nodesToAddToChain[i]->setHovered(true);
}
}

View File

@ -0,0 +1,33 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-06-11 13:42:31.190174662 +0200
@@ -207,7 +207,7 @@
PassRefPtr<StringImpl> RenderText::originalText() const
{
Node* e = node();
- return e ? static_cast<Text*>(e)->dataImpl() : 0;
+ return (e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : 0;
}
void RenderText::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp 2010-06-11 13:42:31.197153658 +0200
@@ -47,7 +47,7 @@
PassRefPtr<StringImpl> RenderTextFragment::originalText() const
{
Node* e = node();
- RefPtr<StringImpl> result = (e ? static_cast<Text*>(e)->dataImpl() : contentString());
+ RefPtr<StringImpl> result = ((e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : contentString());
if (result && (start() > 0 || start() < result->length()))
result = result->substring(start(), end());
return result.release();
@@ -76,7 +76,7 @@
{
if (start()) {
Node* e = node();
- StringImpl* original = (e ? static_cast<Text*>(e)->dataImpl() : contentString());
+ StringImpl* original = ((e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : contentString());
if (original)
return (*original)[start() - 1];
}

View File

@ -0,0 +1,16 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1773/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1773/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp 2010-06-10 17:33:06.092192665 +0200
@@ -88,8 +88,10 @@
--number;
letters[lettersSize - 1] = alphabet[number % alphabetSize];
int length = 1;
- while ((number /= alphabetSize) > 0)
- letters[lettersSize - ++length] = alphabet[number % alphabetSize - 1];
+ while ((number /= alphabetSize) > 0) {
+ --number;
+ letters[lettersSize - ++length] = alphabet[number % alphabetSize];
+ }
ASSERT(length <= lettersSize);
return String(&letters[lettersSize - length], length);

View File

@ -0,0 +1,13 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp qt-everywhere-opensource-src-4.6.3-CVE-1774/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp 2010-06-02 04:03:11.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-CVE-1774/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp 2010-06-11 14:45:02.625278334 +0200
@@ -168,8 +168,7 @@
int usedSpan = 0;
int i = 0;
- while (usedSpan < span) {
- ASSERT(cCol + i < nEffCols);
+ while (usedSpan < span && cCol + i < nEffCols) {
int eSpan = m_table->spanOfEffCol(cCol + i);
// Only set if no col element has already set it.
if (m_width[cCol + i].isAuto() && w.type() != Auto) {

View File

@ -0,0 +1,29 @@
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp.CVE-2010-1778 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp.CVE-2010-1778 2010-06-11 16:12:55.786338275 +0200
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-15 13:23:21.114401487 +0200
@@ -1189,14 +1189,13 @@ void FrameView::scheduleRelayoutOfSubtre
{
ASSERT(m_frame->view() == this);
- if (!m_layoutSchedulingEnabled || (m_frame->contentRenderer()
- && m_frame->contentRenderer()->needsLayout())) {
+ if (m_frame->contentRenderer() && m_frame->contentRenderer()->needsLayout()) {
if (relayoutRoot)
relayoutRoot->markContainingBlocksForLayout(false);
return;
}
- if (layoutPending()) {
+ if (layoutPending() || !m_layoutSchedulingEnabled) {
if (m_layoutRoot != relayoutRoot) {
if (isObjectAncestorContainerOf(m_layoutRoot, relayoutRoot)) {
// Keep the current root
@@ -1213,7 +1212,7 @@ void FrameView::scheduleRelayoutOfSubtre
relayoutRoot->markContainingBlocksForLayout(false);
}
}
- } else {
+ } else if (m_layoutSchedulingEnabled) {
int delay = m_frame->document()->minimumLayoutDelay();
m_layoutRoot = relayoutRoot;
m_delayedLayout = delay != 0;

View File

@ -1,7 +1,7 @@
diff -ur qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck/src/gui/kernel/qguieventdispatcher_glib.cpp
--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-02 04:03:15.000000000 +0200
+++ qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-12-08 22:22:38.000000000 +0100
@@ -76,7 +76,7 @@
diff -up qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp
--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck 2010-06-01 21:03:15.000000000 -0500
+++ qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-29 14:58:12.299073784 -0500
@@ -76,7 +76,7 @@ static gboolean x11EventSourcePrepare(GS
GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s);
return (XEventsQueued(X11->display, QueuedAfterFlush)
|| (!(source->flags & QEventLoop::ExcludeUserInputEvents)
@ -10,7 +10,7 @@ diff -ur qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_g
}
static gboolean x11EventSourceCheck(GSource *s)
@@ -84,7 +84,7 @@
@@ -84,7 +84,7 @@ static gboolean x11EventSourceCheck(GSou
GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s);
return (XEventsQueued(X11->display, QueuedAfterFlush)
|| (!(source->flags & QEventLoop::ExcludeUserInputEvents)
@ -19,51 +19,3 @@ diff -ur qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_g
}
static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointer user_data)
@@ -95,7 +95,7 @@
do {
XEvent event;
if (!(source->flags & QEventLoop::ExcludeUserInputEvents)
- && !source->d->queuedUserInputEvents.isEmpty()) {
+ && source->d && !source->d->queuedUserInputEvents.isEmpty()) {
// process a pending user input event
event = source->d->queuedUserInputEvents.takeFirst();
} else if (XEventsQueued(X11->display, QueuedAlready)) {
@@ -112,7 +112,8 @@
case XKeyRelease:
case EnterNotify:
case LeaveNotify:
- source->d->queuedUserInputEvents.append(event);
+ if (source->d)
+ source->d->queuedUserInputEvents.append(event);
continue;
case ClientMessage:
@@ -127,7 +128,8 @@
break;
}
}
- source->d->queuedUserInputEvents.append(event);
+ if (source->d)
+ source->d->queuedUserInputEvents.append(event);
continue;
default:
@@ -140,7 +142,7 @@
}
// send through event filter
- if (source->q->filterEvent(&event))
+ if (source->q && source->q->filterEvent(&event))
continue;
if (qApp->x11ProcessEvent(&event) == 1)
@@ -152,7 +154,8 @@
out:
- source->d->runTimersOnceWithNormalPriority();
+ if (source->d)
+ source->d->runTimersOnceWithNormalPriority();
if (callback)
callback(user_data);

View File

@ -0,0 +1,47 @@
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp.gtk_init 2010-05-03 19:43:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp 2010-06-18 10:11:20.738800727 -0500
@@ -35,6 +35,8 @@
namespace WebCore {
+typedef void gtkInitFunc(int *argc, char ***argv);
+
bool PluginPackage::fetchInfo()
{
if (!load())
@@ -110,6 +112,8 @@ bool PluginPackage::load()
NP_InitializeFuncPtr NP_Initialize;
NPError npErr;
+ gtkInitFunc* gtkInit;
+
NP_Initialize = (NP_InitializeFuncPtr)m_module->resolve("NP_Initialize");
m_NPP_Shutdown = (NPP_ShutdownProcPtr)m_module->resolve("NP_Shutdown");
@@ -127,6 +131,25 @@ bool PluginPackage::load()
m_browserFuncs.getvalue = staticPluginQuirkRequiresGtkToolKit_NPN_GetValue;
}
+ // WORKAROUND: Prevent gtk based plugin crashes such as BR# 40567 by
+ // explicitly forcing the initializing of Gtk, i.e. calling gtk_init,
+ // whenver the symbol is present in the plugin library loaded above.
+ // Note that this workaround is based on code from the NSPluginClass ctor
+ // in KDE's kdebase/apps/nsplugins/viewer/nsplugin.cpp file.
+ gtkInit = (gtkInitFunc*)m_module->resolve("gtk_init");
+ if (gtkInit) {
+ // Prevent gtk_init() from replacing the X error handlers, since the Gtk
+ // handlers abort when they receive an X error, thus killing the viewer.
+#ifdef Q_WS_X11
+ int (*old_error_handler)(Display*, XErrorEvent*) = XSetErrorHandler(0);
+ int (*old_io_error_handler)(Display*) = XSetIOErrorHandler(0);
+#endif
+ gtkInit(0, 0);
+#ifdef Q_WS_X11
+ XSetErrorHandler(old_error_handler);
+ XSetIOErrorHandler(old_io_error_handler);
+#endif
+ }
#if defined(XP_UNIX)
npErr = NP_Initialize(&m_browserFuncs, &m_pluginFuncs);
#else

View File

@ -0,0 +1,19 @@
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath 2010-05-03 19:43:20.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp 2010-06-18 10:02:37.004788646 -0500
@@ -345,6 +345,7 @@ Vector<String> PluginDatabase::defaultPl
paths.append("/usr/lib/firefox/plugins");
paths.append("/usr/lib64/browser-plugins");
paths.append("/usr/lib/browser-plugins");
+ paths.append("/usr/lib/mozilla/plugins-wrapped");
paths.append("/usr/lib/mozilla/plugins");
paths.append("/usr/local/netscape/plugins");
paths.append("/opt/mozilla/plugins");
@@ -355,6 +356,7 @@ Vector<String> PluginDatabase::defaultPl
paths.append("/usr/lib/netscape/plugins-libc5");
paths.append("/usr/lib/netscape/plugins-libc6");
paths.append("/usr/lib64/netscape/plugins");
+ paths.append("/usr/lib64/mozilla/plugins-wrapped");
paths.append("/usr/lib64/mozilla/plugins");
paths.append("/usr/lib/nsbrowser/plugins");
paths.append("/usr/lib64/nsbrowser/plugins");

View File

@ -0,0 +1,36 @@
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp 2010-06-25 14:11:21.815474310 -0500
@@ -152,7 +152,7 @@ void Ui3Reader::embed(const char *projec
for ( it = images.begin(); it != images.end(); ++it )
out << "** " << *it << "\n";
out << "**\n";
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
+ out << "** Created: " << "\n";
out << "** by: The User Interface Compiler for Qt version " << QT_VERSION_STR << "\n";
out << "**\n";
out << "** WARNING! All changes made in this file will be lost!\n";
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp 2010-06-25 14:11:32.910460623 -0500
@@ -146,7 +146,7 @@ void Uic::writeCopyrightHeader(DomUI *ui
out << "/********************************************************************************\n";
out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
+ out << "** Created: " << "\n";
out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
out << "**\n";
out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";
diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp
--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500
+++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp 2010-06-25 14:10:45.360711498 -0500
@@ -139,7 +139,7 @@ void Uic::writeCopyrightHeader(DomUI *ui
out << "/********************************************************************************\n";
out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
+ out << "** Created: " << "\n";
out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
out << "**\n";
out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";

View File

@ -1,41 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h.QTBUG-22037 qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h
--- qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h.QTBUG-22037 2011-10-03 22:44:32.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h 2011-10-15 14:25:52.238694974 -0500
@@ -769,26 +769,18 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::clea
template <typename T>
Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t)
{
- int index = indexOf(_t);
- if (index == -1)
- return 0;
-
+ detachShared();
const T t = _t;
- detach();
-
- Node *i = reinterpret_cast<Node *>(p.at(index));
- Node *e = reinterpret_cast<Node *>(p.end());
- Node *n = i;
- node_destruct(i);
- while (++i != e) {
- if (i->t() == t)
- node_destruct(i);
- else
- *n++ = *i;
- }
-
- int removedCount = e - n;
- d->end -= removedCount;
+ int removedCount=0, i=0;
+ Node *n;
+ while (i < p.size())
+ if ((n = reinterpret_cast<Node *>(p.at(i)))->t() == t) {
+ node_destruct(n);
+ p.remove(i);
+ ++removedCount;
+ } else {
+ ++i;
+ }
return removedCount;
}

View File

@ -1,20 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.0/src/corelib/arch/qatomic_s390.h.s390-atomic qt-everywhere-opensource-src-4.8.0/src/corelib/arch/qatomic_s390.h
--- qt-everywhere-opensource-src-4.8.0/src/corelib/arch/qatomic_s390.h.s390-atomic 2011-12-18 16:15:20.000000000 +0100
+++ qt-everywhere-opensource-src-4.8.0/src/corelib/arch/qatomic_s390.h 2011-12-18 16:17:34.000000000 +0100
@@ -400,6 +400,16 @@ Q_INLINE_TEMPLATE T* QBasicAtomicPointer
template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
+{
+#ifndef __s390x__
+ return (T *)__CS_OLD_LOOP(&_q_value, valueToAdd * sizeof(T), "ar", "", "bcr 15,0\n");
+#else
+ return (T *)__CSG_OLD_LOOP(&_q_value, valueToAdd * sizeof(T), "agr", "", "bcr 15,0\n");
+#endif
+}
+
+template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
return fetchAndAddOrdered(valueToAdd);

View File

@ -1,36 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-32/qmake.conf.multilib qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-32/qmake.conf
--- qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-32/qmake.conf.multilib 2011-05-23 12:26:21.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-32/qmake.conf 2011-05-25 13:39:38.789054074 +0200
@@ -12,6 +12,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m32
QMAKE_LFLAGS = -m32
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
diff -up qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-64/qmake.conf.multilib qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-64/qmake.conf
--- qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-64/qmake.conf.multilib 2011-05-23 12:26:21.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++-64/qmake.conf 2011-05-25 13:39:47.460747770 +0200
@@ -15,6 +15,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CFLAGS = -m64
QMAKE_LFLAGS = -m64
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
diff -up qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++/qmake.conf.multilib qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++/qmake.conf
--- qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++/qmake.conf.multilib 2011-05-23 12:26:21.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.0-tp/mkspecs/linux-g++/qmake.conf 2011-05-25 13:39:26.630088814 +0200
@@ -9,6 +9,8 @@ CONFIG += qt warn_on release increment
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp.qtreeview-kpackagekit-crash qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp
--- qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp.qtreeview-kpackagekit-crash 2011-05-23 12:26:21.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp 2011-05-25 13:24:33.137315194 +0200
@@ -3215,7 +3215,7 @@ int QTreeViewPrivate::itemHeight(int ite
return defaultItemHeight;
if (viewItems.isEmpty())
return 0;
- const QModelIndex &index = viewItems.at(item).index;
+ QModelIndex index = viewItems.at(item).index;
if (!index.isValid())
return 0;
int height = viewItems.at(item).height;

View File

@ -1,27 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.2/tools/linguist/lrelease/main.cpp.linguist_qtmake-qt4 qt-everywhere-opensource-src-4.8.2/tools/linguist/lrelease/main.cpp
--- qt-everywhere-opensource-src-4.8.2/tools/linguist/lrelease/main.cpp.linguist_qtmake-qt4 2012-04-26 21:45:50.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.2/tools/linguist/lrelease/main.cpp 2012-05-29 12:17:03.416561535 +0200
@@ -314,9 +314,9 @@ int main(int argc, char **argv)
parseHandler.verbose = evalHandler.verbose = cd.isVerbose();
ProFileOption option;
#ifdef QT_BOOTSTRAPPED
- option.initProperties(binDir + QLatin1String("/qmake"));
+ option.initProperties(binDir + QLatin1String("/qmake-qt4"));
#else
- option.initProperties(app.applicationDirPath() + QLatin1String("/qmake"));
+ option.initProperties(app.applicationDirPath() + QLatin1String("/qmake-qt4"));
#endif
ProFileParser parser(0, &parseHandler);
ProFileEvaluator visitor(&option, &parser, &evalHandler);
diff -up qt-everywhere-opensource-src-4.8.2/tools/linguist/lupdate/main.cpp.linguist_qtmake-qt4 qt-everywhere-opensource-src-4.8.2/tools/linguist/lupdate/main.cpp
--- qt-everywhere-opensource-src-4.8.2/tools/linguist/lupdate/main.cpp.linguist_qtmake-qt4 2012-04-26 21:45:50.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.2/tools/linguist/lupdate/main.cpp 2012-05-29 11:46:48.811134546 +0200
@@ -765,7 +765,7 @@ int main(int argc, char **argv)
parseHandler.verbose = evalHandler.verbose = !!(options & Verbose);
ProFileOption option;
- option.initProperties(app.applicationDirPath() + QLatin1String("/qmake"));
+ option.initProperties(app.applicationDirPath() + QLatin1String("/qmake-qt4"));
option.setCommandLineArguments(QStringList() << QLatin1String("CONFIG+=lupdate_run"));
ProFileParser parser(0, &parseHandler);

View File

@ -1,10 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.1/src/qt3support/qt3support.pro.debuginfo qt-everywhere-opensource-src-4.8.1/src/qt3support/qt3support.pro
--- qt-everywhere-opensource-src-4.8.1/src/qt3support/qt3support.pro.debuginfo 2012-03-14 09:01:17.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.1/src/qt3support/qt3support.pro 2012-05-11 11:55:37.780070386 -0500
@@ -34,6 +34,3 @@ MOCDIR = .moc
*-g++*: QMAKE_CXXFLAGS += -fno-strict-aliasing
-CONFIG -= separate_debug_info
-CONFIG += no_debug_info
-

View File

@ -1,13 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp.me qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp
--- qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp.me 2012-06-19 12:52:22.740180410 +0200
+++ qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-19 12:52:51.953194103 +0200
@@ -944,8 +944,7 @@ void MainWindow::updateApplicationFont()
if (helpEngine.usesAppFont())
font = helpEngine.appFont();
- const QWidgetList &widgets = qApp->allWidgets();
- foreach (QWidget* widget, widgets)
+ foreach (QWidget* widget, QApplication::allWidgets())
widget->setFont(font);
}

View File

@ -1,23 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp.icu_no_debug qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp
--- qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp.icu_no_debug 2012-09-06 02:33:45.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp 2012-09-11 09:04:21.542379795 -0500
@@ -84,7 +84,9 @@ bool qt_initIcu(const QString &localeStr
QLibrary lib(QLatin1String("icui18n"), QLatin1String(U_ICU_VERSION_SHORT));
lib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
if (!lib.load()) {
+#ifndef QT_NO_DEBUG
qWarning() << "Unable to load library icui18n" << lib.errorString();
+#endif
status = ErrorLoading;
return false;
}
@@ -114,7 +116,9 @@ bool qt_initIcu(const QString &localeStr
QLibrary ucLib(QLatin1String("icuuc"), QLatin1String(U_ICU_VERSION_SHORT));
ucLib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
if (!ucLib.load()) {
+#ifndef QT_NO_DEBUG
qWarning() << "Unable to load library icuuc" << ucLib.errorString();
+#endif
status = ErrorLoading;
return false;
}

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.3/src/3rdparty/webkit/Source/WebKit.pri.no_Werror qt-everywhere-opensource-src-4.8.3/src/3rdparty/webkit/Source/WebKit.pri
--- qt-everywhere-opensource-src-4.8.3/src/3rdparty/webkit/Source/WebKit.pri.no_Werror 2012-09-06 02:33:50.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.3/src/3rdparty/webkit/Source/WebKit.pri 2012-09-11 09:03:19.152159783 -0500
@@ -102,7 +102,7 @@ CONFIG -= warn_on
# Treat warnings as errors on x86/Linux/GCC
linux-g++* {
- !CONFIG(standalone_package):if(isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386)): QMAKE_CXXFLAGS += -Werror
+ #!CONFIG(standalone_package):if(isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386)): QMAKE_CXXFLAGS += -Werror
greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {

View File

@ -1,14 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug.patch qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp
--- qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug.patch 2012-09-06 02:33:44.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp 2012-09-11 08:55:29.854026815 -0500
@@ -1109,8 +1109,10 @@ public:
// make sure this connection is running on the main thread
QCoreApplication *instance = QCoreApplication::instance();
if (!instance) {
+#ifndef QT_NO_DEBUG
qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
+#endif
} else if (QDBusConnectionPrivate::d(*this)) {
QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
}

View File

@ -1,16 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp.qmake_pkgconfig_requires_private qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp
--- qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp.qmake_pkgconfig_requires_private 2012-11-23 04:11:21.000000000 -0600
+++ qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp 2013-02-11 07:36:36.192779528 -0600
@@ -3293,6 +3293,12 @@ MakefileGenerator::writePkgConfigFile()
t << "Requires: " << requires << endl;
}
+ // requires.private
+ const QString requires_private = project->values("QMAKE_PKGCONFIG_REQUIRES_PRIVATE").join(" ");
+ if (!requires_private.isEmpty()) {
+ t << "Requires.private: " << requires_private << endl;
+ }
+
t << endl;
}

View File

@ -1,24 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf.QTBUG-14467 qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf.QTBUG-14467 2013-05-30 16:19:17.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf 2013-06-09 11:53:45.709773603 -0500
@@ -72,7 +72,7 @@ defineTest(qtAddLibrary) {
}
isEmpty(LINKAGE) {
if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
- win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
+ win32:LINKAGE = -l$${LIB_NAME}d$${QT_LIBINFIX}
mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
}
isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
diff -up qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf.QTBUG-14467 qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf.QTBUG-14467 2013-05-30 16:19:17.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf 2013-06-09 11:53:45.710773593 -0500
@@ -6,7 +6,7 @@ contains(TEMPLATE, ".*app"){
qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
isEqual(entryLib, -lqtmain): {
- CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d
+ CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}d$${QT_LIBINFIX}
else: QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}
} else {
QMAKE_LIBS += $${entryLib}

View File

@ -1,84 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp.QTBUG-21900 qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp.QTBUG-21900 2013-05-30 16:18:05.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_x11.cpp 2013-06-09 11:53:45.891771748 -0500
@@ -818,6 +818,27 @@ static Bool qt_sync_request_scanner(Disp
#endif
#endif // QT_NO_XSYNC
+struct qt_configure_event_data
+{
+ WId window;
+ WId parent;
+};
+
+static Bool qt_configure_event_scanner(Display*, XEvent *event, XPointer arg)
+{
+ qt_configure_event_data *data =
+ reinterpret_cast<qt_configure_event_data*>(arg);
+ if (event->type == ConfigureNotify &&
+ event->xconfigure.window == data->window) {
+ return true;
+ } else if (event->type == ReparentNotify &&
+ event->xreparent.window == data->window) {
+ data->parent = event->xreparent.parent;
+ }
+
+ return false;
+}
+
static void qt_x11_create_intern_atoms()
{
const char *names[QX11Data::NAtoms];
@@ -5302,8 +5323,11 @@ bool QETWidget::translateConfigEvent(con
if (d->extra->compress_events) {
// ConfigureNotify compression for faster opaque resizing
XEvent otherEvent;
- while (XCheckTypedWindowEvent(X11->display, internalWinId(), ConfigureNotify,
- &otherEvent)) {
+ qt_configure_event_data configureData;
+ configureData.window = internalWinId();
+ configureData.parent = d->topData()->parentWinId;
+ while (XCheckIfEvent(X11->display, &otherEvent,
+ &qt_configure_event_scanner, (XPointer)&configureData)) {
if (qt_x11EventFilter(&otherEvent))
continue;
@@ -5316,13 +5340,19 @@ bool QETWidget::translateConfigEvent(con
newSize.setWidth(otherEvent.xconfigure.width);
newSize.setHeight(otherEvent.xconfigure.height);
+ trust = isVisible()
+ && (configureData.parent == XNone ||
+ configureData.parent == QX11Info::appRootWindow());
+
if (otherEvent.xconfigure.send_event || trust) {
newCPos.rx() = otherEvent.xconfigure.x +
otherEvent.xconfigure.border_width;
newCPos.ry() = otherEvent.xconfigure.y +
otherEvent.xconfigure.border_width;
isCPos = true;
- }
+ } else {
+ isCPos = false;
+ }
}
#ifndef QT_NO_XSYNC
qt_sync_request_event_data sync_event;
@@ -5335,9 +5365,14 @@ bool QETWidget::translateConfigEvent(con
}
if (!isCPos) {
- // we didn't get an updated position of the toplevel.
- // either we haven't moved or there is a bug in the window manager.
- // anyway, let's query the position to be certain.
+ // If the last configure event didn't have a trustable position,
+ // it's necessary to query, see ICCCM 4.24:
+ //
+ // Any real ConfigureNotify event on a top-level window implies
+ // that the windows position on the root may have changed, even
+ // though the event reports that the windows position in its
+ // parent is unchanged because the window may have been reparented.
+
int x, y;
Window child;
XTranslateCoordinates(X11->display, internalWinId(),

View File

@ -1,12 +0,0 @@
diff -ur qt-everywhere-opensource-src-4.8.5-CVE-2013-4549/src/xml/sax/qxml.cpp qt-everywhere-opensource-src-4.8.5-QTBUG-35459/src/xml/sax/qxml.cpp
--- qt-everywhere-opensource-src-4.8.5-CVE-2013-4549/src/xml/sax/qxml.cpp 2013-12-05 19:23:33.000000000 +0100
+++ qt-everywhere-opensource-src-4.8.5-QTBUG-35459/src/xml/sax/qxml.cpp 2014-01-13 20:13:59.000000000 +0100
@@ -428,7 +428,7 @@
// for the DTD currently being parsed.
static const int dtdRecursionLimit = 2;
// The maximum amount of characters an entity value may contain, after expansion.
- static const int entityCharacterLimit = 1024;
+ static const int entityCharacterLimit = 4096;
const QString &string();
void stringClear();

View File

@ -1,29 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp.QTBUG-4862 qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp.QTBUG-4862 2013-06-09 12:02:50.323221694 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfilesystemengine_unix.cpp 2013-06-09 12:38:53.140804742 -0500
@@ -624,6 +624,25 @@ QString QFileSystemEngine::homePath()
{
QString home = QFile::decodeName(qgetenv("HOME"));
if (home.isEmpty())
+ {
+#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
+ int size_max = sysconf(_SC_GETPW_R_SIZE_MAX);
+ if (size_max == -1)
+ size_max = 1024;
+ QVarLengthArray<char, 1024> buf(size_max);
+#endif
+ struct passwd *pw = 0;
+ uid_t user_id = getuid();
+ pw = getpwuid(user_id);
+#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
+ struct passwd entry;
+ getpwuid_r(user_id, &entry, buf.data(), buf.size(), &pw);
+#else
+ pw = getpwuid(user_id);
+#endif
+ home = QFile::decodeName(QByteArray(pw->pw_dir));
+ }
+ if (home.isEmpty())
home = rootPath();
return QDir::cleanPath(home);
}

View File

@ -1,19 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/configure.mysql_config qt-everywhere-opensource-src-4.8.5/configure
--- qt-everywhere-opensource-src-4.8.5/configure.mysql_config 2013-06-07 00:16:41.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/configure 2014-03-07 10:09:27.412071146 -0600
@@ -5480,8 +5480,15 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
[ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
if [ -x "$CFG_MYSQL_CONFIG" ]; then
QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
+ $CFG_MYSQL_CONFIG --variable=pkglibdir &>/dev/null && \
+ QT_MYSQL_PKGLIBDIR=`$CFG_MYSQL_CONFIG --variable=pkglibdir 2>/dev/null`
+ if [ -n "$QT_MYSQL_PKGLIBDIR" ]; then
+ QT_LFLAGS_MYSQL_R="-L$QT_MYSQL_PKGLIBDIR -lmysqlclient_r"
+ QT_LFLAGS_MYSQL="-L$QT_MYSQL_PKGLIBDIR -lmysqlclient"
+ else
QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
+ fi
QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
fi

View File

@ -1,22 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp.qgtkstyle_disable_gtk_theme_check qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp.qgtkstyle_disable_gtk_theme_check 2013-06-09 16:28:22.938840346 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/gui/styles/qgtkstyle_p.cpp 2013-06-09 17:03:01.781125479 -0500
@@ -503,18 +503,6 @@ void QGtkStylePrivate::initGtkWidgets()
return;
}
- static QString themeName;
- if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
- themeName = getThemeName();
-
- if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
- // Due to namespace conflicts with Qt3 and obvious recursion with Qt4,
- // we cannot support the GTK_Qt Gtk engine
- qWarning("QGtkStyle cannot be used together with the GTK_Qt engine.");
- return;
- }
- }
-
if (QGtkStylePrivate::gtk_init) {
// Gtk will set the Qt error handler so we have to reset it afterwards
x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);

View File

@ -1,19 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/corelib/kernel/qcoreapplication.cpp.qt_plugin_path qt-everywhere-opensource-src-4.8.5/src/corelib/kernel/qcoreapplication.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/kernel/qcoreapplication.cpp.qt_plugin_path 2013-06-07 00:16:52.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/corelib/kernel/qcoreapplication.cpp 2013-06-21 07:14:10.045039936 -0500
@@ -2511,6 +2511,15 @@ QStringList QCoreApplication::libraryPat
if (!app_libpaths->contains(installPathPlugins))
app_libpaths->append(installPathPlugins);
}
+
+ // hack in support for kde4 plugin paths -- Rex
+ QString kde4PathPlugins = QLibraryInfo::location(QLibraryInfo::LibrariesPath) + QLatin1String("/kde4/plugins");
+ if (QFile::exists(kde4PathPlugins)) {
+ // Make sure we convert from backslashes to slashes.
+ //kde4PathPlugins = QDir(kde4PathPlugins).canonicalPath();
+ if (!app_libpaths->contains(kde4PathPlugins))
+ app_libpaths->append(kde4PathPlugins);
+ }
#endif
// If QCoreApplication is not yet instantiated,

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri.tds_no_strict_aliasing qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri
--- qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri.tds_no_strict_aliasing 2013-06-09 11:57:49.198291245 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri 2013-06-09 12:01:24.120100371 -0500
@@ -1,6 +1,8 @@
HEADERS += $$PWD/qsql_tds.h
SOURCES += $$PWD/qsql_tds.cpp
+*-g++*: QMAKE_CXXFLAGS += -fno-strict-aliasing
+
unix|win32-g++*: {
LIBS += $$QT_LFLAGS_TDS
!contains(LIBS, .*sybdb.*):LIBS += -lsybdb

View File

@ -1,28 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/tools/moc/moc.cpp.uic_multilib qt-everywhere-opensource-src-4.8.5/src/tools/moc/moc.cpp
diff -up qt-everywhere-opensource-src-4.8.5/src/tools/uic3/embed.cpp.uic_multilib qt-everywhere-opensource-src-4.8.5/src/tools/uic3/embed.cpp
--- qt-everywhere-opensource-src-4.8.5/src/tools/uic3/embed.cpp.uic_multilib 2013-05-30 16:18:04.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/tools/uic3/embed.cpp 2013-06-09 11:50:25.597813974 -0500
@@ -152,8 +152,7 @@ void Ui3Reader::embed(const char *projec
for ( it = images.begin(); it != images.end(); ++it )
out << "** " << *it << "\n";
out << "**\n";
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
- out << "** by: The User Interface Compiler for Qt version " << QT_VERSION_STR << "\n";
+ out << "** Created: by: The User Interface Compiler for Qt version " << QT_VERSION_STR << "\n";
out << "**\n";
out << "** WARNING! All changes made in this file will be lost!\n";
out << "****************************************************************************/\n";
diff -up qt-everywhere-opensource-src-4.8.5/src/tools/uic3/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.8.5/src/tools/uic3/uic.cpp
--- qt-everywhere-opensource-src-4.8.5/src/tools/uic3/uic.cpp.uic_multilib 2013-05-30 16:18:04.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/tools/uic3/uic.cpp 2013-06-09 11:51:28.310174526 -0500
@@ -146,8 +146,7 @@ void Uic::writeCopyrightHeader(DomUI *ui
out << "/********************************************************************************\n";
out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
- out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
+ out << "** Created by: " << QString::fromLatin1("Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR));
out << "**\n";
out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";
out << "********************************************************************************/\n\n";
diff -up qt-everywhere-opensource-src-4.8.5/src/tools/uic/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.8.5/src/tools/uic/uic.cpp

View File

@ -1,16 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/WebCore.pri.webkit_debuginfo qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/WebCore.pri
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/WebCore.pri.webkit_debuginfo 2013-06-07 00:16:55.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/WebCore.pri 2013-07-11 14:04:19.937056249 -0500
@@ -5,6 +5,12 @@ include(features.pri)
# Uncomment this to enable Texture Mapper.
# CONFIG += texmap
+#
+equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64)|equals(QT_ARCH, powerpc64)|equals(QT_ARCH, powerpc) {
+ message("WebCore workaround for QtWebkit: do not build with -g, but with -g1")
+ QMAKE_CXXFLAGS_RELEASE -= -g
+ QMAKE_CXXFLAGS_RELEASE += -g1
+}
QT *= network

View File

@ -1,17 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp
--- qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 2015-05-07 09:14:44.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2016-12-08 12:32:46.638962448 -0600
@@ -188,8 +188,12 @@ int runMoc(int _argc, char **_argv)
pp.macros["Q_MOC_RUN"];
pp.macros["__cplusplus"];
- // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
+ // Workaround a bugs while parsing some boost headers. See QTBUG-22829
pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
+ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
+ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
+ pp.macros["BOOST_TYPE_TRAITS_HPP"];
+ pp.macros["_SYS_SYSMACROS_H_OUTER"];
QByteArray filename;
QByteArray output;

View File

@ -1,94 +0,0 @@
--- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100
+++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200
@@ -255,22 +255,30 @@ struct GPostEventSource
GSource source;
QAtomicInt serialNumber;
int lastSerialNumber;
+ QEventLoop::ProcessEventsFlags processEventsFlags;
QEventDispatcherGlibPrivate *d;
};
static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
{
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
QThreadData *data = QThreadData::current();
if (!data)
return false;
+ QEventLoop::ProcessEventsFlags excludeAllFlags
+ = QEventLoop::ExcludeUserInputEvents
+ | QEventLoop::ExcludeSocketNotifiers
+ | QEventLoop::X11ExcludeTimers;
+ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags)
+ return false;
+
gint dummy;
if (!timeout)
timeout = &dummy;
const bool canWait = data->canWaitLocked();
*timeout = canWait ? -1 : 0;
- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
return (!canWait
|| (source->serialNumber != source->lastSerialNumber));
}
@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch(
{
GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
source->lastSerialNumber = source->serialNumber;
- QCoreApplication::sendPostedEvents();
- source->d->runTimersOnceWithNormalPriority();
+ QEventLoop::ProcessEventsFlags excludeAllFlags
+ = QEventLoop::ExcludeUserInputEvents
+ | QEventLoop::ExcludeSocketNotifiers
+ | QEventLoop::X11ExcludeTimers;
+ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) {
+ QCoreApplication::sendPostedEvents();
+ source->d->runTimersOnceWithNormalPriority();
+ }
return true; // i dunno, george...
}
@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa
postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
sizeof(GPostEventSource)));
postEventSource->serialNumber = 1;
+ postEventSource->processEventsFlags = QEventLoop::AllEvents;
postEventSource->d = this;
g_source_set_can_recurse(&postEventSource->source, true);
g_source_attach(&postEventSource->source, mainContext);
@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents
// tell postEventSourcePrepare() and timerSource about any new flags
QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
+ d->postEventSource->processEventsFlags = flags;
d->timerSource->processEventsFlags = flags;
d->socketNotifierSource->processEventsFlags = flags;
@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents
while (!result && canWait)
result = g_main_context_iteration(d->mainContext, canWait);
+ d->postEventSource->processEventsFlags = savedFlags;
d->timerSource->processEventsFlags = savedFlags;
d->socketNotifierSource->processEventsFlags = savedFlags;
--- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200
+++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200
@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents
// we are awake, broadcast it
emit awake();
- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ QEventLoop::ProcessEventsFlags excludeAllFlags
+ = QEventLoop::ExcludeUserInputEvents
+ | QEventLoop::ExcludeSocketNotifiers
+ | QEventLoop::X11ExcludeTimers;
+ if ((flags & excludeAllFlags) == excludeAllFlags)
+ return false;
+ if(( flags & excludeAllFlags ) != excludeAllFlags )
+ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
int nevents = 0;
const bool canWait = (d->threadData->canWaitLocked()

View File

@ -1,63 +0,0 @@
Author: Jan-Marek Glogowski <glogow@fbihome.de>
Date: Thu Mar 06 18:44:43 2014 +0100
Honor QEventLoop::ExcludeSocketNotifiers in glib event loop.
Implements QEventLoop::ExcludeSocketNotifiers in the same way
QEventLoop::X11ExcludeTimers is already implemented for the glib
event loop.
--- qt4-x11-4.8.1.orig/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ qt4-x11-4.8.1/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
struct GSocketNotifierSource
{
GSource source;
+ QEventLoop::ProcessEventsFlags processEventsFlags;
QList<GPollFDWithQSocketNotifier *> pollfds;
};
@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceChec
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
bool pending = false;
+ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
+ return pending;
+
for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDisp
QEvent event(QEvent::SockAct);
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
+ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
+ return true;
+
for (int i = 0; i < src->pollfds.count(); ++i) {
GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
@@ -330,6 +337,7 @@ QEventDispatcherGlibPrivate::QEventDispa
reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
sizeof(GSocketNotifierSource)));
(void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
+ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;
g_source_set_can_recurse(&socketNotifierSource->source, true);
g_source_attach(&socketNotifierSource->source, mainContext);
@@ -415,6 +423,7 @@ bool QEventDispatcherGlib::processEvents
// tell postEventSourcePrepare() and timerSource about any new flags
QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
d->timerSource->processEventsFlags = flags;
+ d->socketNotifierSource->processEventsFlags = flags;
if (!(flags & QEventLoop::EventLoopExec)) {
// force timers to be sent at normal priority
@@ -426,6 +435,7 @@ bool QEventDispatcherGlib::processEvents
result = g_main_context_iteration(d->mainContext, canWait);
d->timerSource->processEventsFlags = savedFlags;
+ d->socketNotifierSource->processEventsFlags = savedFlags;
if (canWait)
emit awake();

View File

@ -1,12 +0,0 @@
--- src/gui/kernel/qclipboard_x11.cpp.sav 2014-04-25 09:52:03.855693228 +0200
+++ src/gui/kernel/qclipboard_x11.cpp 2014-04-25 09:51:58.038693777 +0200
@@ -548,7 +548,8 @@ bool QX11Data::clipboardWaitForEvent(Win
return false;
XSync(X11->display, false);
- usleep(50000);
+ if (!XPending(X11->display))
+ usleep(5000);
now.start();

View File

@ -1,31 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390 qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
--- qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390 2014-03-30 15:36:49.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2014-03-31 17:59:16.846465899 -0500
@@ -189,6 +189,18 @@
#define WTF_CPU_SPARC 1
#endif
+/* CPU(S390X) - S390 64-bit */
+#if defined(__s390x__)
+#define WTF_CPU_S390X 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
+/* CPU(S390) - S390 32-bit */
+#if defined(__s390__)
+#define WTF_CPU_S390 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
/* CPU(X86) - i386 / x86 32-bit */
#if defined(__i386__) \
|| defined(i386) \
@@ -903,7 +915,7 @@
#endif
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64)
+#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(S390X)
#define WTF_USE_JSVALUE64 1
#elif CPU(ARM) || CPU(PPC64)
#define WTF_USE_JSVALUE32 1

View File

@ -1,351 +0,0 @@
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/fulltextsearch.pri qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/fulltextsearch.pri
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/fulltextsearch.pri 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/fulltextsearch.pri 2014-10-26 03:33:45.000000000 +0100
@@ -1,125 +1,7 @@
-DEFINES += _BUILD_FOR_QT_ LUCENE_DISABLE_MEMTRACKING
-win32:DEFINES += _CRT_SECURE_NO_DEPRECATE _MT
-
-CLUCENEDIR = ../../../../src/3rdparty/clucene/src/CLucene
-
-INCLUDEPATH += . .. \
- $$CLUCENEDIR \
- $$CLUCENEDIR/../ \
- $$CLUCENEDIR/analysis \
- $$CLUCENEDIR/analysis/standard \
- $$CLUCENEDIR/config \
- $$CLUCENEDIR/debug \
- $$CLUCENEDIR/document \
- $$CLUCENEDIR/index \
- $$CLUCENEDIR/queryParser \
- $$CLUCENEDIR/search \
- $$CLUCENEDIR/store \
- $$CLUCENEDIR/util
-
-
-SOURCES += $$CLUCENEDIR/StdHeader.cpp \
- $$CLUCENEDIR/analysis/AnalysisHeader.cpp \
- $$CLUCENEDIR/analysis/Analyzers.cpp \
- $$CLUCENEDIR/config/gunichartables.cpp \
- $$CLUCENEDIR/config/repl_lltot.cpp \
- $$CLUCENEDIR/config/repl_tcscasecmp.cpp \
- $$CLUCENEDIR/config/repl_tcslwr.cpp \
- $$CLUCENEDIR/config/repl_tcstod.cpp \
- $$CLUCENEDIR/config/repl_tcstoll.cpp \
- $$CLUCENEDIR/config/repl_tprintf.cpp \
- $$CLUCENEDIR/config/threads.cpp \
- $$CLUCENEDIR/config/utf8.cpp \
- $$CLUCENEDIR/debug/condition.cpp \
- $$CLUCENEDIR/debug/error.cpp \
- $$CLUCENEDIR/debug/memtracking.cpp \
- $$CLUCENEDIR/document/DateField.cpp \
- $$CLUCENEDIR/document/Document.cpp \
- $$CLUCENEDIR/document/Field.cpp \
- $$CLUCENEDIR/index/CompoundFile.cpp \
- $$CLUCENEDIR/index/DocumentWriter.cpp \
- $$CLUCENEDIR/index/FieldInfos.cpp \
- $$CLUCENEDIR/index/FieldsReader.cpp \
- $$CLUCENEDIR/index/FieldsWriter.cpp \
- $$CLUCENEDIR/index/IndexModifier.cpp \
- $$CLUCENEDIR/index/IndexReader.cpp \
- $$CLUCENEDIR/index/IndexWriter.cpp \
- $$CLUCENEDIR/index/MultiReader.cpp \
- $$CLUCENEDIR/index/SegmentInfos.cpp \
- $$CLUCENEDIR/index/SegmentMergeInfo.cpp \
- $$CLUCENEDIR/index/SegmentMergeQueue.cpp \
- $$CLUCENEDIR/index/SegmentMerger.cpp \
- $$CLUCENEDIR/index/SegmentReader.cpp \
- $$CLUCENEDIR/index/SegmentTermDocs.cpp \
- $$CLUCENEDIR/index/SegmentTermEnum.cpp \
- $$CLUCENEDIR/index/SegmentTermPositions.cpp \
- $$CLUCENEDIR/index/SegmentTermVector.cpp \
- $$CLUCENEDIR/index/Term.cpp \
- $$CLUCENEDIR/index/TermInfo.cpp \
- $$CLUCENEDIR/index/TermInfosReader.cpp \
- $$CLUCENEDIR/index/TermInfosWriter.cpp \
- $$CLUCENEDIR/index/TermVectorReader.cpp \
- $$CLUCENEDIR/index/TermVectorWriter.cpp \
- $$CLUCENEDIR/queryParser/Lexer.cpp \
- $$CLUCENEDIR/queryParser/MultiFieldQueryParser.cpp \
- $$CLUCENEDIR/queryParser/QueryParser.cpp \
- $$CLUCENEDIR/queryParser/QueryParserBase.cpp \
- $$CLUCENEDIR/queryParser/QueryToken.cpp \
- $$CLUCENEDIR/queryParser/TokenList.cpp \
- $$CLUCENEDIR/search/BooleanQuery.cpp \
- $$CLUCENEDIR/search/BooleanScorer.cpp \
- $$CLUCENEDIR/search/CachingWrapperFilter.cpp \
- $$CLUCENEDIR/search/ChainedFilter.cpp \
- $$CLUCENEDIR/search/ConjunctionScorer.cpp \
- $$CLUCENEDIR/search/DateFilter.cpp \
- $$CLUCENEDIR/search/ExactPhraseScorer.cpp \
- $$CLUCENEDIR/search/Explanation.cpp \
- $$CLUCENEDIR/search/FieldCache.cpp \
- $$CLUCENEDIR/search/FieldCacheImpl.cpp \
- $$CLUCENEDIR/search/FieldDocSortedHitQueue.cpp \
- $$CLUCENEDIR/search/FieldSortedHitQueue.cpp \
- $$CLUCENEDIR/search/FilteredTermEnum.cpp \
- $$CLUCENEDIR/search/FuzzyQuery.cpp \
- $$CLUCENEDIR/search/HitQueue.cpp \
- $$CLUCENEDIR/search/Hits.cpp \
- $$CLUCENEDIR/search/IndexSearcher.cpp \
- $$CLUCENEDIR/search/MultiSearcher.cpp \
- $$CLUCENEDIR/search/MultiTermQuery.cpp \
- $$CLUCENEDIR/search/PhrasePositions.cpp \
- $$CLUCENEDIR/search/PhraseQuery.cpp \
- $$CLUCENEDIR/search/PhraseScorer.cpp \
- $$CLUCENEDIR/search/PrefixQuery.cpp \
- $$CLUCENEDIR/search/QueryFilter.cpp \
- $$CLUCENEDIR/search/RangeFilter.cpp \
- $$CLUCENEDIR/search/RangeQuery.cpp \
- $$CLUCENEDIR/search/SearchHeader.cpp \
- $$CLUCENEDIR/search/Similarity.cpp \
- $$CLUCENEDIR/search/SloppyPhraseScorer.cpp \
- $$CLUCENEDIR/search/Sort.cpp \
- $$CLUCENEDIR/search/TermQuery.cpp \
- $$CLUCENEDIR/search/TermScorer.cpp \
- $$CLUCENEDIR/search/WildcardQuery.cpp \
- $$CLUCENEDIR/search/WildcardTermEnum.cpp \
- $$CLUCENEDIR/store/FSDirectory.cpp \
- $$CLUCENEDIR/store/IndexInput.cpp \
- $$CLUCENEDIR/store/IndexOutput.cpp \
- $$CLUCENEDIR/store/Lock.cpp \
- $$CLUCENEDIR/store/MMapInput.cpp \
- $$CLUCENEDIR/store/RAMDirectory.cpp \
- $$CLUCENEDIR/store/TransactionalRAMDirectory.cpp \
- $$CLUCENEDIR/util/BitSet.cpp \
- $$CLUCENEDIR/util/Equators.cpp \
- $$CLUCENEDIR/util/FastCharStream.cpp \
- $$CLUCENEDIR/util/fileinputstream.cpp \
- $$CLUCENEDIR/util/Misc.cpp \
- $$CLUCENEDIR/util/Reader.cpp \
- $$CLUCENEDIR/util/StringBuffer.cpp \
- $$CLUCENEDIR/util/StringIntern.cpp \
- $$CLUCENEDIR/util/ThreadLocal.cpp \
- $$CLUCENEDIR/analysis/standard/StandardAnalyzer.cpp \
- $$CLUCENEDIR/analysis/standard/StandardFilter.cpp \
- $$CLUCENEDIR/analysis/standard/StandardTokenizer.cpp
+INCLUDEPATH += /usr/include/clucene09 $$[QT_INSTALL_LIBS]/clucene09 $$[QT_INSTALL_LIBS]
+LIBS += -L$$[QT_INSTALL_LIBS]/clucene09 -lclucene
+#DEFINES += LUCENE_ENABLE_REFCOUNT (must be set at CLucene build time!)
#Header files
HEADERS += qclucene_global_p.h \
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene-config_p.h qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene-config_p.h 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene-config_p.h 2014-10-26 02:28:54.000000000 +0100
@@ -15,6 +15,8 @@
**
****************************************************************************/
+#error This header must not be included when building against system CLucene.
+
#ifndef QCLUCENE_CONFIG_P_H
#define QCLUCENE_CONFIG_P_H
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene_global_p.h qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene_global_p.h
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene_global_p.h 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene_global_p.h 2014-10-26 02:31:54.000000000 +0100
@@ -29,20 +29,10 @@
// We mean it.
//
-#if !defined(_MSC_VER)
-# include "qclucene-config_p.h"
-#endif
-
#include <QtCore/QChar>
#include <QtCore/QString>
-#if !defined(_MSC_VER) && !defined(__MINGW32__) && defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T)
-# if !defined(TCHAR)
-# define TCHAR wchar_t
-# endif
-#else
-# include <windows.h>
-#endif
+#include <CLucene/StdHeader.h>
QT_BEGIN_HEADER
@@ -56,52 +46,6 @@
# define QHELP_EXPORT Q_DECL_IMPORT
#endif
-//
-// W A R N I N G
-// -------------
-//
-// adjustments here, need to be done in
-// QTDIR/src/3rdparty/clucene/src/CLucene/StdHeader.h as well
-//
-#if defined(_LUCENE_DONTIMPLEMENT_NS_MACROS)
-
-#elif !defined(DISABLE_NAMESPACE)
-# ifdef QT_NAMESPACE
-# define CL_NS_DEF(sub) namespace QT_NAMESPACE { namespace lucene{ namespace sub{
-# define CL_NS_DEF2(sub,sub2) namespace QT_NAMESPACE { namespace lucene{ namespace sub{ namespace sub2 {
-
-# define CL_NS_END }}}
-# define CL_NS_END2 }}}}
-
-# define CL_NS_USE(sub) using namespace QT_NAMESPACE::lucene::sub;
-# define CL_NS_USE2(sub,sub2) using namespace QT_NAMESPACE::lucene::sub::sub2;
-
-# define CL_NS(sub) QT_NAMESPACE::lucene::sub
-# define CL_NS2(sub,sub2) QT_NAMESPACE::lucene::sub::sub2
-# else
-# define CL_NS_DEF(sub) namespace lucene{ namespace sub{
-# define CL_NS_DEF2(sub,sub2) namespace lucene{ namespace sub{ namespace sub2 {
-
-# define CL_NS_END }}
-# define CL_NS_END2 }}}
-
-# define CL_NS_USE(sub) using namespace lucene::sub;
-# define CL_NS_USE2(sub,sub2) using namespace lucene::sub::sub2;
-
-# define CL_NS(sub) lucene::sub
-# define CL_NS2(sub,sub2) lucene::sub::sub2
-# endif
-#else
-# define CL_NS_DEF(sub)
-# define CL_NS_DEF2(sub, sub2)
-# define CL_NS_END
-# define CL_NS_END2
-# define CL_NS_USE(sub)
-# define CL_NS_USE2(sub,sub2)
-# define CL_NS(sub)
-# define CL_NS2(sub,sub2)
-#endif
-
namespace {
TCHAR* QStringToTChar(const QString &str)
{
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexreader.cpp qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexreader.cpp
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexreader.cpp 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexreader.cpp 2014-10-26 02:48:02.000000000 +0100
@@ -18,6 +18,8 @@
#include "qindexreader_p.h"
#include "qclucene_global_p.h"
+#include <QtCore/QDir>
+
#include <CLucene.h>
#include <CLucene/index/IndexReader.h>
@@ -59,13 +61,13 @@
{
using namespace lucene::index;
- return IndexReader::isLuceneFile(filename);
+ return IndexReader::isLuceneFile(filename.toLocal8Bit().constData());
}
bool QCLuceneIndexReader::indexExists(const QString &directory)
{
using namespace lucene::index;
- return IndexReader::indexExists(directory);
+ return IndexReader::indexExists(directory.toLocal8Bit().constData());
}
QCLuceneIndexReader QCLuceneIndexReader::open(const QString &path)
@@ -73,7 +75,7 @@
using namespace lucene::index;
QCLuceneIndexReader indexReader;
- indexReader.d->reader = IndexReader::open(path);
+ indexReader.d->reader = IndexReader::open(path.toLocal8Bit().constData());
return indexReader;
}
@@ -81,25 +83,29 @@
void QCLuceneIndexReader::unlock(const QString &path)
{
using namespace lucene::index;
- IndexReader::unlock(path);
+ IndexReader::unlock(path.toLocal8Bit().constData());
}
bool QCLuceneIndexReader::isLocked(const QString &directory)
{
+ // The system CLucene fails here if the directory does not exist yet, unlike
+ // the bundled one. Work around that.
+ QDir::current().mkpath(directory);
+
using namespace lucene::index;
- return IndexReader::isLocked(directory);
+ return IndexReader::isLocked(directory.toLocal8Bit().constData());
}
quint64 QCLuceneIndexReader::lastModified(const QString &directory)
{
using namespace lucene::index;
- return quint64(IndexReader::lastModified(directory));
+ return quint64(IndexReader::lastModified(directory.toLocal8Bit().constData()));
}
qint64 QCLuceneIndexReader::getCurrentVersion(const QString &directory)
{
using namespace lucene::index;
- return qint64(IndexReader::getCurrentVersion(directory));
+ return qint64(IndexReader::getCurrentVersion(directory.toLocal8Bit().constData()));
}
void QCLuceneIndexReader::close()
@@ -155,7 +161,7 @@
void QCLuceneIndexReader::setNorm(qint32 doc, const QString &field, qreal value)
{
TCHAR *fieldName = QStringToTChar(field);
- d->reader->setNorm(int32_t(doc), fieldName, qreal(value));
+ d->reader->setNorm(int32_t(doc), fieldName, (float_t)value);
delete [] fieldName;
}
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexwriter.cpp qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexwriter.cpp
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexwriter.cpp 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexwriter.cpp 2014-10-26 02:48:27.000000000 +0100
@@ -18,6 +18,8 @@
#include "qindexwriter_p.h"
#include "qindexreader_p.h"
+#include <QtCore/QDir>
+
#include <CLucene.h>
#include <CLucene/index/IndexWriter.h>
@@ -50,7 +52,12 @@
: d(new QCLuceneIndexWriterPrivate())
, analyzer(analyzer)
{
- d->writer = new lucene::index::IndexWriter(path,
+ // The system CLucene cannot create directories recursively, so do it here.
+ // Ignore failure: If it failed, we will get an error from CLucene anyway.
+ if (create)
+ QDir::current().mkpath(path);
+
+ d->writer = new lucene::index::IndexWriter(path.toLocal8Bit().constData(),
analyzer.d->analyzer, create, closeDir);
}
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qsearchable.cpp qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qsearchable.cpp
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qsearchable.cpp 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qsearchable.cpp 2014-10-26 02:48:44.000000000 +0100
@@ -95,7 +95,7 @@
: QCLuceneSearcher()
{
lucene::search::IndexSearcher *searcher =
- new lucene::search::IndexSearcher(path);
+ new lucene::search::IndexSearcher(path.toLocal8Bit().constData());
reader.d->reader = searcher->getReader();
reader.d->deleteCLuceneIndexReader = false;
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/lib.pro qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/lib.pro
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/lib.pro 2014-04-10 20:37:12.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/lib.pro 2014-10-26 02:27:55.000000000 +0100
@@ -43,6 +43,7 @@
qhelp_global.cpp
# access to clucene
+INCLUDEPATH += /usr/include/clucene09 $$[QT_INSTALL_LIBS]/clucene09 $$[QT_INSTALL_LIBS]
SOURCES += qhelpsearchindexwriter_clucene.cpp \
qhelpsearchindexreader_clucene.cpp
HEADERS += qhelpenginecore.h \

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h.majmin qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h
--- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h.majmin 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h 2016-12-08 12:10:29.677359701 -0600
@@ -52,7 +52,7 @@
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
-#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
+#define QT_VERSION_CHECK(qt_version_check_major, qt_version_check_minor, qt_version_check_patch) ((qt_version_check_major<<16)|(qt_version_check_minor<<8)|(qt_version_check_patch))
#define QT_PACKAGEDATE_STR "2015-05-07"

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.than qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp
--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.than 2016-02-10 16:31:02.450152334 +0100
+++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp 2016-02-10 16:31:51.495307579 +0100
@@ -40,7 +40,7 @@
****************************************************************************/
#include <alsa/asoundlib.h>
-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
+#if(!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 10)))
#error "Alsa version found too old, require >= 1.0.10"
#endif

View File

@ -1,45 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp.ibase qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp
--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp.ibase 2015-05-07 09:14:42.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.cpp 2016-11-30 10:55:05.825339674 -0600
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <ibase.h>
+#include <firebird/ibase.h>
int main(int, char **)
{
diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro.ibase qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro
--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro.ibase 2015-05-07 09:14:42.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/ibase/ibase.pro 2016-11-30 10:56:11.017740104 -0600
@@ -1,4 +1,4 @@
SOURCES = ibase.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lgds
+LIBS += -lfbclient
diff -up qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h.ibase qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h
--- qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h.ibase 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.h 2016-11-30 10:57:34.516252974 -0600
@@ -45,7 +45,7 @@
#include <QtSql/qsqlresult.h>
#include <QtSql/qsqldriver.h>
#include <QtSql/private/qsqlcachedresult_p.h>
-#include <ibase.h>
+#include <firebird/ibase.h>
QT_BEGIN_HEADER
diff -up qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri.ibase qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri
--- qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri.ibase 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/sql/drivers/ibase/qsql_ibase.pri 2016-11-30 10:57:11.783113341 -0600
@@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_ibase.h
SOURCES += $$PWD/qsql_ibase.cpp
unix {
- !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
+ !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lfbclient
} else {
!contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
win32-borland:LIBS += gds32.lib

View File

@ -1,35 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensource-src-4.8.7/configure
--- qt-everywhere-opensource-src-4.8.7/configure.gcc6 2016-04-15 07:04:19.430268222 -0500
+++ qt-everywhere-opensource-src-4.8.7/configure 2016-04-15 07:05:22.157568689 -0500
@@ -7744,7 +7744,7 @@ case "$XPLATFORM" in
*-g++*)
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 5*|4*|3.4*)
+ 8*|7*|6*|5*|4*|3.4*)
;;
3.3*)
canBuildWebKit="no"
@@ -8060,7 +8060,7 @@ g++*)
3.*)
COMPILER_VERSION="3.*"
;;
- 5*|4.*)
+ 8*|7*|6*|5*|4.*)
COMPILER_VERSION="4"
;;
*)
diff -up qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h
--- qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h 2016-04-15 07:04:19.431268227 -0500
@@ -70,8 +70,8 @@ namespace QPatternist
ForegroundShift = 10,
BackgroundShift = 20,
SpecialShift = 20,
- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
+ ForegroundMask = 0x1f << ForegroundShift,
+ BackgroundMask = 0x7 << BackgroundShift
};
public:

View File

@ -1,13 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 qt-everywhere-opensource-src-4.8.7/src/script/script.pro
--- qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 2015-05-07 09:14:43.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/script/script.pro 2018-05-19 16:01:24.699926959 -0500
@@ -91,6 +91,9 @@ symbian {
TARGET.UID3=0x2001B2E1
}
+# hack around gcc8 optimization bug with -O2
+QMAKE_CXXFLAGS_RELEASE += -O1
+
symbian {
symbian-abld|symbian-sbsv2 {
MMP_RULES += ALWAYS_BUILD_AS_ARM

View File

@ -1,28 +0,0 @@
From: Fabian Vogt <fabian@ritter-vogt.de>
Subject: Fix build with ICU >= 59
ICU >= 59 requires C++11 for its header files.
Qt can't be compiled with -std=c++11 as a whole, so only enable
it for qlocale_icu.cpp.
Index: qt-everywhere-opensource-src-4.8.7/src/corelib/tools/tools.pri
===================================================================
--- qt-everywhere-opensource-src-4.8.7.orig/src/corelib/tools/tools.pri
+++ qt-everywhere-opensource-src-4.8.7/src/corelib/tools/tools.pri
@@ -102,7 +102,15 @@ contains(QT_CONFIG, zlib):include($$PWD/
else:include($$PWD/../../3rdparty/zlib_dependency.pri)
contains(QT_CONFIG,icu) {
- SOURCES += tools/qlocale_icu.cpp
+ cpp11.name = cpp11
+ cpp11.input = SOURCES_CPP11
+ cpp11.dependency_type = TYPE_C
+ cpp11.variable_out = OBJECTS
+ cpp11.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
+ cpp11.commands = $${QMAKE_CXX} $(CXXFLAGS) -std=c++11 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ QMAKE_EXTRA_COMPILERS += cpp11
+
+ SOURCES_CPP11 += tools/qlocale_icu.cpp
DEFINES += QT_USE_ICU
}

View File

@ -1,28 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp.mariadb qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp
--- qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp.mariadb 2015-05-07 09:14:48.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/sql/drivers/mysql/qsql_mysql.cpp 2017-10-23 14:13:15.871808984 -0500
@@ -1105,11 +1105,16 @@ static void qLibraryInit()
}
# endif // MYSQL_VERSION_ID
#endif // Q_NO_MYSQL_EMBEDDED
+
+#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID)
+ qAddPostRoutine(mysql_server_end);
+#endif
}
static void qLibraryEnd()
{
#ifndef Q_NO_MYSQL_EMBEDDED
+#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID)
# if MYSQL_VERSION_ID > 40000
# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
mysql_library_end();
@@ -1118,6 +1123,7 @@ static void qLibraryEnd()
# endif
# endif
#endif
+#endif
}
QMYSQLDriver::QMYSQLDriver(QObject * parent)

View File

@ -1,13 +0,0 @@
diff -urp qt-everywhere-opensource-src-4.8.7/configure q/configure
--- qt-everywhere-opensource-src-4.8.7/configure 2016-04-03 16:49:50.218644449 +0200
+++ q/configure 2016-04-03 17:22:35.376405024 +0200
@@ -3331,6 +3331,9 @@ arm*)
CFG_ARCH=arm
COMPAT_ARCH=armv6
;;
+mips*)
+ CFG_ARCH=mips
+ ;;
esac
if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then

View File

@ -1,694 +0,0 @@
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslcertificate.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslcertificate.cpp 2018-01-05 17:44:16.997588265 +0100
@@ -259,10 +259,10 @@
QByteArray QSslCertificate::version() const
{
QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
- if (d->versionString.isEmpty() && d->x509)
+ if (d->versionString.isEmpty() && d->x509) {
d->versionString =
- QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
-
+ QByteArray::number(qlonglong(q_X509_get_version(d->x509)) + 1);
+ }
return d->versionString;
}
@@ -276,7 +276,7 @@
{
QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
if (d->serialNumberString.isEmpty() && d->x509) {
- ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
+ ASN1_INTEGER *serialNumber = q_X509_get_serialNumber(d->x509);
// if we cannot convert to a long, just output the hexadecimal number
if (serialNumber->length > 4) {
QByteArray hexString;
@@ -489,24 +489,33 @@
QSslKey key;
key.d->type = QSsl::PublicKey;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
X509_PUBKEY *xkey = d->x509->cert_info->key;
+#else
+ X509_PUBKEY *xkey = q_X509_get_X509_PUBKEY(d->x509);
+#endif
EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey);
Q_ASSERT(pkey);
- if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
+ int key_id;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ key_id = q_EVP_PKEY_type(pkey->type);
+#else
+ key_id = q_EVP_PKEY_base_id(pkey);
+#endif
+ if (key_id == EVP_PKEY_RSA) {
key.d->rsa = q_EVP_PKEY_get1_RSA(pkey);
key.d->algorithm = QSsl::Rsa;
key.d->isNull = false;
- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
+ } else if (key_id == EVP_PKEY_DSA) {
key.d->dsa = q_EVP_PKEY_get1_DSA(pkey);
key.d->algorithm = QSsl::Dsa;
key.d->isNull = false;
- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
+ } else if (key_id == EVP_PKEY_DH) {
// DH unsupported
} else {
// error?
}
-
q_EVP_PKEY_free(pkey);
return key;
}
@@ -687,7 +696,11 @@
unsigned char *data = 0;
int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
q_CRYPTO_free(data);
+#else
+ q_CRYPTO_free(data, __FILE__, __LINE__);
+#endif
}
return info;
}
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslkey.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslkey.cpp 2018-01-05 18:00:27.453937599 +0100
@@ -321,8 +321,19 @@
{
if (d->isNull)
return -1;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
return (d->algorithm == QSsl::Rsa)
? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
+#else
+ if (d->algorithm == QSsl::Rsa) {
+ return q_RSA_bits(d->rsa);
+ } else {
+ const BIGNUM *p = (const BIGNUM *) NULL;
+ q_DSA_get0_pqg(d->dsa, &p, (const BIGNUM **) NULL, (const BIGNUM **) NULL);
+ return q_BN_num_bits(p);
+ }
+#endif
+
}
/*!
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl.cpp 2018-01-05 12:06:06.336990956 +0100
@@ -93,6 +93,7 @@
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
bool QSslSocketPrivate::s_loadRootCertsOnDemand = false;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
/* \internal
From OpenSSL's thread(3) manual page:
@@ -174,6 +175,8 @@
}
} // extern "C"
+#endif //OPENSSL_VERSION_NUMBER >= 0x10100000L
+
QSslSocketBackendPrivate::QSslSocketBackendPrivate()
: ssl(0),
ctx(0),
@@ -222,9 +225,12 @@
ciph.d->encryptionMethod = descriptionList.at(4).mid(4);
ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export"));
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
ciph.d->bits = cipher->strength_bits;
ciph.d->supportedBits = cipher->alg_bits;
-
+#else
+ ciph.d->bits = q_SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits);
+#endif
}
return ciph;
}
@@ -363,7 +369,7 @@
//
// See also: QSslContext::fromConfiguration()
if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) {
- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
+ q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle());
}
}
@@ -500,8 +506,10 @@
*/
void QSslSocketPrivate::deinitialize()
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
q_CRYPTO_set_id_callback(0);
q_CRYPTO_set_locking_callback(0);
+#endif
}
/*!
@@ -522,13 +530,17 @@
return false;
// Check if the library itself needs to be initialized.
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
QMutexLocker locker(openssl_locks()->initLock());
+#endif
if (!s_libraryLoaded) {
s_libraryLoaded = true;
// Initialize OpenSSL.
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
q_CRYPTO_set_id_callback(id_function);
q_CRYPTO_set_locking_callback(locking_function);
+#endif
if (q_SSL_library_init() != 1)
return false;
q_SSL_load_error_strings();
@@ -567,7 +579,9 @@
void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
{
- QMutexLocker locker(openssl_locks()->initLock());
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ QMutexLocker locker(openssl_locks()->initLock());
+#endif
if (s_loadedCiphersAndCerts)
return;
s_loadedCiphersAndCerts = true;
@@ -659,13 +673,18 @@
STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
- if (cipher->valid) {
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (cipher->valid) {
+#endif
QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
if (!ciph.isNull()) {
if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
ciphers << ciph;
}
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
}
+#endif
}
}
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_p.h qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_p.h
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_p.h 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_p.h 2018-01-05 12:06:06.337990940 +0100
@@ -84,6 +84,10 @@
#include <openssl/tls1.h>
#endif
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#define OPENSSL_NO_SSL2
+#endif
+
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
typedef _STACK STACK;
#endif
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols.cpp 2018-01-05 17:59:10.636973932 +0100
@@ -111,16 +111,30 @@
DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return);
DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
+#else
+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return)
+#endif
DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return 0, return)
DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
+#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
+#else
+DEFINEFUNC3(void, CRYPTO_free, void *a, a, const char *b, b, int c, c, return, DUMMYARG)
+#endif
DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
#if OPENSSL_VERSION_NUMBER < 0x00908000L
DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return)
@@ -157,6 +171,7 @@
DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
@@ -166,6 +181,12 @@
DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
#endif
+#else
+DEFINEFUNC(int, OPENSSL_sk_num, STACK *a, a, return -1, return)
+DEFINEFUNC2(void, OPENSSL_sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+DEFINEFUNC(void, OPENSSL_sk_free, _STACK *a, a, return, DUMMYARG)
+DEFINEFUNC2(void *, OPENSSL_sk_value, STACK *a, a, int b, b, return 0, return)
+#endif
DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
@@ -213,8 +234,12 @@
#else
DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, return -1, return)
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
+#else
+DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return)
+#endif
DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return)
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
@@ -229,13 +254,21 @@
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
@@ -274,7 +307,11 @@
DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return)
DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return)
DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return)
+#else
+DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return)
+#endif
DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return)
#ifdef SSLEAY_MACROS
DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return)
@@ -282,10 +319,34 @@
DEFINEFUNC3(RSA *, d2i_RSAPrivateKey, RSA **a, a, unsigned char **b, b, long c, c, return 0, return)
DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, c, return 0, return)
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG)
DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
+#else
+DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return)
+#endif
DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return)
+#else
+DEFINEFUNC(unsigned long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+#endif
+DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return)
+
+DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+DEFINEFUNC(int, EVP_PKEY_id, const EVP_PKEY *pkey, pkey, return 0, return)
+DEFINEFUNC(int, EVP_PKEY_base_id, const EVP_PKEY *pkey, pkey, return 0, return)
+DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return)
+DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return)
+DEFINEFUNC(long, X509_get_version, X509 *x, x, return 0, return)
+DEFINEFUNC(X509_PUBKEY *, X509_get_X509_PUBKEY, X509 *x, x, return 0, return)
+DEFINEFUNC(int, RSA_bits, const RSA *rsa, rsa, return 0, return)
+DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return)
+DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x, return 0, return)
+DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *x, x, return 0, return)
+DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, return)
+#endif
#ifdef Q_OS_SYMBIAN
#define RESOLVEFUNC(func, ordinal, lib) \
@@ -580,7 +641,11 @@
static volatile bool symbolsResolved = false;
static volatile bool triedToResolveSymbols = false;
#ifndef QT_NO_THREAD
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_SSL_library_init));
+#else
+ QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_OPENSSL_init_ssl));
+#endif
#endif
if (symbolsResolved)
return true;
@@ -614,9 +679,11 @@
RESOLVEFUNC(BIO_write, 269, libs.second )
RESOLVEFUNC(BN_num_bits, 387, libs.second )
RESOLVEFUNC(CRYPTO_free, 469, libs.second )
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(CRYPTO_num_locks, 500, libs.second )
RESOLVEFUNC(CRYPTO_set_id_callback, 513, libs.second )
RESOLVEFUNC(CRYPTO_set_locking_callback, 516, libs.second )
+#endif
RESOLVEFUNC(DSA_free, 594, libs.second )
RESOLVEFUNC(ERR_error_string, 744, libs.second )
RESOLVEFUNC(ERR_get_error, 749, libs.second )
@@ -674,8 +741,10 @@
RESOLVEFUNC(SSL_get_peer_cert_chain, 117, libs.first )
RESOLVEFUNC(SSL_get_peer_certificate, 118, libs.first )
RESOLVEFUNC(SSL_get_verify_result, 132, libs.first )
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSL_library_init, 137, libs.first )
RESOLVEFUNC(SSL_load_error_strings, 139, libs.first )
+#endif
RESOLVEFUNC(SSL_new, 140, libs.first )
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
RESOLVEFUNC(SSL_ctrl, 95, libs.first )
@@ -747,9 +816,11 @@
RESOLVEFUNC(BIO_write)
RESOLVEFUNC(BN_num_bits)
RESOLVEFUNC(CRYPTO_free)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(CRYPTO_num_locks)
RESOLVEFUNC(CRYPTO_set_id_callback)
RESOLVEFUNC(CRYPTO_set_locking_callback)
+#endif
RESOLVEFUNC(DSA_free)
RESOLVEFUNC(ERR_error_string)
RESOLVEFUNC(ERR_get_error)
@@ -779,10 +850,17 @@
RESOLVEFUNC(RAND_seed)
RESOLVEFUNC(RAND_status)
RESOLVEFUNC(RSA_free)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(sk_free)
RESOLVEFUNC(sk_num)
RESOLVEFUNC(sk_pop_free)
RESOLVEFUNC(sk_value)
+#else
+ RESOLVEFUNC(OPENSSL_sk_free)
+ RESOLVEFUNC(OPENSSL_sk_num)
+ RESOLVEFUNC(OPENSSL_sk_pop_free)
+ RESOLVEFUNC(OPENSSL_sk_value)
+#endif
RESOLVEFUNC(SSL_CIPHER_description)
RESOLVEFUNC(SSL_CTX_check_private_key)
RESOLVEFUNC(SSL_CTX_ctrl)
@@ -797,6 +875,7 @@
RESOLVEFUNC(SSL_CTX_use_PrivateKey)
RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+ RESOLVEFUNC(SSL_CTX_get_cert_store)
RESOLVEFUNC(SSL_accept)
RESOLVEFUNC(SSL_clear)
RESOLVEFUNC(SSL_connect)
@@ -807,8 +886,12 @@
RESOLVEFUNC(SSL_get_peer_cert_chain)
RESOLVEFUNC(SSL_get_peer_certificate)
RESOLVEFUNC(SSL_get_verify_result)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSL_library_init)
RESOLVEFUNC(SSL_load_error_strings)
+#else
+ RESOLVEFUNC(OPENSSL_init_ssl)
+#endif
RESOLVEFUNC(SSL_new)
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
RESOLVEFUNC(SSL_ctrl)
@@ -819,17 +902,47 @@
RESOLVEFUNC(SSL_set_connect_state)
RESOLVEFUNC(SSL_shutdown)
RESOLVEFUNC(SSL_write)
+
+ RESOLVEFUNC(X509_get_serialNumber)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ RESOLVEFUNC(SSL_CTX_ctrl)
+ RESOLVEFUNC(EVP_PKEY_id)
+ RESOLVEFUNC(EVP_PKEY_base_id)
+ RESOLVEFUNC(SSL_CIPHER_get_bits)
+ RESOLVEFUNC(SSL_CTX_set_options)
+ RESOLVEFUNC(X509_get_version)
+ RESOLVEFUNC(X509_get_X509_PUBKEY)
+ RESOLVEFUNC(RSA_bits)
+ RESOLVEFUNC(DSA_security_bits)
+ RESOLVEFUNC(DSA_get0_pqg)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ RESOLVEFUNC(X509_get_notAfter)
+ RESOLVEFUNC(X509_get_notBefore)
+#else
+ RESOLVEFUNC(X509_getm_notAfter)
+ RESOLVEFUNC(X509_getm_notBefore)
+#endif
+#endif
+
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_client_method)
#endif
RESOLVEFUNC(SSLv3_client_method)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLv23_client_method)
+#else
+ RESOLVEFUNC(TLS_client_method)
+#endif
RESOLVEFUNC(TLSv1_client_method)
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_server_method)
#endif
RESOLVEFUNC(SSLv3_server_method)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLv23_server_method)
+#else
+ RESOLVEFUNC(TLS_server_method)
+#endif
RESOLVEFUNC(TLSv1_server_method)
RESOLVEFUNC(X509_NAME_entry_count)
RESOLVEFUNC(X509_NAME_get_entry)
@@ -846,7 +959,11 @@
RESOLVEFUNC(X509_STORE_CTX_get_error)
RESOLVEFUNC(X509_STORE_CTX_get_error_depth)
RESOLVEFUNC(X509_STORE_CTX_get_current_cert)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(X509_STORE_CTX_get_chain)
+#else
+ RESOLVEFUNC(X509_STORE_CTX_get0_chain)
+#endif
RESOLVEFUNC(X509_cmp)
#ifndef SSLEAY_MACROS
RESOLVEFUNC(X509_dup)
@@ -867,10 +984,18 @@
RESOLVEFUNC(d2i_DSAPrivateKey)
RESOLVEFUNC(d2i_RSAPrivateKey)
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf)
RESOLVEFUNC(OPENSSL_add_all_algorithms_conf)
+#else
+ RESOLVEFUNC(OPENSSL_init_crypto)
+#endif
RESOLVEFUNC(SSL_CTX_load_verify_locations)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLeay)
+#else
+ RESOLVEFUNC(OpenSSL_version_num)
+#endif
#endif // Q_OS_SYMBIAN
symbolsResolved = true;
delete libs.first;
diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols_p.h
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h 2015-05-07 16:14:44.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-01-05 17:59:42.041550255 +0100
@@ -207,16 +207,31 @@
int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b);
long q_BIO_ctrl(BIO *a, int b, long c, void *d);
int q_BIO_free(BIO *a);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
BIO *q_BIO_new(BIO_METHOD *a);
+#else
+BIO *q_BIO_new(const BIO_METHOD *a);
+#endif
BIO *q_BIO_new_mem_buf(void *a, int b);
int q_BIO_read(BIO *a, void *b, int c);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
BIO_METHOD *q_BIO_s_mem();
+#else
+const BIO_METHOD *q_BIO_s_mem();
+#endif
int q_BIO_write(BIO *a, const void *b, int c);
int q_BN_num_bits(const BIGNUM *a);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
int q_CRYPTO_num_locks();
void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
void q_CRYPTO_set_id_callback(unsigned long (*a)());
void q_CRYPTO_free(void *a);
+#else
+#define q_CRYPTO_num_locks() 1
+#define q_CRYPTO_set_locking_callback(a)
+#define q_CRYPTO_set_id_callback(a)
+void q_CRYPTO_free(void *a, const char *b, int c);
+#endif
void q_DSA_free(DSA *a);
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
// 0.9.8 broke SC and BC by changing this function's signature.
@@ -258,6 +273,7 @@
void q_RAND_seed(const void *a, int b);
int q_RAND_status();
void q_RSA_free(RSA *a);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
int q_sk_num(STACK *a);
void q_sk_pop_free(STACK *a, void (*b)(void *));
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
@@ -267,6 +283,16 @@
void q_sk_free(STACK *a);
char * q_sk_value(STACK *a, int b);
#endif
+#else
+int q_OPENSSL_sk_num(STACK *a);
+void q_OPENSSL_sk_pop_free(STACK *a, void (*b)(void *));
+void q_OPENSSL_sk_free(_STACK *a);
+void * q_OPENSSL_sk_value(STACK *a, int b);
+#define q_sk_num q_OPENSSL_sk_num
+#define q_sk_pop_free q_OPENSSL_sk_pop_free
+#define q_sk_free q_OPENSSL_sk_free
+#define q_sk_value q_OPENSSL_sk_value
+#endif
int q_SSL_accept(SSL *a);
int q_SSL_clear(SSL *a);
char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c);
@@ -314,8 +340,14 @@
#else
long q_SSL_get_verify_result(SSL *a);
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
int q_SSL_library_init();
void q_SSL_load_error_strings();
+#else
+int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+#define q_SSL_library_init() q_OPENSSL_init_ssl(0, (const OPENSSL_INIT_SETTINGS *) NULL)
+#define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, (const OPENSSL_INIT_SETTINGS *) NULL)
+#endif
SSL *q_SSL_new(SSL_CTX *a);
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
@@ -328,11 +360,21 @@
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
const SSL_METHOD *q_SSLv2_client_method();
const SSL_METHOD *q_SSLv3_client_method();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
const SSL_METHOD *q_SSLv23_client_method();
+#else
+const SSL_METHOD *q_TLS_client_method();
+#define q_SSLv23_client_method q_TLS_client_method
+#endif
const SSL_METHOD *q_TLSv1_client_method();
const SSL_METHOD *q_SSLv2_server_method();
const SSL_METHOD *q_SSLv3_server_method();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
const SSL_METHOD *q_SSLv23_server_method();
+#else
+const SSL_METHOD *q_TLS_server_method();
+#define q_SSLv23_server_method q_TLS_server_method
+#endif
const SSL_METHOD *q_TLSv1_server_method();
#else
SSL_METHOD *q_SSLv2_client_method();
@@ -377,7 +419,12 @@
int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
+#else
+STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx);
+#define q_X509_STORE_CTX_get_chain q_X509_STORE_CTX_get0_chain
+#endif
#define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
#define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
@@ -399,7 +446,25 @@
PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\
bp,(char *)x,enc,kstr,klen,cb,u)
#endif
+
+X509_STORE * q_SSL_CTX_get_cert_store(const SSL_CTX *ctx);
+ASN1_INTEGER * q_X509_get_serialNumber(X509 *x);
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
+#define q_X509_get_version(x) X509_get_version(x)
+#else
+int q_EVP_PKEY_id(const EVP_PKEY *pkey);
+int q_EVP_PKEY_base_id(const EVP_PKEY *pkey);
+int q_SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits);
+long q_SSL_CTX_set_options(SSL_CTX *ctx, long options);
+long q_X509_get_version(X509 *x);
+X509_PUBKEY * q_X509_get_X509_PUBKEY(X509 *x);
+int q_RSA_bits(const RSA *rsa);
+int q_DSA_security_bits(const DSA *dsa);
+void q_DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
+#endif
+
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
#define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
@@ -410,8 +475,17 @@
#define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
#define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define q_X509_get_notAfter(x) X509_get_notAfter(x)
#define q_X509_get_notBefore(x) X509_get_notBefore(x)
+#else
+ASN1_TIME *q_X509_getm_notAfter(X509 *x);
+ASN1_TIME *q_X509_getm_notBefore(X509 *x);
+#define q_X509_get_notAfter(x) q_X509_getm_notAfter(x)
+#define q_X509_get_notBefore(x) q_X509_getm_notBefore(x)
+#endif
+
#define q_EVP_PKEY_assign_RSA(pkey,rsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
(char *)(rsa))
#define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
@@ -421,10 +495,21 @@
#else
#define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_noconf()
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
void q_OPENSSL_add_all_algorithms_noconf();
void q_OPENSSL_add_all_algorithms_conf();
+#else
+int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, (const OPENSSL_INIT_SETTINGS *) NULL)
+# define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, (const OPENSSL_INIT_SETTINGS *) NULL)
+#endif
int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
long q_SSLeay();
+#else
+unsigned long q_OpenSSL_version_num();
+#define q_SSLeay q_OpenSSL_version_num
+#endif
// Helper function
class QDateTime;

View File

@ -1,12 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix.qmake_LFLAGS qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix
--- qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix.qmake_LFLAGS 2015-05-07 09:14:42.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/qmake/Makefile.unix 2018-02-15 08:25:13.168838577 -0600
@@ -3,7 +3,7 @@ BUILD_PATH = @BUILD_PATH@
QTOBJS = @QMAKE_QTOBJS@
QTSRCS = @QMAKE_QTSRCS@
QMAKESPEC = @QMAKESPEC@
-LFLAGS = @QMAKE_LFLAGS@
+LFLAGS = @QMAKE_LFLAGS@ $(QMAKE_LFLAGS_RELEASE)
#qmake code
OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \

View File

@ -1,17 +0,0 @@
--- src/gui/kernel/qguiplatformplugin.cpp.adwaita 2015-02-12 14:32:45.217935391 +0100
+++ src/gui/kernel/qguiplatformplugin.cpp 2015-02-12 14:46:11.471866038 +0100
@@ -165,8 +165,13 @@ QString QGuiPlatformPlugin::styleName()
case DE_GNOME: {
QStringList availableStyles = QStyleFactory::keys();
// Set QGtkStyle for GNOME if available
+ QString adwaitaStyleKey = QString::fromLatin1("adwaita");
QString gtkStyleKey = QString::fromLatin1("GTK+");
- if (availableStyles.contains(gtkStyleKey)) {
+ if (availableStyles.contains(adwaitaStyleKey)) {
+ stylename = adwaitaStyleKey;
+ break;
+ }
+ else if (availableStyles.contains(gtkStyleKey)) {
stylename = gtkStyleKey;
break;
}

View File

@ -0,0 +1,10 @@
--- qt-x11-opensource-src-4.2.2/qmake/project.cpp.QMAKEPATH 2006-11-27 11:26:03.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/qmake/project.cpp 2007-02-26 13:45:39.000000000 -0600
@@ -498,6 +498,7 @@
ret << ((*it) + concat);
}
ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat;
+ ret << QLibraryInfo::location(QLibraryInfo::PrefixPath) + concat;
return ret;
}

View File

@ -0,0 +1,33 @@
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf 2007-02-26 15:01:02.000000000 -0600
@@ -14,6 +14,8 @@
QMAKE_CFLAGS = -m64
QMAKE_LFLAGS = -m64
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/g++.conf)
include(../common/linux.conf)
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf 2007-02-26 15:01:34.000000000 -0600
@@ -11,6 +11,8 @@
QMAKE_CFLAGS = -m32
QMAKE_LFLAGS = -m32
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/g++.conf)
include(../common/linux.conf)
load(qt_config)
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf 2007-02-26 15:01:26.000000000 -0600
@@ -8,6 +8,8 @@
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_CFLAGS_RELEASE += -O2
+
include(../common/g++.conf)
include(../common/linux.conf)
load(qt_config)

View File

@ -0,0 +1,14 @@
diff -up qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp.gcc_hack qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp
--- qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp.gcc_hack 2009-02-25 15:09:22.000000000 -0600
+++ qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp 2009-03-27 11:56:51.000000000 -0500
@@ -102,8 +102,8 @@ static QHash<void *, QByteArray> *asciiC
// internal
int qFindString(const QChar *haystack, int haystackLen, int from,
const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
-int qFindStringBoyerMoore(const QChar *haystack, int haystackLen, int from,
- const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
+//int qFindStringBoyerMoore(const QChar *haystack, int haystackLen, int from,
+// const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
// Unicode case-insensitive comparison

View File

@ -0,0 +1,19 @@
diff -up qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp.kde4_plugins qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp
--- qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp.kde4_plugins 2009-04-21 18:57:41.000000000 -0500
+++ qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp 2009-05-06 13:53:40.258081854 -0500
@@ -2061,6 +2061,15 @@ QStringList QCoreApplication::libraryPat
app_libpaths->append(installPathPlugins);
}
+ // hack in support for kde4 plugin paths -- Rex
+ QString kde4PathPlugins = QLibraryInfo::location(QLibraryInfo::LibrariesPath) + QLatin1String("/kde4/plugins");
+ if (QFile::exists(kde4PathPlugins)) {
+ // Make sure we convert from backslashes to slashes.
+ // kde4PathPlugins = QDir(kde4PathPlugins).canonicalPath();
+ if (!app_libpaths->contains(kde4PathPlugins))
+ app_libpaths->append(kde4PathPlugins);
+ }
+
// If QCoreApplication is not yet instantiated,
// make sure we add the application path when we construct the QCoreApplication
if (self) self->d_func()->appendApplicationPathToLibraryPaths();

View File

@ -0,0 +1,27 @@
diff -up qt-x11-opensource-src-4.5.1/configure.mysql_config qt-x11-opensource-src-4.5.1/configure
--- qt-x11-opensource-src-4.5.1/configure.mysql_config 2009-05-04 09:14:37.105826464 -0500
+++ qt-x11-opensource-src-4.5.1/configure 2009-05-04 09:15:26.747077312 -0500
@@ -4334,6 +4334,7 @@ if [ "$CFG_ACCESSIBILITY" = "auto" ]; th
CFG_ACCESSIBILITY=yes
fi
+set -x
# auto-detect SQL-modules support
for _SQLDR in $CFG_SQL_AVAILABLE; do
case $_SQLDR in
@@ -4342,8 +4343,15 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
[ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`$WHICH mysql_config`
if [ -x "$CFG_MYSQL_CONFIG" ]; then
QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
+ $CFG_MYSQL_CONFIG --pkglibdir &>/dev/null && \
+ QT_MYSQL_PKGLIBDIR=`$CFG_MYSQL_CONFIG --pkglibdir 2>/dev/null`
+ if [ -n "$QT_MYSQL_PKGLIBDIR" ]; then
+ QT_LFLAGS_MYSQL_R="-L$QT_MYSQL_PKGLIBDIR -lmysqlclient_r"
+ QT_LFLAGS_MYSQL="-L$QT_MYSQL_PKGLIBDIR -lmysqlclient"
+ else
QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
+ fi
QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
fi

View File

@ -0,0 +1,38 @@
diff -ur qt-orig/src/phonon/phonon.pro qt-x11-opensource-src-4.5.2/src/phonon/phonon.pro
--- qt-orig/src/phonon/phonon.pro 2009-06-20 06:57:57.000000000 +0200
+++ qt-x11-opensource-src-4.5.2/src/phonon/phonon.pro 2009-06-25 19:30:00.000000000 +0200
@@ -112,4 +112,9 @@
DEFINES += QT_NO_DBUS
}
+# install dbus service file
+sources.files = $$PHONON_DIR/org.kde.Phonon.AudioOutput.xml
+sources.path = /usr/share/dbus-1/interfaces
+INSTALLS += sources
+
contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
diff -ur qt-orig/src/plugins/phonon/gstreamer/gstreamer.pro qt-x11-opensource-src-4.5.2/src/plugins/phonon/gstreamer/gstreamer.pro
--- qt-orig/src/plugins/phonon/gstreamer/gstreamer.pro 2009-06-20 06:57:58.000000000 +0200
+++ qt-x11-opensource-src-4.5.2/src/plugins/phonon/gstreamer/gstreamer.pro 2009-06-25 19:31:36.000000000 +0200
@@ -62,6 +62,8 @@
}
target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
-INSTALLS += target
+services.files = $$PHONON_GSTREAMER_DIR/gstreamer.desktop
+services.path = /usr/share/kde4/services/phononbackends
+INSTALLS += target services
include(../../qpluginbase.pri)
diff -ur qt-orig/src/3rdparty/phonon/gstreamer/gstreamer.desktop qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/gstreamer.desktop
--- qt-orig/src/3rdparty/phonon/gstreamer/gstreamer.desktop 2009-06-20 06:57:54.000000000 +0200
+++ qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/gstreamer/gstreamer.desktop 2009-06-25 19:30:00.000000000 +0200
@@ -2,7 +2,7 @@
Type=Service
X-KDE-ServiceTypes=PhononBackend
MimeType=application/x-annodex;video/quicktime;video/x-quicktime;audio/x-m4a;application/x-quicktimeplayer;video/mkv;video/msvideo;video/x-msvideo;video/x-flic;audio/x-aiff;audio/aiff;audio/x-pn-aiff;audio/x-realaudio;audio/basic;audio/x-basic;audio/x-pn-au;audio/x-8svx;audio/8svx;audio/x-16sv;audio/168sv;image/x-ilbm;image/ilbm;video/x-anim;video/anim;image/png;image/x-png;video/mng;video/x-mng;audio/x-ogg;audio/x-speex+ogg;application/ogg;application/ogg;audio/vnd.rn-realaudio;audio/x-pn-realaudio-plugin;audio/x-real-audio;application/vnd.rn-realmedia;video/mpeg;video/x-mpeg;audio/x-wav;audio/wav;audio/x-pn-wav;audio/x-pn-windows-acm;audio/mpeg2;audio/x-mpeg2;audio/mpeg3;audio/x-mpeg3;audio/mpeg;audio/x-mpeg;x-mpegurl;audio/x-mpegurl;audio/mp3;audio/mpeg;
-X-KDE-Library=phonon_gstreamer
+X-KDE-Library=libphonon_gstreamer
X-KDE-PhononBackendInfo-InterfaceVersion=1
X-KDE-PhononBackendInfo-Version=0.1
X-KDE-PhononBackendInfo-Website=http://gstreamer.freedesktop.org/

View File

@ -0,0 +1,43 @@
diff -up qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/phonon/globalconfig.cpp.phonon-pulseaudio qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/phonon/globalconfig.cpp
--- qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/phonon/globalconfig.cpp.phonon-pulseaudio 2009-06-20 06:57:54.000000000 +0200
+++ qt-x11-opensource-src-4.5.2/src/3rdparty/phonon/phonon/globalconfig.cpp 2009-08-21 00:11:55.000000000 +0200
@@ -31,6 +31,7 @@
#include "phononnamespace_p.h"
#include <QtCore/QList>
+#include <QtCore/QHash>
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
@@ -167,6 +168,15 @@ QList<int> GlobalConfig::audioOutputDevi
| ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0)
);
}
+ // make PulseAudio the global default (assume it is already default in this list)
+ if (!list.isEmpty()) {
+ int firstIndex = list.first();
+ if (backendIface->objectDescriptionProperties(Phonon::AudioOutputDeviceType,
+ firstIndex)["name"].toString() == "PulseAudio") {
+ list.removeFirst();
+ defaultList.prepend(firstIndex);
+ }
+ }
defaultList += list;
}
@@ -222,6 +232,15 @@ QList<int> GlobalConfig::audioCaptureDev
| ((override & HideUnavailableDevices) ? FilterUnavailableDevices : 0)
);
}
+ // make PulseAudio the global default (assume it is already default in this list)
+ if (!list.isEmpty()) {
+ int firstIndex = list.first();
+ if (backendIface->objectDescriptionProperties(Phonon::AudioCaptureDeviceType,
+ firstIndex)["name"].toString() == "PulseAudio") {
+ list.removeFirst();
+ defaultList.prepend(firstIndex);
+ }
+ }
defaultList += list;
}

View File

@ -0,0 +1,25 @@
diff -up qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp.system_ca_certificates qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp
--- qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp.system_ca_certificates 2009-09-29 06:01:38.000000000 -0500
+++ qt-x11-opensource-src-4.5.3/src/network/ssl/qsslsocket_openssl.cpp 2009-10-02 11:20:10.674662746 -0500
@@ -482,8 +482,20 @@ void QSslSocketPrivate::resetDefaultCiph
QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
{
+
+ QFile caBundle;
+
+#ifdef Q_OS_UNIX
+ // Check known locations for the system's default bundle. ### On Windows,
+ // we should use CAPI to find the bundle, and not rely on default unix
+ // locations.
+ caBundle.setFileName(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"));
+ if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text))
+ return QSslCertificate::fromDevice(&caBundle);
+#endif
+
// Qt provides a default bundle of certificates
- QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt"));
+ caBundle.setFileName(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt"));
if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text))
return QSslCertificate::fromDevice(&caBundle);

2518
qt.spec

File diff suppressed because it is too large Load Diff

View File

@ -4,5 +4,7 @@ Comment=Configure Qt4 behavior, styles, fonts
Exec=qtconfig-qt4
Icon=qt4-logo
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Settings;
NoDisplay=true

View File

@ -4,5 +4,6 @@ Comment=Show Qt4 demos and programming examples
Exec=qtdemo-qt4
Icon=qt4-logo
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;

Some files were not shown because too many files have changed in this diff Show More