From 4082975d4fc1bca330f5f09dd7212ba87a598df7 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sun, 16 Aug 2009 15:01:48 +0200 Subject: [PATCH 1/1] Build on Qt 4.4 again --- src/uisupport/multilineedit.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 1a18f328..7bc6c235 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -201,7 +201,18 @@ bool MultiLineEdit::addToHistory(const QString &text, bool temporary) { } void MultiLineEdit::keyPressEvent(QKeyEvent *event) { + // Workaround the fact that Qt < 4.5 doesn't know InsertLineSeparator yet +#if QT_VERSION >= 0x040500 if(event == QKeySequence::InsertLineSeparator) { +#else + +# ifdef Q_WS_MAC + if((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && event->modifiers() & Qt::META) { +# else + if((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && event->modifiers() & Qt::SHIFT) { +# endif +#endif + if(_mode == SingleLine) return; #ifdef HAVE_KDE -- 2.20.1