[kdecorations] Drop initialParentWidget()

No longer needed for creating the preview and not set in our main
bridge. Thus it can go and we just use NULL as the parent widget.
This commit is contained in:
Martin Gräßlin 2013-10-08 07:22:19 +02:00
parent 98549449d6
commit d6bf62eb3e
9 changed files with 1 additions and 28 deletions

View file

@ -180,11 +180,6 @@ int Bridge::currentDesktop() const
return VirtualDesktopManager::self()->current();
}
QWidget* Bridge::initialParentWidget() const
{
return NULL;
}
Qt::WindowFlags Bridge::initialWFlags() const
{
return Qt::WindowDoesNotAcceptFocus;

View file

@ -74,7 +74,6 @@ public:
virtual void setKeepAbove(bool) override;
virtual void setKeepBelow(bool) override;
virtual int currentDesktop() const override;
virtual QWidget* initialParentWidget() const override;
virtual Qt::WindowFlags initialWFlags() const override;
virtual void grabXServer(bool grab) override;

View file

@ -184,11 +184,6 @@ KDecorationPreviewBridge::KDecorationPreviewBridge(KDecorationPreview* p, bool a
{
}
QWidget* KDecorationPreviewBridge::initialParentWidget() const
{
return preview;
}
Qt::WindowFlags KDecorationPreviewBridge::initialWFlags() const
{
return 0;

View file

@ -106,7 +106,6 @@ public:
virtual void setKeepAbove(bool) override;
virtual void setKeepBelow(bool) override;
virtual int currentDesktop() const override;
virtual QWidget* initialParentWidget() const override;
virtual Qt::WindowFlags initialWFlags() const override;
virtual void grabXServer(bool grab) override;

View file

@ -1323,10 +1323,6 @@ void KCommonDecoration::createMainWidget(Qt::WindowFlags flags)
{
return d->wrapper->createMainWidget(flags);
}
QWidget* KCommonDecoration::initialParentWidget() const
{
return d->wrapper->initialParentWidget();
}
Qt::WindowFlags KCommonDecoration::initialWFlags() const
{
return d->wrapper->initialWFlags();

View file

@ -354,7 +354,6 @@ Q_SIGNALS:
public:
void setMainWidget(QWidget*);
void createMainWidget(Qt::WindowFlags flags = 0);
QWidget* initialParentWidget() const;
Qt::WindowFlags initialWFlags() const;
QWidget* widget();
const QWidget* widget() const;

View file

@ -91,7 +91,7 @@ const KDecorationOptions* KDecoration::options()
void KDecoration::createMainWidget(Qt::WindowFlags flags)
{
// FRAME check flags?
QWidget *w = new QWidget(initialParentWidget(), initialWFlags() | flags);
QWidget *w = new QWidget(nullptr, initialWFlags() | flags);
w->setObjectName(QLatin1String("decoration widget"));
if (options()->showTooltips())
w->setAttribute(Qt::WA_AlwaysShowToolTips);
@ -106,11 +106,6 @@ void KDecoration::setMainWidget(QWidget* w)
widget()->resize(geometry().size());
}
QWidget* KDecoration::initialParentWidget() const
{
return d->bridge->initialParentWidget();
}
Qt::WindowFlags KDecoration::initialWFlags() const
{
return d->bridge->initialWFlags();

View file

@ -982,10 +982,6 @@ public:
* like WX11BypassWM or WStyle_NoBorder are forbidden.
*/
void createMainWidget(Qt::WindowFlags flags = 0);
/**
* The parent widget that should be used for the main widget.
*/
QWidget* initialParentWidget() const;
/**
* The flags that should be used when creating the main widget.
* It is possible to add more flags when creating the main widget, but only flags

View file

@ -81,7 +81,6 @@ public:
virtual void setKeepBelow(bool) = 0;
// not part of public API
virtual int currentDesktop() const = 0;
virtual QWidget* initialParentWidget() const = 0;
virtual Qt::WindowFlags initialWFlags() const = 0;
virtual void grabXServer(bool grab) = 0;