Windows code: Replace deprecated QVariant API
Task-number: QTBUG-74043 Change-Id: I6f5f47b74830597eec74e2582e24d2d7dd235a80 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>bb10
parent
5a5a96560e
commit
7ac2263f30
|
|
@ -784,7 +784,7 @@ void QWindowsMenuBar::handleReparent(QWindow *newParentWindow)
|
|||
if (QPlatformWindow *platWin = newParentWindow->handle())
|
||||
install(static_cast<QWindowsWindow *>(platWin));
|
||||
else // Store for later creation, see menuBarOf()
|
||||
newParentWindow->setProperty(menuBarPropertyName, qVariantFromValue<QObject *>(this));
|
||||
newParentWindow->setProperty(menuBarPropertyName, QVariant::fromValue<QObject *>(this));
|
||||
}
|
||||
|
||||
QWindowsMenuBar *QWindowsMenuBar::menuBarOf(const QWindow *notYetCreatedWindow)
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ QVariant QWindowsNativeInterface::windowProperty(QPlatformWindow *window, const
|
|||
{
|
||||
QWindowsWindow *platformWindow = static_cast<QWindowsWindow *>(window);
|
||||
if (name == QLatin1String(customMarginPropertyC))
|
||||
return qVariantFromValue(platformWindow->customMargins());
|
||||
return QVariant::fromValue(platformWindow->customMargins());
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ void QVistaHelper::updateCustomMargins(bool vistaMargins)
|
|||
const QMargins customMarginsDp = vistaMargins
|
||||
? QMargins(0, -titleBarSizeDp(), 0, 0)
|
||||
: QMargins();
|
||||
const QVariant customMarginsV = qVariantFromValue(customMarginsDp);
|
||||
const QVariant customMarginsV = QVariant::fromValue(customMarginsDp);
|
||||
// The dynamic property takes effect when creating the platform window.
|
||||
window->setProperty("_q_windowsCustomMargins", customMarginsV);
|
||||
// If a platform window exists, change via native interface.
|
||||
|
|
|
|||
Loading…
Reference in New Issue