summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/androidtestrunner/main.cpp2
-rw-r--r--src/tools/bootstrap/bootstrap.pro1
-rw-r--r--src/tools/moc/keywords.cpp357
-rw-r--r--src/tools/moc/moc.cpp7
-rw-r--r--src/tools/moc/token.h1
-rw-r--r--src/tools/moc/util/generate_keywords.cpp1
-rw-r--r--src/tools/qlalr/cppgenerator.cpp17
-rw-r--r--src/tools/qlalr/lalr.cpp10
-rw-r--r--src/tools/qlalr/lalr.h34
-rw-r--r--src/tools/qlalr/main.cpp2
-rw-r--r--src/tools/rcc/main.cpp58
-rw-r--r--src/tools/rcc/rcc.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.h2
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp18
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.h11
-rw-r--r--src/tools/uic/customwidgetsinfo.cpp4
-rw-r--r--src/tools/uic/main.cpp5
-rw-r--r--src/tools/uic/ui4.cpp7
-rw-r--r--src/tools/uic/ui4.h8
20 files changed, 316 insertions, 233 deletions
diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp
index bb69b7b914..e6d6f72354 100644
--- a/src/tools/androidtestrunner/main.cpp
+++ b/src/tools/androidtestrunner/main.cpp
@@ -454,7 +454,7 @@ int main(int argc, char *argv[])
if (!g_options.makeCommand.isEmpty()) {
// we need to run make INSTALL_ROOT=path install to install the application file(s) first
if (!execCommand(QStringLiteral("%1 INSTALL_ROOT=%2 install")
- .arg(g_options.makeCommand, g_options.buildPath), nullptr, g_options.verbose)) {
+ .arg(g_options.makeCommand, QDir::toNativeSeparators(g_options.buildPath)), nullptr, g_options.verbose)) {
return 1;
}
}
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 8598fc2721..757460393e 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -84,7 +84,6 @@ SOURCES += \
../../corelib/tools/qcryptographichash.cpp \
../../corelib/tools/qhash.cpp \
../../corelib/tools/qlist.cpp \
- ../../corelib/tools/qlinkedlist.cpp \
../../corelib/tools/qlocale.cpp \
../../corelib/tools/qlocale_tools.cpp \
../../corelib/tools/qmap.cpp \
diff --git a/src/tools/moc/keywords.cpp b/src/tools/moc/keywords.cpp
index 07c59d155f..7da8d94efc 100644
--- a/src/tools/moc/keywords.cpp
+++ b/src/tools/moc/keywords.cpp
@@ -30,12 +30,12 @@
// DO NOT EDIT.
static const short keyword_trans[][128] = {
- {0,0,0,0,0,0,0,0,0,561,558,0,0,0,0,0,
+ {0,0,0,0,0,0,0,0,0,568,565,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 561,252,559,562,8,38,239,560,25,26,236,234,30,235,27,237,
+ 568,252,566,569,8,38,239,567,25,26,236,234,30,235,27,237,
22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43,
0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,21,8,8,8,8,8,8,8,8,8,31,564,32,238,8,
+ 8,21,8,8,8,8,8,8,8,8,8,31,571,32,238,8,
0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13,
14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -116,7 +116,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,290,222,0,0,490,0,0,0,
+ 0,0,0,0,0,0,0,0,290,222,0,0,497,0,0,0,
0,0,0,0,55,0,0,330,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -155,7 +155,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,514,0,0,0,0,0,0,0,0,0,0,357,
+ 0,0,0,0,521,0,0,0,0,0,0,0,0,0,0,357,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -177,7 +177,7 @@ static const short keyword_trans[][128] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0,
- 567,567,567,567,567,567,567,567,567,567,0,0,0,0,0,0,
+ 574,574,574,574,574,574,574,574,574,574,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -336,7 +336,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,566,0,0,0,0,565,
+ 0,0,0,0,0,0,0,0,0,0,573,0,0,0,0,572,
0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -372,29 +372,29 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,487,0,0,0,300,0,0,0,0,0,0,0,0,0,0,
+ 0,494,0,0,0,300,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,468,417,401,409,373,0,477,0,0,0,0,364,358,
- 379,0,550,465,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,475,424,408,416,380,0,484,0,0,0,0,364,358,
+ 386,0,557,472,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,387,0,0,0,
- 0,0,380,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,394,0,0,0,
+ 0,0,387,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,504,0,0,0,0,0,381,
+ 0,0,0,0,0,0,0,0,0,511,0,0,0,0,0,388,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -403,7 +403,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,405,0,0,0,0,0,0,0,0,0,0,0,406,
+ 0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,413,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -411,14 +411,14 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,413,0,0,0,0,0,0,0,0,0,0,0,414,
+ 0,0,0,420,0,0,0,0,0,0,0,0,0,0,0,421,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,447,425,0,0,430,0,0,0,439,0,0,
+ 0,0,0,0,0,454,432,0,0,437,0,0,0,446,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -426,7 +426,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,533,0,466,0,0,0,494,0,0,500,0,0,0,
+ 0,0,0,540,0,473,0,0,0,501,0,0,507,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
@@ -435,7 +435,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,479,0,526,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,486,0,533,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -443,7 +443,7 @@ static const short keyword_trans[][128] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 542,0,0,510,0,0,0,0,0,0,0,0,0,0,0,0,
+ 549,0,0,517,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
@@ -828,197 +828,204 @@ static const struct
{CHARACTER, 0, 65, 370, CHARACTER},
{CHARACTER, 0, 67, 371, CHARACTER},
{CHARACTER, 0, 69, 372, CHARACTER},
- {Q_NAMESPACE_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 65, 374, CHARACTER},
- {CHARACTER, 0, 68, 375, CHARACTER},
- {CHARACTER, 0, 71, 376, CHARACTER},
- {CHARACTER, 0, 69, 377, CHARACTER},
- {CHARACTER, 0, 84, 378, CHARACTER},
+ {Q_NAMESPACE_TOKEN, 0, 95, 373, CHARACTER},
+ {CHARACTER, 0, 69, 374, CHARACTER},
+ {CHARACTER, 0, 88, 375, CHARACTER},
+ {CHARACTER, 0, 80, 376, CHARACTER},
+ {CHARACTER, 0, 79, 377, CHARACTER},
+ {CHARACTER, 0, 82, 378, CHARACTER},
+ {CHARACTER, 0, 84, 379, CHARACTER},
+ {Q_NAMESPACE_EXPORT_TOKEN, 0, 0, 0, CHARACTER},
+ {CHARACTER, 0, 65, 381, CHARACTER},
+ {CHARACTER, 0, 68, 382, CHARACTER},
+ {CHARACTER, 0, 71, 383, CHARACTER},
+ {CHARACTER, 0, 69, 384, CHARACTER},
+ {CHARACTER, 0, 84, 385, CHARACTER},
{Q_GADGET_TOKEN, 0, 0, 0, CHARACTER},
{CHARACTER, 44, 0, 0, CHARACTER},
{CHARACTER, 45, 0, 0, CHARACTER},
- {CHARACTER, 0, 80, 382, CHARACTER},
- {CHARACTER, 0, 69, 383, CHARACTER},
- {CHARACTER, 0, 82, 384, CHARACTER},
- {CHARACTER, 0, 84, 385, CHARACTER},
- {CHARACTER, 0, 89, 386, CHARACTER},
+ {CHARACTER, 0, 80, 389, CHARACTER},
+ {CHARACTER, 0, 69, 390, CHARACTER},
+ {CHARACTER, 0, 82, 391, CHARACTER},
+ {CHARACTER, 0, 84, 392, CHARACTER},
+ {CHARACTER, 0, 89, 393, CHARACTER},
{Q_PROPERTY_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 85, 388, CHARACTER},
- {CHARACTER, 0, 71, 389, CHARACTER},
- {CHARACTER, 0, 73, 390, CHARACTER},
- {CHARACTER, 0, 78, 391, CHARACTER},
- {CHARACTER, 0, 95, 392, CHARACTER},
- {CHARACTER, 0, 77, 393, CHARACTER},
- {CHARACTER, 0, 69, 394, CHARACTER},
- {CHARACTER, 0, 84, 395, CHARACTER},
- {CHARACTER, 0, 65, 396, CHARACTER},
- {CHARACTER, 0, 68, 397, CHARACTER},
- {CHARACTER, 0, 65, 398, CHARACTER},
- {CHARACTER, 0, 84, 399, CHARACTER},
- {CHARACTER, 0, 65, 400, CHARACTER},
+ {CHARACTER, 0, 85, 395, CHARACTER},
+ {CHARACTER, 0, 71, 396, CHARACTER},
+ {CHARACTER, 0, 73, 397, CHARACTER},
+ {CHARACTER, 0, 78, 398, CHARACTER},
+ {CHARACTER, 0, 95, 399, CHARACTER},
+ {CHARACTER, 0, 77, 400, CHARACTER},
+ {CHARACTER, 0, 69, 401, CHARACTER},
+ {CHARACTER, 0, 84, 402, CHARACTER},
+ {CHARACTER, 0, 65, 403, CHARACTER},
+ {CHARACTER, 0, 68, 404, CHARACTER},
+ {CHARACTER, 0, 65, 405, CHARACTER},
+ {CHARACTER, 0, 84, 406, CHARACTER},
+ {CHARACTER, 0, 65, 407, CHARACTER},
{Q_PLUGIN_METADATA_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 78, 402, CHARACTER},
- {CHARACTER, 0, 85, 403, CHARACTER},
- {CHARACTER, 0, 77, 404, CHARACTER},
+ {CHARACTER, 0, 78, 409, CHARACTER},
+ {CHARACTER, 0, 85, 410, CHARACTER},
+ {CHARACTER, 0, 77, 411, CHARACTER},
{Q_ENUM_TOKEN, 46, 0, 0, CHARACTER},
{Q_ENUMS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 78, 407, CHARACTER},
- {CHARACTER, 0, 83, 408, CHARACTER},
+ {CHARACTER, 0, 78, 414, CHARACTER},
+ {CHARACTER, 0, 83, 415, CHARACTER},
{Q_ENUM_NS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 76, 410, CHARACTER},
- {CHARACTER, 0, 65, 411, CHARACTER},
- {CHARACTER, 0, 71, 412, CHARACTER},
+ {CHARACTER, 0, 76, 417, CHARACTER},
+ {CHARACTER, 0, 65, 418, CHARACTER},
+ {CHARACTER, 0, 71, 419, CHARACTER},
{Q_FLAG_TOKEN, 47, 0, 0, CHARACTER},
{Q_FLAGS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 78, 415, CHARACTER},
- {CHARACTER, 0, 83, 416, CHARACTER},
+ {CHARACTER, 0, 78, 422, CHARACTER},
+ {CHARACTER, 0, 83, 423, CHARACTER},
{Q_FLAG_NS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 69, 418, CHARACTER},
- {CHARACTER, 0, 67, 419, CHARACTER},
- {CHARACTER, 0, 76, 420, CHARACTER},
- {CHARACTER, 0, 65, 421, CHARACTER},
- {CHARACTER, 0, 82, 422, CHARACTER},
- {CHARACTER, 0, 69, 423, CHARACTER},
- {CHARACTER, 0, 95, 424, CHARACTER},
+ {CHARACTER, 0, 69, 425, CHARACTER},
+ {CHARACTER, 0, 67, 426, CHARACTER},
+ {CHARACTER, 0, 76, 427, CHARACTER},
+ {CHARACTER, 0, 65, 428, CHARACTER},
+ {CHARACTER, 0, 82, 429, CHARACTER},
+ {CHARACTER, 0, 69, 430, CHARACTER},
+ {CHARACTER, 0, 95, 431, CHARACTER},
{CHARACTER, 48, 0, 0, CHARACTER},
- {CHARACTER, 0, 76, 426, CHARACTER},
- {CHARACTER, 0, 65, 427, CHARACTER},
- {CHARACTER, 0, 71, 428, CHARACTER},
- {CHARACTER, 0, 83, 429, CHARACTER},
+ {CHARACTER, 0, 76, 433, CHARACTER},
+ {CHARACTER, 0, 65, 434, CHARACTER},
+ {CHARACTER, 0, 71, 435, CHARACTER},
+ {CHARACTER, 0, 83, 436, CHARACTER},
{Q_DECLARE_FLAGS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 78, 431, CHARACTER},
- {CHARACTER, 0, 84, 432, CHARACTER},
- {CHARACTER, 0, 69, 433, CHARACTER},
- {CHARACTER, 0, 82, 434, CHARACTER},
- {CHARACTER, 0, 70, 435, CHARACTER},
- {CHARACTER, 0, 65, 436, CHARACTER},
- {CHARACTER, 0, 67, 437, CHARACTER},
- {CHARACTER, 0, 69, 438, CHARACTER},
- {Q_DECLARE_INTERFACE_TOKEN, 0, 0, 0, CHARACTER},
+ {CHARACTER, 0, 78, 438, CHARACTER},
+ {CHARACTER, 0, 84, 439, CHARACTER},
{CHARACTER, 0, 69, 440, CHARACTER},
- {CHARACTER, 0, 84, 441, CHARACTER},
- {CHARACTER, 0, 65, 442, CHARACTER},
- {CHARACTER, 0, 84, 443, CHARACTER},
- {CHARACTER, 0, 89, 444, CHARACTER},
- {CHARACTER, 0, 80, 445, CHARACTER},
- {CHARACTER, 0, 69, 446, CHARACTER},
+ {CHARACTER, 0, 82, 441, CHARACTER},
+ {CHARACTER, 0, 70, 442, CHARACTER},
+ {CHARACTER, 0, 65, 443, CHARACTER},
+ {CHARACTER, 0, 67, 444, CHARACTER},
+ {CHARACTER, 0, 69, 445, CHARACTER},
+ {Q_DECLARE_INTERFACE_TOKEN, 0, 0, 0, CHARACTER},
+ {CHARACTER, 0, 69, 447, CHARACTER},
+ {CHARACTER, 0, 84, 448, CHARACTER},
+ {CHARACTER, 0, 65, 449, CHARACTER},
+ {CHARACTER, 0, 84, 450, CHARACTER},
+ {CHARACTER, 0, 89, 451, CHARACTER},
+ {CHARACTER, 0, 80, 452, CHARACTER},
+ {CHARACTER, 0, 69, 453, CHARACTER},
{Q_DECLARE_METATYPE_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 88, 448, CHARACTER},
- {CHARACTER, 0, 84, 449, CHARACTER},
- {CHARACTER, 0, 69, 450, CHARACTER},
- {CHARACTER, 0, 78, 451, CHARACTER},
- {CHARACTER, 0, 83, 452, CHARACTER},
- {CHARACTER, 0, 73, 453, CHARACTER},
- {CHARACTER, 0, 79, 454, CHARACTER},
- {CHARACTER, 0, 78, 455, CHARACTER},
- {CHARACTER, 0, 95, 456, CHARACTER},
- {CHARACTER, 0, 73, 457, CHARACTER},
+ {CHARACTER, 0, 88, 455, CHARACTER},
+ {CHARACTER, 0, 84, 456, CHARACTER},
+ {CHARACTER, 0, 69, 457, CHARACTER},
{CHARACTER, 0, 78, 458, CHARACTER},
- {CHARACTER, 0, 84, 459, CHARACTER},
- {CHARACTER, 0, 69, 460, CHARACTER},
- {CHARACTER, 0, 82, 461, CHARACTER},
- {CHARACTER, 0, 70, 462, CHARACTER},
- {CHARACTER, 0, 65, 463, CHARACTER},
- {CHARACTER, 0, 67, 464, CHARACTER},
- {CHARACTER, 0, 69, 438, CHARACTER},
- {CHARACTER, 49, 0, 0, CHARACTER},
- {CHARACTER, 0, 84, 467, CHARACTER},
- {CHARACTER, 0, 83, 413, CHARACTER},
- {CHARACTER, 0, 76, 469, CHARACTER},
+ {CHARACTER, 0, 83, 459, CHARACTER},
+ {CHARACTER, 0, 73, 460, CHARACTER},
+ {CHARACTER, 0, 79, 461, CHARACTER},
+ {CHARACTER, 0, 78, 462, CHARACTER},
+ {CHARACTER, 0, 95, 463, CHARACTER},
+ {CHARACTER, 0, 73, 464, CHARACTER},
+ {CHARACTER, 0, 78, 465, CHARACTER},
+ {CHARACTER, 0, 84, 466, CHARACTER},
+ {CHARACTER, 0, 69, 467, CHARACTER},
+ {CHARACTER, 0, 82, 468, CHARACTER},
+ {CHARACTER, 0, 70, 469, CHARACTER},
{CHARACTER, 0, 65, 470, CHARACTER},
- {CHARACTER, 0, 83, 471, CHARACTER},
- {CHARACTER, 0, 83, 472, CHARACTER},
- {CHARACTER, 0, 73, 473, CHARACTER},
- {CHARACTER, 0, 78, 474, CHARACTER},
- {CHARACTER, 0, 70, 475, CHARACTER},
- {CHARACTER, 0, 79, 476, CHARACTER},
+ {CHARACTER, 0, 67, 471, CHARACTER},
+ {CHARACTER, 0, 69, 445, CHARACTER},
+ {CHARACTER, 49, 0, 0, CHARACTER},
+ {CHARACTER, 0, 84, 474, CHARACTER},
+ {CHARACTER, 0, 83, 420, CHARACTER},
+ {CHARACTER, 0, 76, 476, CHARACTER},
+ {CHARACTER, 0, 65, 477, CHARACTER},
+ {CHARACTER, 0, 83, 478, CHARACTER},
+ {CHARACTER, 0, 83, 479, CHARACTER},
+ {CHARACTER, 0, 73, 480, CHARACTER},
+ {CHARACTER, 0, 78, 481, CHARACTER},
+ {CHARACTER, 0, 70, 482, CHARACTER},
+ {CHARACTER, 0, 79, 483, CHARACTER},
{Q_CLASSINFO_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 78, 478, CHARACTER},
+ {CHARACTER, 0, 78, 485, CHARACTER},
{CHARACTER, 50, 0, 0, CHARACTER},
- {CHARACTER, 0, 69, 480, CHARACTER},
- {CHARACTER, 0, 82, 481, CHARACTER},
- {CHARACTER, 0, 70, 482, CHARACTER},
- {CHARACTER, 0, 65, 483, CHARACTER},
- {CHARACTER, 0, 67, 484, CHARACTER},
- {CHARACTER, 0, 69, 485, CHARACTER},
- {CHARACTER, 0, 83, 486, CHARACTER},
+ {CHARACTER, 0, 69, 487, CHARACTER},
+ {CHARACTER, 0, 82, 488, CHARACTER},
+ {CHARACTER, 0, 70, 489, CHARACTER},
+ {CHARACTER, 0, 65, 490, CHARACTER},
+ {CHARACTER, 0, 67, 491, CHARACTER},
+ {CHARACTER, 0, 69, 492, CHARACTER},
+ {CHARACTER, 0, 83, 493, CHARACTER},
{Q_INTERFACES_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 108, 488, CHARACTER},
- {CHARACTER, 0, 115, 489, CHARACTER},
+ {CHARACTER, 0, 108, 495, CHARACTER},
+ {CHARACTER, 0, 115, 496, CHARACTER},
{SIGNALS, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 111, 491, CHARACTER},
- {CHARACTER, 0, 116, 492, CHARACTER},
- {CHARACTER, 0, 115, 493, CHARACTER},
+ {CHARACTER, 0, 111, 498, CHARACTER},
+ {CHARACTER, 0, 116, 499, CHARACTER},
+ {CHARACTER, 0, 115, 500, CHARACTER},
{SLOTS, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 71, 495, CHARACTER},
- {CHARACTER, 0, 78, 496, CHARACTER},
- {CHARACTER, 0, 65, 497, CHARACTER},
- {CHARACTER, 0, 76, 498, CHARACTER},
- {Q_SIGNAL_TOKEN, 0, 83, 499, CHARACTER},
+ {CHARACTER, 0, 71, 502, CHARACTER},
+ {CHARACTER, 0, 78, 503, CHARACTER},
+ {CHARACTER, 0, 65, 504, CHARACTER},
+ {CHARACTER, 0, 76, 505, CHARACTER},
+ {Q_SIGNAL_TOKEN, 0, 83, 506, CHARACTER},
{Q_SIGNALS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 79, 501, CHARACTER},
- {CHARACTER, 0, 84, 502, CHARACTER},
- {Q_SLOT_TOKEN, 0, 83, 503, CHARACTER},
+ {CHARACTER, 0, 79, 508, CHARACTER},
+ {CHARACTER, 0, 84, 509, CHARACTER},
+ {Q_SLOT_TOKEN, 0, 83, 510, CHARACTER},
{Q_SLOTS_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 86, 505, CHARACTER},
- {CHARACTER, 0, 65, 506, CHARACTER},
- {CHARACTER, 0, 84, 507, CHARACTER},
- {CHARACTER, 0, 69, 508, CHARACTER},
- {CHARACTER, 0, 95, 509, CHARACTER},
+ {CHARACTER, 0, 86, 512, CHARACTER},
+ {CHARACTER, 0, 65, 513, CHARACTER},
+ {CHARACTER, 0, 84, 514, CHARACTER},
+ {CHARACTER, 0, 69, 515, CHARACTER},
+ {CHARACTER, 0, 95, 516, CHARACTER},
{CHARACTER, 51, 0, 0, CHARACTER},
- {CHARACTER, 0, 76, 511, CHARACTER},
- {CHARACTER, 0, 79, 512, CHARACTER},
- {CHARACTER, 0, 84, 513, CHARACTER},
+ {CHARACTER, 0, 76, 518, CHARACTER},
+ {CHARACTER, 0, 79, 519, CHARACTER},
+ {CHARACTER, 0, 84, 520, CHARACTER},
{Q_PRIVATE_SLOT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 95, 515, CHARACTER},
- {CHARACTER, 0, 77, 516, CHARACTER},
- {CHARACTER, 0, 79, 517, CHARACTER},
- {CHARACTER, 0, 67, 518, CHARACTER},
- {CHARACTER, 0, 95, 519, CHARACTER},
- {CHARACTER, 0, 67, 520, CHARACTER},
- {CHARACTER, 0, 79, 521, CHARACTER},
- {CHARACTER, 0, 77, 522, CHARACTER},
- {CHARACTER, 0, 80, 523, CHARACTER},
- {CHARACTER, 0, 65, 524, CHARACTER},
- {CHARACTER, 0, 84, 525, CHARACTER},
+ {CHARACTER, 0, 95, 522, CHARACTER},
+ {CHARACTER, 0, 77, 523, CHARACTER},
+ {CHARACTER, 0, 79, 524, CHARACTER},
+ {CHARACTER, 0, 67, 525, CHARACTER},
+ {CHARACTER, 0, 95, 526, CHARACTER},
+ {CHARACTER, 0, 67, 527, CHARACTER},
+ {CHARACTER, 0, 79, 528, CHARACTER},
+ {CHARACTER, 0, 77, 529, CHARACTER},
+ {CHARACTER, 0, 80, 530, CHARACTER},
+ {CHARACTER, 0, 65, 531, CHARACTER},
+ {CHARACTER, 0, 84, 532, CHARACTER},
{Q_MOC_COMPAT_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 79, 527, CHARACTER},
- {CHARACTER, 0, 75, 528, CHARACTER},
- {CHARACTER, 0, 65, 529, CHARACTER},
- {CHARACTER, 0, 66, 530, CHARACTER},
- {CHARACTER, 0, 76, 531, CHARACTER},
- {CHARACTER, 0, 69, 532, CHARACTER},
+ {CHARACTER, 0, 79, 534, CHARACTER},
+ {CHARACTER, 0, 75, 535, CHARACTER},
+ {CHARACTER, 0, 65, 536, CHARACTER},
+ {CHARACTER, 0, 66, 537, CHARACTER},
+ {CHARACTER, 0, 76, 538, CHARACTER},
+ {CHARACTER, 0, 69, 539, CHARACTER},
{Q_INVOKABLE_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 82, 534, CHARACTER},
- {CHARACTER, 0, 73, 535, CHARACTER},
- {CHARACTER, 0, 80, 536, CHARACTER},
- {CHARACTER, 0, 84, 537, CHARACTER},
- {CHARACTER, 0, 65, 538, CHARACTER},
- {CHARACTER, 0, 66, 539, CHARACTER},
- {CHARACTER, 0, 76, 540, CHARACTER},
- {CHARACTER, 0, 69, 541, CHARACTER},
+ {CHARACTER, 0, 82, 541, CHARACTER},
+ {CHARACTER, 0, 73, 542, CHARACTER},
+ {CHARACTER, 0, 80, 543, CHARACTER},
+ {CHARACTER, 0, 84, 544, CHARACTER},
+ {CHARACTER, 0, 65, 545, CHARACTER},
+ {CHARACTER, 0, 66, 546, CHARACTER},
+ {CHARACTER, 0, 76, 547, CHARACTER},
+ {CHARACTER, 0, 69, 548, CHARACTER},
{Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 82, 543, CHARACTER},
- {CHARACTER, 0, 79, 544, CHARACTER},
- {CHARACTER, 0, 80, 545, CHARACTER},
- {CHARACTER, 0, 69, 546, CHARACTER},
- {CHARACTER, 0, 82, 547, CHARACTER},
- {CHARACTER, 0, 84, 548, CHARACTER},
- {CHARACTER, 0, 89, 549, CHARACTER},
+ {CHARACTER, 0, 82, 550, CHARACTER},
+ {CHARACTER, 0, 79, 551, CHARACTER},
+ {CHARACTER, 0, 80, 552, CHARACTER},
+ {CHARACTER, 0, 69, 553, CHARACTER},
+ {CHARACTER, 0, 82, 554, CHARACTER},
+ {CHARACTER, 0, 84, 555, CHARACTER},
+ {CHARACTER, 0, 89, 556, CHARACTER},
{Q_PRIVATE_PROPERTY_TOKEN, 0, 0, 0, CHARACTER},
- {CHARACTER, 0, 69, 551, CHARACTER},
- {CHARACTER, 0, 86, 552, CHARACTER},
- {CHARACTER, 0, 73, 553, CHARACTER},
- {CHARACTER, 0, 83, 554, CHARACTER},
- {CHARACTER, 0, 73, 555, CHARACTER},
- {CHARACTER, 0, 79, 556, CHARACTER},
- {CHARACTER, 0, 78, 557, CHARACTER},
+ {CHARACTER, 0, 69, 558, CHARACTER},
+ {CHARACTER, 0, 86, 559, CHARACTER},
+ {CHARACTER, 0, 73, 560, CHARACTER},
+ {CHARACTER, 0, 83, 561, CHARACTER},
+ {CHARACTER, 0, 73, 562, CHARACTER},
+ {CHARACTER, 0, 79, 563, CHARACTER},
+ {CHARACTER, 0, 78, 564, CHARACTER},
{Q_REVISION_TOKEN, 0, 0, 0, CHARACTER},
{NEWLINE, 0, 0, 0, NOTOKEN},
{QUOTE, 0, 0, 0, NOTOKEN},
{SINGLEQUOTE, 0, 0, 0, NOTOKEN},
{WHITESPACE, 0, 0, 0, NOTOKEN},
- {HASH, 0, 35, 563, HASH},
+ {HASH, 0, 35, 570, HASH},
{PP_HASHHASH, 0, 0, 0, NOTOKEN},
{BACKSLASH, 0, 0, 0, NOTOKEN},
{CPP_COMMENT, 0, 0, 0, NOTOKEN},
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 2f0ea633fa..50946443be 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -620,6 +620,13 @@ void Moc::parse()
case Q_NAMESPACE_TOKEN:
def.hasQNamespace = true;
break;
+ case Q_NAMESPACE_EXPORT_TOKEN:
+ next(LPAREN);
+ while (test(IDENTIFIER))
+ {}
+ next(RPAREN);
+ def.hasQNamespace = true;
+ break;
case Q_ENUMS_TOKEN:
case Q_ENUM_NS_TOKEN:
parseEnumOrFlag(&def, false);
diff --git a/src/tools/moc/token.h b/src/tools/moc/token.h
index db9d319b78..0cc163f9e4 100644
--- a/src/tools/moc/token.h
+++ b/src/tools/moc/token.h
@@ -155,6 +155,7 @@ QT_BEGIN_NAMESPACE
F(Q_OBJECT_TOKEN) \
F(Q_GADGET_TOKEN) \
F(Q_NAMESPACE_TOKEN) \
+ F(Q_NAMESPACE_EXPORT_TOKEN) \
F(Q_PROPERTY_TOKEN) \
F(Q_PLUGIN_METADATA_TOKEN) \
F(Q_ENUMS_TOKEN) \
diff --git a/src/tools/moc/util/generate_keywords.cpp b/src/tools/moc/util/generate_keywords.cpp
index df850c1bdc..9248e9e2e7 100644
--- a/src/tools/moc/util/generate_keywords.cpp
+++ b/src/tools/moc/util/generate_keywords.cpp
@@ -214,6 +214,7 @@ static const Keyword keywords[] = {
{ "return", "RETURN" },
{ "Q_OBJECT", "Q_OBJECT_TOKEN" },
{ "Q_NAMESPACE", "Q_NAMESPACE_TOKEN" },
+ { "Q_NAMESPACE_EXPORT", "Q_NAMESPACE_EXPORT_TOKEN" },
{ "Q_GADGET", "Q_GADGET_TOKEN" },
{ "Q_PROPERTY", "Q_PROPERTY_TOKEN" },
{ "Q_PLUGIN_METADATA", "Q_PLUGIN_METADATA_TOKEN" },
diff --git a/src/tools/qlalr/cppgenerator.cpp b/src/tools/qlalr/cppgenerator.cpp
index ee17be041e..95f70dc988 100644
--- a/src/tools/qlalr/cppgenerator.cpp
+++ b/src/tools/qlalr/cppgenerator.cpp
@@ -36,6 +36,8 @@
#include <QtCore/qfile.h>
#include <QtCore/qmap.h>
+#include <iterator>
+
namespace {
void generateSeparator(int i, QTextStream &out)
@@ -126,7 +128,7 @@ QString CppGenerator::endIncludeGuard(const QString &fileName)
void CppGenerator::operator () ()
{
// action table...
- state_count = aut.states.size ();
+ state_count = static_cast<int>(aut.states.size());
terminal_count = static_cast<int>(grammar.terminals.size());
non_terminal_count = static_cast<int>(grammar.non_terminals.size());
@@ -156,7 +158,7 @@ void CppGenerator::operator () ()
if (grammar.isNonTerminal (a.key ()))
{
- Q_ASSERT (symbol >= terminal_count && symbol < grammar.names.size ());
+ Q_ASSERT(symbol >= terminal_count && symbol < static_cast<int>(grammar.names.size()));
GOTO (q, symbol - terminal_count) = r;
}
@@ -245,7 +247,7 @@ void CppGenerator::operator () ()
<< Qt::endl;
}
- QBitArray used_rules (grammar.rules.count ());
+ QBitArray used_rules{static_cast<int>(grammar.rules.size())};
int q = 0;
for (StatePointer state = aut.states.begin (); state != aut.states.end (); ++state, ++q)
@@ -259,12 +261,11 @@ void CppGenerator::operator () ()
}
}
- for (int i = 0; i < used_rules.count (); ++i)
+ auto rule = grammar.rules.begin();
+ for (int i = 0; i < used_rules.count (); ++i, ++rule)
{
if (! used_rules.testBit (i))
{
- RulePointer rule = grammar.rules.begin () + i;
-
if (rule != grammar.goal)
qerr() << "*** Warning: Rule ``" << *rule << "'' is useless!" << Qt::endl;
}
@@ -280,7 +281,7 @@ void CppGenerator::operator () ()
if (u >= 0)
continue;
- RulePointer rule = grammar.rules.begin () + (- u - 1);
+ RulePointer rule = std::next(grammar.rules.begin(), - u - 1);
if (state->defaultReduce == rule)
u = 0;
@@ -619,7 +620,7 @@ void CppGenerator::generateImpl (QTextStream &out)
out << "const int " << grammar.table_name << "::rule_index [] = {";
idx = 0;
- int offset = 0;
+ size_t offset = 0;
for (RulePointer rule = grammar.rules.begin (); rule != grammar.rules.end (); ++rule, ++idx)
{
generateSeparator(idx, out);
diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp
index 8af3b3c0db..b9a9cf264f 100644
--- a/src/tools/qlalr/lalr.cpp
+++ b/src/tools/qlalr/lalr.cpp
@@ -51,7 +51,9 @@ QTextStream &qout()
static QTextStream result(stdout, QIODevice::WriteOnly);
return result;
}
+QT_END_NAMESPACE
+namespace std {
bool operator < (Name a, Name b)
{
return *a < *b;
@@ -66,7 +68,7 @@ bool operator < (StatePointer a, StatePointer b)
{
return &*a < &*b;
}
-QT_END_NAMESPACE
+}
bool Read::operator < (const Read &other) const
{
@@ -329,7 +331,7 @@ QPair<StatePointer, bool> Automaton::internState (const State &state)
struct _Bucket
{
- QLinkedList<ItemPointer> items;
+ std::list<ItemPointer> items;
void insert (ItemPointer item)
{ items.push_back (item); }
@@ -338,8 +340,8 @@ struct _Bucket
{
State st (aut->_M_grammar);
- for (QLinkedList<ItemPointer>::iterator item = items.begin (); item != items.end (); ++item)
- st.insert ((*item)->next ());
+ for (auto &item : items)
+ st.insert(item->next());
return st;
}
diff --git a/src/tools/qlalr/lalr.h b/src/tools/qlalr/lalr.h
index 55b65a640d..473ea89769 100644
--- a/src/tools/qlalr/lalr.h
+++ b/src/tools/qlalr/lalr.h
@@ -51,34 +51,22 @@ class Automaton;
// names
-typedef QLinkedList<QString>::iterator Name;
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(QLinkedList<QString>::iterator, Q_PRIMITIVE_TYPE);
-QT_END_NAMESPACE
-typedef QLinkedList<Name> NameList;
+typedef std::list<QString>::iterator Name;
+typedef std::list<Name> NameList;
typedef std::set<Name> NameSet;
// items
-typedef QLinkedList<Item> ItemList;
+typedef std::list<Item> ItemList;
typedef ItemList::iterator ItemPointer;
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(ItemList::iterator, Q_PRIMITIVE_TYPE);
-QT_END_NAMESPACE
// rules
-typedef QLinkedList<Rule> debug_infot;
+typedef std::list<Rule> debug_infot;
typedef debug_infot::iterator RulePointer;
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(debug_infot::iterator, Q_PRIMITIVE_TYPE);
-QT_END_NAMESPACE
typedef QMultiMap<Name, RulePointer> RuleMap;
// states
-typedef QLinkedList<State> StateList;
+typedef std::list<State> StateList;
typedef StateList::iterator StatePointer;
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(StateList::iterator, Q_PRIMITIVE_TYPE);
-QT_END_NAMESPACE
// arrows
typedef QMap<Name, StatePointer> Bundle;
@@ -175,7 +163,7 @@ class Node
public:
typedef std::set<Node<_Tp> > Repository;
typedef typename Repository::iterator iterator;
- typedef typename QLinkedList<iterator>::iterator edge_iterator;
+ typedef typename std::list<iterator>::iterator edge_iterator;
public:
static iterator get (_Tp data);
@@ -213,7 +201,7 @@ public: // attributes
mutable bool root;
mutable int dfn;
mutable _Tp data;
- mutable QLinkedList<iterator> outs;
+ mutable std::list<iterator> outs;
protected:
inline Node () {}
@@ -235,7 +223,7 @@ typename Node<_Tp>::iterator Node<_Tp>::get (_Tp data)
}
template <typename _Tp>
-QPair<typename QLinkedList<typename Node<_Tp>::iterator>::iterator, bool> Node<_Tp>::insertEdge (typename Node<_Tp>::iterator other) const
+QPair<typename std::list<typename Node<_Tp>::iterator>::iterator, bool> Node<_Tp>::insertEdge(typename Node<_Tp>::iterator other) const
{
edge_iterator it = std::find (outs.begin (), outs.end (), other);
@@ -272,7 +260,7 @@ public:
QString decl_file_name;
QString impl_file_name;
QString token_prefix;
- QLinkedList<QString> names;
+ std::list<QString> names;
Name start;
NameSet terminals;
NameSet non_terminals;
@@ -401,11 +389,11 @@ private:
int _M_includes_dfn;
};
-QT_BEGIN_NAMESPACE
+namespace std {
bool operator < (Name a, Name b);
bool operator < (StatePointer a, StatePointer b);
bool operator < (ItemPointer a, ItemPointer b);
-QT_END_NAMESPACE
+}
QTextStream &operator << (QTextStream &out, const Name &n);
QTextStream &operator << (QTextStream &out, const Rule &r);
diff --git a/src/tools/qlalr/main.cpp b/src/tools/qlalr/main.cpp
index a920b13c85..6a57c7aa7a 100644
--- a/src/tools/qlalr/main.cpp
+++ b/src/tools/qlalr/main.cpp
@@ -106,7 +106,7 @@ int main (int argc, char *argv[])
if (! p.parse (file_name))
exit (EXIT_FAILURE);
- if (grammar.rules.isEmpty ())
+ if (grammar.rules.empty())
{
qerr() << "*** Fatal. No rules!" << Qt::endl;
exit (EXIT_FAILURE);
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp
index 0eb6766b5a..ac87e48e39 100644
--- a/src/tools/rcc/main.cpp
+++ b/src/tools/rcc/main.cpp
@@ -99,6 +99,37 @@ int createProject(const QString &outFileName)
return 0;
}
+// Escapes a path for use in a Depfile (Makefile syntax)
+QString makefileEscape(const QString &filepath)
+{
+ // Always use forward slashes
+ QString result = QDir::cleanPath(filepath);
+ // Spaces are escaped with a backslash
+ result.replace(QLatin1Char(' '), QLatin1String("\\ "));
+ // Pipes are escaped with a backslash
+ result.replace(QLatin1Char('|'), QLatin1String("\\|"));
+ // Dollars are escaped with a dollar
+ result.replace(QLatin1Char('$'), QLatin1String("$$"));
+
+ return result;
+}
+
+void writeDepFile(QIODevice &iodev, const QStringList &depsList, const QString &targetName)
+{
+ QTextStream out(&iodev);
+ out << qPrintable(makefileEscape(targetName));
+ out << QLatin1Char(':');
+
+ // Write depfile
+ for (int i = 0; i < depsList.size(); ++i) {
+ out << QLatin1Char(' ');
+
+ out << qPrintable(makefileEscape(depsList.at(i)));
+ }
+
+ out << QLatin1Char('\n');
+}
+
int runRcc(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
@@ -176,6 +207,10 @@ int runRcc(int argc, char *argv[])
QStringLiteral("Only output a mapping of resource paths to file system paths defined in the .qrc file, do not generate code."));
parser.addOption(mapOption);
+ QCommandLineOption depFileOption(QStringList{QStringLiteral("d"), QStringLiteral("depfile")},
+ QStringLiteral("Write a depfile with the .qrc dependencies to <file>."), QStringLiteral("file"));
+ parser.addOption(depFileOption);
+
QCommandLineOption projectOption(QStringLiteral("project"), QStringLiteral("Output a resource file containing all files from the current directory."));
parser.addOption(projectOption);
@@ -266,6 +301,7 @@ int runRcc(int argc, char *argv[])
QString outFilename = parser.value(outputOption);
QString tempFilename = parser.value(tempOption);
+ QString depFilename = parser.value(depFileOption);
if (projectRequested) {
return createProject(outFilename);
@@ -352,6 +388,28 @@ int runRcc(int argc, char *argv[])
return 0;
}
+ // Write depfile
+ if (!depFilename.isEmpty()) {
+ QFile depout;
+ depout.setFileName(depFilename);
+
+ if (outFilename.isEmpty() || outFilename == QLatin1String("-")) {
+ const QString msg = QString::fromUtf8("Unable to write depfile when outputting to stdout!\n");
+ errorDevice.write(msg.toUtf8());
+ return 1;
+ }
+
+ if (!depout.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ const QString msg = QString::fromUtf8("Unable to open depfile %1 for writing: %2\n")
+ .arg(depout.fileName(), depout.errorString());
+ errorDevice.write(msg.toUtf8());
+ return 1;
+ }
+
+ writeDepFile(depout, library.dataFiles(), outFilename);
+ depout.close();
+ }
+
QFile temp;
if (!tempFilename.isEmpty()) {
temp.setFileName(tempFilename);
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 94f6911010..9acbce25ff 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -59,7 +59,7 @@ enum {
CONSTANT_COMPRESSTHRESHOLD_DEFAULT = 70
};
-#if QT_CONFIG(zstd)
+#if QT_CONFIG(zstd) && QT_VERSION >= QT_VERSION_CHECK(6,0,0)
# define CONSTANT_COMPRESSALGO_DEFAULT RCCResourceLibrary::CompressionAlgorithm::Zstd
#elif !defined(QT_NO_COMPRESS)
# define CONSTANT_COMPRESSALGO_DEFAULT RCCResourceLibrary::CompressionAlgorithm::Zlib
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index 0ba49627c0..71e02ae9c9 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -69,7 +69,7 @@ static inline QString moduleHeader(const QString &module, const QString &header)
namespace CPP {
WriteIncludes::WriteIncludes(Uic *uic)
- : m_uic(uic), m_output(uic->output()), m_laidOut(false)
+ : m_uic(uic), m_output(uic->output())
{
// When possible (no namespace) use the "QtModule/QClass" convention
// and create a re-mapping of the old header "qclass.h" to it. Do not do this
diff --git a/src/tools/uic/cpp/cppwriteincludes.h b/src/tools/uic/cpp/cppwriteincludes.h
index aadc6f54fc..9b9ac283fe 100644
--- a/src/tools/uic/cpp/cppwriteincludes.h
+++ b/src/tools/uic/cpp/cppwriteincludes.h
@@ -101,7 +101,7 @@ private:
StringMap m_classToHeader;
StringMap m_oldHeaderToNewHeader;
- bool m_laidOut;
+ bool m_laidOut = false;
};
} // namespace CPP
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index 85b9a9f60b..d16c859eed 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -455,22 +455,20 @@ WriteInitialization::WriteInitialization(Uic *uic) :
m_driver(uic->driver()), m_output(uic->output()), m_option(uic->option()),
m_indent(m_option.indent + m_option.indent),
m_dindent(m_indent + m_option.indent),
- m_stdsetdef(true),
- m_layoutMarginType(TopLevelMargin),
- m_mainFormUsedInRetranslateUi(false),
m_delayedOut(&m_delayedInitialization, QIODevice::WriteOnly),
m_refreshOut(&m_refreshInitialization, QIODevice::WriteOnly),
- m_actionOut(&m_delayedActionInitialization, QIODevice::WriteOnly),
- m_layoutWidget(false),
- m_firstThemeIcon(true)
+ m_actionOut(&m_delayedActionInitialization, QIODevice::WriteOnly)
{
}
void WriteInitialization::acceptUI(DomUI *node)
{
- m_actionGroupChain.push(0);
- m_widgetChain.push(0);
- m_layoutChain.push(0);
+ m_actionGroupChain.push(nullptr);
+ m_widgetChain.push(nullptr);
+ m_layoutChain.push(nullptr);
+
+ if (node->hasAttributeConnectslotsbyname())
+ m_connectSlotsByName = node->attributeConnectslotsbyname();
acceptLayoutDefault(node->elementLayoutDefault());
acceptLayoutFunction(node->elementLayoutFunction());
@@ -541,7 +539,7 @@ void WriteInitialization::acceptUI(DomUI *node)
if (!m_delayedInitialization.isEmpty())
m_output << "\n" << m_delayedInitialization << "\n";
- if (m_option.autoConnection) {
+ if (m_option.autoConnection && m_connectSlotsByName) {
m_output << "\n" << m_indent << "QMetaObject" << language::qualifier
<< "connectSlotsByName(" << varName << ')' << language::eol;
}
diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h
index 3cd0efeaac..6f8e352f6a 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.h
+++ b/src/tools/uic/cpp/cppwriteinitialization.h
@@ -244,7 +244,7 @@ private:
const Option &m_option;
QString m_indent;
QString m_dindent;
- bool m_stdsetdef;
+ bool m_stdsetdef = true;
struct Buddy
{
@@ -294,11 +294,11 @@ private:
// layout defaults
LayoutDefaultHandler m_LayoutDefaultHandler;
- int m_layoutMarginType;
+ int m_layoutMarginType = TopLevelMargin;
QString m_generatedClass;
QString m_mainFormVarName;
- bool m_mainFormUsedInRetranslateUi;
+ bool m_mainFormUsedInRetranslateUi = false;
QString m_delayedInitialization;
QTextStream m_delayedOut;
@@ -309,8 +309,9 @@ private:
QString m_delayedActionInitialization;
QTextStream m_actionOut;
- bool m_layoutWidget;
- bool m_firstThemeIcon;
+ bool m_layoutWidget = false;
+ bool m_firstThemeIcon = true;
+ bool m_connectSlotsByName = true;
};
} // namespace CPP
diff --git a/src/tools/uic/customwidgetsinfo.cpp b/src/tools/uic/customwidgetsinfo.cpp
index d6a409152b..c838feaf73 100644
--- a/src/tools/uic/customwidgetsinfo.cpp
+++ b/src/tools/uic/customwidgetsinfo.cpp
@@ -95,7 +95,7 @@ bool CustomWidgetsInfo::extendsOneOf(const QString &classNameIn,
bool CustomWidgetsInfo::isCustomWidgetContainer(const QString &className) const
{
- if (const DomCustomWidget *dcw = m_customWidgets.value(className, 0))
+ if (const DomCustomWidget *dcw = m_customWidgets.value(className, nullptr))
if (dcw->hasElementContainer())
return dcw->elementContainer() != 0;
return false;
@@ -111,7 +111,7 @@ QString CustomWidgetsInfo::realClassName(const QString &className) const
QString CustomWidgetsInfo::customWidgetAddPageMethod(const QString &name) const
{
- if (DomCustomWidget *dcw = m_customWidgets.value(name, 0))
+ if (DomCustomWidget *dcw = m_customWidgets.value(name, nullptr))
return dcw->elementAddPageMethod();
return QString();
}
diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp
index 5c30e4d239..853538479f 100644
--- a/src/tools/uic/main.cpp
+++ b/src/tools/uic/main.cpp
@@ -68,6 +68,10 @@ int runUic(int argc, char *argv[])
outputOption.setValueName(QStringLiteral("file"));
parser.addOption(outputOption);
+ QCommandLineOption noAutoConnectionOption(QStringList() << QStringLiteral("a") << QStringLiteral("no-autoconnection"));
+ noAutoConnectionOption.setDescription(QStringLiteral("Do not generate a call to QObject::connectSlotsByName()."));
+ parser.addOption(noAutoConnectionOption);
+
QCommandLineOption noProtOption(QStringList() << QStringLiteral("p") << QStringLiteral("no-protection"));
noProtOption.setDescription(QStringLiteral("Disable header protection."));
parser.addOption(noProtOption);
@@ -106,6 +110,7 @@ int runUic(int argc, char *argv[])
driver.option().dependencies = parser.isSet(dependenciesOption);
driver.option().outputFile = parser.value(outputOption);
+ driver.option().autoConnection = !parser.isSet(noAutoConnectionOption);
driver.option().headerProtection = !parser.isSet(noProtOption);
driver.option().implicitIncludes = !parser.isSet(noImplicitIncludesOption);
driver.option().idBased = parser.isSet(idBasedOption);
diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp
index 984ef36274..334ced276d 100644
--- a/src/tools/uic/ui4.cpp
+++ b/src/tools/uic/ui4.cpp
@@ -76,6 +76,10 @@ void DomUI::read(QXmlStreamReader &reader)
setAttributeIdbasedtr(attribute.value() == QLatin1String("true"));
continue;
}
+ if (name == QLatin1String("connectslotsbyname")) {
+ setAttributeConnectslotsbyname(attribute.value() == QLatin1String("true"));
+ continue;
+ }
if (name == QLatin1String("stdsetdef")) {
setAttributeStdsetdef(attribute.value().toInt());
continue;
@@ -209,6 +213,9 @@ void DomUI::write(QXmlStreamWriter &writer, const QString &tagName) const
if (hasAttributeIdbasedtr())
writer.writeAttribute(QStringLiteral("idbasedtr"), (attributeIdbasedtr() ? QLatin1String("true") : QLatin1String("false")));
+ if (hasAttributeConnectslotsbyname())
+ writer.writeAttribute(QStringLiteral("connectslotsbyname"), (attributeConnectslotsbyname() ? QLatin1String("true") : QLatin1String("false")));
+
if (hasAttributeStdsetdef())
writer.writeAttribute(QStringLiteral("stdsetdef"), QString::number(attributeStdsetdef()));
diff --git a/src/tools/uic/ui4.h b/src/tools/uic/ui4.h
index 1710147342..08a3abf490 100644
--- a/src/tools/uic/ui4.h
+++ b/src/tools/uic/ui4.h
@@ -169,6 +169,11 @@ public:
inline void setAttributeIdbasedtr(bool a) { m_attr_idbasedtr = a; m_has_attr_idbasedtr = true; }
inline void clearAttributeIdbasedtr() { m_has_attr_idbasedtr = false; }
+ inline bool hasAttributeConnectslotsbyname() const { return m_has_attr_connectslotsbyname; }
+ inline bool attributeConnectslotsbyname() const { return m_attr_connectslotsbyname; }
+ inline void setAttributeConnectslotsbyname(bool a) { m_attr_connectslotsbyname = a; m_has_attr_connectslotsbyname = true; }
+ inline void clearAttributeConnectslotsbyname() { m_has_attr_connectslotsbyname = false; }
+
inline bool hasAttributeStdsetdef() const { return m_has_attr_stdsetdef; }
inline int attributeStdsetdef() const { return m_attr_stdsetdef; }
inline void setAttributeStdsetdef(int a) { m_attr_stdsetdef = a; m_has_attr_stdsetdef = true; }
@@ -285,6 +290,9 @@ private:
bool m_attr_idbasedtr = false;
bool m_has_attr_idbasedtr = false;
+ bool m_attr_connectslotsbyname = false;
+ bool m_has_attr_connectslotsbyname = false;
+
int m_attr_stdsetdef = 0;
bool m_has_attr_stdsetdef = false;