diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-05-28 17:19:34 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-06-15 18:17:25 (GMT) |
commit | a585375406def7ab15d580928ede1eec30b382a4 (patch) | |
tree | 2c5f476944781680f7284ad71c639d70a80a2340 /tools | |
parent | a8ddfa19732a84affd2ffb3fe4cfb8b138296136 (diff) | |
download | Qt-a585375406def7ab15d580928ede1eec30b382a4.zip Qt-a585375406def7ab15d580928ede1eec30b382a4.tar.gz Qt-a585375406def7ab15d580928ede1eec30b382a4.tar.bz2 |
use textedit's signal instead of the textedit's document's
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/linguist/messageeditorwidgets.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/linguist/linguist/messageeditorwidgets.cpp b/tools/linguist/linguist/messageeditorwidgets.cpp index 5270c0d..d23d42e 100644 --- a/tools/linguist/linguist/messageeditorwidgets.cpp +++ b/tools/linguist/linguist/messageeditorwidgets.cpp @@ -145,16 +145,15 @@ void FormatTextEdit::setEditable(bool editable) void FormatTextEdit::setPlainText(const QString &text, bool userAction) { - bool oldBlockState = false; if (!userAction) { // Prevent contentsChanged signal - oldBlockState = document()->blockSignals(true); + bool oldBlockState = blockSignals(true); document()->setUndoRedoEnabled(false); ExpandingTextEdit::setPlainText(text); // highlighter is out of sync because of blocked signals m_highlighter->rehighlight(); document()->setUndoRedoEnabled(true); - document()->blockSignals(oldBlockState); + blockSignals(oldBlockState); } else { ExpandingTextEdit::setPlainText(text); } @@ -178,7 +177,7 @@ FormWidget::FormWidget(const QString &label, bool isEditable, QWidget *parent) setLayout(layout); - connect(m_editor->document(), SIGNAL(contentsChanged()), SLOT(slotTextChanged())); + connect(m_editor, SIGNAL(textChanged()), SLOT(slotTextChanged())); connect(m_editor, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); connect(m_editor, SIGNAL(cursorPositionChanged()), SIGNAL(cursorPositionChanged())); } |