summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-07 11:18:41 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:49:44 (GMT)
commit49dfc4ed6a89cdd7377e4b88236bb7303fdfdc15 (patch)
treec60697560a45c380a3720bbf7dcf1c29e1d4013e
parent4417f485dbaac79412d43ec403e56e7e2067e5ac (diff)
downloadQt-49dfc4ed6a89cdd7377e4b88236bb7303fdfdc15.zip
Qt-49dfc4ed6a89cdd7377e4b88236bb7303fdfdc15.tar.gz
Qt-49dfc4ed6a89cdd7377e4b88236bb7303fdfdc15.tar.bz2
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
-rw-r--r--src/gui/text/qtextengine.cpp2
-rw-r--r--src/gui/text/qtextengine_p.h2
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<QTextCharFormat &>(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;