summaryrefslogtreecommitdiffstats
path: root/patches/0102-Modularized-tst_compilerwarnings.patch
blob: cccfe2a83f0a6275ef883fe0effe9cd7600f4804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
From 8c37eae68f683de8420b372dcb46e201f54cb458 Mon Sep 17 00:00:00 2001
From: Liang Qi <liang.qi@nokia.com>
Date: Wed, 23 Mar 2011 17:25:22 +0100
Subject: [PATCH] Modularized tst_compilerwarnings

---
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 +-------
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 +-------
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |    9 ++--
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   23 +-------
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 +-------
 .../auto/compilerwarnings/compilerwarnings.pro     |    2 +-
 .../auto/compilerwarnings/compilerwarnings.qrc     |    5 --
 .../auto/compilerwarnings/tst_compilerwarnings.cpp |   57 ++++++++++++++++----
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 ++------
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 +-------
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 +-------
 .../tests/auto/compilerwarnings/data}/test_cpp.txt |   22 +-------
 12 files changed, 69 insertions(+), 181 deletions(-)
 copy {qtqa/tests/auto/compilerwarnings => phonon/tests/auto/compilerwarnings/data}/test_cpp.txt (81%)
 copy {qtqa/tests/auto/compilerwarnings => qt3support/tests/auto/compilerwarnings/data}/test_cpp.txt (81%)
 copy {qtqa/tests/auto/compilerwarnings => qtbase/tests/auto/compilerwarnings/data}/test_cpp.txt (96%)
 copy {qtqa/tests/auto/compilerwarnings => qtdeclarative/tests/auto/compilerwarnings/data}/test_cpp.txt (83%)
 copy {qtqa/tests/auto/compilerwarnings => qtmultimedia/tests/auto/compilerwarnings/data}/test_cpp.txt (81%)
 delete mode 100644 qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc
 copy {qtqa/tests/auto/compilerwarnings => qtscript/tests/auto/compilerwarnings/data}/test_cpp.txt (81%)
 copy {qtqa/tests/auto/compilerwarnings => qtsvg/tests/auto/compilerwarnings/data}/test_cpp.txt (81%)
 copy {qtqa/tests/auto/compilerwarnings => qttools/tests/auto/compilerwarnings/data}/test_cpp.txt (82%)
 rename {qtqa/tests/auto/compilerwarnings => qtxmlpatterns/tests/auto/compilerwarnings/data}/test_cpp.txt (81%)

diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/phonon/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 81%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to phonon/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..775619a 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/phonon/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,31 +40,13 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
+#ifndef QT_NO_PHONON
+#include <phonon/phonon>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
-
 #ifndef Q_OS_MAC
 int main(int, char **)
 {
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qt3support/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 81%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qt3support/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..1c52f27 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qt3support/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,31 +40,13 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
+#ifdef QT3_SUPPORT
+#include <Qt3Support/Qt3Support>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
-
 #ifndef Q_OS_MAC
 int main(int, char **)
 {
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtbase/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 96%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qtbase/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..9b8d11c 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qtbase/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -44,22 +44,22 @@
 #include <QtNetwork/QtNetwork>
 #include <QtXml/QtXml>
 #include <QtSql/QtSql>
+
+#ifndef QT_NO_GUI
 #include <QtGui/QtGui>
+#endif
 
 #ifndef QT_NO_OPENGL
 #include <QtOpenGL/QtOpenGL>
 #endif
 
-#include <QtDesigner/QtDesigner>
-
 #include <QtTest/QtTest>
 
 #if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
 #include <QtDBus/QtDBus>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
+#include <QtUiTools/QtUiTools>
 
 #ifndef Q_OS_MAC
 int main(int, char **)
@@ -67,4 +67,3 @@ int main(int, char **)
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 83%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..a3d65db 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -39,27 +39,9 @@
 **
 ****************************************************************************/
 
-
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
-#endif
-
+#ifndef QT_NO_DECLARATIVE
 #include <QtDeclarative/QtDeclarative>
-
+#endif
 
 #ifndef Q_OS_MAC
 int main(int, char **)
@@ -67,4 +49,3 @@ int main(int, char **)
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 81%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..3e33574 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,31 +40,13 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
+#ifndef QT_NO_MULTIMEDIA
+#include <QtMultimedia/QtMultimedia>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
-
 #ifndef Q_OS_MAC
 int main(int, char **)
 {
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro b/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro
index beb0279..301834c 100644
--- a/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro
+++ b/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro
@@ -1,4 +1,4 @@
 load(qttest_p4)
+INCLUDEPATH += ../../shared
 SOURCES += tst_compilerwarnings.cpp
 QT = core
-RESOURCES = compilerwarnings.qrc
diff --git a/qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc b/qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc
deleted file mode 100644
index 3fa313c..0000000
--- a/qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
- <qresource>
-     <file>test_cpp.txt</file>
- </qresource>
- </RCC>
diff --git a/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
index b518e20..d33ad6e 100644
--- a/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
+++ b/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
@@ -51,6 +51,8 @@
 QTEST_NOOP_MAIN
 #else
 
+#include "global.h"
+
 #include <stdlib.h>
 
 QT_USE_NAMESPACE
@@ -60,11 +62,18 @@ class tst_CompilerWarnings: public QObject
     Q_OBJECT
 
 private slots:
+    void initTestCase();
+    void cleanupTestCase();
+
     void warnings_data();
     void warnings();
 
 private:
     bool shouldIgnoreWarning(QString const&);
+
+    QString qtModuleDir;
+    QHash<QString, QString> modules;
+    QStringList incPaths;
 };
 
 #if 0
@@ -109,6 +118,28 @@ static QStringList getFeatures()
 }
 #endif
 
+void tst_CompilerWarnings::initTestCase()
+{
+    QTest::qWarn("This test needs the correct qmake in PATH, we need it to generate INCPATH for qt modules.");
+
+    qtModuleDir = QString::fromLocal8Bit(qgetenv("QT_MODULE_TO_TEST"));
+    QVERIFY2(!qtModuleDir.isEmpty(), "This test needs $QT_MODULE_TO_TEST, we need it to search data and etc.");
+
+    QString configFile = qtModuleDir + "/tests/global/global.cfg";
+    modules = qt_tests_shared_global_get_modules(configFile);
+
+    QVERIFY2(modules.size() > 0, "Something is wrong in the global config file.");
+
+    QString workDir = qtModuleDir + "/tests/global";
+    incPaths = qt_tests_shared_global_get_include_paths(workDir, modules);
+
+    QVERIFY2(incPaths.size() > 0, "Parse INCPATH failed.");
+}
+
+void tst_CompilerWarnings::cleanupTestCase()
+{
+}
+
 void tst_CompilerWarnings::warnings_data()
 {
     QTest::addColumn<QStringList>("cflags");
@@ -133,6 +164,12 @@ void tst_CompilerWarnings::warnings_data()
 
 void tst_CompilerWarnings::warnings()
 {
+    QString workDir = qtModuleDir + "/tests/auto/compilerwarnings";
+    if (!QDir::setCurrent(workDir)) {
+        QTest::qWarn("Change working dir failed.");
+        return;
+    }
+
     QFETCH(QStringList, cflags);
 
 #if !defined(Q_CC_INTEL) && defined(Q_CC_GNU) && __GNUC__ == 3
@@ -149,12 +186,13 @@ void tst_CompilerWarnings::warnings()
     /*static*/ QString tmpSourceFile;
     bool openResult = true;
     const QString tmpBaseName("XXXXXX-test.cpp");
+    const QString cppFileName(workDir + "/data/test_cpp.txt");
     QString templatePath = QDir::temp().absoluteFilePath(tmpBaseName);
     QFile tmpQSourceFile(templatePath);
     if (tmpSourceFile.isEmpty()) {
         tmpQSourceFile.open(QIODevice::ReadWrite | QIODevice::Truncate);
         tmpSourceFile = tmpQSourceFile.fileName();
-        QFile cppSource(":/test_cpp.txt");
+        QFile cppSource(cppFileName);
         bool openResult = cppSource.open(QIODevice::ReadOnly);
         if (openResult)
         {
@@ -164,18 +202,15 @@ void tst_CompilerWarnings::warnings()
         }
     }
     tmpQSourceFile.close();
-    QVERIFY2(openResult, "Need resource temporary \"test_cpp.txt\"");
+    QVERIFY2(openResult, QString("Need data file \"" + cppFileName + "\"").toLatin1());
 
     QStringList args;
     QString compilerName;
 
-    static QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR"));
-    QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR");
-
     args << cflags;
 #if !defined(Q_CC_INTEL) && defined(Q_CC_GNU)
     compilerName = "g++";
-    args << "-I" + qtDir + "/include";
+    args << incPaths;
     args << "-I/usr/X11R6/include/";
 #ifdef Q_OS_HPUX
     args << "-I/usr/local/mesa/aCC-64/include";
@@ -189,7 +224,7 @@ void tst_CompilerWarnings::warnings()
          << tmpSourceFile;
 #elif defined(Q_CC_XLC)
     compilerName = "xlC_r";
-    args << "-I" + qtDir + "/include"
+    args << incPaths
 # if QT_POINTER_SIZE == 8
          << "-q64"
 # endif
@@ -198,13 +233,13 @@ void tst_CompilerWarnings::warnings()
          << tmpSourceFile;
 #elif defined(Q_CC_MSVC)
     compilerName = "cl";
-    args << "-I" + qtDir + "/include"
+    args << incPaths
          << "-nologo" << "-W3"
          << tmpSourceFile;
 #elif defined (Q_CC_SUN)
     compilerName = "CC";
     // +w or +w2 outputs too much bogus
-    args << "-I" + qtDir + "/include"
+    args << incPaths
 # if QT_POINTER_SIZE == 8
          << "-xarch=v9"
 # endif
@@ -212,7 +247,7 @@ void tst_CompilerWarnings::warnings()
          << tmpSourceFile;
 #elif defined (Q_CC_HPACC)
     compilerName = "aCC";
-    args << "-I" + qtDir + "/include"
+    args << incPaths
          << "-I/usr/local/mesa/aCC-64/include"
          << "-I/opt/graphics/OpenGL/include"
 # if QT_POINTER_SIZE == 8 && !defined __ia64
@@ -224,7 +259,7 @@ void tst_CompilerWarnings::warnings()
          << tmpSourceFile;
 #elif defined(Q_CC_MIPS)
     compilerName = "CC";
-    args << "-I" + qtDir + "/include"
+    args << incPaths
          << "-c"
          << "-woff" << "3303" // const qualifier on return
          << "-o" << tmpFile
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtscript/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 81%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qtscript/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..c5c5933 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qtscript/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,31 +40,17 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
+#ifndef QT_NO_SCRIPT
+#include <QtScript/QtScript>
 #endif
 
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
+#ifndef QT_NO_SCRIPTTOOLS
+#include <QtScriptTools/QtScriptTools>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
-
 #ifndef Q_OS_MAC
 int main(int, char **)
 {
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 81%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..4ac69de 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,31 +40,13 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
+#ifndef QT_NO_SVG
+#include <QtSvg/QtSvg>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
-
 #ifndef Q_OS_MAC
 int main(int, char **)
 {
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qttools/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 82%
copy from qtqa/tests/auto/compilerwarnings/test_cpp.txt
copy to qttools/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..5e0cbf3 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qttools/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,26 +40,9 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
 #include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
-#endif
-
-#include <QtDeclarative/QtDeclarative>
-
+#include <QtHelp/QtHelp>
+//#include <QtCLucene/QtCLucene>
 
 #ifndef Q_OS_MAC
 int main(int, char **)
@@ -67,4 +50,3 @@ int main(int, char **)
     return 0;
 }
 #endif
-
diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt
similarity index 81%
rename from qtqa/tests/auto/compilerwarnings/test_cpp.txt
rename to qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt
index d27e972..77fa9ba 100644
--- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt
+++ b/qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -40,31 +40,13 @@
 ****************************************************************************/
 
 
-#include <QtCore/QtCore>
-#include <QtNetwork/QtNetwork>
-#include <QtXml/QtXml>
-#include <QtSql/QtSql>
-#include <QtGui/QtGui>
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#endif
-
-#include <QtDesigner/QtDesigner>
-
-#include <QtTest/QtTest>
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-#include <QtDBus/QtDBus>
+#ifndef QT_NO_XMLPATTERNS
+#include <QtXmlPatterns/QtXmlPatterns>
 #endif
 
-#include <QtDeclarative/QtDeclarative>
-
-
 #ifndef Q_OS_MAC
 int main(int, char **)
 {
     return 0;
 }
 #endif
-
-- 
1.7.3.2.343.g7d43d