[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenox/konq-embed/kdesrc/khtml/patches
From: Eva Brucherseifer <eva () kde ! org>
Date: 2006-02-07 16:46:03
Message-ID: 1139330763.053861.8736.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 506807 by eva:
Qt2 port:
- fixed missing memory allocation in default constructor of DOMString
(Qt2 special version), strangely this function was rarely called
- we are now using QObjectListIt instead of QObjectListIterator
M +17 -5 khtml_qt2.3.patch
M +14 -2 rendering_qt2.3.patch
M +13 -12 xml_qt2.3.patch
--- trunk/kdenox/konq-embed/kdesrc/khtml/patches/khtml_qt2.3.patch #506806:506807
@@ -575,7 +575,19 @@
if (!strcmp(w->name(), "__khtml")) {
w->installEventFilter(this);
w->unsetCursor();
-@@ -1870,7 +1936,12 @@ bool KHTMLView::eventFilter(QObject *o,
+@@ -1850,7 +1916,11 @@ bool KHTMLView::eventFilter(QObject *o,
+ w->setBackgroundMode( QWidget::NoBackground );
+ static_cast<HackWidget *>(w)->setNoErase();
+ if (w->children()) {
++#if (QT_VERSION < 0x030000)
++ QObjectListIt it(*w->children());
++#else
+ QObjectListIterator it(*w->children());
++#endif
+ for (; it.current(); ++it) {
+ QWidget *widget = ::qt_cast<QWidget *>(it.current());
+ if (widget && !widget->isTopLevel()) {
+@@ -1870,7 +1940,12 @@ bool KHTMLView::eventFilter(QObject *o,
QWidget *c = v;
while (v && v != view) {
c = v;
@@ -588,7 +600,7 @@
}
if (v && !strcmp(c->name(), "__khtml")) {
-@@ -2641,7 +2712,7 @@ QMap< ElementImpl*, QChar > KHTMLView::b
+@@ -2641,7 +2716,7 @@ QMap< ElementImpl*, QChar > KHTMLView::b
}
}
if( key.isNull())
@@ -597,7 +609,7 @@
ret[ (*it).element ] = key;
keys.remove( key );
QString url = (*it).url;
-@@ -3096,7 +3167,11 @@ bool KHTMLView::dispatchMouseEvent(int e
+@@ -3096,7 +3171,11 @@ bool KHTMLView::dispatchMouseEvent(int e
bool ctrlKey = (_mouse->state() & ControlButton);
bool altKey = (_mouse->state() & AltButton);
bool shiftKey = (_mouse->state() & ShiftButton);
@@ -609,7 +621,7 @@
// mouseout/mouseover
if (setUnder && (d->prevMouseX != pageX || d->prevMouseY != pageY)) {
-@@ -3200,6 +3275,12 @@ void KHTMLView::viewportWheelEvent(QWhee
+@@ -3200,6 +3279,12 @@ void KHTMLView::viewportWheelEvent(QWhee
{
e->accept();
}
@@ -622,7 +634,7 @@
else if( ( (e->orientation() == Vertical &&
((d->ignoreWheelEvents && !verticalScrollBar()->isVisible())
|| e->delta() > 0 && contentsY() <= 0
-@@ -3210,13 +3291,18 @@ void KHTMLView::viewportWheelEvent(QWhee
+@@ -3210,13 +3295,18 @@ void KHTMLView::viewportWheelEvent(QWhee
|| e->delta() > 0 && contentsX() <=0
|| e->delta() < 0 && contentsX() >= contentsWidth() - visibleWidth())))
&& m_part->parentPart())
--- trunk/kdenox/konq-embed/kdesrc/khtml/patches/rendering_qt2.3.patch #506806:506807
@@ -1146,7 +1146,19 @@
// The PaintBuffer class provides a shared buffer for widget painting.
//
-@@ -659,16 +678,16 @@ bool RenderWidget::eventFilter(QObject*
+@@ -507,7 +526,11 @@ static void copyWidget(const QRect& r, Q
+
+ if (widget->children()) {
+ // build region
++#if (QT_VERSION < 0x030000)
++ QObjectListIt it = *widget->children();
++#else
+ QObjectListIterator it = *widget->children();
++#endif
+ for (; it.current(); ++it) {
+ QWidget* const w = ::qt_cast<QWidget *>(it.current());
+ if ( w && !w->isTopLevel() && !w->isHidden()) {
+@@ -659,16 +682,16 @@ bool RenderWidget::eventFilter(QObject*
void RenderWidget::EventPropagator::sendEvent(QEvent *e) {
switch(e->type()) {
case QEvent::MouseButtonPress:
@@ -1167,7 +1179,7 @@
break;
case QEvent::KeyPress:
keyPressEvent(static_cast<QKeyEvent *>(e));
-@@ -739,14 +758,15 @@ bool RenderWidget::handleEvent(const DOM
+@@ -739,14 +762,15 @@ bool RenderWidget::handleEvent(const DOM
state |= AltButton;
if (me.shiftKey())
state |= ShiftButton;
--- trunk/kdenox/konq-embed/kdesrc/khtml/patches/xml_qt2.3.patch #506806:506807
@@ -284,7 +284,7 @@
bool m_changed : 1;
--- ./dom_stringimpl.cpp
+++ khtml/xml/dom_stringimpl.cpp
-@@ -29,30 +29,133 @@
+@@ -29,30 +29,134 @@
#include <string.h>
#include <qstringlist.h>
@@ -310,6 +310,7 @@
+{
+ s = QT_ALLOC_QCHAR_VEC( 1 );
+ s[0] = 0x0;
++ ushort_s = ALLOC_USHORT_VEC( 1 );
+ ushort_s[0] = 0;
+ l = 0;
+}
@@ -423,7 +424,7 @@
// FIXME: should be a cached flag maybe.
bool DOMStringImpl::containsOnlyWhitespace() const
{
-@@ -61,8 +164,8 @@ bool DOMStringImpl::containsOnlyWhitespa
+@@ -61,8 +165,8 @@ bool DOMStringImpl::containsOnlyWhitespa
for (uint i = 0; i < l; i++) {
QChar c = s[i];
@@ -434,7 +435,7 @@
return false;
} else {
if (c.direction() != QChar::DirWS)
-@@ -73,21 +176,26 @@ bool DOMStringImpl::containsOnlyWhitespa
+@@ -73,21 +177,26 @@ bool DOMStringImpl::containsOnlyWhitespa
}
@@ -463,7 +464,7 @@
{
if(pos > l)
{
-@@ -98,11 +206,17 @@ void DOMStringImpl::insert(DOMStringImpl
+@@ -98,11 +207,17 @@ void DOMStringImpl::insert(DOMStringImpl
{
int newlen = l+str->l;
QChar *c = QT_ALLOC_QCHAR_VEC(newlen);
@@ -481,7 +482,7 @@
l = newlen;
}
}
-@@ -113,9 +227,13 @@ void DOMStringImpl::truncate(int len)
+@@ -113,9 +228,13 @@ void DOMStringImpl::truncate(int len)
int nl = len < 1 ? 1 : len;
QChar *c = QT_ALLOC_QCHAR_VEC(nl);
@@ -495,7 +496,7 @@
l = len;
}
-@@ -127,10 +245,17 @@ void DOMStringImpl::remove(uint pos, int
+@@ -127,10 +246,17 @@ void DOMStringImpl::remove(uint pos, int
uint newLen = l-len;
QChar *c = QT_ALLOC_QCHAR_VEC(newLen);
@@ -513,7 +514,7 @@
l = newLen;
}
-@@ -139,8 +264,6 @@ DOMStringImpl *DOMStringImpl::split(uint
+@@ -139,8 +265,6 @@ DOMStringImpl *DOMStringImpl::split(uint
if( pos >=l ) return new DOMStringImpl();
uint newLen = l-pos;
@@ -522,7 +523,7 @@
DOMStringImpl *str = new DOMStringImpl(s + pos, newLen);
truncate(pos);
-@@ -213,10 +336,8 @@ DOMStringImpl *DOMStringImpl::collapseWh
+@@ -213,10 +337,8 @@ DOMStringImpl *DOMStringImpl::collapseWh
return this;
}
else {
@@ -535,7 +536,7 @@
return out;
}
}
-@@ -236,7 +357,7 @@ static Length parseLength(const QChar *s
+@@ -236,7 +358,7 @@ static Length parseLength(const QChar *s
++i;
bool ok;
@@ -544,7 +545,7 @@
/* Skip over any remaining digits, we are not that accurate (5.5% => 5%) */
while (i < l && (s[i].isDigit() || s[i] == '.'))
-@@ -336,30 +457,30 @@ bool DOMStringImpl::isLower() const
+@@ -336,30 +458,30 @@ bool DOMStringImpl::isLower() const
DOMStringImpl *DOMStringImpl::lower() const
{
@@ -587,7 +588,7 @@
}
DOMStringImpl *DOMStringImpl::capitalize() const
-@@ -368,7 +489,10 @@ DOMStringImpl *DOMStringImpl::capitalize
+@@ -368,7 +490,10 @@ DOMStringImpl *DOMStringImpl::capitalize
DOMStringImpl *c = new DOMStringImpl;
if(!l) return c;
@@ -598,7 +599,7 @@
c->l = l;
for (unsigned int i=0; i<l; i++)
-@@ -385,6 +509,9 @@ DOMStringImpl *DOMStringImpl::capitalize
+@@ -385,6 +510,9 @@ DOMStringImpl *DOMStringImpl::capitalize
canCapitalize=true;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic