remove transientParent property
This commit is contained in:
parent
49252b0b5d
commit
97bfabd4d7
|
@ -161,6 +161,10 @@ void DialogPrivate::updateContrast()
|
|||
void DialogPrivate::updateVisibility(bool visible)
|
||||
{
|
||||
if (visible) {
|
||||
if (visualParent && visualParent.data()->window()) {
|
||||
q->setTransientParent(visualParent.data()->window());
|
||||
}
|
||||
|
||||
if (q->location() == Plasma::Types::FullScreen) {
|
||||
frameSvgItem->setEnabledBorders(Plasma::FrameSvg::NoBorder);
|
||||
|
||||
|
@ -490,6 +494,9 @@ void Dialog::setVisualParent(QQuickItem *visualParent)
|
|||
d->visualParent = visualParent;
|
||||
emit visualParentChanged();
|
||||
if (visualParent) {
|
||||
if (visualParent->window()) {
|
||||
setTransientParent(visualParent->window());
|
||||
}
|
||||
d->requestSyncToMainItemSize();
|
||||
}
|
||||
}
|
||||
|
@ -788,16 +795,6 @@ void Dialog::setOutputOnly(bool outputOnly)
|
|||
emit outputOnlyChanged();
|
||||
}
|
||||
|
||||
void Dialog::setTransientParentAndNotify(QWindow *parent)
|
||||
{
|
||||
if (parent == transientParent()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTransientParent(parent);
|
||||
emit transientParentChanged();
|
||||
}
|
||||
|
||||
|
||||
#include "moc_dialog.cpp"
|
||||
|
||||
|
|
|
@ -73,11 +73,6 @@ class Dialog : public QQuickWindow, public QQmlParserStatus
|
|||
*/
|
||||
Q_PROPERTY(WindowType type READ type WRITE setType NOTIFY typeChanged)
|
||||
|
||||
/**
|
||||
* This is a hint to the window manager that this window is a dialog or pop-up on behalf of the given window.
|
||||
*/
|
||||
Q_PROPERTY(QWindow *transientParent READ transientParent WRITE setTransientParentAndNotify NOTIFY transientParentChanged)
|
||||
|
||||
/**
|
||||
* Whether the dialog should be hidden when the dialog loses focus.
|
||||
*
|
||||
|
@ -135,8 +130,6 @@ public:
|
|||
void setOutputOnly(bool outputOnly);
|
||||
bool isOutputOnly() const;
|
||||
|
||||
void setTransientParentAndNotify(QWindow *parent);
|
||||
|
||||
/**
|
||||
* @returns The suggested screen position for the popup
|
||||
* @arg item the item the popup has to be positioned relatively to. if null, the popup will be positioned in the center of the window
|
||||
|
@ -151,7 +144,6 @@ Q_SIGNALS:
|
|||
void typeChanged();
|
||||
void hideOnWindowDeactivateChanged();
|
||||
void outputOnlyChanged();
|
||||
void transientParentChanged();
|
||||
void flagsChanged();
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue
Block a user