summaryrefslogtreecommitdiff
path: root/src/shared/proparser/proitems.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2012-08-07 13:37:00 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-08-07 13:50:58 +0200
commitedd9279c8af68cb5f4224e72064b7fc64b4e2fb7 (patch)
tree8cde04342395fb16f7bace5595eda514c15a9dcd /src/shared/proparser/proitems.h
parent804be4d31461ca656f2bd845a3d51730d740119e (diff)
downloadqt-creator-edd9279c8af68cb5f4224e72064b7fc64b4e2fb7.tar.gz
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: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/shared/proparser/proitems.h')
-rw-r--r--src/shared/proparser/proitems.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/proparser/proitems.h b/src/shared/proparser/proitems.h
index 0f4af0d394..3b52de6c4d 100644
--- a/src/shared/proparser/proitems.h
+++ b/src/shared/proparser/proitems.h
@@ -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; }