Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ac64bc35 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Merge branch 'Plasma/5.18'

parents 7a011469 6a3929a9
......@@ -279,7 +279,7 @@ QtObject {
if (popupLocation & Qt.AlignTop) {
// We want to calculate the new position based on its original target position to avoid positioning it and then
// positioning it again, hence the temporary Qt.rect with explicit "y" and not just the popup as a whole
if (focusDialog && focusDialog.visible && focusDialog !== popup
if (focusDialog && focusDialog.visible && !(focusDialog instanceof NotificationPopup)
&& rectIntersect(focusDialog, Qt.rect(popup.x, y, popup.width, popup.height))) {
y = focusDialog.y + focusDialog.height + popupEdgeDistance;
}
......@@ -289,7 +289,7 @@ QtObject {
y += popup.height + (popup.height > 0 ? popupSpacing : 0);
} else {
y -= popup.height;
if (focusDialog && focusDialog.visible && focusDialog !== popup
if (focusDialog && focusDialog.visible && !(focusDialog instanceof NotificationPopup)
&& rectIntersect(focusDialog, Qt.rect(popup.x, y, popup.width, popup.height))) {
y = focusDialog.y - popup.height - popupEdgeDistance;
}
......
......@@ -34,8 +34,12 @@ LimitedRowCountProxyModel::~LimitedRowCountProxyModel() = default;
void LimitedRowCountProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
{
if (this->sourceModel()) {
disconnect(this->sourceModel(), nullptr, this, nullptr);
if (sourceModel == QAbstractProxyModel::sourceModel()) {
return;
}
if (QAbstractProxyModel::sourceModel()) {
disconnect(QAbstractProxyModel::sourceModel(), nullptr, this, nullptr);
}
QSortFilterProxyModel::setSourceModel(sourceModel);
......
......@@ -36,8 +36,12 @@ NotificationGroupCollapsingProxyModel::~NotificationGroupCollapsingProxyModel()
void NotificationGroupCollapsingProxyModel::setSourceModel(QAbstractItemModel *source)
{
if (sourceModel()) {
disconnect(sourceModel(), nullptr, this, nullptr);
if (source == QAbstractProxyModel::sourceModel()) {
return;
}
if (QAbstractProxyModel::sourceModel()) {
disconnect(QAbstractProxyModel::sourceModel(), nullptr, this, nullptr);
}
QSortFilterProxyModel::setSourceModel(source);
......
......@@ -261,7 +261,7 @@ public:
UserActionFeedbackRole, ///< Whether this notification is a response/confirmation to an explicit user action. @since 5.18
HasReplyActionRole, ///< Whether the action has a reply action. @since 5.18
HasReplyActionRole, ///< Whether the notification has a reply action. @since 5.18
ReplyActionLabelRole, ///< The user-visible label for the reply action. @since 5.18
ReplyPlaceholderTextRole, ///< A custom placeholder text for the reply action, e.g. "Reply to Max...". @since 5.18
ReplySubmitButtonTextRole, ///< A custom text for the reply submit button, e.g. "Submit Comment". @since 5.18
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment