diff options
author | Carsten Lohrke <carlo@gentoo.org> | 2006-04-17 18:28:09 +0000 |
---|---|---|
committer | Carsten Lohrke <carlo@gentoo.org> | 2006-04-17 18:28:09 +0000 |
commit | b811beb5500ee5f7d81bdffc9d3197a0daf592a4 (patch) | |
tree | 1e9597f8bd47749a75a6ed701f120d7881551c2b /kde-base/kdelibs/files | |
parent | Stable on ppc. (diff) | |
download | gentoo-2-b811beb5500ee5f7d81bdffc9d3197a0daf592a4.tar.gz gentoo-2-b811beb5500ee5f7d81bdffc9d3197a0daf592a4.tar.bz2 gentoo-2-b811beb5500ee5f7d81bdffc9d3197a0daf592a4.zip |
Updated patch set, fixing various issues.
(Portage version: 2.0.54)
Diffstat (limited to 'kde-base/kdelibs/files')
-rw-r--r-- | kde-base/kdelibs/files/digest-kdelibs-3.5.2-r3 | 1 | ||||
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-3.5.2-kate-fixes-2.diff | 366 | ||||
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-3.5.2-kio-fixes.diff | 177 | ||||
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes.diff | 446 |
4 files changed, 990 insertions, 0 deletions
diff --git a/kde-base/kdelibs/files/digest-kdelibs-3.5.2-r3 b/kde-base/kdelibs/files/digest-kdelibs-3.5.2-r3 new file mode 100644 index 000000000000..7399e31d3824 --- /dev/null +++ b/kde-base/kdelibs/files/digest-kdelibs-3.5.2-r3 @@ -0,0 +1 @@ +MD5 367738696dc468859cf90d5a6e8f18a9 kdelibs-3.5.2.tar.bz2 15442103 diff --git a/kde-base/kdelibs/files/kdelibs-3.5.2-kate-fixes-2.diff b/kde-base/kdelibs/files/kdelibs-3.5.2-kate-fixes-2.diff new file mode 100644 index 000000000000..a2abc7b1febf --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-3.5.2-kate-fixes-2.diff @@ -0,0 +1,366 @@ +--- kdelibs/kate/part/katedocument.cpp 2006/01/08 19:00:12 495724 ++++ kdelibs/kate/part/katedocument.cpp 2006/04/02 12:12:26 525537 +@@ -699,6 +699,10 @@ + + bool replacetabs = ( config()->configFlags() & KateDocumentConfig::cfReplaceTabsDyn && ! m_isInUndo ); + uint tw = config()->tabWidth(); ++ uint insertPosExpanded = insertPos; ++ KateTextLine::Ptr l = m_buffer->line( line ); ++ if (l != 0) ++ insertPosExpanded = l->cursorX( insertPos, tw ); + + for (uint pos = 0; pos < len; pos++) + { +@@ -706,28 +710,30 @@ + + if (ch == '\n') + { ++ editInsertText (line, insertPos, buf); ++ + if ( !blockwise ) + { +- editInsertText (line, insertPos, buf); + editWrapLine (line, insertPos + buf.length()); ++ insertPos = insertPosExpanded = 0; + } + else + { +- editInsertText (line, col, buf); +- + if ( line == lastLine() ) +- editWrapLine (line, col + buf.length()); ++ editWrapLine (line, insertPos + buf.length()); + } + + line++; +- insertPos = 0; + buf.truncate(0); ++ l = m_buffer->line( line ); ++ if (l) ++ insertPosExpanded = l->cursorX( insertPos, tw ); + } + else + { + if ( replacetabs && ch == '\t' ) + { +- uint tr = tw - ( ((blockwise?col:insertPos)+buf.length())%tw ); //### ++ uint tr = tw - ( insertPosExpanded+buf.length() )%tw; + for ( uint i=0; i < tr; i++ ) + buf += ' '; + } +@@ -736,10 +742,7 @@ + } + } + +- if ( !blockwise ) +- editInsertText (line, insertPos, buf); +- else +- editInsertText (line, col, buf); ++ editInsertText (line, insertPos, buf); + + editEnd (); + emit textInserted(line,insertPos); +@@ -3097,29 +3100,7 @@ + if (pos < 0 || pos >= (int)colX) + { + // only spaces on left side of cursor +- // search a line with less spaces +- int y = line; +- while (--y >= 0) +- { +- // this is save, y <= line, and line was already success +- textLine = m_buffer->plainLine(y); +- +- pos = textLine->firstChar(); +- +- if (pos >= 0) +- { +- pos = textLine->cursorX(pos, config()->tabWidth()); +- if (pos < (int)colX) +- { +- replaceWithOptimizedSpace(line, col, pos, config()->configFlags()); +- break; +- } +- } +- } +- if (y < 0) { +- // FIXME: what shoud we do in this case? +- removeText(line, 0, line, col+complement); +- } ++ indent( view, line, -1); + } + else + removeText(line, col-1, line, col+complement); +--- kdelibs/kate/data/ada.xml 2005/07/26 18:54:59 438982 ++++ kdelibs/kate/data/ada.xml 2006/04/01 13:39:45 525264 +@@ -73,14 +73,16 @@ + <context attribute="Normal Text" lineEndContext="#stay" name="Default"> + <RegExpr attribute="Keyword" context="#stay" String="if " insensitive="TRUE" beginRegion="Region1" firstNonSpace="true"/> + <StringDetect attribute="Keyword" context="#stay" String="end if" insensitive="TRUE" endRegion="Region1"/> +- <RegExpr attribute="Keyword" context="#stay" String="case " insensitive="TRUE" beginRegion="Region2" firstNonSpace="true"/> +- <StringDetect attribute="Keyword" context="#stay" String="end case" insensitive="TRUE" endRegion="Region2"/> + <RegExpr attribute="Keyword" context="#stay" String="\sloop\s+" insensitive="TRUE" beginRegion="Region3"/> + <RegExpr attribute="Keyword" context="#stay" String="\sloop$" insensitive="TRUE" beginRegion="Region3"/> + <StringDetect attribute="Keyword" context="#stay" String="end loop;" insensitive="TRUE" endRegion="Region3"/> + <RegExpr attribute="Keyword" context="#stay" String="\sselect\s+" insensitive="TRUE" beginRegion="Region4"/> + <RegExpr attribute="Keyword" context="#stay" String="\sselect$" insensitive="TRUE" beginRegion="Region4"/> + <StringDetect attribute="Keyword" context="#stay" String="end select;" insensitive="TRUE" endRegion="Region4"/> ++ <RegExpr attribute="Keyword" context="#stay" String="\b(begin|case|record)\b" insensitive="true" beginRegion="Region5"/> ++ <RegExpr attribute="Keyword" context="#stay" String="\bend(?=((\{[^}]*(\}|$)|\(\*.*(\*\)|$))*)([.;\s]|$)|//|$)" insensitive="true" endRegion="Region5"/> ++ <StringDetect attribute="Region Marker" context="Region Marker" String="-- BEGIN" beginRegion="RegionMarker" firstNonSpace="true" /> ++ <StringDetect attribute="Region Marker" context="Region Marker" String="-- END" endRegion="RegionMarker" firstNonSpace="true" /> + <keyword attribute="Keyword" context="#stay" String="keywords"/> + <Float attribute="Float" context="#stay"/> + <Int attribute="Decimal" context="#stay"/> +@@ -88,6 +90,7 @@ + <DetectChar attribute="String" context="String" char="""/> + <Detect2Chars attribute="Comment" context="Comment" char="-" char1="-"/> + </context> ++ <context attribute="Region Marker" lineEndContext="#pop" name="Region Marker"/> + <context attribute="String" lineEndContext="#pop" name="String"> + <DetectChar attribute="String" context="#pop" char="""/> + </context> +@@ -102,6 +105,7 @@ + <itemData name="Char" defStyleNum="dsChar" /> + <itemData name="String" defStyleNum="dsString" /> + <itemData name="Comment" defStyleNum="dsComment" /> ++ <itemData name="Region Marker" defStyleNum="dsRegionMarker" /> + </itemDatas> + </highlighting> + <general> +--- kdelibs/kate/data/cpp.xml 2006/01/02 21:02:02 493660 ++++ kdelibs/kate/data/cpp.xml 2006/04/01 13:39:45 525264 +@@ -1,6 +1,6 @@ + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE language SYSTEM "language.dtd"> +-<language name="C++" version="1.34" kateversion="2.4" section="Sources" extensions="*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.hxx;*.hpp;*.hcc;*.moc" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" priority="9"> ++<language name="C++" version="1.36" kateversion="2.4" section="Sources" extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" priority="9"> + <highlighting> + <list name="keywords"> + <item> asm </item> +@@ -31,6 +31,7 @@ + <item> private </item> + <item> protected </item> + <item> public </item> ++ <item> qobject_cast </item> + <item> reinterpret_cast </item> + <item> return </item> + <item> sizeof </item> +@@ -79,6 +80,33 @@ + <item> Q_OVERRIDE </item> + <item> Q_PROPERTY </item> + <item> Q_SETS </item> ++ <item> Q_SIGNALS </item> ++ <item> Q_SLOTS </item> ++ <item> Q_FOREACH </item> ++ <item> Q_DECLARE_FLAGS </item> ++ <item> Q_INIT_RESOURCE </item> ++ <item> Q_CLEANUP_RESOURCE </item> ++ <item> Q_GLOBAL_STATIC </item> ++ <item> Q_GLOBAL_STATIC_WITH_ARGS </item> ++ <item> Q_DECLARE_TYPEINFO </item> ++ <item> Q_DECLARE_SHARED </item> ++ <item> Q_DECLARE_FLAGS </item> ++ <item> Q_DECLARE_OPERATORS_FOR_FLAGS </item> ++ <item> Q_FOREVER </item> ++ <item> Q_DECLARE_PRIVATE </item> ++ <item> Q_DECLARE_PUBLIC </item> ++ <item> Q_D </item> ++ <item> Q_Q </item> ++ <item> Q_DISABLE_COPY </item> ++ <item> Q_INTERFACES </item> ++ <item> Q_FLAGS </item> ++ <item> Q_SCRIPTABLE </item> ++ <item> Q_INVOKABLE </item> ++ <item> Q_GADGET </item> ++ <item> Q_ARG </item> ++ <item> Q_RETURN_ARG </item> ++ <item> Q_ASSERT </item> ++ <item> Q_ASSERT_X </item> + <item> TRUE </item> + <item> FALSE </item> + <item> connect </item> +@@ -87,6 +115,7 @@ + <item> signals </item> + <item> slots </item> + <item> foreach </item> ++ <item> forever </item> + </list> + <list name="types"> + <item> auto </item> +--- kdelibs/kate/data/logtalk.xml 2005/07/26 18:54:59 438982 ++++ kdelibs/kate/data/logtalk.xml 2006/04/01 13:39:45 525264 +@@ -1,7 +1,7 @@ + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE language SYSTEM "language.dtd"> + +-<language name="Logtalk" version="1.40" kateversion="2.4" section="Sources" extensions="*.lgt;*.config" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Artistic License 2.0"> ++<language name="Logtalk" version="1.51" kateversion="2.4" section="Sources" extensions="*.lgt;*.config" mimetype="text/x-logtalk" author="Paulo Moura (pmoura@logtalk.org)" license="Artistic License 2.0"> + + <highlighting> + +@@ -17,11 +17,11 @@ + <!-- Reflection --> + <RegExpr String = "\b(current_predicate|predicate_property)(?=[(])" attribute = "Built-in" context = "#stay" /> + <!-- DCGs --> +- <RegExpr String = "\b(expand_term|phrase)(?=[(])" attribute = "Built-in" context = "#stay" /> ++ <RegExpr String = "\b(expand_term|term_expansion|phrase)(?=[(])" attribute = "Built-in" context = "#stay" /> + <!-- Entity --> + <RegExpr String = "\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])" attribute = "Built-in" context = "#stay" /> + <RegExpr String = "\b(object|protocol|category)_property(?=[(])" attribute = "Built-in" context = "#stay" /> +- <!-- Event handlers --> ++ <!-- Entity relations --> + <RegExpr String = "\bextends_(object|protocol)(?=[(])" attribute = "Built-in" context = "#stay" /> + <RegExpr String = "\bimplements_protocol(?=[(])" attribute = "Built-in" context = "#stay" /> + <RegExpr String = "\b(instantiates|specializes)_class(?=[(])" attribute = "Built-in" context = "#stay" /> +@@ -48,7 +48,7 @@ + <RegExpr String = "\b(rem|mod|abs|sign)(?=[(])" attribute = "Built-in" context = "#stay" /> + <RegExpr String = "\bfloat(_(integer|fractional)_part)?(?=[(])" attribute = "Built-in" context = "#stay" /> + <RegExpr String = "\b(floor|truncate|round|ceiling)(?=[(])" attribute = "Built-in" context = "#stay" /> +- <!-- Other arithemtic functors --> ++ <!-- Other arithmetic functors --> + <RegExpr String = "\b(cos|atan|exp|log|s(in|qrt))(?=[(])" attribute = "Built-in" context = "#stay" /> + <!-- Term testing --> + <RegExpr String = "\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])" attribute = "Built-in" context = "#stay" /> +@@ -149,15 +149,16 @@ + <!-- Entity directives --> + <RegExpr String = "\b(category|object|protocol)(?=[(])" attribute = "Directive" context = "entityrelations" beginRegion = "Entity"/> + <RegExpr String = "\bend_(category|object|protocol)[.]" attribute = "Directive" context = "#pop" endRegion = "Entity" /> ++ <RegExpr String = "\bmodule(?=[(])" attribute = "Directive" context = "#pop"/> + <!-- Predicate scope directives --> + <RegExpr String = "\bp(ublic|r(otected|ivate))(?=[(])" attribute = "Directive" context = "#pop" /> + <!-- Other directives --> +- <RegExpr String = "\bencoding(?=[(])" attribute = "Directive" context = "#pop" /> ++ <RegExpr String = "\be(ncoding|xport)(?=[(])" attribute = "Directive" context = "#pop" /> + <RegExpr String = "\bin(fo|itialization)(?=[(])" attribute = "Directive" context = "#pop" /> + <RegExpr String = "\bdynamic[.]" attribute = "Directive" context = "#pop" /> +- <RegExpr String = "\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])" attribute = "Directive" context = "#pop" /> ++ <RegExpr String = "\b(alias|d(ynamic|iscontiguous)|meta_predicate|m(etapredicate|ode|ultifile))(?=[(])" attribute = "Directive" context = "#pop" /> + <RegExpr String = "\bop(?=[(])" attribute = "Directive" context = "#pop" /> +- <RegExpr String = "\b(calls|uses)(?=[(])" attribute = "Directive" context = "#pop" /> ++ <RegExpr String = "\b(calls|use(s|_module))(?=[(])" attribute = "Directive" context = "#pop" /> + </context> + + <context name = "entityrelations" attribute = "Normal" lineEndContext = "#stay" > +--- kdelibs/kate/data/lua.xml 2005/07/26 18:54:59 438982 ++++ kdelibs/kate/data/lua.xml 2006/04/01 13:39:45 525264 +@@ -1,6 +1,6 @@ + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE language SYSTEM "language.dtd"> +-<language name="Lua" version="0.22" kateversion="2.3" section="Scripts" extensions="*.lua" mimetype="text/x-lua"> ++<language name="Lua" version="0.23" kateversion="2.3" section="Scripts" extensions="*.lua" mimetype="text/x-lua"> + <highlighting> + <list name="keywords"> + <item> and </item> +@@ -19,7 +19,7 @@ + <item> else </item> + <item> or </item> + <item> while </item> +- <item> elsif </item> ++ <item> elseif </item> + <item> in </item> + <item> repeat </item> + </list> +--- kdelibs/kate/data/php.xml 2005/09/29 19:26:30 465432 ++++ kdelibs/kate/data/php.xml 2006/04/01 13:39:45 525264 +@@ -1,6 +1,12 @@ + <?xml version="1.0" encoding="UTF-8"?> ++<!-- ++ Changes: version 1.25 -> 1.26 ++ Date: 26/01/2006 ++ Change author: Nicola Gigante ++ Added alternative syntax control structures and named logical operators (and or xor) ++--> + <!DOCTYPE language SYSTEM "language.dtd"> +-<language name="PHP/PHP" version="1.25" kateversion="2.4" section="Scripts" extensions="" priority="5" mimetype="" hidden="true"> ++<language name="PHP/PHP" version="1.26" kateversion="2.4" section="Scripts" extensions="" priority="5" mimetype="" hidden="true"> + <highlighting> + <list name="control structures"> + <item>as</item> +@@ -21,6 +27,11 @@ + <item>include</item> + <item>require_once</item> + <item>include_once</item> ++ <item>endif</item> ++ <item>endwhile</item> ++ <item>endfor</item> ++ <item>endforeach</item> ++ <item>endswitch</item> + </list> + <list name="keywords"> + <item> abstract </item> +@@ -42,6 +53,9 @@ + <item> public </item> + <item> throw </item> + <item> try </item> ++ <item> and </item> ++ <item> or </item> ++ <item> xor </item> + <item> var </item> + <item> __FILE__ </item> + <item> __LINE__ </item> +--- kdelibs/kate/data/ruby.xml 2006/02/14 17:22:27 509424 ++++ kdelibs/kate/data/ruby.xml 2006/03/28 19:38:13 523673 +@@ -34,7 +34,7 @@ + --> + + <!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". --> +-<language name="Ruby" version="1.17" kateversion="2.4" section="Scripts" extensions="*.rb;*.rxml" mimetype="application/x-ruby" author="Stefan Lang (langstefan@gmx.at), Sebastian Vuorinen (sebastian.vuorinen@helsinki.fi)" license="LGPL"> ++<language name="Ruby" version="1.17" kateversion="2.4" section="Scripts" extensions="*.rb;*.rjs;*.rxml" mimetype="application/x-ruby" author="Stefan Lang (langstefan@gmx.at), Sebastian Vuorinen (sebastian.vuorinen@helsinki.fi)" license="LGPL"> + + <highlighting> + +--- kdelibs/kate/part/katedialogs.cpp 2005/12/26 02:23:26 491408 ++++ kdelibs/kate/part/katedialogs.cpp 2006/04/06 12:43:37 526985 +@@ -1634,7 +1634,7 @@ + // Start a KProcess that creates a diff + KProcIO *p = new KProcIO(); + p->setComm( KProcess::All ); +- *p << "diff" << "-ub" << "-" << m_doc->url().path(); ++ *p << "diff" << "-u" << "-" << m_doc->url().path(); + connect( p, SIGNAL(processExited(KProcess*)), this, SLOT(slotPDone(KProcess*)) ); + connect( p, SIGNAL(readReady(KProcIO*)), this, SLOT(slotPRead(KProcIO*)) ); + +@@ -1644,7 +1644,7 @@ + + uint lastln = m_doc->numLines(); + for ( uint l = 0; l < lastln; l++ ) +- p->writeStdin( m_doc->textLine( l ), l < lastln ); ++ p->writeStdin( m_doc->textLine( l ) ); + + p->closeWhenDone(); + } +@@ -1656,15 +1656,32 @@ + m_tmpfile = new KTempFile(); + // put all the data we have in it + QString stmp; ++ bool dataRead = false; + while ( p->readln( stmp, false ) > -1 ) ++ { + *m_tmpfile->textStream() << stmp << endl; ++ dataRead = true; ++ } + +- p->ackRead(); ++ // dominik: only ackRead(), when we *really* read data, otherwise, this slot ++ // is called initity times, which leads to a crash ++ if( dataRead ) ++ p->ackRead(); + } + + void KateModOnHdPrompt::slotPDone( KProcess *p ) + { + setCursor( ArrowCursor ); ++ if( ! m_tmpfile ) ++ { ++ // dominik: there were only whitespace changes, so that the diff returned by ++ // diff(1) has 0 bytes. So slotPRead() is never called, as there is ++ // no data, so that m_tmpfile was never created and thus is NULL. ++ // NOTE: would be nice, if we could produce a fake-diff, so that kompare ++ // tells us "The files are identical". Right now, we get an ugly ++ // "Could not parse diff output". ++ m_tmpfile = new KTempFile(); ++ } + m_tmpfile->close(); + + if ( ! p->normalExit() /*|| p->exitStatus()*/ ) diff --git a/kde-base/kdelibs/files/kdelibs-3.5.2-kio-fixes.diff b/kde-base/kdelibs/files/kdelibs-3.5.2-kio-fixes.diff new file mode 100644 index 000000000000..54df574a23d2 --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-3.5.2-kio-fixes.diff @@ -0,0 +1,177 @@ +--- kdelibs/kio/kio/job.cpp 2006/02/27 23:07:01 514315 ++++ kdelibs/kio/kio/job.cpp 2006/03/24 13:29:00 522108 +@@ -2786,7 +2786,7 @@ + { + m_conflictError = job->error(); + if ( (m_conflictError == ERR_DIR_ALREADY_EXIST) +- || (m_conflictError == ERR_FILE_ALREADY_EXIST) ) ++ || (m_conflictError == ERR_FILE_ALREADY_EXIST) ) // can't happen? + { + KURL oldURL = ((SimpleJob*)job)->url(); + // Should we skip automatically ? +@@ -3050,7 +3050,8 @@ + m_conflictError = job->error(); // save for later + // Existing dest ? + if ( ( m_conflictError == ERR_FILE_ALREADY_EXIST ) +- || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) ) ++ || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) ++ || ( m_conflictError == ERR_IDENTICAL_FILES ) ) + { + subjobs.remove( job ); + assert ( subjobs.isEmpty() ); +@@ -3132,7 +3133,8 @@ + m_reportTimer->stop(); + + if ( ( m_conflictError == ERR_FILE_ALREADY_EXIST ) +- || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) ) ++ || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) ++ || ( m_conflictError == ERR_IDENTICAL_FILES ) ) + { + // Its modification time: + time_t destmtime = (time_t)-1; +@@ -3161,6 +3163,7 @@ + // Offer overwrite only if the existing thing is a file + // If src==dest, use "overwrite-itself" + RenameDlg_Mode mode; ++ bool isDir = true; + + if( m_conflictError == ERR_DIR_ALREADY_EXIST ) + mode = (RenameDlg_Mode) 0; +@@ -3172,6 +3175,7 @@ + mode = M_OVERWRITE_ITSELF; + else + mode = M_OVERWRITE; ++ isDir = false; + } + + if ( m_bSingleFileCopy ) +@@ -3179,7 +3183,7 @@ + else + mode = (RenameDlg_Mode) ( mode | M_MULTI | M_SKIP ); + +- res = Observer::self()->open_RenameDlg( this, m_conflictError == ERR_FILE_ALREADY_EXIST ? ++ res = Observer::self()->open_RenameDlg( this, !isDir ? + i18n("File Already Exists") : i18n("Already Exists as Folder"), + (*it).uSource.url(), + (*it).uDest.url(), +@@ -3602,7 +3606,9 @@ + // In that case it's the _same_ dir, we don't want to copy+del (data loss!) + if ( m_currentSrcURL.isLocalFile() && m_currentSrcURL.url(-1) != dest.url(-1) && + m_currentSrcURL.url(-1).lower() == dest.url(-1).lower() && +- ( err == ERR_FILE_ALREADY_EXIST || err == ERR_DIR_ALREADY_EXIST ) ) ++ ( err == ERR_FILE_ALREADY_EXIST || ++ err == ERR_DIR_ALREADY_EXIST || ++ err == ERR_IDENTICAL_FILES ) ) + { + kdDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls" << endl; + QCString _src( QFile::encodeName(m_currentSrcURL.path()) ); +@@ -3643,7 +3649,9 @@ + Q_ASSERT( m_currentSrcURL == *m_currentStatSrc ); + + // Existing dest? +- if ( ( err == ERR_DIR_ALREADY_EXIST || err == ERR_FILE_ALREADY_EXIST ) ++ if ( ( err == ERR_DIR_ALREADY_EXIST || ++ err == ERR_FILE_ALREADY_EXIST || ++ err == ERR_IDENTICAL_FILES ) + && isInteractive() ) + { + if (m_reportTimer) +@@ -3693,7 +3701,7 @@ + + RenameDlg_Result r = Observer::self()->open_RenameDlg( + this, +- err == ERR_FILE_ALREADY_EXIST ? i18n("File Already Exists") : i18n("Already Exists as Folder"), ++ err != ERR_DIR_ALREADY_EXIST ? i18n("File Already Exists") : i18n("Already Exists as Folder"), + m_currentSrcURL.url(), + dest.url(), + mode, newPath, +--- kdelibs/kio/kio/authinfo.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kio/kio/authinfo.cpp 2006/04/05 22:35:54 526917 +@@ -326,6 +326,7 @@ + } + + delete [] buf; ++ fclose (fstream); + close (fd); + return true; + } +--- kdelibs/kio/kio/forwardingslavebase.cpp 2006/02/27 23:07:01 514315 ++++ kdelibs/kio/kio/forwardingslavebase.cpp 2006/04/12 09:57:56 528985 +@@ -69,10 +69,8 @@ + kdDebug() << "ForwardingSlaveBase::prepareUDSEntry: listing==" + << listing << endl; + +- bool mimetype_found = false; +- bool name_found = false; + bool url_found = false; +- QString name, mimetype; ++ QString name; + KURL url; + + KIO::UDSEntry::iterator it = entry.begin(); +@@ -85,7 +83,6 @@ + switch( (*it).m_uds ) + { + case KIO::UDS_NAME: +- name_found = true; + name = (*it).m_str; + kdDebug() << "Name = " << name << endl; + break; +@@ -100,36 +97,7 @@ + kdDebug() << "URL = " << url << endl; + kdDebug() << "New URL = " << (*it).m_str << endl; + break; +- case KIO::UDS_MIME_TYPE: +- mimetype_found = true; +- mimetype = (*it).m_str; +- kdDebug() << "Mimetype = " << (*it).m_str << endl; +- break; +- } +- } +- +- if (!mimetype_found) +- { +- KURL new_url = m_processedURL; +- if (url_found && listing) +- { +- new_url.addPath( url.fileName() ); +- } +- else if (name_found && listing) +- { +- new_url.addPath( name ); + } +- +- KMimeType::Ptr mime = KMimeType::findByURL(new_url); +- mimetype = mime->name(); +- +- KIO::UDSAtom atom; +- atom.m_uds = KIO::UDS_MIME_TYPE; +- atom.m_long = 0; +- atom.m_str = mimetype; +- entry.append(atom); +- +- kdDebug() << "New Mimetype = " << mime->name() << endl; + } + + if ( m_processedURL.isLocalFile() ) +--- kdelibs/kio/misc/kpac/kpac_dhcp_helper.c 2005/12/09 20:37:46 487225 ++++ kdelibs/kio/misc/kpac/kpac_dhcp_helper.c 2006/04/14 14:45:22 529823 +@@ -94,6 +94,7 @@ + exit(1); + + if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &bcast, sizeof(bcast)) == -1 || ++ setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &bcast, sizeof(bcast)) == -1 || + bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) + exit(1); + +--- kdelibs/kio/kssl/ksslinfodlg.cc 2005/09/29 09:47:40 465272 ++++ kdelibs/kio/kssl/ksslinfodlg.cc 2006/04/13 14:57:25 529483 +@@ -433,7 +433,7 @@ + KURLLabel *mail = new KURLLabel(tmp, tmp, _frame); + connect(mail, SIGNAL(leftClickedURL(const QString &)), mailCatcher, SLOT(mailClicked(const QString &))); + } else { +- new QLabel(tmp, _frame); ++ label = new QLabel(tmp, _frame); + } + } + if (label && viewport()) {
\ No newline at end of file diff --git a/kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes.diff b/kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes.diff new file mode 100644 index 000000000000..17ee7abfb27b --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-3.5.2-misc-fixes.diff @@ -0,0 +1,446 @@ +--- kdelibs/kparts/factory.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kparts/factory.cpp 2006/04/05 22:48:19 526923 +@@ -64,7 +64,7 @@ + if ( !factory ) + return 0; + KParts::Factory *pfactory = dynamic_cast<KParts::Factory *>( factory ); +- if ( !factory ) ++ if ( !pfactory ) + return 0; + return pfactory->partInstance(); + } +--- kdelibs/kdeui/kcmodule.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdeui/kcmodule.cpp 2006/04/05 17:22:08 526823 +@@ -79,7 +79,12 @@ + { + init(); + d->_instance = instance; +- KGlobal::locale()->insertCatalogue(instance->instanceName()); ++ ++ if (instance) ++ { ++ KGlobal::locale()->insertCatalogue(instance->instanceName()); ++ } ++ + d->_hasOwnInstance = false; + KGlobal::setActiveInstance(this->instance()); + } +--- kdelibs/kdeui/kcolordialog.cpp 2006/02/14 13:21:59 509356 ++++ kdelibs/kdeui/kcolordialog.cpp 2006/04/07 13:50:45 527264 +@@ -242,7 +242,7 @@ + p = (uint *) image.scanLine( ySize - s - 1 ); + for( h = 0; h < xSize; h++ ) + { +- col.setHsv( 359*h/(xSize-1), 255*s/(ySize-1), 192 ); ++ col.setHsv( 359*h/(xSize-1), 255*s/((ySize == 1) ? 1 : ySize-1), 192 ); + *p = col.rgb(); + p++; + } +@@ -305,7 +305,7 @@ + + for( int x = 0; x < xSize; x++ ) + { +- col.setHsv( _hue, _sat, 255*x/(xSize-1) ); ++ col.setHsv( _hue, _sat, 255*x/((xSize == 1) ? 1 : xSize-1) ); + rgb = col.rgb(); + *p++ = rgb; + } +@@ -317,7 +317,7 @@ + for ( int v = 0; v < ySize; v++ ) + { + p = (uint *) image.scanLine( ySize - v - 1 ); +- col.setHsv( _hue, _sat, 255*v/(ySize-1) ); ++ col.setHsv( _hue, _sat, 255*v/((ySize == 1) ? 1 : ySize-1) ); + rgb = col.rgb(); + for ( int i = 0; i < xSize; i++ ) + *p++ = rgb; +@@ -426,7 +426,7 @@ + + void KColorCells::mouseMoveEvent( QMouseEvent *e ) + { +- if( !(e->state() && LeftButton)) return; ++ if( !(e->state() & LeftButton)) return; + + if(inMouse) { + int delay = KGlobalSettings::dndEventDelay(); +@@ -530,7 +530,7 @@ + void KColorPatch::mouseMoveEvent( QMouseEvent *e ) + { + // Drag color object +- if( !(e->state() && LeftButton)) return; ++ if( !(e->state() & LeftButton)) return; + KColorDrag *d = new KColorDrag( color, this); + d->dragCopy(); + } +@@ -1253,30 +1253,26 @@ + void + KColorDialog::readSettings() + { +- KConfig* config = KGlobal::config(); ++ KConfigGroup group( KGlobal::config(), "Colors" ); + +- QString oldgroup = config->group(); +- +- config->setGroup("Colors"); +- QString palette = config->readEntry("CurrentPalette"); ++ QString palette = group.readEntry("CurrentPalette"); + d->table->setPalette(palette); +- config->setGroup( oldgroup ); + } + + void + KColorDialog::slotWriteSettings() + { +- KConfig* config = KGlobal::config(); +- config->setGroup("Colors"); ++ KConfigGroup group( KGlobal::config(), "Colors" ); ++ + QString palette = d->table->palette(); +- if (!config->hasDefault("CurrentPalette") && ++ if (!group.hasDefault("CurrentPalette") && + (d->table->palette() == d->originalPalette)) + { +- config->revertToDefault("CurrentPalette"); ++ group.revertToDefault("CurrentPalette"); + } + else + { +- config->writeEntry("CurrentPalette", d->table->palette()); ++ group.writeEntry("CurrentPalette", d->table->palette()); + } + } + +--- kdelibs/kdeui/kdialogbase.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdeui/kdialogbase.cpp 2006/04/05 16:45:10 526809 +@@ -668,7 +668,7 @@ + return; + } + +- if( style < 0 || style > ActionStyleMAX ) { style = ActionStyle0; } ++ if( style < 0 || style >= ActionStyleMAX ) { style = ActionStyle0; } + d->mButton.style = style; + + const int *layout; +--- kdelibs/kdecore/kglobalaccel_x11.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdecore/kglobalaccel_x11.cpp 2006/04/09 09:06:52 527729 +@@ -212,7 +212,7 @@ + if( failed ) { + kdDebug(125) << "grab failed!\n"; + for( uint m = 0; m <= 0xff; m++ ) { +- if( m & keyModMaskX == 0 ) ++ if(( m & keyModMaskX ) == 0 ) + XUngrabKey( qt_xdisplay(), keyCodeX, keyModX | m, qt_xrootwin() ); + } + } +--- kdelibs/kdecore/network/kresolver.cpp 2006/02/26 18:55:08 513854 ++++ kdelibs/kdecore/network/kresolver.cpp 2006/04/13 14:57:25 529483 +@@ -609,7 +609,7 @@ + + QStrList KResolver::protocolName(int protonum) + { +- struct protoent *pe; ++ struct protoent *pe = 0L; + #ifndef HAVE_GETPROTOBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -628,6 +628,7 @@ + if (getprotobynumber_r(protonum, &protobuf, buf, buflen, &pe) == ERANGE) + # endif + { ++ pe = 0L; + buflen += 1024; + delete [] buf; + } +@@ -655,7 +656,7 @@ + + QStrList KResolver::protocolName(const char *protoname) + { +- struct protoent *pe; ++ struct protoent *pe = 0L; + #ifndef HAVE_GETPROTOBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -674,6 +675,7 @@ + if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE) + # endif + { ++ pe = 0L; + buflen += 1024; + delete [] buf; + } +@@ -701,7 +703,7 @@ + + int KResolver::protocolNumber(const char *protoname) + { +- struct protoent *pe; ++ struct protoent *pe = 0L; + #ifndef HAVE_GETPROTOBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -720,6 +722,7 @@ + if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE) + # endif + { ++ pe = 0L; + buflen += 1024; + delete [] buf; + } +@@ -743,7 +746,7 @@ + + int KResolver::servicePort(const char *servname, const char *protoname) + { +- struct servent *se; ++ struct servent *se = 0L; + #ifndef HAVE_GETSERVBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -762,6 +765,7 @@ + if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == ERANGE) + # endif + { ++ se = 0L; + buflen += 1024; + delete [] buf; + } +@@ -785,7 +789,7 @@ + + QStrList KResolver::serviceName(const char* servname, const char *protoname) + { +- struct servent *se; ++ struct servent *se = 0L; + #ifndef HAVE_GETSERVBYNAME_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -804,6 +808,7 @@ + if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == ERANGE) + # endif + { ++ se = 0L; + buflen += 1024; + delete [] buf; + } +@@ -831,7 +836,7 @@ + + QStrList KResolver::serviceName(int port, const char *protoname) + { +- struct servent *se; ++ struct servent *se = 0L; + #ifndef HAVE_GETSERVBYPORT_R + QMutexLocker locker(&getXXbyYYmutex); + +@@ -850,6 +855,7 @@ + if (getservbyport_r(port, protoname, &servbuf, buf, buflen, &se) == ERANGE) + # endif + { ++ se = 0L; + buflen += 1024; + delete [] buf; + } +--- kdelibs/kdecore/ktempdir.cpp 2006/03/01 10:20:31 514742 ++++ kdelibs/kdecore/ktempdir.cpp 2006/04/13 14:57:25 529483 +@@ -107,6 +107,8 @@ + { + if (bAutoDelete) + unlink(); ++ ++ delete d; + } + + int +--- kdelibs/kdecore/netsupp.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdecore/netsupp.cpp 2006/04/13 14:57:25 529483 +@@ -352,15 +352,9 @@ + return 0; + + out: +- // Normal exit of the function +- if (err == 0) +- *result = res; +- else +- { +- if (res->data != NULL) +- freeaddrinfo(res->data); +- free(res); +- } ++ if (res->data != NULL) ++ freeaddrinfo(res->data); ++ free(res); + return err; + } + +--- kdelibs/kdeui/kdockwidget.cpp 2005/09/29 09:47:40 465272 ++++ kdelibs/kdeui/kdockwidget.cpp 2006/04/13 21:35:27 529609 +@@ -762,9 +762,11 @@ + void KDockWidget::setEnableDocking( int pos ) + { + eDocking = pos; +- if( header && header->inherits( "KDockWidgetHeader" ) ) +- ( ( KDockWidgetHeader* ) header )->showUndockButton( pos & DockDesktop ); +- updateHeader(); ++ if( header ) { ++ if (header->inherits( "KDockWidgetHeader" ) ) ++ ( ( KDockWidgetHeader* ) header )->showUndockButton( pos & DockDesktop ); ++ updateHeader(); ++ } + } + + void KDockWidget::updateHeader() +--- kdelibs/kdecore/netwm_def.h 2006/01/06 15:07:18 494899 ++++ kdelibs/kdecore/netwm_def.h 2006/04/11 12:48:50 528573 +@@ -606,6 +606,20 @@ + FromApplication, + FromTool + }; ++ ++ /** ++ Compares two X timestamps, taking into account wrapping and 64bit architectures. ++ Return value is like with strcmp(), 0 for equal, -1 for time1 < time2, 1 for time1 > time2. ++ @since 3.5.3 ++ */ ++ static int timestampCompare( unsigned long time1, unsigned long time2 ); ++ /** ++ Returns a difference of two X timestamps, time2 - time1, where time2 must be later than time1, ++ as returned by timestampCompare(). ++ @since 3.5.3 ++ */ ++ static int timestampDiff( unsigned long time1_, unsigned long time2_ ); ++ + }; + + +--- kdelibs/kdecore/kapplication.cpp 2006/03/15 13:08:02 518842 ++++ kdelibs/kdecore/kapplication.cpp 2006/04/11 12:48:50 528573 +@@ -960,14 +960,13 @@ + static int my_system (const char *command) { + int pid, status; + +- QApplication::flushX(); + pid = fork(); + if (pid == -1) + return -1; + if (pid == 0) { + const char* shell = "/bin/sh"; + execl(shell, shell, "-c", command, (void *)0); +- ::exit(127); ++ ::_exit(127); + } + do { + if (waitpid(pid, &status, 0) == -1) { +@@ -1684,7 +1683,7 @@ + && _event->xclient.data.l[ 3 ] != 0 ) + { + if( qt_x_user_time == 0 +- || ( _event->xclient.data.l[ 3 ] - qt_x_user_time ) < 100000U ) ++ || NET::timestampCompare( _event->xclient.data.l[ 3 ], qt_x_user_time ) > 0 ) + { // and the timestamp looks reasonable + qt_x_user_time = _event->xclient.data.l[ 3 ]; // update our qt_x_user_time from it + } +@@ -1692,7 +1691,7 @@ + else // normal DND, only needed until Qt updates qt_x_user_time from XdndDrop + { + if( qt_x_user_time == 0 +- || ( _event->xclient.data.l[ 2 ] - qt_x_user_time ) < 100000U ) ++ || NET::timestampCompare( _event->xclient.data.l[ 2 ], qt_x_user_time ) > 0 ) + { // the timestamp looks reasonable + qt_x_user_time = _event->xclient.data.l[ 2 ]; // update our qt_x_user_time from it + } +@@ -1812,7 +1811,7 @@ + XDestroyWindow( qt_xdisplay(), w ); + } + if( qt_x_user_time == 0 +- || time - qt_x_user_time < 1000000000U ) // check time > qt_x_user_time, handle wrapping ++ || NET::timestampCompare( time, qt_x_user_time ) > 0 ) // check time > qt_x_user_time + qt_x_user_time = time; + #endif + } +--- kdelibs/kdecore/kprocess.cpp 2006/01/29 09:42:40 503447 ++++ kdelibs/kdecore/kprocess.cpp 2006/03/30 22:04:03 524676 +@@ -355,8 +355,6 @@ + if (pipe(fd)) + fd[0] = fd[1] = -1; // Pipe failed.. continue + +- QApplication::flushX(); +- + // we don't use vfork() because + // - it has unclear semantics and is not standardized + // - we do way too much magic in the child +@@ -768,7 +766,7 @@ + d->shell = shell; + else + // #ifdef NON_FREE // ... as they ship non-POSIX /bin/sh +-#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__GNU__) ++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__GNU__) && !defined(__DragonFly__) + // Solaris POSIX ... + if (!access( "/usr/xpg4/bin/sh", X_OK )) + d->shell = "/usr/xpg4/bin/sh"; +--- kdelibs/kdecore/kxerrorhandler.cpp 2005/07/26 18:54:59 438982 ++++ kdelibs/kdecore/kxerrorhandler.cpp 2006/04/11 13:28:02 528591 +@@ -28,6 +28,7 @@ + #include "kxerrorhandler.h" + #include <assert.h> + #include <stdlib.h> ++#include <netwm_def.h> + + KXErrorHandler** KXErrorHandler::handlers = NULL; + int KXErrorHandler::pos = 0; +@@ -101,13 +102,14 @@ + int KXErrorHandler::handle( Display* dpy, XErrorEvent* e ) + { + if( dpy == display +- && e->serial - first_request < 1000000000 ) // e->serial > first_request, with wrapping ++ // e->serial >= first_request , compare like X timestamps to handle wrapping ++ && NET::timestampCompare( e->serial, first_request ) >= 0 ) + { // it's for us + //qDebug( "Handling: %p", static_cast< void* >( this )); +- if( user_handler1 != NULL ) +- was_error |= user_handler1( e->request_code, e->error_code, e->resourceid ); +- else if( user_handler2 != NULL ) +- was_error |= ( user_handler2( dpy, e ) != 0 ); ++ if( user_handler1 != NULL && user_handler1( e->request_code, e->error_code, e->resourceid )) ++ was_error = true; ++ if( user_handler2 != NULL && user_handler2( dpy, e ) != 0 ) ++ was_error = true; + else // no handler set, simply set that there was an error + was_error = true; + return 0; +--- kdelibs/kdecore/netwm.cpp 2005/07/26 18:54:59 438982 ++++ kdelibs/kdecore/netwm.cpp 2006/04/11 12:48:50 528573 +@@ -4401,4 +4401,38 @@ + void NETWinInfo::virtual_hook( int, void* ) + { /*BASE::virtual_hook( id, data );*/ } + ++// Functions for X timestamp comparing. For Time being 32bit they're fairly simple ++// (the #if 0 part), but on 64bit architectures Time is 64bit unsigned long, ++// so there special care needs to be taken to always use only the lower 32bits. ++#if 0 ++int NET::timestampCompare( Time time1, Time time2 ) // like strcmp() ++ { ++ if( time1 == time2 ) ++ return 0; ++ return ( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping ++ } ++ ++Time NET::timestampDiff( Time time1, Time time2 ) // returns time2 - time1 ++ { // no need to handle wrapping? ++ return time2 - time1; ++ } ++#else ++int NET::timestampCompare( unsigned long time1_, unsigned long time2_ ) // like strcmp() ++ { ++ Q_UINT32 time1 = time1_; ++ Q_UINT32 time2 = time2_; ++ if( time1 == time2 ) ++ return 0; ++ return Q_UINT32( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping ++ } ++ ++int NET::timestampDiff( unsigned long time1_, unsigned long time2_ ) // returns time2 - time1 ++ { // no need to handle wrapping? ++ Q_UINT32 time1 = time1_; ++ Q_UINT32 time2 = time2_; ++ return Q_UINT32( time2 - time1 ); ++ } ++#endif ++ ++ + #endif |