summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/qmimeglobpattern.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CoreLib: replace Java-style iteratorsAnton Kudryavtsev2016-03-091-4/+2
| | | | | | | | | ... with STL-style iterators or with algorithms. Java-style iterators have overhead. Change-Id: Ibeace7357c205a39dff3ca3fc0c835a026a15cac Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QMimeAllGlobPatterns: optimize string handling in matchingGlobs()Marc Mutz2016-01-041-1/+2
| | | | | | | ... by not re-creating the same string in every loop iteration. Change-Id: If17c5980bec8276b531267b309578dac8901c93e Reviewed-by: David Faure <david.faure@kdab.com>
* QtCore: eradicate all Q_FOREACH loops [mimetypes]Marc Mutz2016-01-041-2/+1
| | | | | | | | | Saves just shy of 6KiB in text size on optimized GCC 4.9 Linux AMD64 builds, iow: ~0.1% of the total QtCore library size. Change-Id: I087e1e34a64944affb1211e16371e314012c4b2c Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce QT_NO_MIMETYPESérgio Martins2015-02-171-0/+4
| | | | | | | | | | | | | The mime type stuff generates one of the biggest translation units in QtCore due to the compressed 1.7MB freedesktop.org.xml resource. With QT_NO_MIMETYPE, libQt5Core.so is almost 400Kb smaller (4.8MB->4.4MB gcc 4.9 stripped release build) Change-Id: I5339090994034355724ff4deddb64720e81baeaf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QMimeDatabase: Fix handling of duplicate mimetype definitions (2/2).David Faure2013-08-031-3/+5
| | | | | | | | | | | | 7721c3d27c6a fixed the case where two similar definitions are in the same directory. This commit fixes the case where two similar definitions are in different directories, both in the search path (GenericDataLocation). If the file extension gives us the same mimetype twice, there's no conflict, i.e. no reason to fallback to determination from contents. Change-Id: I72c56004b6d5e88964159e53ec160ce8b06c2264 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QMimeDatabase: Fix handling of duplicate mimetype definitions.David Faure2012-11-141-6/+6
| | | | | | | | | | | | | | | When both freedesktop.org.xml and kde.xml define text/x-qml (*.qml), the XML provider would look up *.qml, see two mimetypes, and treat that as a glob conflict, and proceed with contents-based-determination, which for this sample file, would find "C source" due to the C comment. Fixed by ignoring duplicate pattern-mimetype associations. The binary-cache provider doesn't have this problem, update-mime-database already filters out duplicates when generating the on-disk extension tree. Change-Id: Ie335b0b419e7413fa0550779709513f68c2bfc68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+2
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Don't use the QRegExp methods that modify the object [QtCore]Thiago Macieira2012-04-271-1/+1
| | | | | | | | | | | | | | QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: Icf22986cd5f6fd086518c78a7d56e6cadfe9f5f6 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Import QMimeType / QMimeDatabase into QtCore.David Faure2012-02-181-0/+240
History of the development before the import: ssh://codereview.qt-project.org/playground/mimetypes.git Mimetype definitions come from shared-mime-info where available (UNIX systems), loaded using a mmap'ed binary cache generated by update-mime-database. As a fallback if no cache is found, we parse the raw XML files otherwise. This makes the MIME type support fast and with very low memory usage on UNIX, and it makes it easy to use on Windows (no dependency on shared-mime-info, Qt even includes a freedesktop.xml file to use if none are found on the system). Change-Id: I27b05008216ff936dc463bd80d3893422bfb940e Reviewed-by: Richard J. Moore <rich@kde.org>