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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -88,6 +88,8 @@
- Bugfix: Re-add date of build to the "About" page on nightly versions. (#3464)
- Bugfix: Fixed crash that would occur if the user right-clicked AutoMod badge. (#3496)
- Bugfix: Fixed being unable to drag the user card window from certain spots. (#3508)
- Bugfix: Fixed being unable to open a usercard from inside a usercard while "Automatically close user popup when it loses focus" was enabled. (#3518)
- Bugfix: Usercards no longer close when the originating window (e.g. a search popup) is closed. (#3518)
- Dev: Batch checking live status for channels with live notifications that aren't connected. (#3442)
- Dev: Add GitHub action to test builds without precompiled headers enabled. (#3327)
- Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103)

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()