texteditor: do not allow block selection to modify readonly editors

Task-number: QTCREATORBUG-5391

Change-Id: Icd896f39c183a0bf5e402ad65189b009dabdadc1
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Fawzi Mohamed
2012-01-26 12:14:21 +01:00
parent 6696a9b0d0
commit 6308632e5d

View File

@@ -1819,7 +1819,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
break;
}
if (d->m_inBlockSelectionMode) {
if (!ro && d->m_inBlockSelectionMode) {
QString text = e->text();
if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
d->removeBlockSelection(text);