From: Friedemann Kleint Date: Wed, 22 May 2013 15:18:46 +0000 (+0200) Subject: qmlscene: Set window flags correctly. X-Git-Tag: upstream/5.2.1~798^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=745621a90bde2b01de144cb288302f7d4944a682;p=platform%2Fupstream%2Fqtdeclarative.git qmlscene: Set window flags correctly. Task-number: QTBUG-31258 Change-Id: I13dfc17c75075de155505d20c57400753de0a71d Reviewed-by: Shawn Rutledge --- diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index df267c8..d572487 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -491,7 +491,6 @@ int main(int argc, char ** argv) // Set window default properties; the qml can still override them QString oname = contentItem->objectName(); window->setTitle(oname.isEmpty() ? QString::fromLatin1("qmlscene") : QString::fromLatin1("qmlscene: ") + oname); - window->setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint); if (options.resizeViewToRootItem) qxView->setResizeMode(QQuickView::SizeViewToRootObject); else @@ -512,6 +511,9 @@ int main(int argc, char ** argv) } window->setFormat(surfaceFormat); + if (window->flags() == Qt::Window) // Fix window flags unless set by QML. + window->setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint); + if (options.fullscreen) window->showFullScreen(); else if (options.maximized)