From: Manuel Nickschas Date: Sun, 16 Aug 2009 13:01:48 +0000 (+0200) Subject: Build on Qt 4.4 again X-Git-Tag: 0.5-rc1~61 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=4082975d4fc1bca330f5f09dd7212ba87a598df7;p=quassel.git Build on Qt 4.4 again --- 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