summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgetlinecontrol_p.h
diff options
context:
space:
mode:
authorJani Honkonen <jani.honkonen@digia.com>2012-08-06 13:18:48 +0300
committerQt by Nokia <qt-info@nokia.com>2012-08-15 11:38:37 +0200
commit121062d8848986dcfaf421388a5603b3b48a1e58 (patch)
tree08d92b7e0cb90d6bd49b868d75df8f394913810e /src/widgets/widgets/qwidgetlinecontrol_p.h
parentd19589b90adca7130129b59b662e515226a943e1 (diff)
Fix undo and redo in QLineEdit when in password mode
There are some security issues with undo/redo. User should not be able to get the erased password back in any situation. Therefore redo must be disabled completely and undo is limited only for erasing previously entered text. Task-number: QTBUG-14226 Change-Id: I2b38aca84adbad1c14db76b56ad6303d56b35b4d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index ba3b202bda..2dce790c1e 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -125,8 +125,8 @@ public:
return (c != -1 ? c : 0);
}
- bool isUndoAvailable() const { return !m_readOnly && m_undoState; }
- bool isRedoAvailable() const { return !m_readOnly && m_undoState < (int)m_history.size(); }
+ bool isUndoAvailable() const;
+ bool isRedoAvailable() const;
void clearUndo() { m_history.clear(); m_modifiedState = m_undoState = 0; }
bool isModified() const { return m_modifiedState != m_undoState; }