summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextformat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextformat.h')
-rw-r--r--src/gui/text/qtextformat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index bc627521ff..805affd87c 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -431,9 +431,9 @@ public:
{ return doubleProperty(FontPointSize); }
inline void setFontWeight(int weight)
- { if (weight == QFont::Normal) weight = 0; setProperty(FontWeight, weight); }
+ { setProperty(FontWeight, weight); }
inline int fontWeight() const
- { int weight = intProperty(FontWeight); if (weight == 0) weight = QFont::Normal; return weight; }
+ { return hasProperty(FontWeight) ? intProperty(FontWeight) : QFont::Normal; }
inline void setFontItalic(bool italic)
{ setProperty(FontItalic, italic); }
inline bool fontItalic() const