Commit Graph

22 Commits

Author SHA1 Message Date
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Marco Bubke
56d611e0a3 ClangPchManager: Update PCHs if time stamps of dependencies changed
If there is a newer file than the last indexing or if a file is added or
removed from the project or system PCH we have to reindex the project and
maybe the system PCH.

Change-Id: Ibce2a244190a79b5c422c469c065ddc11e44b2cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:39 +00:00
Marco Bubke
8640ef1927 Utils: Convert to SmallStringView for comparison
Change-Id: I38d9716225b81091e8e75b26c9c2258a2aefa987
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-08-29 16:36:57 +00:00
Marco Bubke
19e0159661 Utils: Improve string vector for string view usage
Some times it makes sense to have a Utils::StringViewVector instead
of a Utils::SmallStringVector because you don't want to hold the ownership.

Change-Id: I5ae39efe21aebbf82d4b3effa9e67eae6727ba8b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-08-01 12:40:22 +00:00
Marco Bubke
a0c69c517c Utils: Fix long small string
We used only 6 bit to save the short size but for SmallString with a size
over 64 it is not enough. So we have now to use a uint16 instead of a
uint8 if the size if over 64.

Change-Id: I53558e492b6cb40b739b23a8af83d192a2e11bd2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-31 16:12:18 +00:00
Marco Bubke
03a68a91bb Utils: Test if vector::operator=(&&) is not throwing exceptions
It is advantageous to mark move assignments noexcept. Some implementations
are already implementing it and with C++ 17 it will be standard. So we take
advantage of it and make it conditionally.

Change-Id: I7c6d77d09a02639096ce0fb43733c1fbf190c7c4
Reviewed-by: hjk <hjk@qt.io>
2017-01-25 13:30:40 +00:00
Marco Bubke
dea722a20c Utils: Fix white space
Change-Id: I9f8246f3c4e6ad076f1397e4bedbd244fe37324d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-24 13:17:00 +00:00
Thomas Hartmann
6eb89ad2ed Possible build fix
This should fix:
"defaulted on its first declaration with an
exception-specification that differs from the
implicit declaration"

Change-Id: I10a18a68543894a4ca81f99dab2cdd0ddc6aad07
Reviewed-by: hjk <hjk@qt.io>
2017-01-20 08:43:26 +00:00
Robert Loehning
eeb0b8fd21 Revert "Revert "Utils: Remove old compiler support code""
Thomas provided a smaller fix.
This reverts commit 78fb7f44bf.

Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-01-19 12:21:43 +00:00
Alessandro Portale
78fb7f44bf Revert "Utils: Remove old compiler support code"
This reverts commit 8a32bcc5e7.

Broke build with MSVC 2015, update 3

Change-Id: Icb59b70fb00ea2a2ecc8d26c8177d21d82aaccf2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-01-19 11:47:26 +00:00
Marco Bubke
8a32bcc5e7 Utils: Remove old compiler support code
We now support constexpr, noexcept and alignas on all compilers. Next will
be C++ 14 constexpr support.

Change-Id: I254049c60dcd82fc373ec907cbb5702a4b344978
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-19 10:59:40 +00:00
Marco Bubke
023e1fa610 Utils: Add PathString to improve memory usage for longer paths
Change-Id: I90bca7eddfc4823406f1320a7f6e7836d53c3425
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-09 13:21:08 +00:00
Marco Bubke
9186a49603 Utils: Add conversion operator to QStringList to BasicSmallStringVector
Change-Id: I32b7df9ff2e08e6e998a6d9efbf721bd7eeca28b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-09 13:20:55 +00:00
Marco Bubke
07ee542a14 Utils: Activate copy constructor for BasicSmallStringVector
Change-Id: I8716c4533274578d01762657dd430796ac21afaa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-09 13:20:49 +00:00
Marco Bubke
8acacf5d42 Utils: Add a constructor for std::vector<SmallString>
Change-Id: I1ce11bfbf14d9fda975c2d1ca27ae9d7b8e40bc7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-09 13:20:45 +00:00
Tim Jenssen
b31c3e0dcb Utils: Changeable SmallString stack size
The size of the small string optimization was hard coded. For some use
cases you want a bigger or smaller size. It is now configurable by a
template parameter. For that we changed the name to BasicSmallString and
added an alias of BasicSmallString<31> to SmallString.

Change-Id: I844b4420d260290307a6018bb6cc4cf3ba7bd449
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 16:17:21 +00:00
Marco Bubke
601dc5fc07 Utils: Introduce a conversion constructors for std::vector<std::string>
Change-Id: Ic37bf194240f5b76ec6299374cc7ad785b78a7ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 15:49:40 +00:00
Marco Bubke
092df2edaa Clang: Smallstring should not depend on std::ostream
We move the io operators in an extra header file because if we would
include ostream in smallstring.h we would blow the compile time.

Change-Id: Iea61ceedbbbcdd2adc6dc149794dab6e743084f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-08 15:01:53 +00:00
Marco Bubke
4d29ca2d3a Utils: Add clone functions to small string
Change-Id: I4e1ff40437253ce9fa047b476edb5d69654963b2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-02 13:38:32 +00:00
Marco Bubke
0549c6af97 Utils: Add std::string conversion constructor and operator to small string
Change-Id: Ia76d7647fc8d2c9b72bc5bce2e7a6e2c3fcc18cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-02 13:38:23 +00:00
Marco Bubke
1eb0c94f81 Utils: Add SmallString
SmallString is a very simple utf8 string class. It's purpose is performance.
It uses a short string opimization which provides 31 bytes of heap free
memory to save a 30 bytes long string plus null terminator. If the string
gets larger heap is allocated. The grow strategy is 1.5 to improve reuse
of allocated memory.

It uses optionally constexpr to provide string literals.

Change-Id: I7757fb51abfeca200d074cbfce2f1d99edc0ecb0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-17 15:07:01 +00:00