QOffscreenSurface: warning-fix - QString(char*) deprecated

Passing a string literal to QWindow::setObjectName() is rude:
it wants a QString.

Change-Id: Ic4c1079889002f0d5f1028c443456a8be0b7b0fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Edward Welbourne 2016-08-25 15:17:47 +02:00 committed by Tor Arne Vestbø
parent f063cb7f81
commit 3525ede0a5

View File

@ -177,7 +177,7 @@ void QOffscreenSurface::create()
if (QThread::currentThread() != qGuiApp->thread())
qWarning("Attempting to create QWindow-based QOffscreenSurface outside the gui thread. Expect failures.");
d->offscreenWindow = new QWindow(d->screen);
d->offscreenWindow->setObjectName("QOffscreenSurface");
d->offscreenWindow->setObjectName(QLatin1String("QOffscreenSurface"));
// Remove this window from the global list since we do not want it to be destroyed when closing the app.
// The QOffscreenSurface has to be usable even after exiting the event loop.
QGuiApplicationPrivate::window_list.removeOne(d->offscreenWindow);