diff options
-rw-r--r-- | src/gui/text/qtextformat.cpp | 9 | ||||
-rw-r--r-- | src/gui/text/qtextformat.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index 2389427da0..3d70befda3 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -706,6 +706,15 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt) */ /*! + \fn bool QTextFormat::isEmpty() const + \since 5.3 + + Returns true if the format does not store any properties; false otherwise. + + \sa propertyCount(), properties() +*/ + +/*! \fn bool QTextFormat::isCharFormat() const Returns \c true if this text format is a \c CharFormat; otherwise diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h index 2098369811..c04ac3876b 100644 --- a/src/gui/text/qtextformat.h +++ b/src/gui/text/qtextformat.h @@ -295,6 +295,7 @@ public: void merge(const QTextFormat &other); inline bool isValid() const { return type() != InvalidFormat; } + inline bool isEmpty() const { return propertyCount() == 0; } int type() const; |