Usercards no longer close when the originating window (e.g. a search popup) is closed (#3518)

Fixed being unable to open a usercard from inside a usercard while "Automatically close user popup when it loses focus" was enabled

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
qooq69
2022-01-16 13:31:24 +01:00
committed by GitHub
parent 201cd67e41
commit 687adf6b4e
2 changed files with 3 additions and 5 deletions
+1 -5
View File
@@ -2060,12 +2060,8 @@ void ChannelView::hideEvent(QHideEvent *)
void ChannelView::showUserInfoPopup(const QString &userName)
{
QWidget *userCardParent = this;
#ifdef Q_OS_MACOS
// Order of closing/opening/killing widgets when the "Automatically close user info popups" setting is enabled is special on macOS, so user info popups should always use the main window as its parent
userCardParent =
QWidget *userCardParent =
static_cast<QWidget *>(&(getApp()->windows->getMainWindow()));
#endif
auto *userPopup =
new UserInfoPopup(getSettings()->autoCloseUserPopup, userCardParent);
userPopup->setData(userName, this->hasSourceChannel()