From ea6cd0de3cbde7ae51bb6f9e2b01dd2785af85a0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 28 Sep 2017 15:54:49 +0200 Subject: Fix outdated BSD license header Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen --- .../quick/quickwidgets/qquickviewcomparison/fbitem.cpp | 16 +++++++++++++--- .../quick/quickwidgets/qquickviewcomparison/fbitem.h | 16 +++++++++++++--- .../quick/quickwidgets/qquickviewcomparison/logo.cpp | 16 +++++++++++++--- examples/quick/quickwidgets/qquickviewcomparison/logo.h | 16 +++++++++++++--- .../quick/quickwidgets/qquickviewcomparison/main.cpp | 16 +++++++++++++--- .../quickwidgets/qquickviewcomparison/mainwindow.cpp | 16 +++++++++++++--- .../quick/quickwidgets/qquickviewcomparison/mainwindow.h | 16 +++++++++++++--- .../quick/quickwidgets/qquickviewcomparison/test.qml | 16 +++++++++++++--- 8 files changed, 104 insertions(+), 24 deletions(-) (limited to 'examples/quick/quickwidgets/qquickviewcomparison') diff --git a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp index 49c4450b89..1f1bd55cfd 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h index 85720f1c59..f437e5771c 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h +++ b/examples/quick/quickwidgets/qquickviewcomparison/fbitem.h @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/logo.cpp b/examples/quick/quickwidgets/qquickviewcomparison/logo.cpp index 05c6e4c1b5..b11c326034 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/logo.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/logo.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/logo.h b/examples/quick/quickwidgets/qquickviewcomparison/logo.h index 9ae2ca0725..6cb35a28c4 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/logo.h +++ b/examples/quick/quickwidgets/qquickviewcomparison/logo.h @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp index 7e45e42527..a80d151401 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp index ea6c7f2f9a..e2892640f7 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h index 5b86c93f38..4358e6769f 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quick/quickwidgets/qquickviewcomparison/test.qml b/examples/quick/quickwidgets/qquickviewcomparison/test.qml index 280beee92c..e142add084 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/test.qml +++ b/examples/quick/quickwidgets/qquickviewcomparison/test.qml @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are -- cgit v1.2.3 From f82c4de515223574bcc510de0d993426b22bccbe Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 5 Sep 2017 13:51:52 +0200 Subject: Qt Quick examples: Introduce QCommandLineParser Task-number: QTBUG-60630 Change-Id: Iaf24e09fdec92f8af495a1288685f266c39be4a7 Reviewed-by: Laszlo Agocs --- .../quick/quickwidgets/qquickviewcomparison/main.cpp | 20 ++++++++++++++++++-- .../quickwidgets/qquickviewcomparison/mainwindow.cpp | 8 ++++---- .../quickwidgets/qquickviewcomparison/mainwindow.h | 3 ++- 3 files changed, 24 insertions(+), 7 deletions(-) (limited to 'examples/quick/quickwidgets/qquickviewcomparison') diff --git a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp index 7e45e42527..848107ce71 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include +#include +#include #include "mainwindow.h" @@ -48,8 +50,22 @@ int main(int argc, char **argv) QApplication app(argc, argv); - bool transparency = QCoreApplication::arguments().contains(QStringLiteral("--transparent")); - MainWindow widgetWindow(transparency); + QCoreApplication::setApplicationName("Qt QQuickView/QQuickWidget Comparison Example"); + QCoreApplication::setOrganizationName("QtProject"); + QCoreApplication::setApplicationVersion(QT_VERSION_STR); + QCommandLineParser parser; + parser.setApplicationDescription(QCoreApplication::applicationName()); + parser.addHelpOption(); + parser.addVersionOption(); + QCommandLineOption noRenderAlphaOption("no-render-alpha", "Do not render Alpha"); + parser.addOption(noRenderAlphaOption); + QCommandLineOption transparentOption("transparent", "Transparent window"); + parser.addOption(transparentOption); + + parser.process(app); + + const bool transparency = parser.isSet(transparentOption); + MainWindow widgetWindow(transparency, parser.isSet(noRenderAlphaOption)); if (transparency) { widgetWindow.setAttribute(Qt::WA_TranslucentBackground); widgetWindow.setAttribute(Qt::WA_NoSystemBackground, false); diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp index ea6c7f2f9a..2e623464ba 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp @@ -40,7 +40,6 @@ #include "mainwindow.h" #include "fbitem.h" -#include #include #include #include @@ -48,10 +47,11 @@ #include #include -MainWindow::MainWindow(bool transparency) +MainWindow::MainWindow(bool transparency, bool noRenderAlpha) : m_currentView(0), m_currentRootObject(0), - m_transparent(transparency) + m_transparent(transparency), + m_noRenderAlpha(noRenderAlpha) { QVBoxLayout *layout = new QVBoxLayout; @@ -178,7 +178,7 @@ void MainWindow::updateView() if (m_currentRootObject) { m_currentRootObject->setProperty("currentText", text); m_currentRootObject->setProperty("multisample", m_checkboxMultiSample->isChecked()); - if (!QCoreApplication::arguments().contains(QStringLiteral("--no_render_alpha"))) + if (!m_noRenderAlpha) m_currentRootObject->setProperty("translucency", m_transparent); } diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h index 5b86c93f38..e49f50cab6 100644 --- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h +++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h @@ -53,7 +53,7 @@ QT_FORWARD_DECLARE_CLASS(QLayout) class MainWindow : public QWidget { public: - MainWindow(bool transparency); + explicit MainWindow(bool transparency, bool noRenderAlpha); protected: void resizeEvent(QResizeEvent*); @@ -86,6 +86,7 @@ private: QSurfaceFormat m_format; bool m_transparent; + bool m_noRenderAlpha; }; #endif -- cgit v1.2.3