Skip to content

Commit

Permalink
reuse headers
Browse files Browse the repository at this point in the history
Change-Id: I2d7bd3dc68dc99a89a9d0a1ad5fe50257dc2773d
Reviewed-on: https://codereview.kdab.com/c/kdab/KDToolBox/+/132633
Reviewed-by: Allen Winter <[email protected]>
  • Loading branch information
Allen Winter authored and Allen Winter committed Oct 22, 2023
1 parent 6b26c88 commit c2f948d
Show file tree
Hide file tree
Showing 183 changed files with 1,426 additions and 2,809 deletions.
10 changes: 6 additions & 4 deletions .krazy
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
CHECKSETS qt5,c++,foss
CHECKSETS qt5,c++

#KDAB-specific checks
EXTRA kdabcopyright
EXTRA kdabcopyright-reuse,fosslicense-reuse

#exclude checks now being done by clazy or clang-tools
EXCLUDE strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,includes
EXCLUDE strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,dpointer,inline,postfixop
#exclude spelling as codespell is much, much better tool
EXCLUDE spelling
#exclude more checks
EXCLUDE qminmax,captruefalse
EXCLUDE style

#skip these
SKIP /examples/|/example/
#forwardinging headers
SKIP /qt/stringtokenizer/include/QtCore/
SKIP /squish/tests\.json
SKIP \.cmake-format\.py
#3rdparty
SKIP /qt/qt_fmt/fmt
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ repos:
exclude: (.py.cmake|Doxyfile.cmake)
- id: cmake-format
exclude: (.py.cmake|Doxyfile.cmake)
- repo: https://github.com/fsfe/reuse-tool
rev: v2.1.0
hooks:
- id: reuse
34 changes: 34 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: KDToolBox
Upstream-Contact: <[email protected]>
Source: http://github.com/KDABLabs/KDToolBox

#misc source code
Files: qt/stringtokenizer/include/QStringTokenizer qt/stringtokenizer/include/QtCore/QStringTokenizer *.qrc *.json *.ui
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
License: MIT

#misc documentation
Files: *.md
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
License: MIT

#misc config files
Files: .clang-format .clazy .cmake-format.py .codespellrc .gitignore .gitmodules .gitreview .krazy .pep8 .pre-commit-config.yaml .pylintrc .qmake.conf .travis.yml appveyor.yml
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
License: MIT

#artwork
Files: *.png
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
License: MIT

#3rdparty fmt
Files: qt/qt_fmt/fmt
Copyright: Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors
License: MIT

#3rdparty from Qt
Files: qt/qt6_natvis/qt6.natvis
Copyright: Copyright (C) 2022 The Qt Company Ltd.
License: LicenseRef-Qt-GPL-3.0_EXCEPTION OR LicenseRef-Qt-Commercial
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of KDToolBox.
#
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: MIT
#
cmake_minimum_required(VERSION 3.5)

project(KDToolBox LANGUAGES CXX)
Expand Down
21 changes: 0 additions & 21 deletions LICENSE.MIT.txt

This file was deleted.

4 changes: 4 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
KDToolBox is (C) 2019-2023, Klarälvdalens Datakonsult AB (KDAB) and is
made available under the terms of the MIT license (see LICENSES/MIT.txt).

Contact KDAB at <[email protected]> to inquire about commercial licensing.
11 changes: 11 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
157 changes: 157 additions & 0 deletions LICENSES/LicenseRef-CISST.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
This license applies to the cmake/Toolchain-QNX-* files only.

CISST Software License Agreement

Version 1.0 (October 30, 2006)

PURPOSE

The Johns Hopkins University's Engineering Research Center for
Computer-Integrated Surgical Systems and Technology (CISST ERC) has
developed a software package ("CISST") that provides C++ libraries to
facilitate the development of computer-integrated surgery systems.
This Software License Agreement ("Agreement") covers downloads from
the CISST package maintained by The Johns Hopkins University ("JHU").
If you distribute Software (as defined below) downloaded from CISST,
all of the paragraphs of this Agreement must be included with and
apply to such Software.

Your downloading, copying, modifying, displaying, distributing or use
of any software, documentation, and/or data from CISST (collectively,
the "Software") constitutes acceptance of all of the terms and
conditions of this Agreement. If you do not agree to such terms and
conditions, you have no right to download, copy, modify, display,
distribute or use the Software.

DOWNLOADING AGREEMENT - License from JHU with Right to Sublicense
("Software License").

