Bug 39668 - [FEATURE] Minimal patch to make KDE STL compatible
Summary: [FEATURE] Minimal patch to make KDE STL compatible
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Other
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-22 16:33 UTC by Claus Rasmussen
Modified: 2003-03-08 23:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claus Rasmussen 2002-03-22 16:21:35 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: kdebindings
Version: 3.0rc3
System : RedHat 7.2

Problem:
    KDE is not STL compatible by default. The following very simple patch
    corrects the only clash between STL and KDE when Qt is compiled with
    the STL option.

    It seems to me that there is no real justification for not using a STL
    compatible Qt when the conversion is that simple.

    I would suggest to include this in the 3.1 (or 3.0.1) release.


diff -Naur kdebindings-3.0rc3/qtc/clib/qtc/qt_QStringList.cpp 
kdebindings-patched/qtc/clib/qtc/qt_QStringList.cpp
--- kdebindings-3.0rc3/qtc/clib/qtc/qt_QStringList.cpp  Sat Dec  1 07:14:15 
2001+++ kdebindings-patched/qtc/clib/qtc/qt_QStringList.cpp Tue Mar 19 
16:37:57 2002@@ -227 +227 @@

 #include <qstringlist.h>

-static QStringList::Iterator   iterator;
+static QStringList::Iterator   qt_iterator;

 class QStringListBridge : public QStringList
 {
@@ -6718 +6718 @@
        return (qt_QStringList*)new 
QStringList(QStringListBridge::split((QRegExp&)* (QRegExp*)sep (QString&)* 
(QString*)str (bool)allowEmptyEntries));
 }
 void qt_QStringList_begin( qt_QStringList* instPointer){
-       iterator = ((QStringList*)instPointer)->begin();
+       qt_iterator = ((QStringList*)instPointer)->begin();
        return;
 }
 qt_QString * qt_QStringList_current(){
-       if ( *iterator == NULL ) {
+       if ( *qt_iterator == NULL ) {
                return NULL;
        } else {
-               return (qt_QString *) new QString(*iterator);
+               return (qt_QString *) new QString(*qt_iterator);
        }
 }
 qt_QString * qt_QStringList_next(){
-       iterator++;
+       qt_iterator++;
        return qt_QStringList_current();
 }
 void qt_QStringList_clear( qt_QStringList* instPointer){
Comment 1 thebeast 2003-02-06 22:10:17 UTC
what
Comment 2 Thiago Macieira 2003-03-08 23:19:54 UTC
Similar patch has been applied.