aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/fdegen/main.cpp29
-rw-r--r--tools/qml/conf.h29
-rw-r--r--tools/qml/main.cpp29
-rw-r--r--tools/qmleasing/Button.qml29
-rw-r--r--tools/qmleasing/main.cpp29
-rw-r--r--tools/qmleasing/mainwindow.cpp29
-rw-r--r--tools/qmleasing/mainwindow.h29
-rw-r--r--tools/qmleasing/preview.qml29
-rw-r--r--tools/qmleasing/segmentproperties.cpp29
-rw-r--r--tools/qmleasing/segmentproperties.h29
-rw-r--r--tools/qmleasing/splineeditor.cpp31
-rw-r--r--tools/qmleasing/splineeditor.h31
-rw-r--r--tools/qmlimportscanner/main.cpp75
-rw-r--r--tools/qmljs/qmljs.cpp29
-rw-r--r--tools/qmllint/main.cpp29
-rw-r--r--tools/qmlmin/main.cpp31
-rw-r--r--tools/qmlplugindump/Info.plist6
-rw-r--r--tools/qmlplugindump/main.cpp72
-rw-r--r--tools/qmlplugindump/qmlstreamwriter.cpp29
-rw-r--r--tools/qmlplugindump/qmlstreamwriter.h29
-rw-r--r--tools/qmlplugindump/qmltypereader.cpp2
-rw-r--r--tools/qmlprofiler/commandlistener.cpp29
-rw-r--r--tools/qmlprofiler/commandlistener.h29
-rw-r--r--tools/qmlprofiler/constants.h29
-rw-r--r--tools/qmlprofiler/main.cpp29
-rw-r--r--tools/qmlprofiler/qmlprofiler.pro11
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.cpp186
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.h53
-rw-r--r--tools/qmlprofiler/qmlprofilerclient.cpp400
-rw-r--r--tools/qmlprofiler/qmlprofilerclient.h140
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.cpp280
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.h47
-rw-r--r--tools/qmlprofiler/qmlprofilereventlocation.h53
-rw-r--r--tools/qmlprofiler/qpacketprotocol.cpp527
-rw-r--r--tools/qmlprofiler/qpacketprotocol.h109
-rw-r--r--tools/qmlprofiler/qqmldebugclient.cpp403
-rw-r--r--tools/qmlprofiler/qqmldebugclient.h101
-rw-r--r--tools/qmlscene/main.cpp29
-rw-r--r--tools/qmltestrunner/main.cpp29
-rw-r--r--tools/qmltime/example.qml29
-rw-r--r--tools/qmltime/linelaidout.qml29
-rw-r--r--tools/qmltime/qmltime.cpp29
-rw-r--r--tools/qmltime/tests/anchors/empty.qml29
-rw-r--r--tools/qmltime/tests/anchors/fill.qml29
-rw-r--r--tools/qmltime/tests/anchors/null.qml29
-rw-r--r--tools/qmltime/tests/animation/large.qml29
-rw-r--r--tools/qmltime/tests/animation/largeNoProps.qml29
-rw-r--r--tools/qmltime/tests/item_creation/children.qml29
-rw-r--r--tools/qmltime/tests/item_creation/data.qml29
-rw-r--r--tools/qmltime/tests/item_creation/no_creation.qml29
-rw-r--r--tools/qmltime/tests/item_creation/resources.qml29
-rw-r--r--tools/qmltime/tests/loader/Loaded.qml29
-rw-r--r--tools/qmltime/tests/loader/component_loader.qml29
-rw-r--r--tools/qmltime/tests/loader/empty_loader.qml29
-rw-r--r--tools/qmltime/tests/loader/no_loader.qml29
-rw-r--r--tools/qmltime/tests/loader/source_loader.qml29
-rw-r--r--tools/qmltime/tests/positioner_creation/no_positioner.qml29
-rw-r--r--tools/qmltime/tests/positioner_creation/null_positioner.qml29
-rw-r--r--tools/qmltime/tests/positioner_creation/positioner.qml29
-rw-r--r--tools/qmltime/tests/vmemetaobject/null.qml29
-rw-r--r--tools/qmltime/tests/vmemetaobject/property.qml29
-rw-r--r--tools/qmltime/textingrid.qml29
-rw-r--r--tools/tools.pro4
63 files changed, 1008 insertions, 2801 deletions
diff --git a/tools/fdegen/main.cpp b/tools/fdegen/main.cpp
index 1906037989..53ee9dec2a 100644
--- a/tools/fdegen/main.cpp
+++ b/tools/fdegen/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the V4VM module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qml/conf.h b/tools/qml/conf.h
index abd9441b2e..0c9d8613a0 100644
--- a/tools/qml/conf.h
+++ b/tools/qml/conf.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2013 Research In Motion.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Research In Motion.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index ff559e7076..a795144984 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2013 Research In Motion.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Research In Motion.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/Button.qml b/tools/qmleasing/Button.qml
index bd4a5945a0..1131e559ab 100644
--- a/tools/qmleasing/Button.qml
+++ b/tools/qmleasing/Button.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/main.cpp b/tools/qmleasing/main.cpp
index db650cf704..ab137d5eb4 100644
--- a/tools/qmleasing/main.cpp
+++ b/tools/qmleasing/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/mainwindow.cpp b/tools/qmleasing/mainwindow.cpp
index 0c0fb51e3e..e45feea76e 100644
--- a/tools/qmleasing/mainwindow.cpp
+++ b/tools/qmleasing/mainwindow.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/mainwindow.h b/tools/qmleasing/mainwindow.h
index 6eef0f59fc..9af5c8050c 100644
--- a/tools/qmleasing/mainwindow.h
+++ b/tools/qmleasing/mainwindow.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/preview.qml b/tools/qmleasing/preview.qml
index 199ab678ef..3591684da5 100644
--- a/tools/qmleasing/preview.qml
+++ b/tools/qmleasing/preview.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/segmentproperties.cpp b/tools/qmleasing/segmentproperties.cpp
index cf49b2488c..d2ab00d518 100644
--- a/tools/qmleasing/segmentproperties.cpp
+++ b/tools/qmleasing/segmentproperties.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/segmentproperties.h b/tools/qmleasing/segmentproperties.h
index c22cf25458..b6bb6e2a5f 100644
--- a/tools/qmleasing/segmentproperties.h
+++ b/tools/qmleasing/segmentproperties.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp
index 9e35af6189..78ed9606db 100644
--- a/tools/qmleasing/splineeditor.cpp
+++ b/tools/qmleasing/splineeditor.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -228,6 +223,7 @@ void SplineEditor::mouseReleaseEvent(QMouseEvent *e)
}
}
+#ifndef QT_NO_CONTEXTMENU
void SplineEditor::contextMenuEvent(QContextMenuEvent *e)
{
int index = findControlPoint(e->pos());
@@ -247,6 +243,7 @@ void SplineEditor::contextMenuEvent(QContextMenuEvent *e)
addPoint(e->pos());
}
}
+#endif // QT_NO_CONTEXTMENU
void SplineEditor::invalidate()
{
diff --git a/tools/qmleasing/splineeditor.h b/tools/qmleasing/splineeditor.h
index 595580bba2..243e199cd0 100644
--- a/tools/qmleasing/splineeditor.h
+++ b/tools/qmleasing/splineeditor.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -84,7 +79,9 @@ protected:
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
+#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent *);
+#endif // QT_NO_CONTEXTMENU
void invalidate();
void invalidateSmoothList();
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index ce91062edc..2569d78c63 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -162,24 +157,46 @@ QVariantMap pluginsForModulePath(const QString &modulePath) {
// Search for a given qml import in g_qmlImportPaths.
QString resolveImportPath(const QString &uri, const QString &version)
{
- // Create path from uri (QtQuick.Controls -> QtQuick/Controls)
- QString path = uri;
- path.replace(QLatin1Char('.'), QLatin1Char('/'));
- // search for the most spesifc version first
- QString versionedName = path + QLatin1Char('.') + version;
+ const QLatin1Char dot('.');
+ const QLatin1Char slash('/');
+ const QStringList parts = uri.split(dot, QString::SkipEmptyParts);
+
+ QString ver = version;
while (true) {
- // look in all g_qmlImportPaths
foreach (const QString &qmlImportPath, g_qmlImportPaths) {
- QString candidatePath = QDir::cleanPath(qmlImportPath + QLatin1Char('/') + versionedName);
- if (QDir(candidatePath).exists())
- return candidatePath; // import found
+ // Search for the most specific version first, and search
+ // also for the version in parent modules. For example:
+ // - qml/QtQml/Models.2.0
+ // - qml/QtQml.2.0/Models
+ // - qml/QtQml/Models.2
+ // - qml/QtQml.2/Models
+ // - qml/QtQml/Models
+ if (ver.isEmpty()) {
+ const QString candidatePath = QDir::cleanPath(qmlImportPath + slash + parts.join(slash));
+ if (QDir(candidatePath).exists())
+ return candidatePath; // import found
+ } else {
+ for (int index = parts.count() - 1; index >= 0; --index) {
+ const QString candidatePath = QDir::cleanPath(qmlImportPath + slash
+ + parts.mid(0, index + 1).join(slash)
+ + dot + ver + slash
+ + parts.mid(index + 1).join(slash));
+
+ if (QDir(candidatePath).exists())
+ return candidatePath; // import found
+ }
+ }
}
// remove the last version digit; stop if there are none left
- int lastDot = versionedName.lastIndexOf(QLatin1Char('.'));
- if (lastDot == -1)
+ if (ver.isEmpty())
break;
- versionedName = versionedName.mid(0, lastDot);
+
+ int lastDot = ver.lastIndexOf(dot);
+ if (lastDot == -1)
+ ver.clear();
+ else
+ ver = ver.mid(0, lastDot);
}
return QString(); // not found
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index 27aeed4c0c..68aa52ce91 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the V4VM module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmllint/main.cpp b/tools/qmllint/main.cpp
index a1161c635a..211427cc64 100644
--- a/tools/qmllint/main.cpp
+++ b/tools/qmllint/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sergio Martins <sergio.martins@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sergio Martins <sergio.martins@kdab.com>
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp
index a3f2b92bde..2b18a8442b 100644
--- a/tools/qmlmin/main.cpp
+++ b/tools/qmlmin/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -590,7 +585,7 @@ int runQmlmin(int argc, char *argv[])
}
} else if (arg.startsWith(QLatin1String("-w"))) {
bool ok;
- width = arg.mid(2).toInt(&ok);
+ width = arg.midRef(2).toInt(&ok);
if (!ok) {
std::cerr << "qmlmin: argument to '-w' is invalid" << std::endl;
diff --git a/tools/qmlplugindump/Info.plist b/tools/qmlplugindump/Info.plist
index f35846d048..e6c4914ca0 100644
--- a/tools/qmlplugindump/Info.plist
+++ b/tools/qmlplugindump/Info.plist
@@ -5,11 +5,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>????</string>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>qmlplugindump</string>
<key>CFBundleIdentifier</key>
- <string>com.nokia.qt.qmlplugindump</string>
+ <string>org.qt-project.qt.qmlplugindump</string>
<key>LSUIElement</key>
<string>1</string>
</dict>
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 393abc8883..5a39e497d2 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -80,6 +75,12 @@
static const uint qtQmlMajorVersion = 2;
static const uint qtQmlMinorVersion = 2;
+static const uint qtQuickMajorVersion = 2;
+static const uint qtQuickMinorVersion = 7;
+
+const QString qtQuickQualifiedName = QString::fromLatin1("QtQuick %1.%2")
+ .arg(qtQuickMajorVersion)
+ .arg(qtQuickMinorVersion);
QString pluginImportPath;
bool verbose = false;
@@ -243,10 +244,10 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
// For each export of a base object there can be a single extension object overriding it.
// Example: QDeclarativeGraphicsWidget overrides the QtQuick/QGraphicsWidget export
// of QGraphicsWidget.
- foreach (const QByteArray &baseCpp, extensions.keys()) {
- QSet<const QQmlType *> baseExports = qmlTypesByCppName.value(baseCpp);
+ for (auto it = extensions.cbegin(), end = extensions.cend(); it != end; ++it) {
+ QSet<const QQmlType *> baseExports = qmlTypesByCppName.value(it.key());
- const QSet<QByteArray> extensionCppNames = extensions.value(baseCpp);
+ const QSet<QByteArray> extensionCppNames = it.value();
foreach (const QByteArray &extensionCppName, extensionCppNames) {
const QSet<const QQmlType *> extensionExports = qmlTypesByCppName.value(extensionCppName);
@@ -268,7 +269,7 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
}
baseExports = newBaseExports;
}
- qmlTypesByCppName[baseCpp] = baseExports;
+ qmlTypesByCppName[it.key()] = baseExports;
}
if (creatable) {
@@ -735,7 +736,7 @@ void sigSegvHandler(int) {
void printUsage(const QString &appName)
{
std::cerr << qPrintable(QString(
- "Usage: %1 [-v] [-noinstantiate] [-defaultplatform] [-[non]relocatable] [-dependencies <dependencies.json>] [-merge <file-to-merge.qmltypes>] module.uri version [module/import/path]\n"
+ "Usage: %1 [-v] [-noinstantiate] [-defaultplatform] [-[non]relocatable] [-dependencies <dependencies.json>] [-merge <file-to-merge.qmltypes>] [-noforceqtquick] module.uri version [module/import/path]\n"
" %1 [-v] [-noinstantiate] -path path/to/qmldir/directory [version]\n"
" %1 [-v] -builtins\n"
"Example: %1 Qt.labs.folderlistmodel 2.0 /home/user/dev/qt-install/imports").arg(
@@ -743,7 +744,8 @@ void printUsage(const QString &appName)
}
static bool readDependenciesData(QString dependenciesFile, const QByteArray &fileData,
- QStringList *dependencies, const QStringList &urisToSkip) {
+ QStringList *dependencies, const QStringList &urisToSkip,
+ bool forceQtQuickDependency = true) {
if (verbose) {
std::cerr << "parsing "
<< qPrintable( dependenciesFile ) << " skipping";
@@ -776,7 +778,7 @@ static bool readDependenciesData(QString dependenciesFile, const QByteArray &fil
QString version = obj.value(QStringLiteral("version")).toString();
if (name.isEmpty() || urisToSkip.contains(name) || version.isEmpty())
continue;
- if (name.endsWith(QLatin1String("Private"))) {
+ if (name.endsWith(QLatin1String("Private"), Qt::CaseInsensitive)) {
if (verbose)
std::cerr << "skipping private dependecy "
<< qPrintable( name ) << " " << qPrintable(version) << std::endl;
@@ -798,8 +800,8 @@ static bool readDependenciesData(QString dependenciesFile, const QByteArray &fil
// qmlplugindump used to import QtQuick, so all types defined in QtQuick used to be skipped when dumping.
// Now that it imports only Qt, it is no longer the case: if no dependency is found all the types defined
// in QtQuick will be dumped, causing conflicts.
- if (dependencies->isEmpty())
- dependencies->push_back(QLatin1String("QtQuick 2.0"));
+ if (forceQtQuickDependency && dependencies->isEmpty())
+ dependencies->push_back(qtQuickQualifiedName);
return true;
}
@@ -817,11 +819,12 @@ static bool readDependenciesFile(const QString &dependenciesFile, QStringList *d
return false;
}
QByteArray fileData = f.readAll();
- return readDependenciesData(dependenciesFile, fileData, dependencies, urisToSkip);
+ return readDependenciesData(dependenciesFile, fileData, dependencies, urisToSkip, false);
}
static bool getDependencies(const QQmlEngine &engine, const QString &pluginImportUri,
- const QString &pluginImportVersion, QStringList *dependencies)
+ const QString &pluginImportVersion, QStringList *dependencies,
+ bool forceQtQuickDependency)
{
QFileInfo selfExe(QCoreApplication::applicationFilePath());
QString command = selfExe.absoluteDir().filePath(QLatin1String("qmlimportscanner")
@@ -854,7 +857,7 @@ static bool getDependencies(const QQmlEngine &engine, const QString &pluginImpor
}
QByteArray depencenciesData = importScanner.readAllStandardOutput();
if (!readDependenciesData(QLatin1String("<outputOfQmlimportscanner>"), depencenciesData,
- dependencies, QStringList(pluginImportUri))) {
+ dependencies, QStringList(pluginImportUri), forceQtQuickDependency)) {
std::cerr << "failed to proecess output of qmlimportscanner" << std::endl;
return false;
}
@@ -976,6 +979,8 @@ int main(int argc, char *argv[])
if (!requireWindowManager)
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal"));
+ else
+ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
QGuiApplication app(argc, argv);
const QStringList args = app.arguments();
@@ -990,6 +995,7 @@ int main(int argc, char *argv[])
bool relocatable = true;
QString dependenciesFile;
QString mergeFile;
+ bool forceQtQuickDependency = true;
enum Action { Uri, Path, Builtins };
Action action = Uri;
{
@@ -1034,6 +1040,9 @@ int main(int argc, char *argv[])
action = Builtins;
} else if (arg == QLatin1String("-v")) {
verbose = true;
+ } else if (arg == QLatin1String("--noforceqtquick")
+ || arg == QLatin1String("-noforceqtquick")){
+ forceQtQuickDependency = false;
} else if (arg == QLatin1String("--defaultplatform")
|| arg == QLatin1String("-defaultplatform")) {
continue;
@@ -1102,9 +1111,12 @@ int main(int argc, char *argv[])
calculateDependencies = !readDependenciesFile(dependenciesFile, &dependencies,
QStringList(pluginImportUri)) && calculateDependencies;
if (calculateDependencies)
- getDependencies(engine, pluginImportUri, pluginImportVersion, &dependencies);
+ getDependencies(engine, pluginImportUri, pluginImportVersion, &dependencies,
+ forceQtQuickDependency);
+
compactDependencies(&dependencies);
+
QString qtQmlImportString = QString::fromLatin1("import QtQml %1.%2")
.arg(qtQmlMajorVersion)
.arg(qtQmlMinorVersion);
diff --git a/tools/qmlplugindump/qmlstreamwriter.cpp b/tools/qmlplugindump/qmlstreamwriter.cpp
index e583afc381..dd3c188fe4 100644
--- a/tools/qmlplugindump/qmlstreamwriter.cpp
+++ b/tools/qmlplugindump/qmlstreamwriter.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlplugindump/qmlstreamwriter.h b/tools/qmlplugindump/qmlstreamwriter.h
index 25b3e06f87..cb642159ea 100644
--- a/tools/qmlplugindump/qmlstreamwriter.h
+++ b/tools/qmlplugindump/qmlstreamwriter.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlplugindump/qmltypereader.cpp b/tools/qmlplugindump/qmltypereader.cpp
index 67ba415388..9dfb6fc1e0 100644
--- a/tools/qmlplugindump/qmltypereader.cpp
+++ b/tools/qmlplugindump/qmltypereader.cpp
@@ -40,7 +40,7 @@
#include <iostream>
QStringList readQmlTypes(const QString &filename) {
- QRegularExpression re("import QtQuick.tooling 1.2.*Module {\\s*dependencies:\\[([^\\]]*)\\](.*)}",
+ QRegularExpression re("import QtQuick\\.tooling 1\\.2.*Module {\\s*dependencies:\\s*\\[([^\\]]*)\\](.*)}",
QRegularExpression::DotMatchesEverythingOption);
if (!QFileInfo(filename).exists()) {
std::cerr << "Non existing file: " << filename.toStdString() << std::endl;
diff --git a/tools/qmlprofiler/commandlistener.cpp b/tools/qmlprofiler/commandlistener.cpp
index 369d095725..88800c5e49 100644
--- a/tools/qmlprofiler/commandlistener.cpp
+++ b/tools/qmlprofiler/commandlistener.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlprofiler/commandlistener.h b/tools/qmlprofiler/commandlistener.h
index e74d5323c8..c10b199daa 100644
--- a/tools/qmlprofiler/commandlistener.h
+++ b/tools/qmlprofiler/commandlistener.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlprofiler/constants.h b/tools/qmlprofiler/constants.h
index 5b4b52515f..8c3e16a8a7 100644
--- a/tools/qmlprofiler/constants.h
+++ b/tools/qmlprofiler/constants.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlprofiler/main.cpp b/tools/qmlprofiler/main.cpp
index 12fcc79efa..d3e2beb83f 100644
--- a/tools/qmlprofiler/main.cpp
+++ b/tools/qmlprofiler/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmlprofiler/qmlprofiler.pro b/tools/qmlprofiler/qmlprofiler.pro
index 4fa36f5127..a65e25c657 100644
--- a/tools/qmlprofiler/qmlprofiler.pro
+++ b/tools/qmlprofiler/qmlprofiler.pro
@@ -1,22 +1,17 @@
-QT = qml qml-private network core-private
+QT = qml-private network core qmldebug-private
CONFIG += no_import_scan
SOURCES += main.cpp \
qmlprofilerapplication.cpp \
commandlistener.cpp \
- qqmldebugclient.cpp \
qmlprofilerdata.cpp \
- qmlprofilerclient.cpp \
- qpacketprotocol.cpp
+ qmlprofilerclient.cpp
HEADERS += \
qmlprofilerapplication.h \
commandlistener.h \
constants.h \
qmlprofilerdata.h \
- qmlprofilerclient.h \
- qmlprofilereventlocation.h \
- qqmldebugclient.h \
- qpacketprotocol.h
+ qmlprofilerclient.h
load(qt_tool)
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
index 347e7d3b55..b04ff7e558 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.cpp
+++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -41,6 +36,7 @@
#include <QtCore/QFileInfo>
#include <QtCore/QDebug>
#include <QtCore/QCommandLineParser>
+#include <QtCore/QTemporaryFile>
static const char commandTextC[] =
"The following commands are available:\n"
@@ -70,60 +66,35 @@ static const char *features[] = {
"creating",
"binding",
"handlingsignal",
- "inputevents"
+ "inputevents",
+ "debugmessages"
};
+Q_STATIC_ASSERT(sizeof(features) ==
+ QQmlProfilerDefinitions::MaximumProfileFeature * sizeof(char *));
+
QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) :
QCoreApplication(argc, argv),
m_runMode(LaunchMode),
m_process(0),
m_hostName(QLatin1String("127.0.0.1")),
- m_port(3768),
+ m_port(0),
m_pendingRequest(REQUEST_NONE),
m_verbose(false),
m_recording(true),
m_interactive(false),
- m_qmlProfilerClient(&m_connection),
- m_v8profilerClient(&m_connection),
- m_connectionAttempts(0),
- m_qmlDataReady(false),
- m_v8DataReady(false)
+ m_qmlProfilerClient(&m_connection, &m_profilerData),
+ m_connectionAttempts(0)
{
m_connectTimer.setInterval(1000);
connect(&m_connectTimer, SIGNAL(timeout()), this, SLOT(tryToConnect()));
connect(&m_connection, SIGNAL(connected()), this, SLOT(connected()));
- connect(&m_connection, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(connectionStateChanged(QAbstractSocket::SocketState)));
- connect(&m_connection, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectionError(QAbstractSocket::SocketError)));
-
- connect(&m_qmlProfilerClient, SIGNAL(enabledChanged()), this, SLOT(traceClientEnabled()));
- connect(&m_qmlProfilerClient, SIGNAL(range(QQmlProfilerDefinitions::RangeType,QQmlProfilerDefinitions::BindingType,qint64,qint64,QStringList,QmlEventLocation)),
- &m_profilerData, SLOT(addQmlEvent(QQmlProfilerDefinitions::RangeType,QQmlProfilerDefinitions::BindingType,qint64,qint64,QStringList,QmlEventLocation)));
- connect(&m_qmlProfilerClient, SIGNAL(traceFinished(qint64)), &m_profilerData, SLOT(setTraceEndTime(qint64)));
- connect(&m_qmlProfilerClient, SIGNAL(traceStarted(qint64)), &m_profilerData, SLOT(setTraceStartTime(qint64)));
- connect(&m_qmlProfilerClient, SIGNAL(traceStarted(qint64)), this, SLOT(notifyTraceStarted()));
- connect(&m_qmlProfilerClient, SIGNAL(frame(qint64,int,int,int)), &m_profilerData, SLOT(addFrameEvent(qint64,int,int,int)));
- connect(&m_qmlProfilerClient, SIGNAL(sceneGraphFrame(QQmlProfilerDefinitions::SceneGraphFrameType,
- qint64,qint64,qint64,qint64,qint64,qint64)),
- &m_profilerData, SLOT(addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGraphFrameType,
- qint64,qint64,qint64,qint64,qint64,qint64)));
- connect(&m_qmlProfilerClient, SIGNAL(pixmapCache(QQmlProfilerDefinitions::PixmapEventType,qint64,
- QmlEventLocation,int,int,int)),
- &m_profilerData, SLOT(addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType,qint64,
- QmlEventLocation,int,int,int)));
- connect(&m_qmlProfilerClient, SIGNAL(memoryAllocation(QQmlProfilerDefinitions::MemoryType,qint64,
- qint64)),
- &m_profilerData, SLOT(addMemoryEvent(QQmlProfilerDefinitions::MemoryType,qint64,
- qint64)));
- connect(&m_qmlProfilerClient, SIGNAL(inputEvent(QQmlProfilerDefinitions::EventType,qint64)),
- &m_profilerData, SLOT(addInputEvent(QQmlProfilerDefinitions::EventType,qint64)));
-
- connect(&m_qmlProfilerClient, SIGNAL(complete()), this, SLOT(qmlComplete()));
-
- connect(&m_v8profilerClient, SIGNAL(enabledChanged()), this, SLOT(profilerClientEnabled()));
- connect(&m_v8profilerClient, SIGNAL(range(int,QString,QString,int,double,double)),
- &m_profilerData, SLOT(addV8Event(int,QString,QString,int,double,double)));
- connect(&m_v8profilerClient, SIGNAL(complete()), this, SLOT(v8Complete()));
+
+ connect(&m_qmlProfilerClient, SIGNAL(enabledChanged(bool)),
+ this, SLOT(traceClientEnabledChanged(bool)));
+ connect(&m_qmlProfilerClient, SIGNAL(recordingStarted()), this, SLOT(notifyTraceStarted()));
+ connect(&m_qmlProfilerClient, SIGNAL(error(QString)), this, SLOT(logError(QString)));
connect(&m_profilerData, SIGNAL(error(QString)), this, SLOT(logError(QString)));
connect(&m_profilerData, SIGNAL(dataReady()), this, SLOT(traceFinished()));
@@ -228,6 +199,7 @@ void QmlProfilerApplication::parseArguments()
if (parser.isSet(attach)) {
m_hostName = parser.value(attach);
m_runMode = AttachMode;
+ m_port = 3768;
}
if (parser.isSet(port)) {
@@ -237,6 +209,10 @@ void QmlProfilerApplication::parseArguments()
logError(tr("'%1' is not a valid port.").arg(parser.value(port)));
parser.showHelp(1);
}
+ } else if (m_port == 0) {
+ QTemporaryFile file;
+ if (file.open())
+ m_socketFile = file.fileName();
}
m_outputFile = parser.value(output);
@@ -316,7 +292,6 @@ void QmlProfilerApplication::flush()
if (m_recording) {
m_pendingRequest = REQUEST_FLUSH;
m_qmlProfilerClient.sendRecordingStatus(false);
- m_v8profilerClient.sendRecordingStatus(false);
} else {
if (m_profilerData.save(m_interactiveOutputFile)) {
m_profilerData.clear();
@@ -407,7 +382,6 @@ void QmlProfilerApplication::userCommand(const QString &command)
if (cmd == Constants::CMD_RECORD || cmd == Constants::CMD_RECORD2) {
m_pendingRequest = REQUEST_TOGGLE_RECORDING;
m_qmlProfilerClient.sendRecordingStatus(!m_recording);
- m_v8profilerClient.sendRecordingStatus(!m_recording);
} else if (cmd == Constants::CMD_QUIT || cmd == Constants::CMD_QUIT2) {
m_pendingRequest = REQUEST_QUIT;
if (m_recording) {
@@ -474,10 +448,15 @@ void QmlProfilerApplication::outputData()
void QmlProfilerApplication::run()
{
if (m_runMode == LaunchMode) {
+ if (!m_socketFile.isEmpty()) {
+ logStatus(QString::fromLatin1("Listening on %1 ...").arg(m_socketFile));
+ m_connection.startLocalServer(m_socketFile);
+ }
m_process = new QProcess(this);
QStringList arguments;
- arguments << QString::fromLatin1("-qmljsdebugger=port:%1,block,services:CanvasFrameRate")
- .arg(m_port);
+ arguments << QString::fromLatin1("-qmljsdebugger=%1:%2,block,services:CanvasFrameRate")
+ .arg(QLatin1String(m_socketFile.isEmpty() ? "port" : "file"))
+ .arg(m_socketFile.isEmpty() ? QString::number(m_port) : m_socketFile);
arguments << m_programArguments;
m_process->setProcessChannelMode(QProcess::MergedChannels);
@@ -492,7 +471,6 @@ void QmlProfilerApplication::run()
m_process->errorString()));
exit(1);
}
-
}
m_connectTimer.start();
}
@@ -503,15 +481,18 @@ void QmlProfilerApplication::tryToConnect()
++ m_connectionAttempts;
if (!m_verbose && !(m_connectionAttempts % 5)) {// print every 5 seconds
- if (!m_verbose)
- logError(QString("Could not connect to %1:%2 for %3 seconds ...").arg(
- m_hostName, QString::number(m_port),
- QString::number(m_connectionAttempts)));
+ if (m_verbose) {
+ if (m_socketFile.isEmpty())
+ logError(QString::fromLatin1("Could not connect to %1:%2 for %3 seconds ...")
+ .arg(m_hostName).arg(m_port).arg(m_connectionAttempts));
+ else
+ logError(QString::fromLatin1("No connection received on %1 for %2 seconds ...")
+ .arg(m_socketFile).arg(m_connectionAttempts));
+ }
}
- if (m_connection.state() == QAbstractSocket::UnconnectedState) {
- logStatus(QString("Connecting to %1:%2 ...").arg(m_hostName,
- QString::number(m_port)));
+ if (m_socketFile.isEmpty()) {
+ logStatus(QString::fromLatin1("Connecting to %1:%2 ...").arg(m_hostName).arg(m_port));
m_connection.connectToHost(m_hostName, m_port);
}
}
@@ -519,22 +500,12 @@ void QmlProfilerApplication::tryToConnect()
void QmlProfilerApplication::connected()
{
m_connectTimer.stop();
- prompt(tr("Connected to host:port %1:%2. Wait for profile data or type a command (type 'help' "
- "to show list of commands).\nRecording Status: %3")
- .arg(m_hostName).arg((m_port)).arg(m_recording ? tr("on") : tr("off")));
-}
-
-void QmlProfilerApplication::connectionStateChanged(
- QAbstractSocket::SocketState state)
-{
- if (m_verbose)
- qDebug() << state;
-}
-
-void QmlProfilerApplication::connectionError(QAbstractSocket::SocketError error)
-{
- if (m_verbose)
- qDebug() << error;
+ QString endpoint = m_socketFile.isEmpty() ?
+ QString::fromLatin1("%1:%2").arg(m_hostName).arg(m_port) :
+ m_socketFile;
+ prompt(tr("Connected to %1. Wait for profile data or type a command (type 'help' to show list "
+ "of commands).\nRecording Status: %2")
+ .arg(endpoint).arg(m_recording ? tr("on") : tr("off")));
}
void QmlProfilerApplication::processHasOutput()
@@ -562,35 +533,24 @@ void QmlProfilerApplication::processFinished()
}
if (!m_interactive)
exit(exitCode);
+ else
+ m_qmlProfilerClient.clearPendingData();
}
-void QmlProfilerApplication::traceClientEnabled()
-{
- logStatus("Trace client is attached.");
- // blocked server is waiting for recording message from both clients
- // once the last one is connected, both messages should be sent
- m_qmlProfilerClient.sendRecordingStatus(m_recording);
- m_v8profilerClient.sendRecordingStatus(m_recording);
-}
-
-void QmlProfilerApplication::profilerClientEnabled()
+void QmlProfilerApplication::traceClientEnabledChanged(bool enabled)
{
- logStatus("Profiler client is attached.");
-
- // blocked server is waiting for recording message from both clients
- // once the last one is connected, both messages should be sent
- m_qmlProfilerClient.sendRecordingStatus(m_recording);
- m_v8profilerClient.sendRecordingStatus(m_recording);
+ if (enabled) {
+ logStatus("Trace client is attached.");
+ // blocked server is waiting for recording message from both clients
+ // once the last one is connected, both messages should be sent
+ m_qmlProfilerClient.sendRecordingStatus(m_recording);
+ }
}
void QmlProfilerApplication::traceFinished()
{
m_recording = false; // only on "Complete" we know that the trace is really finished.
- // after receiving both notifications, reset the flags
- m_qmlDataReady = false;
- m_v8DataReady = false;
-
if (m_pendingRequest == REQUEST_FLUSH) {
flush();
} else if (m_pendingRequest == REQUEST_TOGGLE_RECORDING) {
@@ -599,6 +559,8 @@ void QmlProfilerApplication::traceFinished()
} else {
prompt(tr("Application stopped recording."), false);
}
+
+ m_qmlProfilerClient.clearPendingData();
}
void QmlProfilerApplication::prompt(const QString &line, bool ready)
@@ -626,21 +588,3 @@ void QmlProfilerApplication::logStatus(const QString &status)
QTextStream err(stderr);
err << status << endl;
}
-
-void QmlProfilerApplication::qmlComplete()
-{
- m_qmlDataReady = true;
- if (m_v8profilerClient.state() != QQmlDebugClient::Enabled ||
- m_v8DataReady) {
- m_profilerData.complete();
- }
-}
-
-void QmlProfilerApplication::v8Complete()
-{
- m_v8DataReady = true;
- if (m_qmlProfilerClient.state() != QQmlDebugClient::Enabled ||
- m_qmlDataReady) {
- m_profilerData.complete();
- }
-}
diff --git a/tools/qmlprofiler/qmlprofilerapplication.h b/tools/qmlprofiler/qmlprofilerapplication.h
index f1bf6c3e93..04f9d43c87 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.h
+++ b/tools/qmlprofiler/qmlprofilerapplication.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -34,13 +29,16 @@
#ifndef QMLPROFILERAPPLICATION_H
#define QMLPROFILERAPPLICATION_H
-#include <QtCore/QCoreApplication>
-#include <QtCore/QProcess>
-#include <QtCore/QTimer>
-
#include "qmlprofilerclient.h"
#include "qmlprofilerdata.h"
+#include <private/qqmldebugconnection_p.h>
+
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qprocess.h>
+#include <QtCore/qtimer.h>
+#include <QtNetwork/qabstractsocket.h>
+
enum PendingRequest {
REQUEST_QUIT,
REQUEST_FLUSH_FILE,
@@ -73,22 +71,16 @@ private slots:
void run();
void tryToConnect();
void connected();
- void connectionStateChanged(QAbstractSocket::SocketState state);
- void connectionError(QAbstractSocket::SocketError error);
void processHasOutput();
void processFinished();
- void traceClientEnabled();
- void profilerClientEnabled();
+ void traceClientEnabledChanged(bool enabled);
void traceFinished();
void prompt(const QString &line = QString(), bool ready = true);
void logError(const QString &error);
void logStatus(const QString &status);
- void qmlComplete();
- void v8Complete();
-
private:
quint64 parseFeatures(const QStringList &featureList, const QString &values, bool exclude);
bool checkOutputFile(PendingRequest pending);
@@ -105,6 +97,7 @@ private:
QStringList m_programArguments;
QProcess *m_process;
+ QString m_socketFile;
QString m_hostName;
quint16 m_port;
QString m_outputFile;
@@ -117,13 +110,9 @@ private:
QQmlDebugConnection m_connection;
QmlProfilerClient m_qmlProfilerClient;
- V8ProfilerClient m_v8profilerClient;
QmlProfilerData m_profilerData;
QTimer m_connectTimer;
uint m_connectionAttempts;
-
- bool m_qmlDataReady;
- bool m_v8DataReady;
};
#endif // QMLPROFILERAPPLICATION_H
diff --git a/tools/qmlprofiler/qmlprofilerclient.cpp b/tools/qmlprofiler/qmlprofilerclient.cpp
index b4768e6934..217942244f 100644
--- a/tools/qmlprofiler/qmlprofilerclient.cpp
+++ b/tools/qmlprofiler/qmlprofilerclient.cpp
@@ -1,348 +1,200 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmlprofilerclient.h"
+#include "qmlprofilerdata.h"
+
+#include <private/qqmlprofilerclient_p_p.h>
#include <QtCore/QStack>
#include <QtCore/QStringList>
-#include <QtCore/QDataStream>
#include <limits>
-ProfilerClient::ProfilerClient(const QString &clientName,
- QQmlDebugConnection *client)
- : QQmlDebugClient(clientName, client),
- m_enabled(false)
-{
-}
-
-ProfilerClient::~ProfilerClient()
-{
-}
-
-void ProfilerClient::clearData()
-{
- emit cleared();
-}
-
-bool ProfilerClient::isEnabled() const
-{
- return m_enabled;
-}
-
-void ProfilerClient::stateChanged(State status)
-{
- if ((m_enabled && status != Enabled) ||
- (!m_enabled && status == Enabled))
- emit enabledChanged();
-
- m_enabled = status == Enabled;
-
-}
-
-class QmlProfilerClientPrivate
+class QmlProfilerClientPrivate : public QQmlProfilerClientPrivate
{
+ Q_DECLARE_PUBLIC(QmlProfilerClient)
public:
- QmlProfilerClientPrivate()
- : inProgressRanges(0) , features(std::numeric_limits<quint64>::max())
- {
- ::memset(rangeCount, 0, QQmlProfilerDefinitions::MaximumRangeType * sizeof(int));
- }
+ QmlProfilerClientPrivate(QQmlDebugConnection *connection, QmlProfilerData *data);
+
+ QmlProfilerData *data;
qint64 inProgressRanges;
QStack<qint64> rangeStartTimes[QQmlProfilerDefinitions::MaximumRangeType];
QStack<QStringList> rangeDatas[QQmlProfilerDefinitions::MaximumRangeType];
- QStack<QmlEventLocation> rangeLocations[QQmlProfilerDefinitions::MaximumRangeType];
- QStack<QQmlProfilerDefinitions::BindingType> bindingTypes;
+ QStack<QQmlEventLocation> rangeLocations[QQmlProfilerDefinitions::MaximumRangeType];
int rangeCount[QQmlProfilerDefinitions::MaximumRangeType];
- quint64 features;
+ bool enabled;
};
-QmlProfilerClient::QmlProfilerClient(
- QQmlDebugConnection *client)
- : ProfilerClient(QStringLiteral("CanvasFrameRate"), client),
- d(new QmlProfilerClientPrivate)
+QmlProfilerClientPrivate::QmlProfilerClientPrivate(QQmlDebugConnection *connection,
+ QmlProfilerData *data) :
+ QQmlProfilerClientPrivate(connection), data(data), inProgressRanges(0), enabled(false)
{
+ ::memset(rangeCount, 0, QQmlProfilerDefinitions::MaximumRangeType * sizeof(int));
}
-QmlProfilerClient::~QmlProfilerClient()
+QmlProfilerClient::QmlProfilerClient(QQmlDebugConnection *connection, QmlProfilerData *data) :
+ QQmlProfilerClient(*(new QmlProfilerClientPrivate(connection, data)))
{
- delete d;
}
-void QmlProfilerClient::setFeatures(quint64 features)
+void QmlProfilerClient::clearPendingData()
{
- d->features = features;
+ Q_D(QmlProfilerClient);
+ for (int i = 0; i < QQmlProfilerDefinitions::MaximumRangeType; ++i) {
+ d->rangeCount[i] = 0;
+ d->rangeDatas[i].clear();
+ d->rangeLocations[i].clear();
+ }
}
-void QmlProfilerClient::clearData()
+void QmlProfilerClient::stateChanged(State state)
{
- ::memset(d->rangeCount, 0, QQmlProfilerDefinitions::MaximumRangeType * sizeof(int));
- d->bindingTypes.clear();
- ProfilerClient::clearData();
+ Q_D(QmlProfilerClient);
+ if ((d->enabled && state != Enabled) || (!d->enabled && state == Enabled)) {
+ d->enabled = (state == Enabled);
+ emit enabledChanged(d->enabled);
+ }
}
-void QmlProfilerClient::sendRecordingStatus(bool record)
+void QmlProfilerClient::traceStarted(qint64 time, int engineId)
{
- QByteArray ba;
- QDataStream stream(&ba, QIODevice::WriteOnly);
- stream.setVersion(QDataStream::Qt_4_7);
- stream << record << -1 << d->features;
- sendMessage(ba);
+ Q_UNUSED(engineId);
+ Q_D(QmlProfilerClient);
+ d->data->setTraceStartTime(time);
+ emit recordingStarted();
}
-inline QQmlProfilerDefinitions::ProfileFeature featureFromRangeType(
- QQmlProfilerDefinitions::RangeType range)
+void QmlProfilerClient::traceFinished(qint64 time, int engineId)
{
- switch (range) {
- case QQmlProfilerDefinitions::Painting:
- return QQmlProfilerDefinitions::ProfilePainting;
- case QQmlProfilerDefinitions::Compiling:
- return QQmlProfilerDefinitions::ProfileCompiling;
- case QQmlProfilerDefinitions::Creating:
- return QQmlProfilerDefinitions::ProfileCreating;
- case QQmlProfilerDefinitions::Binding:
- return QQmlProfilerDefinitions::ProfileBinding;
- case QQmlProfilerDefinitions::HandlingSignal:
- return QQmlProfilerDefinitions::ProfileHandlingSignal;
- case QQmlProfilerDefinitions::Javascript:
- return QQmlProfilerDefinitions::ProfileJavaScript;
- default:
- return QQmlProfilerDefinitions::MaximumProfileFeature;
- }
+ Q_UNUSED(engineId);
+ Q_D(QmlProfilerClient);
+ d->data->setTraceEndTime(time);
}
-void QmlProfilerClient::messageReceived(const QByteArray &data)
+void QmlProfilerClient::rangeStart(QQmlProfilerDefinitions::RangeType type, qint64 startTime)
{
- QByteArray rwData = data;
- QDataStream stream(&rwData, QIODevice::ReadOnly);
- stream.setVersion(QDataStream::Qt_4_7);
+ Q_D(QmlProfilerClient);
+ d->rangeStartTimes[type].push(startTime);
+ d->inProgressRanges |= (static_cast<qint64>(1) << type);
+ ++d->rangeCount[type];
+}
- // Force all the 1 << <FLAG> expressions to be done in 64 bit, to silence some warnings
- const quint64 one = static_cast<quint64>(1);
+void QmlProfilerClient::rangeData(QQmlProfilerDefinitions::RangeType type, qint64 time,
+ const QString &data)
+{
+ Q_UNUSED(time);
+ Q_D(QmlProfilerClient);
+ int count = d->rangeCount[type];
+ if (count > 0) {
+ while (d->rangeDatas[type].count() < count)
+ d->rangeDatas[type].push(QStringList());
+ d->rangeDatas[type][count - 1] << data;
+ }
+}
- qint64 time;
- int messageType;
+void QmlProfilerClient::rangeLocation(QQmlProfilerDefinitions::RangeType type, qint64 time,
+ const QQmlEventLocation &location)
+{
+ Q_UNUSED(time);
+ Q_D(QmlProfilerClient);
+ if (d->rangeCount[type] > 0)
+ d->rangeLocations[type].push(location);
+}
- stream >> time >> messageType;
+void QmlProfilerClient::rangeEnd(QQmlProfilerDefinitions::RangeType type, qint64 endTime)
+{
+ Q_D(QmlProfilerClient);
- if (messageType >= QQmlProfilerDefinitions::MaximumMessage)
+ if (d->rangeCount[type] == 0) {
+ emit error(tr("Spurious range end detected."));
return;
+ }
- if (messageType == QQmlProfilerDefinitions::Event) {
- int event;
- stream >> event;
-
- if (event == QQmlProfilerDefinitions::EndTrace) {
- emit this->traceFinished(time);
- } else if (event == QQmlProfilerDefinitions::AnimationFrame) {
- if (!(d->features & one << QQmlProfilerDefinitions::ProfileAnimations))
- return;
- int frameRate, animationCount;
- int threadId = 0;
- stream >> frameRate >> animationCount;
- if (!stream.atEnd())
- stream >> threadId;
- emit this->frame(time, frameRate, animationCount, threadId);
- } else if (event == QQmlProfilerDefinitions::StartTrace) {
- emit this->traceStarted(time);
- } else if (event == QQmlProfilerDefinitions::Key ||
- event == QQmlProfilerDefinitions::Mouse) {
- if (!(d->features & one << QQmlProfilerDefinitions::ProfileInputEvents))
- return;
- emit this->inputEvent((QQmlProfilerDefinitions::EventType)event, time);
- }
- } else if (messageType == QQmlProfilerDefinitions::Complete) {
- emit complete();
- } else if (messageType == QQmlProfilerDefinitions::SceneGraphFrame) {
- if (!(d->features & one << QQmlProfilerDefinitions::ProfileSceneGraph))
- return;
- int sgEventType;
- int count = 0;
- qint64 params[5];
-
- stream >> sgEventType;
- while (!stream.atEnd()) {
- stream >> params[count++];
- }
- while (count<5)
- params[count++] = 0;
- emit sceneGraphFrame((QQmlProfilerDefinitions::SceneGraphFrameType)sgEventType, time,
- params[0], params[1], params[2], params[3], params[4]);
- } else if (messageType == QQmlProfilerDefinitions::PixmapCacheEvent) {
- if (!(d->features & one << QQmlProfilerDefinitions::ProfilePixmapCache))
- return;
- int pixEvTy, width = 0, height = 0, refcount = 0;
- QString pixUrl;
- stream >> pixEvTy >> pixUrl;
- if (pixEvTy == (int)QQmlProfilerDefinitions::PixmapReferenceCountChanged ||
- pixEvTy == (int)QQmlProfilerDefinitions::PixmapCacheCountChanged) {
- stream >> refcount;
- } else if (pixEvTy == (int)QQmlProfilerDefinitions::PixmapSizeKnown) {
- stream >> width >> height;
- refcount = 1;
- }
- emit pixmapCache((QQmlProfilerDefinitions::PixmapEventType)pixEvTy, time,
- QmlEventLocation(pixUrl,0,0), width, height, refcount);
- } else if (messageType == QQmlProfilerDefinitions::MemoryAllocation) {
- if (!(d->features & one << QQmlProfilerDefinitions::ProfileMemory))
- return;
- int type;
- qint64 delta;
- stream >> type >> delta;
- emit memoryAllocation((QQmlProfilerDefinitions::MemoryType)type, time, delta);
- } else {
- int range;
- stream >> range;
-
- if (range >= QQmlProfilerDefinitions::MaximumRangeType)
- return;
-
- if (!(d->features & one << featureFromRangeType(
- static_cast<QQmlProfilerDefinitions::RangeType>(range))))
- return;
-
- if (messageType == QQmlProfilerDefinitions::RangeStart) {
- d->rangeStartTimes[range].push(time);
- d->inProgressRanges |= (static_cast<qint64>(1) << range);
- ++d->rangeCount[range];
-
- // read binding type
- if (range == (int)QQmlProfilerDefinitions::Binding) {
- int bindingType = (int)QQmlProfilerDefinitions::QmlBinding;
- if (!stream.atEnd())
- stream >> bindingType;
- d->bindingTypes.push((QQmlProfilerDefinitions::BindingType)bindingType);
- }
- } else if (messageType == QQmlProfilerDefinitions::RangeData) {
- QString data;
- stream >> data;
-
- int count = d->rangeCount[range];
- if (count > 0) {
- while (d->rangeDatas[range].count() < count)
- d->rangeDatas[range].push(QStringList());
- d->rangeDatas[range][count-1] << data;
- }
-
- } else if (messageType == QQmlProfilerDefinitions::RangeLocation) {
- QString fileName;
- int line;
- int column = -1;
- stream >> fileName >> line;
-
- if (!stream.atEnd())
- stream >> column;
-
- if (d->rangeCount[range] > 0) {
- d->rangeLocations[range].push(QmlEventLocation(fileName, line,
- column));
- }
- } else {
- if (d->rangeCount[range] > 0) {
- --d->rangeCount[range];
- if (d->inProgressRanges & (static_cast<qint64>(1) << range))
- d->inProgressRanges &= ~(static_cast<qint64>(1) << range);
-
- QStringList data = d->rangeDatas[range].count() ?
- d->rangeDatas[range].pop() : QStringList();
- QmlEventLocation location = d->rangeLocations[range].count() ?
- d->rangeLocations[range].pop() : QmlEventLocation();
-
- qint64 startTime = d->rangeStartTimes[range].pop();
- QQmlProfilerDefinitions::BindingType bindingType =
- QQmlProfilerDefinitions::QmlBinding;
- if (range == (int)QQmlProfilerDefinitions::Binding)
- bindingType = d->bindingTypes.pop();
- emit this->range((QQmlProfilerDefinitions::RangeType)range,
- bindingType, startTime, time - startTime, data, location);
- if (d->rangeCount[range] == 0) {
- int count = d->rangeDatas[range].count() +
- d->rangeStartTimes[range].count() +
- d->rangeLocations[range].count();
- if (count != 0)
- qWarning() << "incorrectly nested data";
- }
- }
- }
+ --d->rangeCount[type];
+ if (d->inProgressRanges & (static_cast<qint64>(1) << type))
+ d->inProgressRanges &= ~(static_cast<qint64>(1) << type);
+ QStringList data = d->rangeDatas[type].count() ? d->rangeDatas[type].pop() : QStringList();
+ QQmlEventLocation location = d->rangeLocations[type].count() ? d->rangeLocations[type].pop() :
+ QQmlEventLocation();
+ qint64 startTime = d->rangeStartTimes[type].pop();
+
+ if (d->rangeCount[type] == 0 && d->rangeDatas[type].count() + d->rangeStartTimes[type].count()
+ + d->rangeLocations[type].count() != 0) {
+ emit error(tr("Incorrectly nested range data"));
+ return;
}
+
+ d->data->addQmlEvent(type, QQmlProfilerDefinitions::QmlBinding, startTime, endTime - startTime,
+ data, location);
}
-V8ProfilerClient::V8ProfilerClient(QQmlDebugConnection *client)
- : ProfilerClient(QStringLiteral("V8Profiler"), client)
+void QmlProfilerClient::animationFrame(qint64 time, int frameRate, int animationCount, int threadId)
{
+ Q_D(QmlProfilerClient);
+ d->data->addFrameEvent(time, frameRate, animationCount, threadId);
}
-V8ProfilerClient::~V8ProfilerClient()
+void QmlProfilerClient::sceneGraphEvent(QQmlProfilerDefinitions::SceneGraphFrameType type,
+ qint64 time, qint64 numericData1, qint64 numericData2,
+ qint64 numericData3, qint64 numericData4,
+ qint64 numericData5)
{
+ Q_D(QmlProfilerClient);
+ d->data->addSceneGraphFrameEvent(type, time, numericData1, numericData2, numericData3,
+ numericData4, numericData5);
}
-void V8ProfilerClient::sendRecordingStatus(bool record)
+void QmlProfilerClient::pixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType type, qint64 time,
+ const QString &url, int numericData1, int numericData2)
{
- QByteArray ba;
- QDataStream stream(&ba, QIODevice::WriteOnly);
- QByteArray cmd("V8PROFILER");
- QByteArray option(record ? "start" : "stop");
- QByteArray title("");
-
- stream << cmd << option << title;
- sendMessage(ba);
+ Q_D(QmlProfilerClient);
+ d->data->addPixmapCacheEvent(type, time, url, numericData1, numericData2);
}
-void V8ProfilerClient::messageReceived(const QByteArray &data)
+void QmlProfilerClient::memoryAllocation(QQmlProfilerDefinitions::MemoryType type, qint64 time,
+ qint64 amount)
{
- QByteArray rwData = data;
- QDataStream stream(&rwData, QIODevice::ReadOnly);
-
- int messageType;
-
- stream >> messageType;
-
- if (messageType == V8Complete) {
- emit complete();
- } else if (messageType == V8Entry) {
- QString filename;
- QString function;
- int lineNumber;
- double totalTime;
- double selfTime;
- int depth;
+ Q_D(QmlProfilerClient);
+ d->data->addMemoryEvent(type, time, amount);
+}
- stream >> filename >> function >> lineNumber >> totalTime >>
- selfTime >> depth;
- emit this->range(depth, function, filename, lineNumber, totalTime,
- selfTime);
- }
+void QmlProfilerClient::inputEvent(QQmlProfilerDefinitions::InputEventType type, qint64 time,
+ int a, int b)
+{
+ Q_D(QmlProfilerClient);
+ d->data->addInputEvent(type, time, a, b);
}
+void QmlProfilerClient::complete()
+{
+ Q_D(QmlProfilerClient);
+ d->data->complete();
+}
diff --git a/tools/qmlprofiler/qmlprofilerclient.h b/tools/qmlprofiler/qmlprofilerclient.h
index 731ab99973..1da04db42a 100644
--- a/tools/qmlprofiler/qmlprofilerclient.h
+++ b/tools/qmlprofiler/qmlprofilerclient.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -34,100 +29,45 @@
#ifndef QMLPROFILERCLIENT_H
#define QMLPROFILERCLIENT_H
-#include "qqmldebugclient.h"
-#include "qmlprofilereventlocation.h"
-#include <QtQml/private/qqmlprofilerdefinitions_p.h>
+#include <private/qqmleventlocation_p.h>
+#include <private/qqmlprofilerclient_p.h>
+#include <private/qqmlprofilerdefinitions_p.h>
-class ProfilerClientPrivate;
-class ProfilerClient : public QQmlDebugClient
+class QmlProfilerData;
+class QmlProfilerClientPrivate;
+class QmlProfilerClient : public QQmlProfilerClient
{
Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlProfilerClient)
- Q_PROPERTY(bool enabled READ isEnabled NOTIFY enabledChanged)
public:
- ProfilerClient(const QString &clientName,
- QQmlDebugConnection *client);
- ~ProfilerClient();
-
- bool isEnabled() const;
-
-public slots:
- virtual void clearData();
+ QmlProfilerClient(QQmlDebugConnection *connection, QmlProfilerData *data);
+ void clearPendingData();
signals:
- void complete();
- void enabledChanged();
- void cleared();
-
-protected:
- virtual void stateChanged(State);
-
-protected:
- bool m_enabled;
-};
-
-class QmlProfilerClient : public ProfilerClient
-{
- Q_OBJECT
-
-public:
- QmlProfilerClient(QQmlDebugConnection *client);
- ~QmlProfilerClient();
+ void enabledChanged(bool enabled);
+ void recordingStarted();
+ void error(const QString &error);
- void setFeatures(quint64 features);
-
-public slots:
- void clearData();
- void sendRecordingStatus(bool record);
-
-signals:
- void traceFinished( qint64 time );
- void traceStarted( qint64 time );
- void range(QQmlProfilerDefinitions::RangeType type,
- QQmlProfilerDefinitions::BindingType bindingType,
- qint64 startTime, qint64 length,
- const QStringList &data,
- const QmlEventLocation &location);
- void frame(qint64 time, int frameRate, int animationCount, int threadId);
- void sceneGraphFrame(QQmlProfilerDefinitions::SceneGraphFrameType type, qint64 time,
+private:
+ virtual void stateChanged(State state);
+
+ void traceStarted(qint64 time, int engineId);
+ void traceFinished(qint64 time, int engineId);
+ void rangeStart(QQmlProfilerDefinitions::RangeType type, qint64 startTime);
+ void rangeData(QQmlProfilerDefinitions::RangeType type, qint64 time, const QString &data);
+ void rangeLocation(QQmlProfilerDefinitions::RangeType type, qint64 time,
+ const QQmlEventLocation &location);
+ void rangeEnd(QQmlProfilerDefinitions::RangeType type, qint64 endTime);
+ void animationFrame(qint64 time, int frameRate, int animationCount, int threadId);
+ void sceneGraphEvent(QQmlProfilerDefinitions::SceneGraphFrameType type, qint64 time,
qint64 numericData1, qint64 numericData2, qint64 numericData3,
qint64 numericData4, qint64 numericData5);
- void pixmapCache(QQmlProfilerDefinitions::PixmapEventType, qint64 time,
- const QmlEventLocation &location, int width, int height, int refCount);
+ void pixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType type, qint64 time,
+ const QString &url, int numericData1, int numericData2);
void memoryAllocation(QQmlProfilerDefinitions::MemoryType type, qint64 time, qint64 amount);
- void inputEvent(QQmlProfilerDefinitions::EventType, qint64 time);
-
-protected:
- virtual void messageReceived(const QByteArray &);
-
-private:
- class QmlProfilerClientPrivate *d;
-};
-
-class V8ProfilerClient : public ProfilerClient
-{
- Q_OBJECT
-
-public:
- enum Message {
- V8Entry,
- V8Complete,
-
- V8MaximumMessage
- };
-
- V8ProfilerClient(QQmlDebugConnection *client);
- ~V8ProfilerClient();
-
-public slots:
- void sendRecordingStatus(bool record);
-
-signals:
- void range(int depth, const QString &function, const QString &filename,
- int lineNumber, double totalTime, double selfTime);
-
-protected:
- virtual void messageReceived(const QByteArray &);
+ void inputEvent(QQmlProfilerDefinitions::InputEventType type, qint64 time, int a, int b);
+ void complete();
};
#endif // QMLPROFILERCLIENT_H
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp
index 307b9d3686..74fa44c1d6 100644
--- a/tools/qmlprofiler/qmlprofilerdata.cpp
+++ b/tools/qmlprofiler/qmlprofilerdata.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -73,14 +68,14 @@ Q_STATIC_ASSERT(sizeof(MESSAGE_STRINGS) ==
struct QmlRangeEventData {
QmlRangeEventData() {} // never called
QmlRangeEventData(const QString &_displayName, int _detailType, const QString &_eventHashStr,
- const QmlEventLocation &_location, const QString &_details,
+ const QQmlEventLocation &_location, const QString &_details,
QQmlProfilerDefinitions::Message _message,
QQmlProfilerDefinitions::RangeType _rangeType)
: displayName(_displayName), eventHashStr(_eventHashStr), location(_location),
details(_details), message(_message), rangeType(_rangeType), detailType(_detailType) {}
QString displayName;
QString eventHashStr;
- QmlEventLocation location;
+ QQmlEventLocation location;
QString details;
QQmlProfilerDefinitions::Message message;
QQmlProfilerDefinitions::RangeType rangeType;
@@ -107,14 +102,17 @@ struct QmlRangeEventStartInstance {
qint64 duration;
union {
int frameRate;
+ int inputType;
qint64 numericData1;
};
union {
int animationCount;
+ int inputA;
qint64 numericData2;
};
union {
int threadId;
+ int inputB;
qint64 numericData3;
};
qint64 numericData4;
@@ -127,18 +125,6 @@ Q_DECLARE_TYPEINFO(QmlRangeEventData, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(QmlRangeEventStartInstance, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
-struct QV8EventInfo {
- QString displayName;
- QString eventHashStr;
- QString functionName;
- QString fileName;
- int line;
- qint64 totalTime;
- qint64 selfTime;
-
- QHash<QString, qint64> v8children;
-};
-
/////////////////////////////////////////////////////////////////
class QmlProfilerDataPrivate
{
@@ -148,18 +134,12 @@ public:
// data storage
QHash<QString, QmlRangeEventData *> eventDescriptions;
QVector<QmlRangeEventStartInstance> startInstanceList;
- QHash<QString, QV8EventInfo *> v8EventHash;
qint64 traceStartTime;
qint64 traceEndTime;
// internal state while collecting events
qint64 qmlMeasuredTime;
- qint64 v8MeasuredTime;
- QHash<int, QV8EventInfo *> v8parents;
- void clearV8RootEvent();
- QV8EventInfo v8RootEvent;
-
QmlProfilerData::State state;
};
@@ -183,12 +163,6 @@ void QmlProfilerData::clear()
d->eventDescriptions.clear();
d->startInstanceList.clear();
- qDeleteAll(d->v8EventHash);
- d->v8EventHash.clear();
- d->v8parents.clear();
- d->clearV8RootEvent();
- d->v8MeasuredTime = 0;
-
d->traceEndTime = std::numeric_limits<qint64>::min();
d->traceStartTime = std::numeric_limits<qint64>::max();
d->qmlMeasuredTime = 0;
@@ -196,7 +170,7 @@ void QmlProfilerData::clear()
setState(Empty);
}
-QString QmlProfilerData::getHashStringForQmlEvent(const QmlEventLocation &location, int eventType)
+QString QmlProfilerData::getHashStringForQmlEvent(const QQmlEventLocation &location, int eventType)
{
return QString(QStringLiteral("%1:%2:%3:%4")).arg(
location.filename,
@@ -205,14 +179,9 @@ QString QmlProfilerData::getHashStringForQmlEvent(const QmlEventLocation &locati
QString::number(eventType));
}
-QString QmlProfilerData::getHashStringForV8Event(const QString &displayName, const QString &function)
-{
- return QString(QStringLiteral("%1:%2")).arg(displayName, function);
-}
-
QString QmlProfilerData::qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType type)
{
- if (type * sizeof(QString) < sizeof(RANGE_TYPE_STRINGS))
+ if (type * sizeof(char *) < sizeof(RANGE_TYPE_STRINGS))
return QLatin1String(RANGE_TYPE_STRINGS[type]);
else
return QString::number(type);
@@ -220,7 +189,7 @@ QString QmlProfilerData::qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType
QString QmlProfilerData::qmlMessageAsString(QQmlProfilerDefinitions::Message type)
{
- if (type * sizeof(QString) < sizeof(MESSAGE_STRINGS))
+ if (type * sizeof(char *) < sizeof(MESSAGE_STRINGS))
return QLatin1String(MESSAGE_STRINGS[type]);
else
return QString::number(type);
@@ -253,15 +222,13 @@ void QmlProfilerData::addQmlEvent(QQmlProfilerDefinitions::RangeType type,
qint64 startTime,
qint64 duration,
const QStringList &data,
- const QmlEventLocation &location)
+ const QQmlEventLocation &location)
{
setState(AcquiringData);
QString details;
// generate details string
- if (data.isEmpty())
- details = tr("Source code not available");
- else {
+ if (!data.isEmpty()) {
details = data.join(QLatin1Char(' ')).replace(
QLatin1Char('\n'), QLatin1Char(' ')).simplified();
QRegExp rewrite(QStringLiteral("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
@@ -273,7 +240,7 @@ void QmlProfilerData::addQmlEvent(QQmlProfilerDefinitions::RangeType type,
details = details.mid(details.lastIndexOf(QLatin1Char('/')) + 1);
}
- QmlEventLocation eventLocation = location;
+ QQmlEventLocation eventLocation = location;
QString displayName, eventHashStr;
// generate hash
if (eventLocation.filename.isEmpty()) {
@@ -315,7 +282,7 @@ void QmlProfilerData::addFrameEvent(qint64 time, int framerate, int animationcou
} else {
newEvent = new QmlRangeEventData(displayName, QQmlProfilerDefinitions::AnimationFrame,
eventHashStr,
- QmlEventLocation(), details,
+ QQmlEventLocation(), details,
QQmlProfilerDefinitions::Event,
QQmlProfilerDefinitions::MaximumRangeType);
d->eventDescriptions.insert(eventHashStr, newEvent);
@@ -340,7 +307,7 @@ void QmlProfilerData::addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGrap
newEvent = d->eventDescriptions[eventHashStr];
} else {
newEvent = new QmlRangeEventData(QStringLiteral("<SceneGraph>"), type, eventHashStr,
- QmlEventLocation(), QString(),
+ QQmlEventLocation(), QString(),
QQmlProfilerDefinitions::SceneGraphFrame,
QQmlProfilerDefinitions::MaximumRangeType);
d->eventDescriptions.insert(eventHashStr, newEvent);
@@ -353,12 +320,12 @@ void QmlProfilerData::addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGrap
}
void QmlProfilerData::addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType type,
- qint64 time, const QmlEventLocation &location,
- int width, int height, int refcount)
+ qint64 time, const QString &location,
+ int numericData1, int numericData2)
{
setState(AcquiringData);
- QString filePath = QUrl(location.filename).path();
+ QString filePath = QUrl(location).path();
QString eventHashStr = filePath.mid(filePath.lastIndexOf(QLatin1Char('/')) + 1) +
QStringLiteral(":") + QString::number(type);
@@ -366,13 +333,14 @@ void QmlProfilerData::addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventTy
if (d->eventDescriptions.contains(eventHashStr)) {
newEvent = d->eventDescriptions[eventHashStr];
} else {
- newEvent = new QmlRangeEventData(eventHashStr, type, eventHashStr, location, QString(),
+ newEvent = new QmlRangeEventData(eventHashStr, type, eventHashStr,
+ QQmlEventLocation(location, -1, -1), QString(),
QQmlProfilerDefinitions::PixmapCacheEvent,
QQmlProfilerDefinitions::MaximumRangeType);
d->eventDescriptions.insert(eventHashStr, newEvent);
}
- QmlRangeEventStartInstance rangeEventStartInstance(time, width, height, refcount, 0, 0,
+ QmlRangeEventStartInstance rangeEventStartInstance(time, numericData1, numericData2, 0, 0, 0,
newEvent);
d->startInstanceList.append(rangeEventStartInstance);
}
@@ -386,7 +354,7 @@ void QmlProfilerData::addMemoryEvent(QQmlProfilerDefinitions::MemoryType type, q
if (d->eventDescriptions.contains(eventHashStr)) {
newEvent = d->eventDescriptions[eventHashStr];
} else {
- newEvent = new QmlRangeEventData(eventHashStr, type, eventHashStr, QmlEventLocation(),
+ newEvent = new QmlRangeEventData(eventHashStr, type, eventHashStr, QQmlEventLocation(),
QString(), QQmlProfilerDefinitions::MemoryAllocation,
QQmlProfilerDefinitions::MaximumRangeType);
d->eventDescriptions.insert(eventHashStr, newEvent);
@@ -395,93 +363,36 @@ void QmlProfilerData::addMemoryEvent(QQmlProfilerDefinitions::MemoryType type, q
d->startInstanceList.append(rangeEventStartInstance);
}
-void QmlProfilerData::addInputEvent(QQmlProfilerDefinitions::EventType type, qint64 time)
+void QmlProfilerData::addInputEvent(QQmlProfilerDefinitions::InputEventType type, qint64 time,
+ int a, int b)
{
setState(AcquiringData);
- QString eventHashStr = QString::fromLatin1("Input:%1").arg(type);
+ QQmlProfilerDefinitions::EventType eventType;
+ switch (type) {
+ case QQmlProfilerDefinitions::InputKeyPress:
+ case QQmlProfilerDefinitions::InputKeyRelease:
+ case QQmlProfilerDefinitions::InputKeyUnknown:
+ eventType = QQmlProfilerDefinitions::Key;
+ break;
+ default:
+ eventType = QQmlProfilerDefinitions::Mouse;
+ break;
+ }
+
+ QString eventHashStr = QString::fromLatin1("Input:%1").arg(eventType);
QmlRangeEventData *newEvent;
if (d->eventDescriptions.contains(eventHashStr)) {
newEvent = d->eventDescriptions[eventHashStr];
} else {
- newEvent = new QmlRangeEventData(QString(), type, eventHashStr, QmlEventLocation(),
+ newEvent = new QmlRangeEventData(QString(), eventType, eventHashStr, QQmlEventLocation(),
QString(), QQmlProfilerDefinitions::Event,
QQmlProfilerDefinitions::MaximumRangeType);
d->eventDescriptions.insert(eventHashStr, newEvent);
}
- d->startInstanceList.append(QmlRangeEventStartInstance(time, -1, 0, 0, 0, newEvent));
-}
-
-QString QmlProfilerData::rootEventName()
-{
- return tr("<program>");
-}
-
-QString QmlProfilerData::rootEventDescription()
-{
- return tr("Main Program");
-}
-
-void QmlProfilerDataPrivate::clearV8RootEvent()
-{
- v8RootEvent.displayName = QmlProfilerData::rootEventName();
- v8RootEvent.eventHashStr = QmlProfilerData::rootEventName();
- v8RootEvent.functionName = QmlProfilerData::rootEventDescription();
- v8RootEvent.line = -1;
- v8RootEvent.totalTime = 0;
- v8RootEvent.selfTime = 0;
- v8RootEvent.v8children.clear();
-}
-
-void QmlProfilerData::addV8Event(int depth, const QString &function, const QString &filename,
- int lineNumber, double totalTime, double selfTime)
-{
- QString displayName = filename.mid(filename.lastIndexOf(QLatin1Char('/')) + 1) +
- QLatin1Char(':') + QString::number(lineNumber);
- QString hashStr = getHashStringForV8Event(displayName, function);
-
- setState(AcquiringData);
-
- // time is given in milliseconds, but internally we store it in microseconds
- totalTime *= 1e6;
- selfTime *= 1e6;
-
- // accumulate information
- QV8EventInfo *eventData = d->v8EventHash[hashStr];
- if (!eventData) {
- eventData = new QV8EventInfo;
- eventData->displayName = displayName;
- eventData->eventHashStr = hashStr;
- eventData->fileName = filename;
- eventData->functionName = function;
- eventData->line = lineNumber;
- eventData->totalTime = totalTime;
- eventData->selfTime = selfTime;
- d->v8EventHash[hashStr] = eventData;
- } else {
- eventData->totalTime += totalTime;
- eventData->selfTime += selfTime;
- }
- d->v8parents[depth] = eventData;
-
- QV8EventInfo *parentEvent = 0;
- if (depth == 0) {
- parentEvent = &d->v8RootEvent;
- d->v8MeasuredTime += totalTime;
- }
- if (depth > 0 && d->v8parents.contains(depth-1)) {
- parentEvent = d->v8parents.value(depth-1);
- }
-
- if (parentEvent != 0) {
- if (!parentEvent->v8children.contains(eventData->eventHashStr)) {
- parentEvent->v8children[eventData->eventHashStr] = totalTime;
- } else {
- parentEvent->v8children[eventData->eventHashStr] += totalTime;
- }
- }
+ d->startInstanceList.append(QmlRangeEventStartInstance(time, -1, type, a, b, newEvent));
}
void QmlProfilerData::computeQmlTime()
@@ -532,7 +443,7 @@ void QmlProfilerData::sortStartTimes()
// find block to sort
while ( itFrom != d->startInstanceList.begin()
&& itTo->startTime > itFrom->startTime ) {
- itTo--;
+ --itTo;
itFrom = itTo - 1;
}
@@ -543,7 +454,7 @@ void QmlProfilerData::sortStartTimes()
// find block length
while ( itFrom != d->startInstanceList.begin()
&& itTo->startTime <= itFrom->startTime )
- itFrom--;
+ --itFrom;
if (itTo->startTime <= itFrom->startTime)
std::sort(itFrom, itTo + 1, compareStartTimes);
@@ -567,7 +478,7 @@ void QmlProfilerData::complete()
bool QmlProfilerData::isEmpty() const
{
- return d->startInstanceList.isEmpty() && d->v8EventHash.isEmpty();
+ return d->startInstanceList.isEmpty();
}
bool QmlProfilerData::save(const QString &filename)
@@ -604,25 +515,31 @@ bool QmlProfilerData::save(const QString &filename)
stream.writeStartElement(QStringLiteral("eventData"));
stream.writeAttribute(QStringLiteral("totalTime"), QString::number(d->qmlMeasuredTime));
- foreach (const QmlRangeEventData *eventData, d->eventDescriptions.values()) {
+ const auto eventDescriptionsKeys = d->eventDescriptions.keys();
+ for (auto it = d->eventDescriptions.cbegin(), end = d->eventDescriptions.cend();
+ it != end; ++it) {
+ const QmlRangeEventData *eventData = it.value();
stream.writeStartElement(QStringLiteral("event"));
stream.writeAttribute(QStringLiteral("index"), QString::number(
- d->eventDescriptions.keys().indexOf(eventData->eventHashStr)));
- stream.writeTextElement(QStringLiteral("displayname"), eventData->displayName);
+ eventDescriptionsKeys.indexOf(eventData->eventHashStr)));
+ if (!eventData->displayName.isEmpty())
+ stream.writeTextElement(QStringLiteral("displayname"), eventData->displayName);
if (eventData->rangeType != QQmlProfilerDefinitions::MaximumRangeType)
stream.writeTextElement(QStringLiteral("type"),
qmlRangeTypeAsString(eventData->rangeType));
else
stream.writeTextElement(QStringLiteral("type"),
qmlMessageAsString(eventData->message));
- if (!eventData->location.filename.isEmpty()) {
+ if (!eventData->location.filename.isEmpty())
stream.writeTextElement(QStringLiteral("filename"), eventData->location.filename);
+ if (eventData->location.line >= 0)
stream.writeTextElement(QStringLiteral("line"),
QString::number(eventData->location.line));
+ if (eventData->location.column >= 0)
stream.writeTextElement(QStringLiteral("column"),
QString::number(eventData->location.column));
- }
- stream.writeTextElement(QStringLiteral("details"), eventData->details);
+ if (!eventData->details.isEmpty())
+ stream.writeTextElement(QStringLiteral("details"), eventData->details);
if (eventData->rangeType == QQmlProfilerDefinitions::Binding)
stream.writeTextElement(QStringLiteral("bindingType"),
QString::number((int)eventData->detailType));
@@ -662,14 +579,24 @@ bool QmlProfilerData::save(const QString &filename)
stream.writeAttribute(QStringLiteral("duration"),
QString::number(event.duration));
stream.writeAttribute(QStringLiteral("eventIndex"), QString::number(
- d->eventDescriptions.keys().indexOf(event.data->eventHashStr)));
- if (event.data->message == QQmlProfilerDefinitions::Event &&
- event.data->detailType == QQmlProfilerDefinitions::AnimationFrame) {
- // special: animation frame
- stream.writeAttribute(QStringLiteral("framerate"), QString::number(event.frameRate));
- stream.writeAttribute(QStringLiteral("animationcount"),
- QString::number(event.animationCount));
- stream.writeAttribute(QStringLiteral("thread"), QString::number(event.threadId));
+ eventDescriptionsKeys.indexOf(event.data->eventHashStr)));
+ if (event.data->message == QQmlProfilerDefinitions::Event) {
+ if (event.data->detailType == QQmlProfilerDefinitions::AnimationFrame) {
+ // special: animation frame
+ stream.writeAttribute(QStringLiteral("framerate"), QString::number(event.frameRate));
+ stream.writeAttribute(QStringLiteral("animationcount"),
+ QString::number(event.animationCount));
+ stream.writeAttribute(QStringLiteral("thread"), QString::number(event.threadId));
+ } else if (event.data->detailType == QQmlProfilerDefinitions::Key ||
+ event.data->detailType == QQmlProfilerDefinitions::Mouse) {
+ // numerical value here, to keep the format a bit more compact
+ stream.writeAttribute(QStringLiteral("type"),
+ QString::number(event.inputType));
+ stream.writeAttribute(QStringLiteral("data1"),
+ QString::number(event.inputA));
+ stream.writeAttribute(QStringLiteral("data2"),
+ QString::number(event.inputB));
+ }
} else if (event.data->message == QQmlProfilerDefinitions::PixmapCacheEvent) {
// special: pixmap cache event
if (event.data->detailType == QQmlProfilerDefinitions::PixmapSizeKnown) {
@@ -682,7 +609,7 @@ bool QmlProfilerData::save(const QString &filename)
event.data->detailType ==
QQmlProfilerDefinitions::PixmapCacheCountChanged) {
stream.writeAttribute(QStringLiteral("refCount"),
- QString::number(event.numericData3));
+ QString::number(event.numericData1));
}
} else if (event.data->message == QQmlProfilerDefinitions::SceneGraphFrame) {
// special: scenegraph frame events
@@ -708,38 +635,6 @@ bool QmlProfilerData::save(const QString &filename)
}
stream.writeEndElement(); // profilerDataModel
- stream.writeStartElement(QStringLiteral("v8profile")); // v8 profiler output
- stream.writeAttribute(QStringLiteral("totalTime"), QString::number(d->v8MeasuredTime));
- foreach (QV8EventInfo *v8event, d->v8EventHash.values()) {
- stream.writeStartElement(QStringLiteral("event"));
- stream.writeAttribute(QStringLiteral("index"),QString::number(
- d->v8EventHash.keys().indexOf(v8event->eventHashStr)));
- stream.writeTextElement(QStringLiteral("displayname"), v8event->displayName);
- stream.writeTextElement(QStringLiteral("functionname"), v8event->functionName);
- if (!v8event->fileName.isEmpty()) {
- stream.writeTextElement(QStringLiteral("filename"), v8event->fileName);
- stream.writeTextElement(QStringLiteral("line"), QString::number(v8event->line));
- }
- stream.writeTextElement(QStringLiteral("totalTime"), QString::number(v8event->totalTime));
- stream.writeTextElement(QStringLiteral("selfTime"), QString::number(v8event->selfTime));
- if (!v8event->v8children.isEmpty()) {
- stream.writeStartElement(QStringLiteral("childrenEvents"));
- QStringList childrenIndexes;
- QStringList childrenTimes;
- foreach (const QString &childHash, v8event->v8children.keys()) {
- childrenIndexes << QString::number(v8EventIndex(childHash));
- childrenTimes << QString::number(v8event->v8children[childHash]);
- }
-
- stream.writeAttribute(QStringLiteral("list"), childrenIndexes.join(QString(", ")));
- stream.writeAttribute(QStringLiteral("childrenTimes"),
- childrenTimes.join(QString(", ")));
- stream.writeEndElement();
- }
- stream.writeEndElement();
- }
- stream.writeEndElement(); // v8 profiler output
-
stream.writeEndElement(); // trace
stream.writeEndDocument();
@@ -747,15 +642,6 @@ bool QmlProfilerData::save(const QString &filename)
return true;
}
-int QmlProfilerData::v8EventIndex(const QString &hashStr)
-{
- if (!d->v8EventHash.contains(hashStr)) {
- emit error("Trying to index nonexisting v8 event");
- return -1;
- }
- return d->v8EventHash.keys().indexOf( hashStr );
-}
-
void QmlProfilerData::setState(QmlProfilerData::State state)
{
// It's not an error, we are continuously calling "AcquiringData" for example
diff --git a/tools/qmlprofiler/qmlprofilerdata.h b/tools/qmlprofiler/qmlprofilerdata.h
index 91c16c3222..2570513d93 100644
--- a/tools/qmlprofiler/qmlprofilerdata.h
+++ b/tools/qmlprofiler/qmlprofilerdata.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -34,9 +29,9 @@
#ifndef QMLPROFILERDATA_H
#define QMLPROFILERDATA_H
-#include "qmlprofilereventlocation.h"
+#include <private/qqmleventlocation_p.h>
+#include <private/qqmlprofilerdefinitions_p.h>
-#include <QtQml/private/qqmlprofilerdefinitions_p.h>
#include <QObject>
class QmlProfilerDataPrivate;
@@ -54,12 +49,9 @@ public:
explicit QmlProfilerData(QObject *parent = 0);
~QmlProfilerData();
- static QString getHashStringForQmlEvent(const QmlEventLocation &location, int eventType);
- static QString getHashStringForV8Event(const QString &displayName, const QString &function);
+ static QString getHashStringForQmlEvent(const QQmlEventLocation &location, int eventType);
static QString qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType type);
static QString qmlMessageAsString(QQmlProfilerDefinitions::Message type);
- static QString rootEventName();
- static QString rootEventDescription();
qint64 traceStartTime() const;
qint64 traceEndTime() const;
@@ -78,24 +70,21 @@ public slots:
void addQmlEvent(QQmlProfilerDefinitions::RangeType type,
QQmlProfilerDefinitions::BindingType bindingType,
qint64 startTime, qint64 duration, const QStringList &data,
- const QmlEventLocation &location);
- void addV8Event(int depth, const QString &function, const QString &filename,
- int lineNumber, double totalTime, double selfTime);
+ const QQmlEventLocation &location);
void addFrameEvent(qint64 time, int framerate, int animationcount, int threadId);
void addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGraphFrameType type, qint64 time,
qint64 numericData1, qint64 numericData2, qint64 numericData3,
qint64 numericData4, qint64 numericData5);
void addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType type, qint64 time,
- const QmlEventLocation &location, int width, int height, int refcount);
+ const QString &location, int numericData1, int numericData2);
void addMemoryEvent(QQmlProfilerDefinitions::MemoryType type, qint64 time, qint64 size);
- void addInputEvent(QQmlProfilerDefinitions::EventType type, qint64 time);
+ void addInputEvent(QQmlProfilerDefinitions::InputEventType type, qint64 time, int a, int b);
void complete();
bool save(const QString &filename);
private:
void sortStartTimes();
- int v8EventIndex(const QString &hashStr);
void computeQmlTime();
void setState(QmlProfilerData::State state);
diff --git a/tools/qmlprofiler/qmlprofilereventlocation.h b/tools/qmlprofiler/qmlprofilereventlocation.h
deleted file mode 100644
index ebf9f2eed6..0000000000
--- a/tools/qmlprofiler/qmlprofilereventlocation.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLPROFILEREVENTLOCATION_H
-#define QMLPROFILEREVENTLOCATION_H
-
-#include <QString>
-
-struct QmlEventLocation
-{
- QmlEventLocation() : line(-1), column(-1) {}
- QmlEventLocation(const QString &file, int lineNumber, int columnNumber)
- : filename(file), line(lineNumber), column(columnNumber) {}
- QString filename;
- int line;
- int column;
-};
-
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(QmlEventLocation, Q_MOVABLE_TYPE);
-QT_END_NAMESPACE
-
-#endif // QMLPROFILEREVENTLOCATION_H
diff --git a/tools/qmlprofiler/qpacketprotocol.cpp b/tools/qmlprofiler/qpacketprotocol.cpp
deleted file mode 100644
index 096bc142c5..0000000000
--- a/tools/qmlprofiler/qpacketprotocol.cpp
+++ /dev/null
@@ -1,527 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qpacketprotocol.h"
-
-#include <QtCore/QBuffer>
-#include <QtCore/QElapsedTimer>
-#include <private/qiodevice_p.h> // for qt_subtract_from_timeout
-
-static const unsigned int MAX_PACKET_SIZE = 0x7FFFFFFF;
-
-/*!
- \class QPacketProtocol
- \internal
-
- \brief The QPacketProtocol class encapsulates communicating discrete packets
- across fragmented IO channels, such as TCP sockets.
-
- QPacketProtocol makes it simple to send arbitrary sized data "packets" across
- fragmented transports such as TCP and UDP.
-
- As transmission boundaries are not respected, sending packets over protocols
- like TCP frequently involves "stitching" them back together at the receiver.
- QPacketProtocol makes this easier by performing this task for you. Packet
- data sent using QPacketProtocol is prepended with a 4-byte size header
- allowing the receiving QPacketProtocol to buffer the packet internally until
- it has all been received. QPacketProtocol does not perform any sanity
- checking on the size or on the data, so this class should only be used in
- prototyping or trusted situations where DOS attacks are unlikely.
-
- QPacketProtocol does not perform any communications itself. Instead it can
- operate on any QIODevice that supports the QIODevice::readyRead() signal. A
- logical "packet" is encapsulated by the companion QPacket class. The
- following example shows two ways to send data using QPacketProtocol. The
- transmitted data is equivalent in both.
-
- \code
- QTcpSocket socket;
- // ... connect socket ...
-
- QPacketProtocol protocol(&socket);
-
- // Send packet the quick way
- protocol.send() << "Hello world" << 123;
-
- // Send packet the longer way
- QPacket packet;
- packet << "Hello world" << 123;
- protocol.send(packet);
- \endcode
-
- Likewise, the following shows how to read data from QPacketProtocol, assuming
- that the QPacketProtocol::readyRead() signal has been emitted.
-
- \code
- // ... QPacketProtocol::readyRead() is emitted ...
-
- int a;
- QByteArray b;
-
- // Receive packet the quick way
- protocol.read() >> a >> b;
-
- // Receive packet the longer way
- QPacket packet = protocol.read();
- p >> a >> b;
- \endcode
-
- \ingroup io
- \sa QPacket
-*/
-
-class QPacketProtocolPrivate : public QObject
-{
- Q_OBJECT
-public:
- QPacketProtocolPrivate(QPacketProtocol *parent, QIODevice *_dev)
- : QObject(parent), inProgressSize(-1), maxPacketSize(MAX_PACKET_SIZE),
- waitingForPacket(false), dev(_dev)
- {
- Q_ASSERT(4 == sizeof(qint32));
-
- QObject::connect(this, SIGNAL(readyRead()),
- parent, SIGNAL(readyRead()));
- QObject::connect(this, SIGNAL(packetWritten()),
- parent, SIGNAL(packetWritten()));
- QObject::connect(this, SIGNAL(invalidPacket()),
- parent, SIGNAL(invalidPacket()));
- QObject::connect(dev, SIGNAL(readyRead()),
- this, SLOT(readyToRead()));
- QObject::connect(dev, SIGNAL(aboutToClose()),
- this, SLOT(aboutToClose()));
- QObject::connect(dev, SIGNAL(bytesWritten(qint64)),
- this, SLOT(bytesWritten(qint64)));
- }
-
-Q_SIGNALS:
- void readyRead();
- void packetWritten();
- void invalidPacket();
-
-public Q_SLOTS:
- void aboutToClose()
- {
- inProgress.clear();
- sendingPackets.clear();
- inProgressSize = -1;
- }
-
- void bytesWritten(qint64 bytes)
- {
- Q_ASSERT(!sendingPackets.isEmpty());
-
- while (bytes) {
- if (sendingPackets.at(0) > bytes) {
- sendingPackets[0] -= bytes;
- bytes = 0;
- } else {
- bytes -= sendingPackets.at(0);
- sendingPackets.removeFirst();
- emit packetWritten();
- }
- }
- }
-
- void readyToRead()
- {
- while (true) {
- // Need to get trailing data
- if (-1 == inProgressSize) {
- // We need a size header of sizeof(qint32)
- if (sizeof(qint32) > (uint)dev->bytesAvailable())
- return;
-
- // Read size header
- int read = dev->read((char *)&inProgressSize, sizeof(qint32));
- Q_ASSERT(read == sizeof(qint32));
- Q_UNUSED(read);
-
- // Check sizing constraints
- if (inProgressSize > maxPacketSize) {
- QObject::disconnect(dev, SIGNAL(readyRead()),
- this, SLOT(readyToRead()));
- QObject::disconnect(dev, SIGNAL(aboutToClose()),
- this, SLOT(aboutToClose()));
- QObject::disconnect(dev, SIGNAL(bytesWritten(qint64)),
- this, SLOT(bytesWritten(qint64)));
- dev = 0;
- emit invalidPacket();
- return;
- }
-
- inProgressSize -= sizeof(qint32);
- } else {
- inProgress.append(dev->read(inProgressSize - inProgress.size()));
-
- if (inProgressSize == inProgress.size()) {
- // Packet has arrived!
- packets.append(inProgress);
- inProgressSize = -1;
- inProgress.clear();
-
- waitingForPacket = false;
- emit readyRead();
- } else
- return;
- }
- }
- }
-
-public:
- QList<qint64> sendingPackets;
- QList<QByteArray> packets;
- QByteArray inProgress;
- qint32 inProgressSize;
- qint32 maxPacketSize;
- bool waitingForPacket;
- QIODevice *dev;
-};
-
-/*!
- Construct a QPacketProtocol instance that works on \a dev with the
- specified \a parent.
- */
-QPacketProtocol::QPacketProtocol(QIODevice *dev, QObject *parent)
- : QObject(parent), d(new QPacketProtocolPrivate(this, dev))
-{
- Q_ASSERT(dev);
-}
-
-/*!
- Destroys the QPacketProtocol instance.
- */
-QPacketProtocol::~QPacketProtocol()
-{
-}
-
-/*!
- Returns the maximum packet size allowed. By default this is
- 2,147,483,647 bytes.
-
- If a packet claiming to be larger than the maximum packet size is received,
- the QPacketProtocol::invalidPacket() signal is emitted.
-
- \sa QPacketProtocol::setMaximumPacketSize()
- */
-qint32 QPacketProtocol::maximumPacketSize() const
-{
- return d->maxPacketSize;
-}
-
-/*!
- Sets the maximum allowable packet size to \a max.
-
- \sa QPacketProtocol::maximumPacketSize()
- */
-qint32 QPacketProtocol::setMaximumPacketSize(qint32 max)
-{
- if (max > (signed)sizeof(qint32))
- d->maxPacketSize = max;
- return d->maxPacketSize;
-}
-
-/*!
- Returns a streamable object that is transmitted on destruction. For example
-
- \code
- protocol.send() << "Hello world" << 123;
- \endcode
-
- will send a packet containing "Hello world" and 123. To construct more
- complex packets, explicitly construct a QPacket instance.
- */
-QPacketAutoSend QPacketProtocol::send()
-{
- return QPacketAutoSend(this);
-}
-
-/*!
- \fn void QPacketProtocol::send(const QPacket & packet)
-
- Transmit the \a packet.
- */
-void QPacketProtocol::send(const QPacket & p)
-{
- if (p.b.isEmpty())
- return; // We don't send empty packets
-
- qint64 sendSize = p.b.size() + sizeof(qint32);
-
- d->sendingPackets.append(sendSize);
- qint32 sendSize32 = sendSize;
- qint64 writeBytes = d->dev->write((char *)&sendSize32, sizeof(qint32));
- Q_UNUSED(writeBytes);
- Q_ASSERT(writeBytes == sizeof(qint32));
- writeBytes = d->dev->write(p.b);
- Q_ASSERT(writeBytes == p.b.size());
-}
-
-/*!
- Returns the number of received packets yet to be read.
- */
-qint64 QPacketProtocol::packetsAvailable() const
-{
- return d->packets.count();
-}
-
-/*!
- Discard any unread packets.
- */
-void QPacketProtocol::clear()
-{
- d->packets.clear();
-}
-
-/*!
- Return the next unread packet, or an invalid QPacket instance if no packets
- are available. This method does NOT block.
- */
-QPacket QPacketProtocol::read()
-{
- if (0 == d->packets.count())
- return QPacket();
-
- QPacket rv(d->packets.at(0));
- d->packets.removeFirst();
- return rv;
-}
-
-/*!
- This function locks until a new packet is available for reading and the
- \l{QIODevice::}{readyRead()} signal has been emitted. The function
- will timeout after \a msecs milliseconds; the default timeout is
- 30000 milliseconds.
-
- The function returns true if the readyRead() signal is emitted and
- there is new data available for reading; otherwise it returns false
- (if an error occurred or the operation timed out).
- */
-
-bool QPacketProtocol::waitForReadyRead(int msecs)
-{
- if (!d->packets.isEmpty())
- return true;
-
- QElapsedTimer stopWatch;
- stopWatch.start();
-
- d->waitingForPacket = true;
- do {
- if (!d->dev->waitForReadyRead(msecs))
- return false;
- if (!d->waitingForPacket)
- return true;
- msecs = qt_subtract_from_timeout(msecs, stopWatch.elapsed());
- } while (true);
-}
-
-/*!
- Return the QIODevice passed to the QPacketProtocol constructor.
-*/
-QIODevice *QPacketProtocol::device()
-{
- return d->dev;
-}
-
-/*!
- \fn void QPacketProtocol::readyRead()
-
- Emitted whenever a new packet is received. Applications may use
- QPacketProtocol::read() to retrieve this packet.
- */
-
-/*!
- \fn void QPacketProtocol::invalidPacket()
-
- A packet larger than the maximum allowable packet size was received. The
- packet will be discarded and, as it indicates corruption in the protocol, no
- further packets will be received.
- */
-
-/*!
- \fn void QPacketProtocol::packetWritten()
-
- Emitted each time a packet is completing written to the device. This signal
- may be used for communications flow control.
- */
-
-/*!
- \class QPacket
- \internal
-
- \brief The QPacket class encapsulates an unfragmentable packet of data to be
- transmitted by QPacketProtocol.
-
- The QPacket class works together with QPacketProtocol to make it simple to
- send arbitrary sized data "packets" across fragmented transports such as TCP
- and UDP.
-
- QPacket provides a QDataStream interface to an unfragmentable packet.
- Applications should construct a QPacket, propagate it with data and then
- transmit it over a QPacketProtocol instance. For example:
- \code
- QPacketProtocol protocol(...);
-
- QPacket myPacket;
- myPacket << "Hello world!" << 123;
- protocol.send(myPacket);
- \endcode
-
- As long as both ends of the connection are using the QPacketProtocol class,
- the data within this packet will be delivered unfragmented at the other end,
- ready for extraction.
-
- \code
- QByteArray greeting;
- int count;
-
- QPacket myPacket = protocol.read();
-
- myPacket >> greeting >> count;
- \endcode
-
- Only packets returned from QPacketProtocol::read() may be read from. QPacket
- instances constructed by directly by applications are for transmission only
- and are considered "write only". Attempting to read data from them will
- result in undefined behavior.
-
- \ingroup io
- \sa QPacketProtocol
- */
-
-/*!
- Constructs an empty write-only packet.
- */
-QPacket::QPacket()
- : QDataStream(), buf(0)
-{
- buf = new QBuffer(&b);
- buf->open(QIODevice::WriteOnly);
- setDevice(buf);
- setVersion(QDataStream::Qt_4_7);
-}
-
-/*!
- Destroys the QPacket instance.
- */
-QPacket::~QPacket()
-{
- if (buf) {
- delete buf;
- buf = 0;
- }
-}
-
-/*!
- Creates a copy of \a other. The initial stream positions are shared, but the
- two packets are otherwise independent.
- */
-QPacket::QPacket(const QPacket & other)
- : QDataStream(), b(other.b), buf(0)
-{
- buf = new QBuffer(&b);
- buf->open(other.buf->openMode());
- setDevice(buf);
-}
-
-/*!
- \internal
- */
-QPacket::QPacket(const QByteArray & ba)
- : QDataStream(), b(ba), buf(0)
-{
- buf = new QBuffer(&b);
- buf->open(QIODevice::ReadOnly);
- setDevice(buf);
-}
-
-/*!
- Returns true if this packet is empty - that is, contains no data.
- */
-bool QPacket::isEmpty() const
-{
- return b.isEmpty();
-}
-
-/*!
- Returns raw packet data.
- */
-QByteArray QPacket::data() const
-{
- return b;
-}
-
-/*!
- Clears data in the packet. This is useful for reusing one writable packet.
- For example
- \code
- QPacketProtocol protocol(...);
-
- QPacket packet;
-
- packet << "Hello world!" << 123;
- protocol.send(packet);
-
- packet.clear();
- packet << "Goodbyte world!" << 789;
- protocol.send(packet);
- \endcode
- */
-void QPacket::clear()
-{
- QBuffer::OpenMode oldMode = buf->openMode();
- buf->close();
- b.clear();
- buf->setBuffer(&b); // reset QBuffer internals with new size of b.
- buf->open(oldMode);
-}
-
-/*!
- \class QPacketAutoSend
- \internal
-
- \internal
- */
-QPacketAutoSend::QPacketAutoSend(QPacketProtocol *_p)
- : QPacket(), p(_p)
-{
-}
-
-QPacketAutoSend::~QPacketAutoSend()
-{
- if (!b.isEmpty())
- p->send(*this);
-}
-
-#include <qpacketprotocol.moc>
diff --git a/tools/qmlprofiler/qpacketprotocol.h b/tools/qmlprofiler/qpacketprotocol.h
deleted file mode 100644
index 17608033f4..0000000000
--- a/tools/qmlprofiler/qpacketprotocol.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPACKETPROTOCOL_H
-#define QPACKETPROTOCOL_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qdatastream.h>
-
-QT_BEGIN_NAMESPACE
-class QIODevice;
-class QBuffer;
-QT_END_NAMESPACE
-class QPacket;
-class QPacketAutoSend;
-class QPacketProtocolPrivate;
-
-class QPacketProtocol : public QObject
-{
- Q_OBJECT
-public:
- explicit QPacketProtocol(QIODevice *dev, QObject *parent = 0);
- virtual ~QPacketProtocol();
-
- qint32 maximumPacketSize() const;
- qint32 setMaximumPacketSize(qint32);
-
- QPacketAutoSend send();
- void send(const QPacket &);
-
- qint64 packetsAvailable() const;
- QPacket read();
-
- bool waitForReadyRead(int msecs = 3000);
-
- void clear();
-
- QIODevice *device();
-
-Q_SIGNALS:
- void readyRead();
- void invalidPacket();
- void packetWritten();
-
-private:
- QPacketProtocolPrivate *d;
-};
-
-
-class QPacket : public QDataStream
-{
-public:
- QPacket();
- QPacket(const QPacket &);
- virtual ~QPacket();
-
- void clear();
- bool isEmpty() const;
- QByteArray data() const;
-
-protected:
- friend class QPacketProtocol;
- QPacket(const QByteArray &ba);
- QByteArray b;
- QBuffer *buf;
-};
-
-class QPacketAutoSend : public QPacket
-{
-public:
- virtual ~QPacketAutoSend();
-
-private:
- friend class QPacketProtocol;
- QPacketAutoSend(QPacketProtocol *);
- QPacketProtocol *p;
-};
-
-#endif
diff --git a/tools/qmlprofiler/qqmldebugclient.cpp b/tools/qmlprofiler/qqmldebugclient.cpp
deleted file mode 100644
index f87d4b0a7c..0000000000
--- a/tools/qmlprofiler/qqmldebugclient.cpp
+++ /dev/null
@@ -1,403 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qqmldebugclient.h"
-#include "qpacketprotocol.h"
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qstringlist.h>
-#include <QtNetwork/qnetworkproxy.h>
-
-const int protocolVersion = 1;
-const QString serverId = QLatin1String("QDeclarativeDebugServer");
-const QString clientId = QLatin1String("QDeclarativeDebugClient");
-
-class QQmlDebugClientPrivate
-{
-public:
- QQmlDebugClientPrivate();
-
- QString name;
- QQmlDebugConnection *connection;
-};
-
-class QQmlDebugConnectionPrivate : public QObject
-{
- Q_OBJECT
-public:
- QQmlDebugConnectionPrivate(QQmlDebugConnection *c);
- QQmlDebugConnection *q;
- QPacketProtocol *protocol;
- QIODevice *device;
-
- bool gotHello;
- QHash <QString, float> serverPlugins;
- QHash<QString, QQmlDebugClient *> plugins;
-
- void advertisePlugins();
- void connectDeviceSignals();
-
-public Q_SLOTS:
- void connected();
- void readyRead();
- void deviceAboutToClose();
-};
-
-QQmlDebugConnectionPrivate::QQmlDebugConnectionPrivate(QQmlDebugConnection *c)
- : QObject(c), q(c), protocol(0), device(0), gotHello(false)
-{
- protocol = new QPacketProtocol(q, this);
- QObject::connect(c, SIGNAL(connected()), this, SLOT(connected()));
- QObject::connect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead()));
-}
-
-void QQmlDebugConnectionPrivate::advertisePlugins()
-{
- if (!q->isConnected())
- return;
-
- QPacket pack;
- pack << serverId << 1 << plugins.keys();
- protocol->send(pack);
- q->flush();
-}
-
-void QQmlDebugConnectionPrivate::connected()
-{
- QPacket pack;
- pack << serverId << 0 << protocolVersion << plugins.keys();
- protocol->send(pack);
- q->flush();
-}
-
-void QQmlDebugConnectionPrivate::readyRead()
-{
- if (!gotHello) {
- QPacket pack = protocol->read();
- QString name;
-
- pack >> name;
-
- bool validHello = false;
- if (name == clientId) {
- int op = -1;
- pack >> op;
- if (op == 0) {
- int version = -1;
- pack >> version;
- if (version == protocolVersion) {
- QStringList pluginNames;
- QList<float> pluginVersions;
- pack >> pluginNames;
- if (!pack.isEmpty())
- pack >> pluginVersions;
-
- const int pluginNamesSize = pluginNames.size();
- const int pluginVersionsSize = pluginVersions.size();
- for (int i = 0; i < pluginNamesSize; ++i) {
- float pluginVersion = 1.0;
- if (i < pluginVersionsSize)
- pluginVersion = pluginVersions.at(i);
- serverPlugins.insert(pluginNames.at(i), pluginVersion);
- }
-
- validHello = true;
- }
- }
- }
-
- if (!validHello) {
- qWarning("QQmlDebugConnection: Invalid hello message");
- QObject::disconnect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead()));
- return;
- }
- gotHello = true;
-
- QHash<QString, QQmlDebugClient *>::Iterator iter = plugins.begin();
- for (; iter != plugins.end(); ++iter) {
- QQmlDebugClient::State newState = QQmlDebugClient::Unavailable;
- if (serverPlugins.contains(iter.key()))
- newState = QQmlDebugClient::Enabled;
- iter.value()->stateChanged(newState);
- }
- }
-
- while (protocol->packetsAvailable()) {
- QPacket pack = protocol->read();
- QString name;
- pack >> name;
-
- if (name == clientId) {
- int op = -1;
- pack >> op;
-
- if (op == 1) {
- // Service Discovery
- QHash<QString, float> oldServerPlugins = serverPlugins;
- serverPlugins.clear();
-
- QStringList pluginNames;
- QList<float> pluginVersions;
- pack >> pluginNames;
- if (!pack.isEmpty())
- pack >> pluginVersions;
-
- const int pluginNamesSize = pluginNames.size();
- const int pluginVersionsSize = pluginVersions.size();
- for (int i = 0; i < pluginNamesSize; ++i) {
- float pluginVersion = 1.0;
- if (i < pluginVersionsSize)
- pluginVersion = pluginVersions.at(i);
- serverPlugins.insert(pluginNames.at(i), pluginVersion);
- }
-
- QHash<QString, QQmlDebugClient *>::Iterator iter = plugins.begin();
- for (; iter != plugins.end(); ++iter) {
- const QString pluginName = iter.key();
- QQmlDebugClient::State newSate = QQmlDebugClient::Unavailable;
- if (serverPlugins.contains(pluginName))
- newSate = QQmlDebugClient::Enabled;
-
- if (oldServerPlugins.contains(pluginName)
- != serverPlugins.contains(pluginName)) {
- iter.value()->stateChanged(newSate);
- }
- }
- } else {
- qWarning() << "QQmlDebugConnection: Unknown control message id" << op;
- }
- } else {
- QByteArray message;
- pack >> message;
-
- QHash<QString, QQmlDebugClient *>::Iterator iter =
- plugins.find(name);
- if (iter == plugins.end()) {
- qWarning() << "QQmlDebugConnection: Message received for missing plugin" << name;
- } else {
- (*iter)->messageReceived(message);
- }
- }
- }
-}
-
-void QQmlDebugConnectionPrivate::deviceAboutToClose()
-{
- // This is nasty syntax but we want to emit our own aboutToClose signal (by calling QIODevice::close())
- // without calling the underlying device close fn as that would cause an infinite loop
- q->QIODevice::close();
-}
-
-QQmlDebugConnection::QQmlDebugConnection(QObject *parent)
- : QIODevice(parent), d(new QQmlDebugConnectionPrivate(this))
-{
-}
-
-QQmlDebugConnection::~QQmlDebugConnection()
-{
- QHash<QString, QQmlDebugClient*>::iterator iter = d->plugins.begin();
- for (; iter != d->plugins.end(); ++iter) {
- iter.value()->d->connection = 0;
- iter.value()->stateChanged(QQmlDebugClient::NotConnected);
- }
-}
-
-bool QQmlDebugConnection::isConnected() const
-{
- return state() == QAbstractSocket::ConnectedState;
-}
-
-qint64 QQmlDebugConnection::readData(char *data, qint64 maxSize)
-{
- return d->device->read(data, maxSize);
-}
-
-qint64 QQmlDebugConnection::writeData(const char *data, qint64 maxSize)
-{
- return d->device->write(data, maxSize);
-}
-
-qint64 QQmlDebugConnection::bytesAvailable() const
-{
- return d->device->bytesAvailable();
-}
-
-bool QQmlDebugConnection::isSequential() const
-{
- return true;
-}
-
-void QQmlDebugConnection::close()
-{
- if (isOpen()) {
- QIODevice::close();
- d->device->close();
- emit stateChanged(QAbstractSocket::UnconnectedState);
-
- QHash<QString, QQmlDebugClient*>::iterator iter = d->plugins.begin();
- for (; iter != d->plugins.end(); ++iter) {
- iter.value()->stateChanged(QQmlDebugClient::NotConnected);
- }
- }
-}
-
-bool QQmlDebugConnection::waitForConnected(int msecs)
-{
- QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(d->device);
- if (socket)
- return socket->waitForConnected(msecs);
- return false;
-}
-
-QAbstractSocket::SocketState QQmlDebugConnection::state() const
-{
- QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(d->device);
- if (socket)
- return socket->state();
-
- return QAbstractSocket::UnconnectedState;
-}
-
-void QQmlDebugConnection::flush()
-{
- QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(d->device);
- if (socket) {
- socket->flush();
- return;
- }
-}
-
-void QQmlDebugConnection::connectToHost(const QString &hostName, quint16 port)
-{
- QTcpSocket *socket = new QTcpSocket(d);
-#ifndef QT_NO_NETWORKPROXY
- socket->setProxy(QNetworkProxy::NoProxy);
-#endif
- d->device = socket;
- d->connectDeviceSignals();
- d->gotHello = false;
- connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SIGNAL(stateChanged(QAbstractSocket::SocketState)));
- connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SIGNAL(error(QAbstractSocket::SocketError)));
- connect(socket, SIGNAL(connected()), this, SIGNAL(connected()));
- socket->connectToHost(hostName, port);
- QIODevice::open(ReadWrite | Unbuffered);
-}
-
-void QQmlDebugConnectionPrivate::connectDeviceSignals()
-{
- connect(device, SIGNAL(bytesWritten(qint64)), q, SIGNAL(bytesWritten(qint64)));
- connect(device, SIGNAL(readyRead()), q, SIGNAL(readyRead()));
- connect(device, SIGNAL(aboutToClose()), this, SLOT(deviceAboutToClose()));
-}
-
-//
-
-QQmlDebugClientPrivate::QQmlDebugClientPrivate()
- : connection(0)
-{
-}
-
-QQmlDebugClient::QQmlDebugClient(const QString &name,
- QQmlDebugConnection *parent)
- : QObject(parent),
- d(new QQmlDebugClientPrivate)
-{
- d->name = name;
- d->connection = parent;
-
- if (!d->connection)
- return;
-
- if (d->connection->d->plugins.contains(name)) {
- qWarning() << "QQmlDebugClient: Conflicting plugin name" << name;
- d->connection = 0;
- } else {
- d->connection->d->plugins.insert(name, this);
- d->connection->d->advertisePlugins();
- }
-}
-
-QQmlDebugClient::~QQmlDebugClient()
-{
- if (d->connection && d->connection->d) {
- d->connection->d->plugins.remove(d->name);
- d->connection->d->advertisePlugins();
- }
- delete d;
-}
-
-QString QQmlDebugClient::name() const
-{
- return d->name;
-}
-
-float QQmlDebugClient::serviceVersion() const
-{
- if (d->connection->d->serverPlugins.contains(d->name))
- return d->connection->d->serverPlugins.value(d->name);
- return -1;
-}
-
-QQmlDebugClient::State QQmlDebugClient::state() const
-{
- if (!d->connection
- || !d->connection->isConnected()
- || !d->connection->d->gotHello)
- return NotConnected;
-
- if (d->connection->d->serverPlugins.contains(d->name))
- return Enabled;
-
- return Unavailable;
-}
-
-void QQmlDebugClient::sendMessage(const QByteArray &message)
-{
- if (state() != Enabled)
- return;
-
- QPacket pack;
- pack << d->name << message;
- d->connection->d->protocol->send(pack);
- d->connection->flush();
-}
-
-void QQmlDebugClient::stateChanged(State)
-{
-}
-
-void QQmlDebugClient::messageReceived(const QByteArray &)
-{
-}
-
-#include <qqmldebugclient.moc>
diff --git a/tools/qmlprofiler/qqmldebugclient.h b/tools/qmlprofiler/qqmldebugclient.h
deleted file mode 100644
index 522f6bca2f..0000000000
--- a/tools/qmlprofiler/qqmldebugclient.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQMLDEBUGCLIENT_H
-#define QQMLDEBUGCLIENT_H
-
-#include <QtNetwork/qtcpsocket.h>
-
-class QQmlDebugConnectionPrivate;
-class QQmlDebugConnection : public QIODevice
-{
- Q_OBJECT
- Q_DISABLE_COPY(QQmlDebugConnection)
-public:
- QQmlDebugConnection(QObject * = 0);
- ~QQmlDebugConnection();
-
- void connectToHost(const QString &hostName, quint16 port);
-
- qint64 bytesAvailable() const;
- bool isConnected() const;
- QAbstractSocket::SocketState state() const;
- void flush();
- bool isSequential() const;
- void close();
- bool waitForConnected(int msecs = 30000);
-
-signals:
- void connected();
- void stateChanged(QAbstractSocket::SocketState socketState);
- void error(QAbstractSocket::SocketError socketError);
-
-protected:
- qint64 readData(char *data, qint64 maxSize);
- qint64 writeData(const char *data, qint64 maxSize);
-
-private:
- QQmlDebugConnectionPrivate *d;
- friend class QQmlDebugClient;
- friend class QQmlDebugClientPrivate;
-};
-
-class QQmlDebugClientPrivate;
-class QQmlDebugClient : public QObject
-{
- Q_OBJECT
- Q_DISABLE_COPY(QQmlDebugClient)
-
-public:
- enum State { NotConnected, Unavailable, Enabled };
-
- QQmlDebugClient(const QString &, QQmlDebugConnection *parent);
- ~QQmlDebugClient();
-
- QString name() const;
- float serviceVersion() const;
- State state() const;
-
- virtual void sendMessage(const QByteArray &);
-
-protected:
- virtual void stateChanged(State);
- virtual void messageReceived(const QByteArray &);
-
-private:
- QQmlDebugClientPrivate *d;
- friend class QQmlDebugConnection;
- friend class QQmlDebugConnectionPrivate;
-};
-
-#endif // QQMLDEBUGCLIENT_H
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index fc4fc3e167..c892f60680 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltestrunner/main.cpp b/tools/qmltestrunner/main.cpp
index a9cfb637c3..687d6fbb01 100644
--- a/tools/qmltestrunner/main.cpp
+++ b/tools/qmltestrunner/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/example.qml b/tools/qmltime/example.qml
index 3ef15d7567..e717a074e1 100644
--- a/tools/qmltime/example.qml
+++ b/tools/qmltime/example.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/linelaidout.qml b/tools/qmltime/linelaidout.qml
index 90b7d14253..0e9da83087 100644
--- a/tools/qmltime/linelaidout.qml
+++ b/tools/qmltime/linelaidout.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/qmltime.cpp b/tools/qmltime/qmltime.cpp
index 2abe71fb4c..8afaebc413 100644
--- a/tools/qmltime/qmltime.cpp
+++ b/tools/qmltime/qmltime.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/anchors/empty.qml b/tools/qmltime/tests/anchors/empty.qml
index 309b4caa7e..e6a24a83ca 100644
--- a/tools/qmltime/tests/anchors/empty.qml
+++ b/tools/qmltime/tests/anchors/empty.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/anchors/fill.qml b/tools/qmltime/tests/anchors/fill.qml
index df32da66e5..121eb404fc 100644
--- a/tools/qmltime/tests/anchors/fill.qml
+++ b/tools/qmltime/tests/anchors/fill.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/anchors/null.qml b/tools/qmltime/tests/anchors/null.qml
index 8a1ae0c25d..391aac89e3 100644
--- a/tools/qmltime/tests/anchors/null.qml
+++ b/tools/qmltime/tests/anchors/null.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/animation/large.qml b/tools/qmltime/tests/animation/large.qml
index 0c791961dd..2f7e86cada 100644
--- a/tools/qmltime/tests/animation/large.qml
+++ b/tools/qmltime/tests/animation/large.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/animation/largeNoProps.qml b/tools/qmltime/tests/animation/largeNoProps.qml
index 734ee46b77..504953b9e6 100644
--- a/tools/qmltime/tests/animation/largeNoProps.qml
+++ b/tools/qmltime/tests/animation/largeNoProps.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/item_creation/children.qml b/tools/qmltime/tests/item_creation/children.qml
index 87085c1134..73d9b6d364 100644
--- a/tools/qmltime/tests/item_creation/children.qml
+++ b/tools/qmltime/tests/item_creation/children.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/item_creation/data.qml b/tools/qmltime/tests/item_creation/data.qml
index 96804fda40..40f2abfc7b 100644
--- a/tools/qmltime/tests/item_creation/data.qml
+++ b/tools/qmltime/tests/item_creation/data.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/item_creation/no_creation.qml b/tools/qmltime/tests/item_creation/no_creation.qml
index 64561eb211..9149303137 100644
--- a/tools/qmltime/tests/item_creation/no_creation.qml
+++ b/tools/qmltime/tests/item_creation/no_creation.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/item_creation/resources.qml b/tools/qmltime/tests/item_creation/resources.qml
index c896666b9a..7afcacc892 100644
--- a/tools/qmltime/tests/item_creation/resources.qml
+++ b/tools/qmltime/tests/item_creation/resources.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/loader/Loaded.qml b/tools/qmltime/tests/loader/Loaded.qml
index 8dedef1361..946933bafa 100644
--- a/tools/qmltime/tests/loader/Loaded.qml
+++ b/tools/qmltime/tests/loader/Loaded.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/loader/component_loader.qml b/tools/qmltime/tests/loader/component_loader.qml
index 9c245aeb21..8b338f37be 100644
--- a/tools/qmltime/tests/loader/component_loader.qml
+++ b/tools/qmltime/tests/loader/component_loader.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/loader/empty_loader.qml b/tools/qmltime/tests/loader/empty_loader.qml
index 9f288f8ad5..356195a4a9 100644
--- a/tools/qmltime/tests/loader/empty_loader.qml
+++ b/tools/qmltime/tests/loader/empty_loader.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/loader/no_loader.qml b/tools/qmltime/tests/loader/no_loader.qml
index c84b9d3dd6..4de2dc26f1 100644
--- a/tools/qmltime/tests/loader/no_loader.qml
+++ b/tools/qmltime/tests/loader/no_loader.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/loader/source_loader.qml b/tools/qmltime/tests/loader/source_loader.qml
index 41a1792d2c..38b47a134d 100644
--- a/tools/qmltime/tests/loader/source_loader.qml
+++ b/tools/qmltime/tests/loader/source_loader.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/positioner_creation/no_positioner.qml b/tools/qmltime/tests/positioner_creation/no_positioner.qml
index 09a3fb4321..c473a89d38 100644
--- a/tools/qmltime/tests/positioner_creation/no_positioner.qml
+++ b/tools/qmltime/tests/positioner_creation/no_positioner.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/positioner_creation/null_positioner.qml b/tools/qmltime/tests/positioner_creation/null_positioner.qml
index 957688bcee..e459c4060f 100644
--- a/tools/qmltime/tests/positioner_creation/null_positioner.qml
+++ b/tools/qmltime/tests/positioner_creation/null_positioner.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/positioner_creation/positioner.qml b/tools/qmltime/tests/positioner_creation/positioner.qml
index 4e6f08a1fe..569dc8187c 100644
--- a/tools/qmltime/tests/positioner_creation/positioner.qml
+++ b/tools/qmltime/tests/positioner_creation/positioner.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/vmemetaobject/null.qml b/tools/qmltime/tests/vmemetaobject/null.qml
index f695c989a3..520ad8bc0e 100644
--- a/tools/qmltime/tests/vmemetaobject/null.qml
+++ b/tools/qmltime/tests/vmemetaobject/null.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/tests/vmemetaobject/property.qml b/tools/qmltime/tests/vmemetaobject/property.qml
index f0ccabe2f0..df31145e5f 100644
--- a/tools/qmltime/tests/vmemetaobject/property.qml
+++ b/tools/qmltime/tests/vmemetaobject/property.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/qmltime/textingrid.qml b/tools/qmltime/textingrid.qml
index 69dbdb5dd6..41073f50dc 100644
--- a/tools/qmltime/textingrid.qml
+++ b/tools/qmltime/textingrid.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company 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 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tools/tools.pro b/tools/tools.pro
index 96cf80405a..18bfe28a8a 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -9,8 +9,10 @@ qmlimportscanner.CONFIG = host_build
!android|android_app {
SUBDIRS += \
qml \
- qmlprofiler \
qmllint
+
+ !contains(QT_CONFIG, no-qml-debug): SUBDIRS += qmlprofiler
+
qtHaveModule(quick) {
!static: {
SUBDIRS += \