Ralf Habacker wrote:
> Can you send a patch for the second solution that I can give it a try ?
> Ralf
>
Attached the patch, it's not perfect - especially the macro naming.
Peter
Index: khtml/ecma/kjs_binding.h
===================================================================
--- khtml/ecma/kjs_binding.h (Revision 512833)
+++ khtml/ecma/kjs_binding.h (Arbeitskopie)
@@ -313,4 +313,9 @@
} // namespace
+
+#ifdef USTRING_EXPORT_INLINE_ON
+#include "kjs_binding_def.h
#endif
+#endif
Index: khtml/ecma/kjs_binding.cpp
===================================================================
--- khtml/ecma/kjs_binding.cpp (Revision 512833)
+++ khtml/ecma/kjs_binding.cpp (Arbeitskopie)
@@ -130,6 +130,7 @@
return false;
}
+/*
UString::UString(const QString &d)
{
unsigned int len = d.length();
@@ -168,7 +169,9 @@
{
return QConstString((QChar*) data(), size());
}
+*/
+/*
DOM::DOMString Identifier::domString() const
{
return DOM::DOMString((QChar*) data(), size());
@@ -178,7 +181,7 @@
{
return QString((QChar*) data(), size());
}
-
+*/
DOM::NodeImpl* toNode(ValueImp *val)
{
ObjectImp *obj = val->getObject();
@@ -375,3 +378,8 @@
}
}
+
+
+#ifndef USTRING_EXPORT_INLINE_ON
+#include "kjs_binding_def.h"
+#endif
Index: khtml/CMakeLists.txt
===================================================================
--- khtml/CMakeLists.txt (Revision 512833)
+++ khtml/CMakeLists.txt (Arbeitskopie)
@@ -282,6 +282,10 @@
khtml_iface.h
)
+if (WIN32)
+ add_definitions(-DUSTRING_EXPORT_INLINE_ON)
+endif (WIN32)
+
kde4_add_dcop_skels(khtml_LIB_SRCS ${khtml_DCOP_SKEL_SRCS})
kde4_add_library(khtml SHARED ${khtml_LIB_SRCS})
Index: kjs/ustring.h
===================================================================
--- kjs/ustring.h (Revision 512833)
+++ kjs/ustring.h (Arbeitskopie)
@@ -41,6 +41,12 @@
#include <stdint.h>
+#ifdef USTRING_EXPORT_INLINE_ON
+#define USTRING_EXPORT inline
+#else
+#define USTRING_EXPORT
+#endif
+
/**
* @internal
*/
@@ -278,15 +284,15 @@
* Note: feel free to contact me if you want to see a dummy header for
* your favorite FooString class here !
*/
- UString(const QString&);
+ USTRING_EXPORT UString(const QString&);
/**
* Convenience declaration only ! See UString(const QString&).
*/
- UString(const DOM::DOMString&);
+ USTRING_EXPORT UString(const DOM::DOMString&);
/**
* Convenience declaration only ! See UString(const QString&).
*/
- UString(const DOM::AtomicString&);
+ USTRING_EXPORT UString(const DOM::AtomicString&);
/**
* Concatenation constructor. Makes operator+ more efficient.
@@ -358,15 +364,15 @@
/**
* @see UString(const QString&).
*/
- DOM::DOMString domString() const;
+ USTRING_EXPORT DOM::DOMString domString() const;
/**
* @see UString(const QString&).
*/
- QString qstring() const;
+ USTRING_EXPORT QString qstring() const;
/**
* @see UString(const QString&).
*/
- QConstString qconststring() const;
+ USTRING_EXPORT QConstString qconststring() const;
/**
* Assignment operator.
Index: kjs/identifier.h
===================================================================
--- kjs/identifier.h (Revision 512833)
+++ kjs/identifier.h (Arbeitskopie)
@@ -53,11 +53,11 @@
* returns a UString of the identifier
*/
const UString &ustring() const { return _ustring; }
- DOM::DOMString domString() const;
+ USTRING_EXPORT DOM::DOMString domString() const;
/**
* returns a QString of the identifier
*/
- QString qstring() const;
+ USTRING_EXPORT QString qstring() const;
/**
* returns a UChar pointer to the string of the identifier with a size
defined by @ref size()_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem