From 49dfc4ed6a89cdd7377e4b88236bb7303fdfdc15 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 7 Aug 2009 13:18:41 +0200 Subject: Remove const-specifier to make QTextItemInt::operator=() more beautiful The const-specifier on the char format was unecessary, and made the operator= implementation ugly, so it has been removed. Reviewed-by: Simon Hausmann --- src/gui/text/qtextengine.cpp | 2 +- src/gui/text/qtextengine_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index b27b0b7..b55ac68 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2669,7 +2669,7 @@ QTextItemInt &QTextItemInt::operator=(const QTextItemInt &other) flags = other.flags; justified = other.justified; underlineStyle = other.underlineStyle; - const_cast(charFormat) = other.charFormat; + charFormat = other.charFormat; num_chars = other.num_chars; chars = other.chars; fontEngine = other.fontEngine; diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index 3ce744e..347b71e 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -332,7 +332,7 @@ public: RenderFlags flags; bool justified; QTextCharFormat::UnderlineStyle underlineStyle; - const QTextCharFormat charFormat; + QTextCharFormat charFormat; int num_chars; const QChar *chars; const unsigned short *logClusters; -- cgit v0.12