Silence warnings about not supporting setMask on platforms like eglfs

Showing warnings based on an (otherwise unused) WindowMasks platform capability
is wrong. The default implementation of setMask() shows a warning anyway so it
is safe to call it in any case.

On top of this, platforms like eglfs may want to avoid showing any warnings,
since they  are completely useless for end users and pollute their debug
output and Creator panes. The standard way is to provide an empty implementation
for the function. This cannot work however if there are hardcoded warnings
generated in the common widget code.

Change-Id: I842a96b5b84c50b7caa59bdd48107785b21ab5af
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
bb10
Laszlo Agocs 2014-06-25 13:58:08 +02:00
parent b71ccf10fc
commit 3959298024
1 changed files with 0 additions and 4 deletions

View File

@ -12553,10 +12553,6 @@ void QWidget::setMask(const QRegion &newMask)
void QWidgetPrivate::setMask_sys(const QRegion &region)
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowMasks)) {
qWarning("%s: Not supported on %s.", Q_FUNC_INFO, qPrintable(QGuiApplication::platformName()));
return;
}
Q_Q(QWidget);
if (const QWindow *window = q->windowHandle())
if (QPlatformWindow *platformWindow = window->handle())