diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-17 11:59:43 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-17 12:13:57 (GMT) |
commit | 38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c (patch) | |
tree | 5c63dcc03caf4cc3817a4282cf200afecf62583b /src/gui/text/qtextcursor.cpp | |
parent | b80312254e61986e6848d1608dcac54e0b3f191a (diff) | |
download | Qt-38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c.zip Qt-38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c.tar.gz Qt-38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c.tar.bz2 |
QTextControl::print: fix coverity warning
the test was wrong on the QPrinter pointer
In addition, priv is never null
Diffstat (limited to 'src/gui/text/qtextcursor.cpp')
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index 6ab89dc..f97146d 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -84,8 +84,7 @@ QTextCursorPrivate::QTextCursorPrivate(const QTextCursorPrivate &rhs) QTextCursorPrivate::~QTextCursorPrivate() { - if (priv) - priv->removeCursor(this); + priv->removeCursor(this); } QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int positionOfChange, int charsAddedOrRemoved, QTextUndoCommand::Operation op) @@ -125,7 +124,7 @@ QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int position void QTextCursorPrivate::setX() { - if (priv && priv->isInEditBlock()) { + if (priv->isInEditBlock()) { x = -1; // mark dirty return; } |