[Pkg-kde-commits] rev 2426 - trunk/packages/kdelibs/debian/patches
Christopher Martin
chrsmrtn at costa.debian.org
Tue Nov 29 22:24:37 UTC 2005
Author: chrsmrtn
Date: 2005-11-29 22:24:36 +0000 (Tue, 29 Nov 2005)
New Revision: 2426
Added:
trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r484194.diff
Log:
kdelibs branch pull.
Added: trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r484194.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r484194.diff 2005-11-29 22:23:58 UTC (rev 2425)
+++ trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r484194.diff 2005-11-29 22:24:36 UTC (rev 2426)
@@ -0,0 +1,668 @@
+#DPATCHLEVEL=0
+--- libkscreensaver/kscreensaver_vroot.h (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ libkscreensaver/kscreensaver_vroot.h (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -94,15 +94,18 @@
+ Atom actual_type;
+ int actual_format;
+ unsigned long nitems, bytesafter;
+- Window *newRoot = (Window *)0;
++ unsigned char *newRoot = 0;
+
+ if (XGetWindowProperty(dpy, children[i],
+ __SWM_VROOT, 0, 1, False, XA_WINDOW,
+ &actual_type, &actual_format,
+ &nitems, &bytesafter,
+- (unsigned char **) &newRoot) == Success
+- && newRoot) {
+- root = *newRoot;
++ &newRoot) == Success
++ && newRoot)
++ {
++ void *tmpRoot = (void *) newRoot;
++ root = *(Window*) tmpRoot;
++ XFree( (char*) newRoot );
+ break;
+ }
+ }
+--- interfaces/kspeech/kspeech.h (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ interfaces/kspeech/kspeech.h (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -1170,6 +1170,12 @@
+ * Re-start %KTTSD.
+ */
+ virtual void reinit() = 0;
++
++ /**
++ * Return the KTTSD deamon version number.
++ * @since KDE 3.5
++ */
++ virtual QString version() = 0;
+ //@}
+
+ k_dcop_signals:
+--- kunittest/runner.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kunittest/runner.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -224,6 +224,10 @@
+ int numXFail = 0;
+ int numXPass = 0;
+ int numSkip = 0;
++ QStringList xpassList;
++ QStringList errorList;
++ QStringList xfailList;
++ QStringList skipList;
+
+ if ( test->inherits("KUnitTest::SlotTester") )
+ {
+@@ -237,6 +241,11 @@
+ numXPass += it.current()->xpasses();
+ numSkip += it.current()->skipped();
+ globalSteps += it.current()->testsFinished();
++
++ xpassList += it.current()->xpassList();
++ errorList += it.current()->errorList();
++ xfailList += it.current()->xfailList();
++ skipList += it.current()->skipList();
+ }
+ }
+ else
+@@ -247,6 +256,11 @@
+ numXPass = test->results()->xpasses();
+ numSkip= test->results()->skipped();
+ globalSteps += test->results()->testsFinished();
++
++ xpassList += test->results()->xpassList();
++ errorList += test->results()->errorList();
++ xfailList += test->results()->xfailList();
++ skipList += test->results()->skipList();
+ }
+
+
+@@ -258,7 +272,7 @@
+
+ cout << name << " - ";
+ cout << numPass << " test" << ( ( 1 == numPass )?"":"s") << " passed";
+- if ( 0 < test->results()->xpassList().count() ) {
++ if ( 0 < xpassList.count() ) {
+ cout << " (" << numXPass << " unexpected pass" << ( ( 1 == numXPass )?"":"es") << ")";
+ }
+ cout << ", " << numFail << " test" << ( ( 1 == numFail )?"":"s") << " failed";
+@@ -272,28 +286,28 @@
+
+ if ( 0 < numXPass ) {
+ cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl;
+- QStringList list = test->results()->xpassList();
++ QStringList list = xpassList;
+ for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ cout << "\t" << (*itr).latin1() << endl;
+ }
+ }
+ if ( 0 < (numFail - numXFail) ) {
+ cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl;
+- QStringList list = test->results()->errorList();
++ QStringList list = errorList;
+ for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ cout << "\t" << (*itr).latin1() << endl;
+ }
+ }
+ if ( 0 < numXFail ) {
+ cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl;
+- QStringList list = test->results()->xfailList();
++ QStringList list = xfailList;
+ for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ cout << "\t" << (*itr).latin1() << endl;
+ }
+ }
+ if ( 0 < numSkip ) {
+ cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl;
+- QStringList list = test->results()->skipList();
++ QStringList list = skipList;
+ for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
+ cout << "\t" << (*itr).latin1() << endl;
+ }
+--- kunittest/module.h (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kunittest/module.h (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -115,6 +115,6 @@
+ kunittest_registerModuleTester(fullName.local8Bit(), test); \
+ } \
+ } tester##ModuleAutoregisterInstance;
+-};
++}
+
+ #endif
+--- kunittest/tester.h (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kunittest/tester.h (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -338,6 +338,12 @@
+ */
+ #define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y, false )
+
++/// for source-compat with qttestlib: use COMPARE(x,y) if you plan to port to qttestlib later.
++#define COMPARE CHECK
++
++/// for source-compat with qttestlib: use VERIFY(x) if you plan to port to qttestlib later.
++#define VERIFY( x ) CHECK( x, true )
++
+ /*! @def XFAIL(x,y)
+ * Use this macro to perform a check you expect to fail. For example
+ *
+--- kio/kfile/kopenwith.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kio/kfile/kopenwith.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -151,7 +151,7 @@
+ setRootIsDecorated( true );
+
+ addDesktopGroup( QString::null );
+- cleanupTree();
++ cleanupTree();
+
+ connect( this, SIGNAL( currentChanged(QListViewItem*) ),
+ SLOT( slotItemHighlighted(QListViewItem*) ) );
+@@ -214,7 +214,7 @@
+ {
+ KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p);
+
+- if (serviceGroup->noDisplay())
++ if (serviceGroup->noDisplay() || serviceGroup->childCount() == 0)
+ continue;
+
+ icon = serviceGroup->icon();
+@@ -292,23 +292,6 @@
+ {
+ if(item->isExpandable())
+ {
+- item->setOpen(true);
+- if(item->childCount()==0) {
+- QListViewItem *current=item;
+- item=item->itemBelow();
+- delete current;
+- continue;
+- }
+- item=item->itemBelow();
+- continue;
+- }
+- item=item->itemBelow();
+- }
+- item=firstChild();
+- while(item!=0)
+- {
+- if(item->isExpandable())
+- {
+ QListViewItem *temp=item->itemBelow();
+ if(item->text(0)!=i18n("Applications"))
+ item->setOpen(false);
+--- kstyles/plastik/plastik.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kstyles/plastik/plastik.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -2399,6 +2399,7 @@
+ }
+ else
+ {
++ p->setPen(cg.buttonText());
+ drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ cg, flags, opt );
+ w -= dx;
+--- kdecore/ksycoca.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/ksycoca.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -144,8 +144,9 @@
+ }
+ else
+ {
++#ifdef HAVE_MADVISE
+ (void) madvise((void*)m_sycoca_mmap, m_sycoca_size, MADV_WILLNEED);
+-
++#endif
+ QByteArray b_array;
+ b_array.setRawData(m_sycoca_mmap, m_sycoca_size);
+ QBuffer *buffer = new QBuffer( b_array );
+--- kdecore/klibloader.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/klibloader.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -181,7 +181,7 @@
+ void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname );
+ if ( !sym )
+ {
+- KLibLoader::self()->d->errorMessage = "KLibrary: " + QString::fromLatin1( lt_dlerror() );
++ KLibLoader::self()->d->errorMessage = "KLibrary: " + QString::fromLocal8Bit( lt_dlerror() );
+ kdWarning(150) << KLibLoader::self()->d->errorMessage << endl;
+ return 0;
+ }
+@@ -431,7 +431,7 @@
+ {
+ const char* errmsg = lt_dlerror();
+ if(errmsg)
+- d->errorMessage = QString::fromLatin1(errmsg);
++ d->errorMessage = QString::fromLocal8Bit(errmsg);
+ else
+ d->errorMessage = QString::null;
+ return 0;
+--- kdecore/kipc.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/kipc.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -43,15 +43,15 @@
+ {
+ Atom real_type;
+ int format;
+- unsigned long n, extra, *p = 0, res;
++ unsigned long n, extra, res = 0;
+ int status;
++ unsigned char *p = 0;
+
+- res = 0;
+ status = XGetWindowProperty(qt_xdisplay(), w, a, 0L, 1L, False, a,
+- &real_type, &format, &n, &extra, (unsigned char **) &p);
++ &real_type, &format, &n, &extra, &p);
+ if ((status == Success) && (n == 1) && (format == 32))
+- res = p[0];
+- if (p) XFree((char *) p);
++ res = *(unsigned long*)p;
++ if (p) XFree(p);
+ return res;
+ }
+ #endif
+--- kdecore/krootprop.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/krootprop.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -78,7 +78,6 @@
+ unsigned long nitems;
+ unsigned long bytes_after;
+ long offset;
+- char *buf;
+
+ // If a property has already been opened write
+ // the dictionary back to the root window
+@@ -96,13 +95,15 @@
+ offset = 0; bytes_after = 1;
+ while (bytes_after != 0)
+ {
+- XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), atom, offset, 256,
++ unsigned char *buf = 0;
++ if (XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), atom, offset, 256,
+ False, XA_STRING, &type, &format, &nitems, &bytes_after,
+- (unsigned char **)&buf);
+- s += QString::fromUtf8(buf);
+- offset += nitems/4;
+- if (buf)
++ &buf) == Success && buf)
++ {
++ s += QString::fromUtf8((const char*)buf);
++ offset += nitems/4;
+ XFree(buf);
++ }
+ }
+
+ // Parse through the property string stripping out key value pairs
+--- kdecore/kcharsets.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/kcharsets.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -61,60 +61,54 @@
+ I18N_NOOP( "South-Eastern Europe" )
+ };
+
+-// this list gives the charsets that can be used to display a file given in a certain encoding.
+-// the list should be in order of preference
+-// left side is the name returned by the codec used, right side the name of the charset as
+-// used in kcharsets.cpp
+-// 'unicode' will always be chosen as last resort, so it only needs to be added to the list,
+-// if it should get a higher priority
+-// every line must end with 0
+-
++// This list gives the charsets that can be used to display a file given in a certain encoding.
++// The list should be in order of preference
+ static const char* const charsets_for_encoding[] = {
+- "koi8-r", "koi8-r","cp 1251","koi8-u","iso-8859-5", 0,
+- "koi8-u", "koi8-u","cp 1251","iso-8859-5","koi8-r", 0,
+- "iso 8859-1", "iso8859-1","iso8859-15", 0,
+- "iso 8859-2", "iso8859-2","unicode","iso8859-1", 0,
+- "iso 8859-3", "iso8859-3","unicode","iso8859-1", 0,
+- "iso 8859-4", "iso8859-4","unicode","iso8859-13", "iso8859-1", 0,
+- "iso 8859-5", "iso8859-5","koi8-u","koi8-r", 0,
+- "iso 8859-6", "unicode","iso8859-6", 0,
+- "iso 8859-7", "iso8859-7", 0,
+- "iso 8859-8", "iso8859-8", 0,
+- "iso 8859-8-i", "iso8859-8", 0,
+- "iso 8859-9", "iso8859-9","unicode","iso8859-1", 0,
+- "iso 8859-11", "iso8859-11", 0,
+- "iso 8859-13", "iso8859-13","unicode","iso8859-4", "iso8859-1", 0,
+- "iso 8859-14", "iso8859-15", "iso8859-1", 0,
+- "iso 8859-15", "iso8859-15","unicode","iso8859-1", 0,
+- "iso 8859-16", "iso8859-2", 0, // ISO-8859-2 is not a replacement
+- "utf8", "unicode","iso8859-1", 0,
+- "utf16", "unicode","iso8859-1", 0,
+- "iso-10646-ucs-2", "unicode","iso8859-1", 0,
+- "cp 1250", "iso8859-2", 0,
+- "cp 1251", "cp 1251","koi8-u","koi8-r","iso8859-5", 0,
+- "cp 1252", "iso8859-1", 0,
+- "cp 1253", "iso8859-7", 0,
+- "cp 1254", "iso8859-9", 0,
+- "cp 1255", "iso8859-8", 0,
+- "cp 1256", "unicode","iso8859-6", 0,
+- "cp 1257", "iso8859-13", "iso8859-4", 0,
+- "cp 1258", "iso8859-1", 0, // ISO-8859-1 is not a replacement
+- "ibm850", "ibm850","unicode","iso8859-1", 0,
+- "ibm852", "unicode","iso-8859-2", 0,
+- "ibm866", "ibm866","cp 1251","koi8-u","koi8-r","iso8859-5", 0,
+- "tis620", "iso8859-11", 0,
+- "eucjp", "eucjp","unicode","iso8859-1", 0,
+- "sjis", "eucjp","unicode","iso8859-1", 0,
+- "jis7", "eucjp","unicode","iso8859-1", 0,
+- "big5", "big5","unicode","iso8859-1", 0,
+- "gbk", "gb2312.1980-0","gbk-0","unicode","iso8859-1", "gb_2312-80", 0,
+- "gb18030", "gb18030.2000-1", "gb18030.2000-0", "unicode", "gbk-0", "gb2313.1980-0", "iso8859-1", 0,
+- "gb2312", "gb2312.1980-0","unicode","iso8859-1", 0,
+- "euckr", "euckr","unicode","iso8859-1", 0,
+- "tscii", "tscii", 0,
+-// "pt 154", "pt 154","cp 1251","koi8-u","koi8-r","iso8859-5", 0,
+- "winsami2", "winsami2", "cp1252", "unicode", 0,
+- "cp 874", "tis620", 0,
++ "koi8-r",
++ "koi8-u",
++ "iso 8859-1",
++ "iso 8859-2",
++ "iso 8859-3",
++ "iso 8859-4",
++ "iso 8859-5",
++ "iso 8859-6",
++ "iso 8859-7",
++ "iso 8859-8",
++ "iso 8859-8-i",
++ "iso 8859-9",
++ "iso 8859-11",
++ "iso 8859-13",
++ "iso 8859-14",
++ "iso 8859-15",
++ "iso 8859-16",
++ "utf8",
++ "utf16",
++ "iso-10646-ucs-2",
++ "cp 1250",
++ "cp 1251",
++ "cp 1252",
++ "cp 1253",
++ "cp 1254",
++ "cp 1255",
++ "cp 1256",
++ "cp 1257",
++ "cp 1258",
++ "ibm850",
++ "ibm852",
++ "ibm866",
++ "tis620",
++ "eucjp",
++ "sjis",
++ "jis7",
++ "big5",
++ "gbk",
++ "gb18030",
++ "gb2312",
++ "euckr",
++ "tscii",
++// "pt 154",
++ "winsami2",
++ "cp 874",
+ 0 }; // extra 0 for end
+
+ // 0 other
+@@ -477,29 +471,9 @@
+ QStringList KCharsets::availableEncodingNames()
+ {
+ QStringList available;
+-
+- const char* const* pos = charsets_for_encoding;
+- while( *pos != 0 ) {
+- //kdDebug(0) << "key = " << *pos << endl;
+-
+-
+- // iterate thorugh the list and find the first charset that is available
+- for( const char* const* charsets = pos + 1;
+- *charsets != 0;
+- ++charsets ) {
+- //kdDebug(0) << "checking for " << *charsets << endl;
+-#ifdef __GNUC__
+-#warning FIXME?
+-#endif
+- if( true ) {
+- //kdDebug(0) << *charsets << " available" << endl;
+- available.append( QString::fromLatin1( *pos ));
+- break;
+- }
+- }
+- while( *pos != 0 ) // find end of line
+- ++pos;
+- ++pos; // move to the next line
++ for ( const char* const* pos = charsets_for_encoding; *pos; ++pos ) {
++ //kdDebug(0) << *charsets << " available" << endl;
++ available.append( QString::fromLatin1( *pos ));
+ }
+ return available;
+ }
+@@ -530,14 +504,15 @@
+
+ QStringList KCharsets::descriptiveEncodingNames()
+ {
+- QStringList encodings = availableEncodingNames();
+- QStringList::Iterator it;
+- for( it = encodings.begin(); it != encodings.end(); ++it ) {
+- QString lang = KGlobal::charsets()->languageForEncoding( *it );
+- *it = i18n("Descriptive Encoding Name", "%1 ( %2 )") .arg(lang) .arg(*it);
+- }
+- encodings.sort();
+- return encodings;
++ // As we are sorting, we can directly read the array language_for_encoding
++ QStringList encodings;
++ for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) {
++ const QString name = QString::fromLatin1( pos->index );
++ const QString description = i18n( language_names[ pos->data ] );
++ encodings.append( i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( name ) );
++ }
++ encodings.sort();
++ return encodings;
+ }
+
+ QTextCodec *KCharsets::codecForName(const QString &n) const
+--- kdecore/configure.in.in (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/configure.in.in (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -83,7 +83,7 @@
+
+ KDE_CHECK_HEADERS([netinet/in.h net/if.h],,,[$netincludes])
+ KDE_CHECK_HEADERS([sys/filio.h])
+-AC_CHECK_FUNCS([usleep poll])
++AC_CHECK_FUNCS([usleep poll madvise])
+
+ dnl Check for struct addrinfo
+ AC_CHECK_TYPES([struct addrinfo],,,[$netincludes])
+--- kdecore/ksock.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdecore/ksock.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -224,7 +224,7 @@
+ KInetSocketAddress *ksin = (KInetSocketAddress*)sa;
+ const sockaddr_in *sin = ksin->addressV4();
+ if (sin != NULL)
+- retval = *(unsigned long*)&sin->sin_addr; // I told you this was dumb
++ retval = sin->sin_addr.s_addr;
+ }
+ delete sa;
+ return retval;
+@@ -388,14 +388,14 @@
+
+ if (sin->sin_family == PF_INET)
+ // correct family
+- return ntohl(*(unsigned long*)&sin->sin_addr);
++ return ntohl(sin->sin_addr.s_addr);
+ #ifdef PF_INET6
+ else if (sin->sin_family == PF_INET6)
+ {
+ KInetSocketAddress *ksin = (KInetSocketAddress*)sa;
+ sin = ksin->addressV4();
+ if (sin != NULL)
+- return *(unsigned long*)&sin->sin_addr;
++ return sin->sin_addr.s_addr;
+ }
+ #endif
+ return 0; // this is dumb, isn't it?
+--- khtml/khtml_part.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ khtml/khtml_part.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -6680,13 +6680,46 @@
+ }
+
+ if ( KHTMLFactory::defaultHTMLSettings()->isHideAdsEnabled() ) {
+- for ( NodeImpl *node = d->m_doc; node; node = node->traverseNextNode() ) {
++ for ( NodeImpl *nextNode, *node = d->m_doc; node; node = nextNode ) {
++
++ // We might be deleting 'node' shortly.
++ nextNode = node->traverseNextNode();
++
+ if ( node->id() == ID_IMG ||
+ node->id() == ID_IFRAME ||
+ (node->id() == ID_INPUT && !strcasecmp( static_cast<ElementImpl *>(node)->getAttribute(ATTR_TYPE), "image")) )
+ {
+ if ( KHTMLFactory::defaultHTMLSettings()->isAdFiltered( d->m_doc->completeURL( static_cast<ElementImpl *>(node)->getAttribute(ATTR_SRC).string() ) ) )
++ {
++ // We found an IMG, IFRAME or INPUT (of type "image") matching a filter.
++
++ // Detach the node from the document and rendering trees.
+ node->detach();
++
++ // Connect its siblings to each other instead.
++ NodeImpl *next = node->nextSibling();
++ NodeImpl *prev = node->previousSibling();
++
++ if( next ) next->setPreviousSibling( prev );
++ if( prev ) prev->setNextSibling( next );
++
++ // If it's the first or last child of its parent, we cut it off there too.
++ NodeImpl *parent = node->parent();
++ if( parent )
++ {
++ if( node == parent->firstChild() )
++ parent->setFirstChild( next );
++
++ if( node == parent->lastChild() )
++ parent->setLastChild( prev );
++ }
++
++ node->removedFromDocument();
++
++ // If nobody needs this node, we can safely delete it.
++ if( !node->refCount() )
++ delete node;
++ }
+ }
+ }
+ }
+--- khtml/ecma/xmlhttprequest.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ khtml/ecma/xmlhttprequest.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -246,6 +246,8 @@
+ if (state != newState) {
+ state = newState;
+
++ ref();
++
+ if (onReadyStateChangeListener != 0 && doc->view() && doc->view()->part()) {
+ DOM::Event ev = doc->view()->part()->document().createEvent("HTMLEvents");
+ ev.initEvent("readystatechange", true, true);
+@@ -257,6 +259,8 @@
+ ev.initEvent("load", true, true);
+ onLoadListener->handleEvent(ev);
+ }
++
++ deref();
+ }
+ }
+
+@@ -709,7 +713,7 @@
+ }
+ case XMLHttpRequest::Send:
+ {
+- if (args.size() > 1) {
++ if (args.size() != 1) {
+ return Undefined();
+ }
+
+@@ -718,24 +722,21 @@
+ }
+
+ QString body;
++ Object obj = Object::dynamicCast(args[0]);
++ if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
++ DOM::Node docNode = static_cast<KJS::DOMDocument *>(obj.imp())->toNode();
++ DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(docNode.handle());
++
++ try {
++ body = doc->toString().string();
++ // FIXME: also need to set content type, including encoding!
+
+- if (args.size() >= 1) {
+- Object obj = Object::dynamicCast(args[0]);
+- if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
+- DOM::Node docNode = static_cast<KJS::DOMDocument *>(obj.imp())->toNode();
+- DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(docNode.handle());
+-
+- try {
+- body = doc->toString().string();
+- // FIXME: also need to set content type, including encoding!
+-
+- } catch(DOM::DOMException& e) {
+- Object err = Error::create(exec, GeneralError, "Exception serializing document");
+- exec->setException(err);
+- }
+- } else {
+- body = args[0].toString(exec).qstring();
+- }
++ } catch(DOM::DOMException& e) {
++ Object err = Error::create(exec, GeneralError, "Exception serializing document");
++ exec->setException(err);
++ }
++ } else {
++ body = args[0].toString(exec).qstring();
+ }
+
+ request->send(body);
+--- khtml/ecma/kjs_window.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ khtml/ecma/kjs_window.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -21,6 +21,16 @@
+ */
+ #include "config.h"
+
++#include "khtmlview.h"
++#include "khtml_part.h"
++#include "khtmlpart_p.h"
++#include "khtml_settings.h"
++#include "xml/dom2_eventsimpl.h"
++#include "xml/dom_docimpl.h"
++#include "misc/htmltags.h"
++#include "html/html_documentimpl.h"
++#include "rendering/render_frames.h"
++
+ #include <qstylesheet.h>
+ #include <qtimer.h>
+ #include <qpaintdevicemetrics.h>
+@@ -60,16 +70,6 @@
+ #include "xmlserializer.h"
+ #include "domparser.h"
+
+-#include "khtmlview.h"
+-#include "khtml_part.h"
+-#include "khtmlpart_p.h"
+-#include "khtml_settings.h"
+-#include "xml/dom2_eventsimpl.h"
+-#include "xml/dom_docimpl.h"
+-#include "misc/htmltags.h"
+-#include "html/html_documentimpl.h"
+-#include "rendering/render_frames.h"
+-
+ using namespace KJS;
+
+ namespace KJS {
+--- kdoctools/customization/es/user.entities (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdoctools/customization/es/user.entities (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -9,6 +9,7 @@
+ <!ENTITY Alt "<keycap>Alt</keycap>">
+ <!ENTITY amarok "<application>amaroK</application>">
+ <!ENTITY Backspace "<keycap>Retroceso</keycap>">
++<!ENTITY cdrom "<hardware>CD-ROM</hardware>">
+ <!ENTITY Ctrl "<keycap>Ctrl</keycap>">
+ <!ENTITY digikam "<application>digiKam</application>">
+ <!ENTITY dpi "<acronym>ppp</acronym>">
+--- kdeprint/cups/kmcupsmanager.cpp (.../tags/KDE/3.5.0/kdelibs) (revision 484194)
++++ kdeprint/cups/kmcupsmanager.cpp (.../branches/KDE/3.5/kdelibs) (revision 484194)
+@@ -431,6 +431,9 @@
+ keys.append("printer-is-accepting-jobs");
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",keys);
+
++ // filtering by username (hides printers user doesn't have allowance to use)
++ req.addName(IPP_TAG_OPERATION, "requesting-user-name", QString(cupsUser()));
++
+ if (req.doRequest("/printers/"))
+ {
+ processRequest(&req);
More information about the pkg-kde-commits
mailing list