1. As used in this Software License, "you" means the individual
downloading and/or using, reproducing, modifying, displaying and/or
distributing the Software and the institution or entity which
employs or is otherwise affiliated with such individual in
connection therewith. The Johns Hopkins University ("JHU") hereby
grants you, with right to sublicense, with respect to JHU's rights
in the software, documentation, and data, if any, which is the
subject of this Software License (collectively, the "Software"), a
royalty-free, non-exclusive license to use, reproduce, make
derivative works of, display and distribute the Software, provided
that:

(a) you accept and adhere to all of the terms and conditions of
this Software License;

(b) in connection with any copy of or sublicense of all or any
portion of the Software, all of the terms and conditions in
this Software License shall appear in and shall apply to such
copy and such sublicense, including without limitation all
source and executable forms and on any user documentation that
includes license information, prefaced with the following
words: "All or portions of this licensed product have been
obtained under license from The Johns Hopkins University and
are subject to the following terms and conditions:"

(c) you preserve and maintain all applicable attributions,
copyright notices and licenses included in or applicable to the
Software;

(d) modified versions of the Software must be clearly identified
and marked as such, and must not be misrepresented as being the
original Software; and

(e) you consider making, but are under no obligation to make, the
source code of any of your modifications to the Software freely
available to others on an open source basis.

2. The license granted in this Software License includes without
limitation the right to (i) incorporate the Software into
proprietary programs (subject to any restrictions applicable to
such programs), (ii) add your own copyright statement to your
modifications of the Software, and (iii) provide additional or
different license terms and conditions in your sublicenses of
modifications of the Software; provided that in each case your use,
reproduction or distribution of such modifications otherwise
complies with the conditions stated in this Software License.

3. This Software License does not grant any rights with respect to
third party software, except those rights that JHU has been
authorized by a third party to grant to you, and accordingly you
are solely responsible for (i) obtaining any permissions from third
parties that you need to use, reproduce, make derivative works of,
display and distribute the Software, and (ii) informing your
sublicensees, including without limitation your end-users, of their
obligations to secure any such required permissions.

4. The Software, as provided by JHU, was designed for research
purposes only and was not reviewed or approved by the Food and Drug
Administration or by any other agency. YOU ACKNOWLEDGE AND AGREE
THAT CLINICAL USE OF THE JHU SOFTWARE IS NEITHER RECOMMENDED NOR
ADVISED. Any modification or commercialization of the Software,
whether for clinical use or otherwise, is at the sole risk of the
party or parties engaged therein. You further agree to use,
reproduce, make derivative works of, display and distribute the
Software in compliance with all applicable governmental laws,
regulations and orders, including without limitation those relating
to export and import control.

5. The Software is provided "AS IS" and neither JHU nor any
contributor to the software (each a "Contributor") shall have any
obligation to provide maintenance, support, updates, enhancements
or modifications thereto. JHU AND ALL CONTRIBUTORS MAKE NO WARRANTY
THAT ALL ERRORS, BUGS, DEFICIENCIES, DEFECTS AND MALFUNCTIONS HAVE
BEEN OR CAN BE ELIMINATED FROM THE SOFTWARE, AND, JHU AND ALL
CONTRIBUTORS SHALL IN NO EVENT BE RESPONSIBLE FOR LOSSES OF ANY
KIND RESULTING FROM THE USE OF THE SOFTWARE, OR ANY PART THEREOF,
INCLUDING, WITHOUT LIMITATION ANY LIABILITY FOR BUSINESS EXPENSE,
MACHINE DOWNTIME, OR DAMAGES CAUSED TO LICENSEE BY ANY ERROR, BUG,
DEFICIENCY, DEFECT OR MALFUNCITON. JHU AND ALL CONTRIBUTORS
SPECIFICALLY DISCLAIM ALL EXPRESS AND IMPLIED WARRANTIES OF ANY
KIND INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT. IN NO EVENT SHALL JHU OR ANY CONTRIBUTOR BE
LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
EXEMPLARY OR CONSEQUENTIAL DAMAGES HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY ARISING IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF
JHU OR ANY CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. TO THE MAXIMUM EXTENT NOT PROHIBITED BY LAW OR REGULATION,
YOU FURTHER ASSUME ALL LIABILITY FOR YOUR USE, REPRODUCTION, MAKING
OF DERIVATIVE WORKS, DISPLAY, LICENSE OR DISTRIBUTION OF THE
SOFTWARE AND AGREE TO INDEMNIFY AND HOLD HARMLESS JHU AND ALL
CONTRIBUTORS FROM AND AGAINST ANY AND ALL CLAIMS, SUITS, ACTIONS,
DEMANDS AND JUDGMENTS ARISING THEREFROM.

