summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 20:10:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 20:10:08 +0000
commitf7279a489b22c536c0cf5916abbe66390072d8b2 (patch)
tree59682a9f6772edb36e999f50a6b20a6a6d685033
parentc8554ed8c29bbd676e1b48eb23c0ead827d8313f (diff)
downloadtdelibs-f7279a489b22c536c0cf5916abbe66390072d8b2.tar.gz
tdelibs-f7279a489b22c536c0cf5916abbe66390072d8b2.zip
* Imported all kdelibs bugfix patches from Chakra project
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1172682 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kdeprint/kdeprintrc1
-rw-r--r--khtml/ecma/kjs_dom.cpp16
-rw-r--r--kio/kio/configure.in.in3
-rw-r--r--kio/kio/kdirlister.cpp12
-rw-r--r--kio/kio/kdirwatch.cpp18
-rw-r--r--kioslave/http/http.cc1
6 files changed, 35 insertions, 16 deletions
diff --git a/kdeprint/kdeprintrc b/kdeprint/kdeprintrc
index 9b4e6fd94..7e34d8e9e 100644
--- a/kdeprint/kdeprintrc
+++ b/kdeprint/kdeprintrc
@@ -1,4 +1,5 @@
[General]
+PrintSystem=cups
Orientation=1
ViewType=1
ViewToolBar=false
diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp
index c96e99939..08afc6aab 100644
--- a/khtml/ecma/kjs_dom.cpp
+++ b/khtml/ecma/kjs_dom.cpp
@@ -335,26 +335,26 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
switch (token) {
case OffsetLeft:
- return rend ? static_cast<Value>( Number( rend->offsetLeft() ) ) : Undefined();
+ return rend ? static_cast<Value>( Number( rend->offsetLeft() ) ) : Number(0);
case OffsetTop:
- return rend ? static_cast<Value>( Number( rend->offsetTop() ) ) : Undefined();
+ return rend ? static_cast<Value>( Number( rend->offsetTop() ) ) : Number(0);
case OffsetWidth:
- return rend ? static_cast<Value>( Number( rend->offsetWidth() ) ) : Undefined();
+ return rend ? static_cast<Value>( Number( rend->offsetWidth() ) ) : Number(0);
case OffsetHeight:
- return rend ? static_cast<Value>( Number( rend->offsetHeight() ) ) : Undefined();
+ return rend ? static_cast<Value>( Number( rend->offsetHeight() ) ) : Number(0);
case OffsetParent:
{
khtml::RenderObject* par = rend ? rend->offsetParent() : 0;
return getDOMNode( exec, par ? par->element() : 0 );
}
case ClientWidth:
- return rend ? static_cast<Value>( Number( rend->clientWidth() ) ) : Undefined();
+ return rend ? static_cast<Value>( Number( rend->clientWidth() ) ) : Number(0);
case ClientHeight:
- return rend ? static_cast<Value>( Number( rend->clientHeight() ) ) : Undefined();
+ return rend ? static_cast<Value>( Number( rend->clientHeight() ) ) : Number(0);
case ScrollWidth:
- return rend ? static_cast<Value>( Number(rend->scrollWidth()) ) : Undefined();
+ return rend ? static_cast<Value>( Number(rend->scrollWidth()) ) : Number(0);
case ScrollHeight:
- return rend ? static_cast<Value>( Number(rend->scrollHeight()) ) : Undefined();
+ return rend ? static_cast<Value>( Number(rend->scrollHeight()) ) : Number(0);
case ScrollLeft:
if (rend && rend->layer()) {
if (rend->isRoot() && !rend->style()->hidesOverflow())
diff --git a/kio/kio/configure.in.in b/kio/kio/configure.in.in
index 4d07ef964..8683dfec1 100644
--- a/kio/kio/configure.in.in
+++ b/kio/kio/configure.in.in
@@ -130,9 +130,6 @@ if test "x$kde_enable_inotify" = "xyes"; then
#ifndef IN_ALL_EVENTS
#error no inotify notification
#endif
-#ifndef __NR_inotify_init
-#error no __NR_inotify_init
-#endif
],kde_cv_have_inotify=yes,kde_cv_have_inotify=no)
diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp
index 7be6da985..901f382b8 100644
--- a/kio/kio/kdirlister.cpp
+++ b/kio/kio/kdirlister.cpp
@@ -447,8 +447,11 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
url.adjustPath( -1 );
TQString urlStr = url.url();
TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
- Q_ASSERT( holders );
- holders->removeRef( lister );
+ //Q_ASSERT( holders );
+ if ( holders )
+ {
+ holders->removeRef( lister );
+ }
// remove the dir from lister->d->lstDirs so that it doesn't contain things
// that itemsInUse doesn't. When emitting the canceled signals lstDirs must
@@ -457,9 +460,8 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
lister->d->lstDirs.remove( lister->d->lstDirs.find( url ) );
DirItem *item = itemsInUse[urlStr];
- Q_ASSERT( item );
- if ( holders->isEmpty() )
+ if ( holders && holders->isEmpty() )
{
urlsCurrentlyHeld.remove( urlStr ); // this deletes the (empty) holders list
if ( !urlsCurrentlyListed[urlStr] )
@@ -486,7 +488,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
if ( notify )
emit lister->clear( url );
- if ( item->complete )
+ if ( item && item->complete )
{
kdDebug(7004) << k_funcinfo << lister << " item moved into cache: " << url << endl;
itemsCached.insert( urlStr, item ); // TODO: may return false!!
diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp
index 38cd8f866..bbea148fa 100644
--- a/kio/kio/kdirwatch.cpp
+++ b/kio/kio/kdirwatch.cpp
@@ -73,6 +73,24 @@
#define _S390_BITOPS_H
#include <sys/inotify.h>
+#ifndef __NR_inotify_init
+#if defined(__i386__)
+#define __NR_inotify_init 291
+#define __NR_inotify_add_watch 292
+#define __NR_inotify_rm_watch 293
+#endif
+#if defined(__PPC__)
+#define __NR_inotify_init 275
+#define __NR_inotify_add_watch 276
+#define __NR_inotify_rm_watch 277
+#endif
+#if defined(__x86_64__)
+#define __NR_inotify_init 253
+#define __NR_inotify_add_watch 254
+#define __NR_inotify_rm_watch 255
+#endif
+#endif
+
#ifndef IN_ONLYDIR
#define IN_ONLYDIR 0x01000000
#endif
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
index 4fa95780f..c8faf40cb 100644
--- a/kioslave/http/http.cc
+++ b/kioslave/http/http.cc
@@ -2850,6 +2850,7 @@ try_again:
m_responseHeader << TQString::fromLatin1(buf);
if ((strncasecmp(buf, "HTTP", 4) == 0) ||
+ if ((strncasecmp(buf, "HTTP/", 5) == 0) ||
(strncasecmp(buf, "ICY ", 4) == 0)) // Shoutcast support
{
if (strncasecmp(buf, "ICY ", 4) == 0)