diff --git a/scripts/updatecopyright.py b/scripts/updatecopyright.py index 9dc3d3dd2..d494316c2 100755 --- a/scripts/updatecopyright.py +++ b/scripts/updatecopyright.py @@ -7,10 +7,10 @@ licenses = ['BSD', 'FDL', 'LGPL', 'LGPL3', 'LGPL21'] lfiles = [] for root, subdirs, files in os.walk(os.curdir): for sfile in files: - if sfile.endswith(('.cpp', '.h', '.js', '.qs', '.qml', '.ui')): + if sfile.endswith(('.cpp', '.h', '.js', '.qs', '.qml', '.ui', '.g')): lfiles.append('%s/%s' % (root, sfile)) -def readlicense(sfile): +def readlicense(sfile, replacestars): sheader = '' with open(sfile, 'r') as f: shouldappend = False @@ -22,6 +22,8 @@ def readlicense(sfile): shouldappend = False if shouldappend: sheader = '%s%s' % (sheader, sline) + if replacestars: + sheader = sheader.replace('**', '--') return sheader for sfile in lfiles: @@ -29,10 +31,10 @@ for sfile in lfiles: scontent = f.read() for license in licenses: if ('$QT_BEGIN_LICENSE:%s$' % license) in scontent: - snewheader = readlicense('%s/header.%s' % (os.curdir, license)) - soldheader = readlicense(sfile) + snewheader = readlicense('%s/header.%s' % (os.curdir, license), sfile.endswith('.g')) + soldheader = readlicense(sfile, False) snewcontent = scontent.replace(soldheader, snewheader) - snewcontent = snewcontent.replace("2016-2019", "2016-2020") + snewcontent = snewcontent.replace('2016-2019', '2016-2020') if not snewcontent == scontent: with open(sfile, 'w') as f: f.write(snewcontent) diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g index c8b096320..fbfa01d3d 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -83,7 +83,7 @@ /./**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016-2019 Ivailo Monev +** Copyright (C) 2016-2020 Ivailo Monev ** ** This file is part of the QtDeclarative module of the Katie Toolkit. ** @@ -136,7 +136,7 @@ /:/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016-2019 Ivailo Monev +** Copyright (C) 2016-2020 Ivailo Monev ** ** This file is part of the QtDeclarative module of the Katie Toolkit. ** diff --git a/src/script/parser/qscript.g b/src/script/parser/qscript.g index db50fe20d..b3bfe3f31 100644 --- a/src/script/parser/qscript.g +++ b/src/script/parser/qscript.g @@ -62,7 +62,7 @@ /./**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016-2019 Ivailo Monev +** Copyright (C) 2016-2020 Ivailo Monev ** ** This file is part of the QtScript module of the Katie Toolkit. ** @@ -119,7 +119,7 @@ /:/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016-2019 Ivailo Monev +** Copyright (C) 2016-2020 Ivailo Monev ** ** This file is part of the QtScript module of the Katie Toolkit. ** diff --git a/src/tools/lupdate/qscript.g b/src/tools/lupdate/qscript.g index 4d98bee5f..b4708d2b9 100644 --- a/src/tools/lupdate/qscript.g +++ b/src/tools/lupdate/qscript.g @@ -5,16 +5,9 @@ -- This file is part of the Qt Linguist of the Katie Toolkit. -- -- $QT_BEGIN_LICENSE:LGPL$ --- Commercial License Usage --- Licensees holding valid commercial Qt licenses may use this file in --- accordance with the commercial license agreement provided with the --- Software or, alternatively, in accordance with the terms contained in --- a written agreement between you and 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 +-- This file may be used under the terms of the GNU Lesser -- General Public License version 2.1 as published by the Free Software -- Foundation and appearing in the file LICENSE.LGPL included in the -- packaging of this file. Please review the following information to @@ -33,7 +26,6 @@ -- ensure the GNU General Public License version 3.0 requirements will be -- met: http://www.gnu.org/copyleft/gpl.html. -- --- -- $QT_END_LICENSE$ -- ---------------------------------------------------------------------------- diff --git a/src/xml/kernel/qxmlstream.g b/src/xml/kernel/qxmlstream.g index a88637ace..438783ec2 100644 --- a/src/xml/kernel/qxmlstream.g +++ b/src/xml/kernel/qxmlstream.g @@ -5,16 +5,9 @@ -- This file is part of the QtCore module of the Katie Toolkit. -- -- $QT_BEGIN_LICENSE:LGPL$ --- Commercial License Usage --- Licensees holding valid commercial Qt licenses may use this file in --- accordance with the commercial license agreement provided with the --- Software or, alternatively, in accordance with the terms contained in --- a written agreement between you and 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 +-- This file may be used under the terms of the GNU Lesser -- General Public License version 2.1 as published by the Free Software -- Foundation and appearing in the file LICENSE.LGPL included in the -- packaging of this file. Please review the following information to @@ -33,7 +26,6 @@ -- ensure the GNU General Public License version 3.0 requirements will be -- met: http://www.gnu.org/copyleft/gpl.html. -- --- -- $QT_END_LICENSE$ -- ---------------------------------------------------------------------------- diff --git a/util/qlalr/lalr.g b/util/qlalr/lalr.g index c89da67dc..de64f8d0f 100644 --- a/util/qlalr/lalr.g +++ b/util/qlalr/lalr.g @@ -77,7 +77,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016-2019 Ivailo Monev +** Copyright (C) 2016-2020 Ivailo Monev ** ** This file is part of the QLALR project on Qt Labs. ** @@ -195,7 +195,7 @@ QT_END_NAMESPACE /**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2016-2019 Ivailo Monev +** Copyright (C) 2016-2020 Ivailo Monev ** ** This file is part of the QLALR project on Qt Labs. **