diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2010-07-28 19:05:01 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2010-07-28 19:05:01 (GMT) |
commit | f0e47672cc3f910aebd1d30fe3db21e9dbd943c4 (patch) | |
tree | aa81c2bd3e6109417a6bd30d6a58111d892f25f2 /qtools/qstring.h | |
parent | d0412f05557d55f465407a9337553c0a6ee0396f (diff) | |
download | Doxygen-f0e47672cc3f910aebd1d30fe3db21e9dbd943c4.zip Doxygen-f0e47672cc3f910aebd1d30fe3db21e9dbd943c4.tar.gz Doxygen-f0e47672cc3f910aebd1d30fe3db21e9dbd943c4.tar.bz2 |
Release-1.7.1-20100728
Diffstat (limited to 'qtools/qstring.h')
-rw-r--r-- | qtools/qstring.h | 16 |
1 files changed, 11 insertions, 5 deletions
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(); } |