static QWidgetMapper *wPRmapper = 0; // alternative widget mapper
-void qPRCreate(const QWidget *widget, Window oldwin)
+void qPRCreate(QWidget *widget, Window oldwin)
{ // QWidget::reparent mechanism
if (!wPRmapper)
wPRmapper = new QWidgetMapper;
- QETWidget *w = static_cast<QETWidget *>(const_cast<QWidget *>(widget));
+ QETWidget *w = static_cast<QETWidget *>(widget);
wPRmapper->insert((int)oldwin, w); // add old window to mapper
w->setAttribute(Qt::WA_WState_Reparented); // set reparented flag
}
void qPRCleanup(QWidget *widget)
{
- QETWidget *etw = static_cast<QETWidget *>(const_cast<QWidget *>(widget));
+ QETWidget *etw = static_cast<QETWidget *>(widget);
if (!(wPRmapper && widget->testAttribute(Qt::WA_WState_Reparented)))
return; // not a reparented widget
QWidgetMapper::iterator it = wPRmapper->begin();
return true;
}
+extern void qPRCleanup(QWidget *widget); // from qapplication_x11.cpp
+extern void qPRCreate(QWidget *, Window);
+
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
{
Q_D(QWidget);
}
d->setWinId(0);
- extern void qPRCleanup(QWidget *widget); // from qapplication_x11.cpp
if (testAttribute(Qt::WA_WState_Reparented))
qPRCleanup(this);
}
bool wasCreated = q->testAttribute(Qt::WA_WState_Created);
if (q->isVisible() && q->parentWidget() && parent != q->parentWidget())
q->parentWidget()->d_func()->invalidateBuffer(effectiveRectFor(q->geometry()));
- extern void qPRCreate(const QWidget *, Window);
#ifndef QT_NO_CURSOR
QCursor oldcurs;
#endif