[Kde-bindings] [Bug 103988] smoke bindings compile error on Solaris

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sat Apr 16 11:59:03 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=103988         




------- Additional Comments From Richard_Dale tipitina demon co uk  2005-04-16 13:59 -------
On Saturday 16 April 2005 10:10, David Faure wrote:
[bugs.kde.org quoted mail]
Yes, in qstring.h '<string>' is only included if QT_NO_STL wasn't defined:

#ifndef QT_NO_STL
#if defined ( Q_CC_MSVC_NET ) && _MSV_VER < 1310 // Avoids nasty warning for 
xlocale, line 450
#  pragma warning ( push )
#  pragma warning ( disable : 4189 )
#  include <string>
#  pragma warning ( pop )
#else
#  include <string>
#endif
#if defined(Q_WRONG_SB_CTYPE_MACROS) && defined(_SB_CTYPE_MACROS)
#undef _SB_CTYPE_MACROS
#endif
#endif

Then the two concatenate methods were defined:

#ifndef QT_NO_STL
Q_EXPORT inline const QString operator+(const QString& s1, const std::string& 
s2)
{
    return s1 + QString(s2);
}

Q_EXPORT inline const QString operator+(const std::string& s1, const QString& 
s2)
{
    QString tmp(s2);
    return QString(tmp.prepend(s1));
}
#endif

So kalyptus wasn't skipping over the '#ifndef QT_NO_STL', and was including 
the concatenate methods. So I'll fix kalyptus so it skips over the #ifndef 
instead just ditching any method with a std::string arg type.

A better fix would be to include a configuration check for whether or not Qt 
had been built with STL support or not, and conditionally skip stuff like the 
above.

-- Richard



More information about the Kde-bindings mailing list