Beautifier: Add const wherever applicable

Change-Id: Iba3e5793bfd0e4057074e2b04e6353ba09aa4a5f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Lorenz Haas
2015-06-21 19:12:02 +02:00
committed by David Schulz
parent f06482ca7f
commit e7789de28c
8 changed files with 14 additions and 14 deletions

View File

@@ -139,7 +139,7 @@ void ConfigurationEditor::setCommentExpression(const QRegExp &rx)
bool ConfigurationEditor::eventFilter(QObject *object, QEvent *event)
{
if (event->type() == QEvent::ShortcutOverride) {
QKeyEvent *key = static_cast<QKeyEvent *>(event);
const QKeyEvent *key = static_cast<const QKeyEvent *>(event);
if (key->key() == Qt::Key_Escape) {
event->accept();
m_completer->popup()->hide();
@@ -176,7 +176,7 @@ void ConfigurationEditor::keyPressEvent(QKeyEvent *event)
QPlainTextEdit::keyPressEvent(event);
const int cursorPosition = textCursor().position();
QTextCursor cursor = cursorForTextUnderCursor();
const QTextCursor cursor = cursorForTextUnderCursor();
const QString prefix = cursor.selectedText();
if (!isShortcut && (prefix.length() < 2 || cursorPosition != cursor.position())) {