Commit edd9279c authored by Joerg Bornemann's avatar Joerg Bornemann Committed by Oswald Buddenhagen

fix release build on Windows with MSVC

We must work around strange MSVC behaviour when exporting classes
with ProKey members.

Change-Id: I56d56588a52523b1a15e432eb2d84c5c3b13c0f3
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
parent 804be4d3
......@@ -127,6 +127,16 @@ public:
ProKey(const QString &str, int off, int len, uint hash);
void setValue(const QString &str);
#ifdef Q_CC_MSVC
// Workaround strange MSVC behaviour when exporting classes with ProKey members.
ALWAYS_INLINE ProKey(const ProKey &other) : ProString(other.toString()) {}
ALWAYS_INLINE ProKey &operator=(const ProKey &other)
{
toString() = other.toString();
return *this;
}
#endif
ALWAYS_INLINE ProString &toString() { return *(ProString *)this; }
ALWAYS_INLINE const ProString &toString() const { return *(const ProString *)this; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment