summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
Commit message (Collapse)AuthorAgeFilesLines
* fix somewhat common edge case in $$shadowed()Oswald Buddenhagen2012-06-261-0/+1
| | | | | | | | | | | | if source and build dir are direct children of the common root and we are shadowing the top-level source dir, there is of course no trailing slash to match. Change-Id: I8a34a6a72d16cb21d77d056e037235af9b32a008 Reviewed-by: Davide Pesavento <davidepesa@gmail.com> Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Change *-clang mkspec globs to *-clang*Bradley T. Hughes2012-06-201-1/+1
| | | | | | | | Like with the numerous g++ mkspecs, we have mkspecs with suffixes, and these mkspecs should still match the clang globs. Change-Id: I9296408b5192bc72cc468d229a57923e3f5ab6f0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix unused parameter warnings in moc test.Mitch Curtis2012-06-201-3/+3
| | | | | Change-Id: I3467a8bf99464c2d3762a171b20508bb4b29ddb4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* add $$reverse() functionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | | | returns the list with the order of the elements reversed. one can easily implement this with existing functions, but this is way faster and more readable. Change-Id: I12d306eb9fe58fc332622274ea6b658192529491 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* add $$shell_quote() functionOswald Buddenhagen2012-06-191-0/+8
| | | | | | | | to be used in system() calls and when assembling EXTRA_COMPILER and INSTALLS .commands by hand. Change-Id: Id706cd56aa267a9fb4b14e3416692b4716fafa5b Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$absolute_path() and $$relative_path()Oswald Buddenhagen2012-06-191-0/+5
| | | | | | | just exposes QDir::fooFilePath() wrapped into QDir::cleanPath() Change-Id: I7a7644084825fd8092a9910ac20f695c4d9351f6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$native_path() functionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | more or less QDir::toNativeSeparators(QDir::cleanPath()) Change-Id: I52deee1e8086559eda5833b387a0cf64d21cbcd9 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$clean_path() functionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | just QDir::cleanPath() Change-Id: I2d51e2385939d8926c00f296537ab7f6757d9a79 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$format_number() functionOswald Buddenhagen2012-06-191-0/+14
| | | | | Change-Id: I04266c1f5fb72af94073f3f508cee59085e365b6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$shadowed() functionOswald Buddenhagen2012-06-192-1/+3
| | | | | | | | | return the build directory corresponding to a given source directory. this is the identity function if not shadow-building. if input lies outside the source directory, return empty value. Change-Id: I2d2a6b1112bd19989fe29cfe19a12d39a0d208c1 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$val_escape() functionOswald Buddenhagen2012-06-191-0/+9
| | | | | | | | this quotes the elements of a variable in a way suitable for re-parsing as qmake code. Change-Id: I0e6ea2478c43b5aeff45f485a48ac8c86705dd4a Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add mkpath() functionOswald Buddenhagen2012-06-191-0/+4
| | | | | Change-Id: I8809b9ee4e85fbe8cec95641d659f237c5f51a26 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add write_file() functionOswald Buddenhagen2012-06-191-1/+15
| | | | | | | | | this dumps the contents of a variable into a file. each element of the variable is considered a line; line terminators are added. all missing directories are automatically created. Change-Id: Idafeb873cea64e6705c894b3ab0ef21df69e7170 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Replace QTEST_APPLESS_MAIN with QTEST_MAIN in tests using QProcessRohan McGovern2012-06-053-3/+3
| | | | | | | | | | QProcess requires an application object to be created in order to work correctly on Windows. Task-number: QTBUG-26023 Task-number: QTBUG-26024 Change-Id: Ifa90946262bc7e2a7df6b6aad54e10b54473fc97 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Marked tst_qmake as parallel-safeRohan McGovern2012-05-291-0/+1
| | | | | | | | | This autotest fails a parallel-stress test because it writes into its own source/build directory. However, by inspection, it appears not likely to cause issues with any tests other than itself. Change-Id: I13789ba14bab240d34c22c5b77d6407995423afc Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Add CONFIG+=parallel_test to suspected parallel-safe tests.Rohan McGovern2012-05-281-0/+1
| | | | | | | | | These tests have passed a parallel stress test on all three of Linux, Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run them in parallel, saving time. Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Don't use the deprecated translate() method anymoreLars Knoll2012-05-1899-981/+981
| | | | | | | | | | The Encoding argument of QCoreApplication::translate() is deprecated and source code is always assumed to be encoded in Utf8. Simply remove the encoding argument from the generated .ui.h files. Change-Id: If6c40f6df13abd45a0303c863077972c3d1fb685 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtDBus]Thiago Macieira2012-05-071-1/+1
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I052a3412a568ad639f2bf169b4491b56dddff1c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [other]Thiago Macieira2012-05-042-3/+3
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ib1eaf42679ab5db4005192c3d00ba79e43edfcca Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-033-1/+269
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| * Add unit testing for the qdbusxml2cpp toolThiago Macieira2012-04-213-1/+269
| | | | | | | | | | | | | | | | I have not added tests for warnings or other failure to input. This tests only proper output for the moment. Change-Id: Ie01fd2a78adfa57c27bf288a08cd44ae82f51241 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* | Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-7/+7
| | | | | | | | | | | | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Remove QMetaObjectExtraData and put everything into QMetaObjectOlivier Goffart2012-04-251-4/+1
|/ | | | | | | | | | | | | | | | QMetaObjectExtraData was added when support for QMetaObject::newInstance was added. One needed a place to put the pointer to static_metacall in the QMetaObject. But as we break binary compatibility, one can change the size of QMetaObject, and put everything back inside QMetaObject's own structure. Meaning it is not required anymore to have one QMetaObjectExtraData instance per QMetaObject anymore. Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-0/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * moc: Fix parsing of the empty preprocessor commandOlivier Goffart2012-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | When encountering a null preprocessing directive (which is supposed to be ignored), the moc preprocessor will leave a PP_NEWLINE token in the token stream. That will confuse the parser. The PP_NEWLINE token need to be ignored in the preprocessing phase. Task-number: QTBUG-22717 Change-Id: I1e502a7e5bc6fa8ce2f82109ba7199b95747ff0a Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-103-9/+9
|\| | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Use "qt-project.org" instead of "trolltech" in the resource systemhjk2012-03-282-8/+8
| | | | | | | | | | | | | | Task-number: QTBUG-23272 Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Fix some compiler warnings in tests.Friedemann Kleint2012-03-271-1/+1
| | | | | | | | | | | | | | | | - Unused variables - Deprecated conversion from const char * to char *. Change-Id: Iea0b9c4613ea74cead6d95ba12ad1028f531cbff Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* | New qHash algorithm for uchar/ushort arrays (QString, QByteArray, etc.)Giuseppe D'Angelo2012-04-091-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port of Robin's work from I0a53aa4581e25b351b9cb5033415b5163d05fe71 on top of the new qHash patches (the original commit just introduced lots of conflicts, so I redid it from scratch). This is based on the work done in the QHash benchmark over the past few months experimenting with the performance of the string hashing algorithm used by Java. The Java algorithm, in turn, appears to have been based off a variant of djb's work at http://cr.yp.to/cdb/cdb.txt. This commit provides a performance boost of ~12-33% on the QHash benchmark. Unfortunately, the rcc test depends on QHash ordering. Randomizing QHash or changing qHash will cause the test to fail (see QTBUG-25078), so for now the testdata is changed as well. Done-with: Robin Burchell Change-Id: Ie05d8e21588d1b2d4bd555ef254e1eb101864b75 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Stop relying on QHash orderingGiuseppe D'Angelo2012-04-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | tst_rcc and tst_qdom rely on specific QHash orderings inside rcc and QDom respectively (see QTBUG-25078 and QTBUG-25071). A workaround is added to make them succeed: QDom checks for all possible orderings, and rcc initializes the hash seed to 0 if the QT_RCC_TEST environment variable is set. Change-Id: I5ed6b50602fceba731c797aec8dffc9cc1d6a1ce Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Bootstrap qdbuscpp2xml.Stephen Kelly2012-03-185-0/+326
| | | | | | | | | | | | | | | | | | This involves invoking the Moc classes directly and using the data structures it provides instead of invoking the moc exectutable and parsing the generated code. Change-Id: Ia5c654e8ef58d52d0d3376252c13e13885f80da3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | moc: test signature with (void)Olivier Goffart2012-03-162-0/+4
| | | | | | | | | | | | Change-Id: Id63ed21e9f5e7447ced877ec19a2786d20f439f0 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-1250-42/+746
|\| | | | | | | | | | | | | Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
| * remove strange .qmake.cache hacksOswald Buddenhagen2012-03-085-26/+0
| | | | | | | | | | | | | | | | they are obsolete (qmake knows the qt build configuration anyway), and messing with QTDIR is a recipe for disaster. Change-Id: Ib3594f38ec3192a5f70771f8bc5d8fd435bbbd15 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * Remove usage of QtXml from rcc, add testGiuseppe D'Angelo2012-03-0845-16/+746
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ported from QDom to QXmlStreamReader. This enables removal of QtXml classes from bootstrap. A new rcc test was added, copying the data from the QResourceFileEngine test. The new test runs rcc to create binary resources, dynamically loads them under various locales and checks that they do contain the expected files. Change-Id: I15d23dfda45de851a421156951ce2a60af4c1f7f Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* | Merge remote-tracking branch 'origin/api_changes' into containtersJoão Abecasis2012-03-083-2/+176
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qvariant.cpp src/tools/moc/moc.h Change-Id: I2cd3d95b41d2636738c6b98064864941e3b0b4e6
| * remove injection of default_pre in infile()/$$fromfile()Oswald Buddenhagen2012-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | this is a hack from the times when these functions were (ab)used to inspect proper project files, but the inclusion was done with a clean project, so that the included files did not have any functions to work with. Change-Id: I19925e8ead597ca38df040000c183e368b32c06d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-041-0/+152
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| | * Merge master -> api_changesRohan McGovern2012-02-297-47/+49
| | |\ | | | | | | | | | | | | | | | | | | | | Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
| | * | Allow moc to handle symbols that have been redefined.Matthew Vogt2012-02-271-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow moc to produce the desired identifiers when used with C++ symbol names that have been redefined, for example by -Dfoo=bar. Two changes are required: firstly, when encoding a type name, the components of the name must be checked for substitutions that have been defined for that token (note that this is not done here by correct pre-processing, but only by processing the resultant table of definitions). Secondly, the arguments to the SIGNAL, SLOT and METHOD macros must be allowed to be substituted during macro expansion rather than stringized directly. This is a temporary change to prevent breaking existing projects that depend on the declarative module. After clients have had an opportunity to update their code to the use the new interfaces, it can be removed. Task-number: QTBUG-23737 Change-Id: I39e6844cebf6ca7984af6028160b8a3797ac44a5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * | | qmake-test: Fix jom/nmake handling on Windows.Friedemann Kleint2012-03-011-2/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The test fails if MAKEFLAGS is set up for jom since the test always uses nmake. Remove MAKEFLAGS from the process environment. Change-Id: Idaed3cc964832b83c282a59fc5257572c520b882 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* / | Rename QMetaMethod::signature() to methodSignature()Kent Hansen2012-02-291-13/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | remove useless init() functionOswald Buddenhagen2012-02-271-6/+0
| | | | | | | | | | | | | | | | it did the same cleanup() did, and they are always called consecutively anyway (except at start and end where it does not matter). Change-Id: I4c82024d19d6c670f1f4037d43147a15680614ae Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | move resetEnvironment() call to cleanup()Oswald Buddenhagen2012-02-271-1/+1
| | | | | | | | | | | | | | we want to call it even if the test fails Change-Id: Ie8f3f9d2df5d52990d6b9f9a632e49826278175a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | make qmake test suite a tad more verbose on failureOswald Buddenhagen2012-02-273-13/+19
| | | | | | | | | | | | | | automatically dump the collected output on non-expected return code Change-Id: Ifda7287869f329c5a6714e6f21aa9c3991e9ee4e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | TestCompiler: split commands from argumentsOswald Buddenhagen2012-02-273-11/+27
| | | | | | | | | | | | | | | | | | this allows us to temporarily set some extra args without (incorrectly) instantiating a second TestCompiler (and on the way relying on $PATH for finding qmake). Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | don't rely on $PATH for finding rccOswald Buddenhagen2012-02-271-1/+3
| | | | | | | | | | Change-Id: I7e6ffad6d84cca0b548920b3e620375fb5e314e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | clean up qmake-generated projectsOswald Buddenhagen2012-02-243-16/+0
|/ | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* uic: use QStringLiteral() instead of QString::fromUtf8() where applicableMarc Mutz2012-02-2099-1500/+1500
| | | | | | | | | | | | | | | | | | | | | | | Many (most?) strings written aren't in fact UTF-8, and we can check at compile-time which are and which aren't, so don't hard-code fromUtf8() but use the much more efficient QStringLiteral() where applicable. This is low-hanging fruit. This patch only optimises US-ASCII string literals, not those that are latin-1 or even UTF-8, because that would require more extensive changes to the original fixString() function. Likewise, there are also other calls to QString::fromUtf8() being generated (e.g. in the pixmap code) that could benefit from being turned into QStringLiterals, but their code paths are more involved than those this patch fixes. This patch at least suffices in turning all the setObjectName() arguments into QStringLiterals, which was the main goal. The autotest baseline has been updated with the new expected results. Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Eliminate duplicate data row names in dbus, tools and xml autotests.Jason McDonald2012-02-161-3/+3
| | | | | Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>