summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixes an FTBFS on CentOS 6HEADmasterLuís Pereira2014-10-201-0/+1
| | | | | | | It happens when using Qt 4.6.2. Including the QHash header fixes it. Change-Id: I97692ce1d3a05695e01b39d67f4c068f7500aed8 Reviewed-by: David Faure <david.faure@kdab.com>
* Adds version info & bumps it to 1.0.1v1.0.1Luís Pereira2014-09-031-0/+2
| | | | | | | VERSION wasn't being used, it defaulted to 1.0.1. Change-Id: I237feb1eb40db19cb880efc7ad23c5bbb5a24723 Reviewed-by: David Faure <david.faure@kdab.com>
* Removes the Wno-long-long flagLuís Pereira2014-08-304-4/+4
| | | | | | | | | -Wlong-long is enabled by either -Wpedantic or -Wtraditional in ISO C90 and C++98 modes. They aren't turned on, so there is no need to inhibit -Wlong-long with -Wno-long-long. Change-Id: I2cd9655d9d885f762e4af422d393934790c3970c Reviewed-by: David Faure <david.faure@kdab.com>
* Support building against Qt v4.7.2 using "modern" GCC versionsLuís Pereira2014-07-244-4/+4
| | | | | | | | With "modern" GCC versions we got some new warnings that, due to the -Werror, were treated as errors. Just kill the -Werror flag. Change-Id: I3947fde8b56dab8f3810366aa27dc25967ba5b10 Reviewed-by: David Faure <david.faure@kdab.com>
* Fixes an FTBFSLuís Pereira2014-07-161-0/+2
| | | | | | | Include geteuid() headers. Change-Id: I1ce0ecf20002144fc90548080ec5b7c21ee61cad Reviewed-by: David Faure <david.faure@kdab.com>
* Don't install test stuffLuís Pereira2013-09-136-120/+11
| | | | | | | | | Testing is done by the developer/builder. No need to install it. test.xml testdefinition also removed. It was not being used it anyway. Change-Id: I24c56df85ce00368934a731fde6a3cf253dedb41 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Kills all the QML stuffLuís Pereira2013-09-1322-2407/+2
| | | | | | | | | It didn't make to Qt5 because it made no sense. No point in having it in Qt4. Change-Id: I94a4444d0c667c4dc2b07565f45ff05ad53680db Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Fixes declarative_mimetypes lib install directoryLuís Pereira2013-09-121-7/+2
| | | | | | | | | | Just install it to the $$[QT_INSTALL_IMPORTS] directory. Qt will search there. maemo5 "special" install directory dropped. Change-Id: I307da5b73d02b665d221d1067a6e83b13b00915c Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Fixes another typo bug in the LIBDIR install pathLuís Pereira2013-09-081-1/+1
| | | | | | Change-Id: I5a7bf6045d51189f2fba5fae0b66cbbebeadbe2b Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
* Creates and installs pkg-config .pc fileLuís Pereira2013-08-311-1/+13
| | | | | | | | | I was able to build the examples/mimetypefinder example with: g++ `pkg-config --cflags --libs QtMimeTypes` -o mimetypefinder main.cpp Change-Id: Ie783f88b74119392be633a6094ba40d16209a7c3 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Fixes a bug in the LIBDIR install pathLuís Pereira2013-08-291-1/+1
| | | | | | | | | Introduced by commit 10517652f65f05120432ea05883977e39ed7b8be. It made libQtMimeTypes installation fail. Change-Id: I7c512b5d29bcfa06896a2df71f98b9c58db06817 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Fixes development header and lib install directoryLuís Pereira2013-08-284-12/+18
| | | | | | | | | | | | | | | | | | PREFIX variable added. Let packagers and users choose the install prefix. Headers installed to $${INCLUDEDIR}/QtMimeTypes. Installing it to $${INCLUDEDIR}/qt5/QtMimeTypes makes no sense. This is an Qt4 project. Libraries installed to $${LIBDIR}. maemo5 "special" include and lib path dropped. Just use the PREFIX variable. Use example: qmake PREFIX=/usr/local Change-Id: I4fc173e7999ea7ffdd4dfe26f8a142a822fa7da9 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Removes Qt5 modules from the project filesLuís Pereira2013-08-286-9/+3
| | | | | | | | They don't exist in Qt4. Change-Id: Idb354fbd38ffe2976159e6a1d1cd9ddf8d2cce11 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Reworks the detect Qt5 then abortLuís Pereira2013-08-283-8/+7
| | | | | | | | | One check at the source code level is enough. Added a check in the project file so we can abort earlier. Change-Id: I37f2562d583c5fb54005e22a2a6894dc9054c8f3 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Removes Qt5 conditional codeLuís Pereira2013-08-287-43/+0
| | | | | | | | | The project is only an Qt4 one. Qt5 already includes this functionality in QtCore/QMimeType Change-Id: I15e7d0a0a4d254cd2ffd2ff57f340302534e34e9 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Don't use the -Wshadow CXX FLAGLuís Pereira2013-08-282-2/+2
| | | | | | | | | | It causes the following error (Qt version 4.8.1 i386-linux-gnu): /usr/include/qt4/QtCore/qtconcurrentrunbase.h:84:42: error: declaration of ‘future’ shadows a member of 'this' [-Werror=shadow] Change-Id: I55fe238155948fbd1289f3c5f02596ac0167c0f5 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Adds missing test filesLuís Pereira2013-08-284-0/+4
| | | | | | | | | Taken from: http://freedesktop.org/wiki/Software/shared-mime-info Change-Id: Icdfbc918c1f0f0f6583dee4d1e9935b4014801aa Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Defines Q_CONSTRUCTOR_FUNCTION macroLuís Pereira2013-08-281-1/+7
| | | | | | | | Help from: http://qt-project.org/wiki/QtResources Change-Id: Ia26894cb019db15a5a88c43159fb94ad6511a482 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Backport QTEST_GUILESS_MAIN from Qt5Luís Pereira2013-08-281-0/+8
| | | | | | Change-Id: I71f2ab4a204cc07f71a4d91dc78204ef4538e5eb Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Adapt to Qt4 QSKIPLuís Pereira2013-08-281-5/+5
| | | | | | | | | | | | | | | | From the C++ API changes at http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html#changes-to-qt-test "The "mode" parameter in QSKIP macro is removed. This parameter caused problems in test metrics calculation because of the SkipAll mode, which hid information about the skipped test data. Calling QSKIP in a test function now behaves like SkipSingle, which is skipping a non-data-driven test function or skipping only the current data row of a data-driven test function. Every skipped data row is now reported in the test log." Change-Id: I6d07fb13f5949dda52a89438d84c86dcc54f8c6c Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Simulate QFINDTESTDATA functionalityLuís Pereira2013-08-281-2/+8
| | | | | | Change-Id: Ia80700d5df7bbfab94f25333cb88662836676124 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Simulate Qt5 QTemporaryDirLuís Pereira2013-08-282-4/+17
| | | | | | | | Qt4 doesn't have an QTemporaryDir, so we must simulate it. Change-Id: Ief45836d1ae63f7979d76b6b887be961ba7aca38 Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Replaces QStringLiteral by QLatin1StringLuís Pereira2013-08-282-10/+11
| | | | | | | | QStringLiteral was introduced in Qt5. Change-Id: Id1942225a1a9758db7bc8e05df45223d13bf86dc Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Replaced Nokia copyrights and contact detailsTeemu Kaukoranta2013-05-2721-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced Nokia copyrights with correct Digia copyrights. Text in front of copyright is now retained: ** File is part of Foo, Copyright Nokia... -> ** File is part of Foo, Copyright Digia... Replaced Nokia contact details with Digia's. Removing "All Rights Reserved" no longer leaves an empty line. Used the following command: find . -path '*/3rdparty/*' -prune -o -exec grep -ilI -E '.*Copyright.*Nokia.*|.*Contact.*' {} \; | tee >(xargs sed -i -r '1,50 { /INdT|copy[a-z]*[ ]*=/ !{ s/(^[ \t:#*]*)([a-z ]*) (Copyright.*Nokia.*)/ \1\2Copyright \(C\) 2013 Digia Plc and\/or its subsidiary\(-ies\)\./I }}') >(xargs sed -i -r '1,50 s/(^[ \t:#*]*)(.*info@qt\.nokia\.com.* |.*INSERT EMAIL ADDRESS.*|.*qt-info@nokia\.com.* |.*qt-label1@nokia\.com.*|.*http:\/\/qt\.nokia\.com\/contact.* |.*qt-sales@nokia\.com.*|.*http:\/\/www\.qt-project\.org\/.*)/ \1Contact: http:\/\/www\.qt-project\.org\/legal/I') >(xargs sed -i -r '1,50{/(^[ \t:#*]*)(all rights reserved.*)/Id}') Command now finds command details that point to qt-project.org and changes them to qt-project.org/legal Also no longer wrongly replaces code snippet "copyright = ..". Need to fix these case-by-case later. Change-Id: I627e378a0fa5dfb0224444dd8f08e0712df6eb0f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Replaced Nokia copyrights and contact detailsTeemu Kaukoranta2013-05-2738-70/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Replaced Nokia copyrights with correct Digia copyrights. Text in front of copyright is now retained: ** File is part of Foo, Copyright Nokia... -> ** File is part of Foo, Copyright Digia... Replaced Nokia contact details with Digia's. Removing "All Rights Reserved" no longer leaves an empty line. Used the following command: find . -path '*/3rdparty/*' -prune -o -exec grep -ilI -E '.*Copyright.*Nokia.*|.*Contact.*Nokia.*' {} \; | tee >(xargs sed -i -r '1,50 { /INdT/ !{ s/(^[ \t:#*]*)([a-z ]*)(Copyright.*Nokia.*)/ \1\2Copyright \(C\) 2013 Digia Plc and\/or its subsidiary\(-ies\)\./I } }') >(xargs sed -i -r '1,50 s/(^[ \t:#*]*)(.*info@qt\.nokia\.com.* |.*INSERT EMAIL ADDRESS.*|.*qt-info@nokia\.com.* |.*qt-label1@nokia\.com.*|.*http:\/\/qt\.nokia\.com\/contact.* |.*qt-sales@nokia\.com.*) /\1Contact: http:\/\/www\.qt-project\.org\/legal/I') >(xargs sed -i -r '1,50{/(^[ \t:#*]*)(all rights reserved.*)/Id}') Change-Id: I351a3815c27f51e15070f2b7bdc381f445ca058b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed licensesTeemu Kaukoranta2013-05-2337-803/+819
| | | | | | | | | Updated licenses using replace-licenses.zsh from mkdist repo. Possible copyright and contact changes will come later. Change-Id: I2d0782525b6e65dd67db69eaea4a4c72e42831c2 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Resynced with qt5.Wolf-Michael Bolle2012-07-2026-636/+1372
| | | | | | Change-Id: I7fb65ea7210ddc38e6c9dff694d11257c5c2a71d Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Fix build for macarch2012-02-261-3/+4
| | | | | Change-Id: Ifcd7f558b8ad5d7885cffdfaab7f8d3216c700c8 Reviewed-by: David Faure <faure@kde.org>
* Add version check to prevent building qmime with qt5arch2012-02-262-0/+12
| | | | | Change-Id: I94e932b2c193871de10dfc448153adf25886612f Reviewed-by: David Faure <faure@kde.org>
* Code is synced with qt5 code.arch2012-02-2619-603/+865
| | | | | Change-Id: I550b4eeb15caab9641b0de892e2d5680e8ecaa0a Reviewed-by: David Faure <faure@kde.org>
* Don't export QMimeMagicRuleMatcher.David Faure2012-02-103-5/+2
| | | | | | | | QMimeTypePrivate still has to be exported, due to QMIMETYPE_BUILDER used in autotests. Change-Id: Ibcd4976b2f18fbaa4f2532ed45a03a0bfeaf2694 Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Remove unused method data_ptr()David Faure2012-02-101-2/+0
| | | | | Change-Id: I9226fa1afae97b631fc20d259c5dce4bb5f51405 Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Make QFile member variable a value rather than a pointerDavid Faure2012-02-071-26/+20
| | | | | | | Which saves calls to new and delete. As suggested by Thiago. Change-Id: Icda7e909ac0d3b08df3d8d84b8c1a3a6bb35b782 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMime: Remove the remaining commented out code.David Faure2012-01-307-99/+3
| | | | | | Change-Id: I50d843f5da0a3becfd85462877c148fbf16ee58a Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* QMimeType: Remove langaage argument to comment() methodDavid Faure2012-01-303-7/+2
| | | | | | Change-Id: I68aecd4b5ea222947ce785c4b83057cc65edf458 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* QMimeType API: allParentMimeTypes -> allAncestors.David Faure2012-01-305-11/+11
| | | | | | | | | Suggested by Lars. Change-Id: Ibaef47854fcf06fb39e7cc9a987557940f5bbe66 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Rename the other findBy* methods to mimeTypeFor*.David Faure2012-01-305-35/+34
| | | | | | | | | These are API changes suggested by Lars. Change-Id: I9bd71120531c8e1f2e9ae9999cd4ce28ae716f2c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Merge findByFile and findByFileName into mimeTypeForFile(flags).David Faure2012-01-3011-132/+143
| | | | | | | | | | These are API changes suggested by Lars. Implement MatchContent. Change-Id: I2baca9c99777573f6a5ac5dbf9221df6b37b01c9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Compile QMimeType &operator=(const QMimeType &other) unconditionally.Wolf-Michael Bolle2012-01-303-8/+0
| | | | | | Change-Id: I9a49845eaf54835e57cfa4dfe125a972026477b4 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org>
* Updated the documentation.Wolf-Michael Bolle2012-01-2711-80/+390
| | | | | | | | | | | | | Added some of the missing licensing information. Corrected types in QML documentation to QML types like string. Corrected wrong function parameter profiles. Marked declarative class as internal. Only their QML documentation is part of the public API. Also, exposed the debugging flags to QML. Change-Id: I41fd8d93e60ba3a7860bca81211321cb46705821 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org>
* Fix allParentMimeTypes including the starting mimetype. Added docu.David Faure2012-01-272-5/+30
| | | | | | Change-Id: I8d238027df522555a7cadc573d713b34e0bab104 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Document genericIconName() and implement fallback from the spec.David Faure2012-01-272-1/+20
| | | | | | Change-Id: Iaeec6f445f6b15ca937e0283be1f9873d4b82b91 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Added missing QT += quick.Wolf-Michael Bolle2012-01-261-1/+1
| | | | | | | Change-Id: Ie3bf6d3b3a4e0e82d5e457061bc2a669448f339c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Add object address to the debug output.Wolf-Michael Bolle2012-01-265-14/+14
| | | | | | Change-Id: Ifd0f56cccb4bf55e562db61ca0907b2e73e2bee7 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org>
* Fix LD_LIBRARY_PATH setting for unit tests.Wolf-Michael Bolle2012-01-263-3/+3
| | | | | | Change-Id: I6399388f62c69548c74e866cb5cd9f2e5b5cb543 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org>
* Complete the renaming efforts.Wolf-Michael Bolle2012-01-261-5/+5
| | | | | | Change-Id: I590a73a9a40a1ef4647c1bd1a5176394e31a0431 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org>
* Rename findByName to findByFileNameDavid Faure2012-01-2513-60/+60
| | | | | | | | | This makes it clearer that it's about file names, and not about mimetype names. And this makes it closer to findMimeTypesByFileName. Change-Id: If407fd775b71e9e75acfbd8725026f7e36fce871 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Implement support for noticing new or modified mimetypes at runtime.David Faure2012-01-239-47/+319
| | | | | | | | | | | | | | | | The binary provider checks the mtime of the mime.cache files, and re-lists mime.cache files (not more often than once every 5 seconds). Upon a change, it simply has to close, open and map() the file again. The XML provider checks the list of xml files found (not more often than once every 5 seconds) and if the list changes, reloads everything. With unit tests for adding and removing a mimetype xml file, both in an existing dir (global) and into a new dir (local). Change-Id: I6347b95502c26b76c05e7fbc7028b62acb240005 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Fix "make check" not running qmimedatabase-cache.David Faure2012-01-131-1/+15
| | | | | | | | | Also grabbed the rest of the settings from qmimedatabase-xml. But maybe that stuff should be shared in .pri files instead? Change-Id: I19c983b0790e4dc5051b7bd73a6e5f88b70855b2 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Get unit tests to work.Wolf-Michael Bolle2012-01-112-2/+2
| | | | | | Change-Id: I0633cca7276f727b99b5675389b9ede3c50733d0 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Faure <faure@kde.org>