6. None of the names, logos or trademarks of JHU or any of JHU's
affiliates or any of the Contributors, or any funding agency, may
be used to endorse or promote products produced in whole or in part
by operation of the Software or derived from or based on the
Software without specific prior written permission from the
applicable party.

7. Any use, reproduction or distribution of the Software which is not
in accordance with this Software License shall automatically revoke
all rights granted to you under this Software License.

8. This Software License does not grant any rights in or to any
intellectual property owned by JHU or any Contributor except those
rights expressly granted hereunder.

MISCELLANEOUS

This Agreement shall be governed by and construed in accordance with
the laws of The State of Maryland without regard to principles of
conflicts of law. As specifically provided by MD. Anno. Code, CL,
Section 21-104, the Parties agree that this Agreement shall not be
governed by the Uniform Computer Information Transactions Act (UCITA)
as adopted in Maryland under Title 21 of the Commercial Law Article of
the Maryland Annotated Code, as amended from time to time. This
agreement shall be governed by the common law of Maryland relating to
written agreements, as well as other statutory provisions, other than
UCITA which may apply, and shall be interpreted and enforced as if
UCITA had never been adopted in Maryland. The Parties further agree
that electronic self-help shall not be permitted under this Agreement.
This Agreement shall supersede and replace any license terms that you
may have agreed to previously with respect to CISST.

This Software License was derived, with permission, from the 3D Slicer
Software License Agreement, Version 1.0 (December 20, 2005), created
by The Brigham & Women's Hospital, Inc.
7 changes: 7 additions & 0 deletions LICENSES/LicenseRef-Qt-Commercial.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Commercial License Usage
Licensees holding valid commercial Qt licenses may use this file in
accordance with the commercial license agreement provided with the
Software or, alternatively, in accordance with the terms contained in
a written agreement between you and The Qt Company. For licensing terms
and conditions see https://www.qt.io/terms-conditions. For further
information use the contact form at https://www.qt.io/contact-us.
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
This is the GNU General Public License version 3, annotated with The
Qt Company GPL Exception 1.0:

-------------------------------------------------------------------------

The Qt Company GPL Exception 1.0

Exception 1:

As a special exception you may create a larger work which contains the
output of this application and distribute that work under terms of your
choice, so long as the work is not otherwise derived from or based on
this application and so long as the work does not in itself generate
output that contains the output from this application in its original
or modified form.

Exception 2:

As a special exception, you have permission to combine this application
with Plugins licensed under the terms of your choice, to produce an
executable, and to copy and distribute the resulting executable under
the terms of your choice. However, the executable must be accompanied
by a prominent notice offering all users of the executable the entire
source code to this application, excluding the source code of the
independent modules, but including any changes you have made to this
application, under the terms of this license.


-------------------------------------------------------------------------

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down Expand Up @@ -645,7 +675,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

Expand All @@ -664,11 +694,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
9 changes: 9 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ Squish Tools

Licensing
=========
KDToolBox is (C) 2019-2023, Klarälvdalens Datakonsult AB, and is available under the
terms of the MIT license (see the [LICENSE.MIT.txt](https://github.com/KDAB/KDToolBox/blob/master/LICENSE.MIT.txt) file in this repository).
KDToolBox is (C) 2019-2023, Klarälvdalens Datakonsult AB (KDAB) and is
made available under the terms of the [MIT](LICENSES/MIT.txt) license.

Contact KDAB at <[email protected]> if you need different licensing options.

Exceptions
----------
The [qt6_natvis](https://github.com/KDAB/KDToolBox/tree/master/qt/qt6_natvis) project is available under
the terms of the GPLv3 license (see the [LICENSE.GPLv3.txt](https://github.com/KDAB/KDToolBox/blob/master/qt/qt6_natvis/LICENSE.GPLv3.txt) in this repository)
the terms of the [The Qt Company GPL Exception for GPL3 license](LICENSES/LicenseRef-Qt-GPL-3.0_EXCEPTION.txt).

For the "Other code snippets", which are hosted outside of this repo, please consult
their own license.
Expand Down
8 changes: 8 additions & 0 deletions config.tests/cpp20/cpp20.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
This file is part of KDToolBox.
SPDX-FileCopyrightText: 2021-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
SPDX-License-Identifier: MIT
*/

#include <version>

int main() {}
6 changes: 6 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This file is part of KDToolBox.
#
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: MIT
#
add_subdirectory(duplicatetracker)
add_subdirectory(future-backports)
add_subdirectory(propagate_const)
Expand Down
Loading

0 comments on commit c2f948d

Please sign in to comment.