Fix split focusing being broken in certain circumstances when the "Show input when it's empty" setting was disabled (#3838)

Co-authored-by: Kasia <zneix@zneix.eu>
This commit is contained in:
pajlada
2022-06-26 18:53:09 +02:00
committed by GitHub
parent 8bdfbf7b87
commit 6599009e79
13 changed files with 151 additions and 57 deletions
+5
View File
@@ -155,6 +155,11 @@ ChannelView::ChannelView(BaseWidget *parent)
QObject::connect(&this->scrollTimer_, &QTimer::timeout, this,
&ChannelView::scrollUpdateRequested);
// TODO: Figure out if we need this, and if so, why
// StrongFocus means we can focus this event through clicking it
// and tabbing to it from another widget. I don't currently know
// of any place where you can, or where it would make sense,
// to tab to a ChannelVieChannelView
this->setFocusPolicy(Qt::FocusPolicy::StrongFocus);
}
+3 -1
View File
@@ -96,8 +96,10 @@ QString ResizingTextEdit::textUnderCursor(bool *hadSpace) const
return lastWord;
}
bool ResizingTextEdit::eventFilter(QObject *, QEvent *event)
bool ResizingTextEdit::eventFilter(QObject *obj, QEvent *event)
{
(void)obj; // unused
// makes QShortcuts work in the ResizingTextEdit
if (event->type() != QEvent::ShortcutOverride)
{
+2 -1
View File
@@ -43,7 +43,8 @@ private:
QCompleter *completer_ = nullptr;
bool completionInProgress_ = false;
bool eventFilter(QObject *widget, QEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
private slots:
void insertCompletion(const QString &completion);
};