X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Finputline.cpp;h=76796dd5e071fef4375e99715d86f553b35e64bb;hb=e673fb0057265c0969a7632a057e41fa991bb8bd;hp=53bcdcacd2c5c156456eb0d69a3c155635eb5108;hpb=d3f2be9223dc34e5bc52095de4ec59f734f5c820;p=quassel.git diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index 53bcdcac..76796dd5 100644 --- a/src/uisupport/inputline.cpp +++ b/src/uisupport/inputline.cpp @@ -43,7 +43,7 @@ bool InputLine::eventFilter(QObject *watched, QEvent *event) { BufferView *view = qobject_cast(watched); if(view) { QKeyEvent *keyEvent = static_cast(event); - if(keyEvent->text().length() == 1) { // normal key press + if(keyEvent->text().length() == 1 && !(keyEvent->modifiers() & (Qt::ControlModifier ^ Qt::AltModifier)) ) { // normal key press QChar c = keyEvent->text().at(0); if(c.isLetterOrNumber() || c.isSpace() || c.isPunct() || c.isSymbol()) { setFocus(); @@ -144,7 +144,7 @@ void InputLine::on_textChanged(QString newText) { QStringList lines = newText.split(lineSep); clear(); - if(lines.count() > 4) { + if(lines.count() >= 4) { QString msg = tr("Do you really want to paste %1 lines?").arg(lines.count()); msg += "

"; for(int i = 0; i < 3; i++) { @@ -156,7 +156,9 @@ void InputLine::on_textChanged(QString newText) { msg += "...

"; QMessageBox question(QMessageBox::NoIcon, tr("Paste Protection"), msg, QMessageBox::Yes|QMessageBox::No); question.setDefaultButton(QMessageBox::No); +#ifdef Q_WS_MAC question.setWindowFlags(question.windowFlags() | Qt::Sheet); +#endif if(question.exec() == QMessageBox::No) return; }