summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-07-28 19:05:01 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-07-28 19:05:01 (GMT)
commit4ad0d24c5b3a0afd99722ae5c33968ff9fa44e2d (patch)
treeaa81c2bd3e6109417a6bd30d6a58111d892f25f2 /qtools
parentc37c8626674dd6ba0d53dcad84dd4bb5d92005a4 (diff)
downloadDoxygen-4ad0d24c5b3a0afd99722ae5c33968ff9fa44e2d.zip
Doxygen-4ad0d24c5b3a0afd99722ae5c33968ff9fa44e2d.tar.gz
Doxygen-4ad0d24c5b3a0afd99722ae5c33968ff9fa44e2d.tar.bz2
Release-1.7.1-20100728
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qstring.cpp9
-rw-r--r--qtools/qstring.h16
2 files changed, 19 insertions, 6 deletions
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index 5d50060..bc3dfc7 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -12170,13 +12170,20 @@ QString QString::fromUcs2( const unsigned short *str )
*/
Q_EXPORT QStringData *QString::shared_null = 0;
-QT_STATIC_CONST_IMPL QString QString::null;
+//QT_STATIC_CONST_IMPL QString QString::null;
QT_STATIC_CONST_IMPL QChar QChar::null;
QT_STATIC_CONST_IMPL QChar QChar::replacement((ushort)0xfffd);
QT_STATIC_CONST_IMPL QChar QChar::byteOrderMark((ushort)0xfeff);
QT_STATIC_CONST_IMPL QChar QChar::byteOrderSwapped((ushort)0xfffe);
QT_STATIC_CONST_IMPL QChar QChar::nbsp((ushort)0x00a0);
+#if defined(_CC_MSVC_) && _MSC_VER <= 1300
+const QString::Null QString::null;
+#else
+const QString::Null QString::null = { };
+#endif
+
+
QStringData* QString::makeSharedNull()
{
return shared_null=new QStringData;
diff --git a/qtools/qstring.h b/qtools/qstring.h
index 4357809..0dd6352 100644
--- a/qtools/qstring.h
+++ b/qtools/qstring.h
@@ -368,9 +368,15 @@ public:
QString &operator=( QChar c );
QString &operator=( char c );
- QT_STATIC_CONST QString null;
-
- bool isNull() const;
+ //QT_STATIC_CONST QString null;
+ //bool isNull() const;
+
+ struct Null { };
+ static const Null null;
+ inline QString(const Null &): d(shared_null) { d->ref(); }
+ inline QString &operator=(const Null &) { *this = QString(); return *this; }
+ inline bool isNull() const { return d == shared_null; }
+
bool isEmpty() const;
uint length() const;
void truncate( uint pos );
@@ -662,8 +668,8 @@ inline QString &QString::operator=( QChar c )
inline QString &QString::operator=( char c )
{ return *this = QString(QChar(c)); }
-inline bool QString::isNull() const
-{ return unicode() == 0; }
+//inline bool QString::isNull() const
+//{ return unicode() == 0; }
inline bool QString::operator!() const
{ return isNull(); }