Add default argument to QPlatformWindow::isEmbedded()
Removes magic 0-pointers at the call sites. Change-Id: I6740f6b8cc75004ab5f2ebcb3b3c95cbbdc43153 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
parent
26a89e7bf7
commit
233d0a6b8d
@ -870,7 +870,7 @@ QWindowList QGuiApplication::topLevelWindows()
|
||||
if (!list.at(i)->parent() && list.at(i)->type() != Qt::Desktop) {
|
||||
// Top windows of embedded QAxServers do not have QWindow parents,
|
||||
// but they are not true top level windows, so do not include them.
|
||||
const bool embedded = list.at(i)->handle() && list.at(i)->handle()->isEmbedded(0);
|
||||
const bool embedded = list.at(i)->handle() && list.at(i)->handle()->isEmbedded();
|
||||
if (!embedded)
|
||||
topLevelWindows.prepend(list.at(i));
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
|
||||
virtual bool isExposed() const;
|
||||
virtual bool isActive() const;
|
||||
virtual bool isEmbedded(const QPlatformWindow *parentWindow) const;
|
||||
virtual bool isEmbedded(const QPlatformWindow *parentWindow = 0) const;
|
||||
virtual QPoint mapToGlobal(const QPoint &pos) const;
|
||||
virtual QPoint mapFromGlobal(const QPoint &pos) const;
|
||||
|
||||
|
@ -2292,7 +2292,7 @@ QPoint QWindow::mapToGlobal(const QPoint &pos) const
|
||||
Q_D(const QWindow);
|
||||
// QTBUG-43252, prefer platform implementation for foreign windows.
|
||||
if (d->platformWindow
|
||||
&& (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) {
|
||||
&& (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded())) {
|
||||
return d->platformWindow->mapToGlobal(pos);
|
||||
}
|
||||
return pos + d->globalPosition();
|
||||
@ -2312,7 +2312,7 @@ QPoint QWindow::mapFromGlobal(const QPoint &pos) const
|
||||
Q_D(const QWindow);
|
||||
// QTBUG-43252, prefer platform implementation for foreign windows.
|
||||
if (d->platformWindow
|
||||
&& (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) {
|
||||
&& (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded())) {
|
||||
return d->platformWindow->mapFromGlobal(pos);
|
||||
}
|
||||
return pos - d->globalPosition();
|
||||
|
@ -1062,7 +1062,7 @@ QWindow *QWindowsWindow::topLevelOf(QWindow *w)
|
||||
|
||||
if (const QPlatformWindow *handle = w->handle()) {
|
||||
const QWindowsWindow *ww = static_cast<const QWindowsWindow *>(handle);
|
||||
if (ww->isEmbedded(0)) {
|
||||
if (ww->isEmbedded()) {
|
||||
HWND parentHWND = GetAncestor(ww->handle(), GA_PARENT);
|
||||
const HWND desktopHwnd = GetDesktopWindow();
|
||||
const QWindowsContext *ctx = QWindowsContext::instance();
|
||||
@ -1140,7 +1140,7 @@ bool QWindowsWindow::isEmbedded(const QPlatformWindow *parentWindow) const
|
||||
}
|
||||
|
||||
if (!m_data.embedded && parent())
|
||||
return parent()->isEmbedded(0);
|
||||
return parent()->isEmbedded();
|
||||
|
||||
return m_data.embedded;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
bool isVisible() const;
|
||||
bool isExposed() const Q_DECL_OVERRIDE { return testFlag(Exposed); }
|
||||
bool isActive() const Q_DECL_OVERRIDE;
|
||||
bool isEmbedded(const QPlatformWindow *parentWindow) const Q_DECL_OVERRIDE;
|
||||
bool isEmbedded(const QPlatformWindow *parentWindow = 0) const Q_DECL_OVERRIDE;
|
||||
QPoint mapToGlobal(const QPoint &pos) const Q_DECL_OVERRIDE;
|
||||
QPoint mapFromGlobal(const QPoint &pos) const Q_DECL_OVERRIDE;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
void setParent(const QPlatformWindow *window) Q_DECL_OVERRIDE;
|
||||
|
||||
bool isExposed() const Q_DECL_OVERRIDE;
|
||||
bool isEmbedded(const QPlatformWindow *parentWindow) const Q_DECL_OVERRIDE;
|
||||
bool isEmbedded(const QPlatformWindow *parentWindow = 0) const Q_DECL_OVERRIDE;
|
||||
QPoint mapToGlobal(const QPoint &pos) const Q_DECL_OVERRIDE;
|
||||
QPoint mapFromGlobal(const QPoint &pos) const Q_DECL_OVERRIDE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user