X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Finputline.cpp;h=eaed70fe5c5ebe1fa039a0a8b22f9b12b5a033d4;hb=5cfbc4c3d77118661d2be0fb79dc138af81310a3;hp=53bcdcacd2c5c156456eb0d69a3c155635eb5108;hpb=d3f2be9223dc34e5bc52095de4ec59f734f5c820;p=quassel.git diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index 53bcdcac..eaed70fe 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,8 +144,8 @@ void InputLine::on_textChanged(QString newText) { QStringList lines = newText.split(lineSep); clear(); - if(lines.count() > 4) { - QString msg = tr("Do you really want to paste %1 lines?").arg(lines.count()); + if(lines.count() >= 4) { + QString msg = tr("Do you really want to paste %n lines?", "", lines.count()); msg += "

"; for(int i = 0; i < 3; i++) { msg += lines[i].left(40); @@ -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; }