diff options
| author | J-P Nurmi <jpnurmi@digia.com> | 2014-08-06 14:29:17 +0200 |
|---|---|---|
| committer | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2014-08-06 18:41:41 +0200 |
| commit | 6b8a0dabdc750052512446ee6db06d4033320d48 (patch) | |
| tree | f8954ff6eb41d944a80941ea4dbf2bea281eed5b /src/controls/qquickapplicationwindow.cpp | |
| parent | 42a5930a75b5b05926da8895faa228da9d1e20e5 (diff) | |
Fix ApplicationWindow state / content size
QML Window is not a plain QQuickWindow, but QQuickWindowQmlImpl that
does delayed visibility handling and shows the window in appropriate
state. Thus, ApplicationWindow cannot inherit QQuickWindow or it would
lose all that magic.
QQuickApplicationWindow was added in order for ApplicationWindowStyle
to be able to know whether a custom window color had been set. This
change gets rid of the QQuickWindow subclass and simply compares the
window color to white, which is the default fill color of QQuickWindow.
Change-Id: Ibd95ef0717c2db51246c6a71585e9286e61cef0b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/qquickapplicationwindow.cpp')
| -rw-r--r-- | src/controls/qquickapplicationwindow.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/controls/qquickapplicationwindow.cpp b/src/controls/qquickapplicationwindow.cpp deleted file mode 100644 index 4bdf1066b..000000000 --- a/src/controls/qquickapplicationwindow.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qquickapplicationwindow_p.h" - -QT_BEGIN_NAMESPACE - -QQuickApplicationWindow::QQuickApplicationWindow(QWindow *parent) : - QQuickWindow(parent), m_hasColor(false) -{ - connect(this, SIGNAL(colorChanged(QColor)), this, SLOT(setHasColor())); -} - -bool QQuickApplicationWindow::hasColor() const -{ - return m_hasColor; -} - -void QQuickApplicationWindow::setHasColor(bool hasColor) -{ - if (m_hasColor != hasColor) { - m_hasColor = hasColor; - emit hasColorChanged(hasColor); - } -} - -QT_END_NAMESPACE |
