summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes
Commit message (Collapse)AuthorAgeFilesLines
* Add QDebug operator for QMimeType.David Faure2014-03-132-0/+18
| | | | | | Task-number: QTBUG-35686 Change-Id: I72be7cf9374f86e8cb3e6946129bbfec8fec9616 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing Q_INIT_RESOURCETor Arne Vestbø2013-11-071-0/+6
| | | | | | | | | | | The library needs to do Q_INIT_RESOURCE for all resources it uses internally, otherwise static linking will fail, and the user has no idea how to rectify it as the name of the missing resource is not known. The Q_INIT_RESOURCE needs to happen outside of any namespace, hence the use of static initResources() functions. Change-Id: I8f7d36b440b05809d97dd489cf8789f345633cec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-5/+5
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-271-0/+8
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.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>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-061-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreen.cpp src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
| * QMimeDatabase: pass MatchMode down, to fix MatchContent.David Faure2013-03-011-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-29702 Change-Id: I2f1538adbf8e7a5edfc4276585bf4ef04ce69874 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-292-6/+0
|/ | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1816-16/+16
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove documentation for deleted methods, to fix a qdoc warningDavid Faure2012-12-141-14/+0
| | | | | | | | The methods were removed in 6cac729ae4181414f0b80361cdae3c30a3c99ca1 Change-Id: I0b4e32a143af877181e939241b6a00f5532db40d Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QMimeType: don't document the constructor that takes a Private classDavid Faure2012-11-301-0/+1
| | | | | | Change-Id: I238e1eca6938deb728085a5416220230d9e751c7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add more qtbase implictly-shared classes to the listGiuseppe D'Angelo2012-11-301-0/+1
| | | | | | | QText*Format and QDns* ones are still missing. Change-Id: I8e87fba596e87289ca935717e0a90bfc0b0a26c0 Reviewed-by: hjk <qthjk@ovi.com>
* Add QMimeType::aliases().David Faure2012-11-224-0/+50
| | | | | | | | | Requested by Allan Sandfeld Jensen for QWebkit, which needs to register upfront all the mimetypes that a given plugin can handle. Change-Id: I64b8d39c7988adfc7db4ed8bfdc73acd16e999da Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMimeDatabase: remove deprecated APIDavid Faure2012-11-201-9/+0
| | | | | | | | c241d8921ea6384c30a1731a036aec8edc7609ab renamed the methods but kept the old ones "for a week or two" at Thiago's request. Change-Id: I0747c032b549e45f6c8201db577d84863f39f599 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Document what the QMimeDatabase constructor really does.David Faure2012-11-191-1/+6
| | | | | | Change-Id: I8d4dcc92296163dea7b78fbb0ceefaee08e57a94 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Allan Sandfeld Jensen <kde@carewolf.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>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-261-1/+1
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2216-384/+384
| | | | | | | | 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>
* Fix missing or improper include guard in headersSergio Ahumada2012-09-091-2/+2
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Icf7d7d4bed91443b3b21ef5d4219dbd260dffef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Check for C++ operators that should be 'const'Sergio Ahumada2012-09-082-2/+2
| | | | | | | | Make sure all C++ class comparison operators are const. Change-Id: Ib4a66f2afe6c62f437dae1ecde94287d3db8442d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <faure@kde.org>
* add macro wrap for QXmlStream related codeJing Bai2012-08-312-0/+13
| | | | | | | | To fix a compile error when QXmlStream is removed by defining macro, but it is still used in some files. Change-Id: I776c799732212b7401767440448248fc7b5dc480 Reviewed-by: David Faure <faure@kde.org>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-235-0/+7
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtCore: use new qEnvironmentVariableIs{Set,Empty}()Marc Mutz2012-08-141-1/+1
| | | | | | | | | | | | In particular, qEmergencyOut() is now completely exception-free. Incidentally, this patch shows that Qt isn't consistent in how it treats empty environment variables used as flags, but that is something for a separate commit. This patch aims to be behaviour-preserving, except in exceptional circumstances, of course. Change-Id: Ie106e7b430e1ab086c40c81cc1e56cd0e5400cb4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some syncqt warnings.Lars Knoll2012-08-012-0/+4
| | | | | Change-Id: I6f432ee991f4bde217fa27d4004ef318f1d480e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix QMimeDatabase qdoc errorsJeremy Katz2012-07-271-2/+28
| | | | | | | | Some of the \sa lines were missing () after function names. Document MatchMode and the deprecated mimeTypeForNameAndData() Change-Id: I468b9741908beb7be5723a8bb927e5418fc1c344 Reviewed-by: David Faure <faure@kde.org>
* fix "No such ..." for QMimaeDatabase::mimeTypeForFile()Jeremy Katz2012-07-191-1/+1
| | | | | Change-Id: Ife8e361524ac324ce2cfb20d952db5be042fecc1 Reviewed-by: David Faure <faure@kde.org>
* QtCore: mark some classes as sharedMarc Mutz2012-07-101-0/+2
| | | | | Change-Id: I811d3eebd87c230883cc579c20f9fa4e14ff9521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMimeType: document preferredSuffix()/suffixes() betterDavid Faure2012-07-081-2/+3
| | | | | | | Change-Id: Icf4aab3516cd622d9932e32cb0bd819bef22ce9b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Fix QMimeType::operator== to only compare mimetype names.David Faure2012-07-082-20/+3
| | | | | | | | | | The name is the unique identifier. Code such as if (oldItem.mimeType() == newItem.mimeType()) really wants to detect whether the item has a new mimetype (name), not compare static mimetype data such as comments and icons. Change-Id: I5fe56443295c91e1024c066ad6e7f93d842ae507 Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Remove debug outputABBAPOH2012-06-272-68/+0
| | | | | | Change-Id: I07270211ee6f0439dc7249c8946795a68025828f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: David Faure <faure@kde.org>
* Rename QMimeDatabase method for consistency.David Faure2012-05-153-10/+19
| | | | | | | | Name is about mimetype names, while FileName is about, well, file names. Task-number: QTBUG-25748 Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671 Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* QMimeType performance fix: don't reload from XML files over and over.David Faure2012-05-073-1/+8
| | | | | | | Change-Id: Ie19c338ed6449ea1509306cbda5dc251295783ae Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.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>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-1/+1
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Include with qt module to avoid configure warningPekka Vuorela2012-04-051-2/+1
| | | | | Change-Id: I8d338f22c4b0dabcca33878b33c6a203828d84c5 Reviewed-by: David Faure <faure@kde.org>
* Fix warnings about truncations in constants.Friedemann Kleint2012-04-031-1/+1
| | | | | Change-Id: I46872c5b2866454112092c1ec5efbfe15db5af33 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove extra lines in mimetypesABBAPOH2012-04-019-10/+0
| | | | | Change-Id: Ic7ec295b2a0b23a21f44f880f29df13503f8ef3a Reviewed-by: David Faure <faure@kde.org>
* Remove QMimeTypeParserBase from docABBAPOH2012-04-011-0/+1
| | | | | Change-Id: I64d6b4f3209316e28bddb98f221a2c5a45e3e3d0 Reviewed-by: David Faure <faure@kde.org>
* Fix wrong method signature in documentationABBAPOH2012-04-011-1/+0
| | | | | Change-Id: Ib1b4ce93e8d584e07e69253231c3c993627f00db Reviewed-by: David Faure <faure@kde.org>
* Make comment() work in the C locale too.David Faure2012-03-221-1/+2
| | | | | | | | | The parser makes the default language en_US, and no mimetype xml says <comment xml:lang="C">, so use the en_US string for the C locale, rather than returning an empty string. Change-Id: Iad7c142e8078abe357773249416e7ce9b3e29a92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removed move constructor.Wolf-Michael Bolle2012-03-162-21/+0
| | | | | | | | | | | | | All C++-2011-specific constructors, operators and methods may be inline only in Qt. Since an implementation in the header file does not seem to be possible for QMimeType without breaking backward compatiblity the move constructor has to disappear altogether. See also the discussion at http://codereview.qt-project.org/#change,19150 Change-Id: If07347a51a1ae5bd4c2d292dac835592ede4b370 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove commented 'comment'ABBAPOH2012-03-101-3/+0
| | | | | Change-Id: I996a34fb2dc91da8b68039b4bc797a255c99d2e0 Reviewed-by: David Faure <faure@kde.org>
* Fix commas according to qt coding styleABBAPOH2012-03-101-6/+6
| | | | | Change-Id: Ibf49f1c3d426917d1cfcb382c8ed2771d43d6e99 Reviewed-by: David Faure <faure@kde.org>
* Remove calls for default constructorsABBAPOH2012-03-091-6/+0
| | | | | | Change-Id: Ib33013bed9e6b7bb9ef54c858da5cd61f35f2c41 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Build fix when use '-no-stl' optionYuchen Deng2012-03-081-0/+2
| | | | | | | | error C2039: 'move' : is not a member of 'std' error C3861: 'move': identifier not found Change-Id: I40beb59f893a8969275154664c947889eb570c95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMimeDatabase: Fix crash on empty filenameDavid Faure2012-03-061-0/+2
| | | | | | | | | This is due to the search in the suffix tree starting at position fileName.length() - 1. Change-Id: I98501c1724c7dde2626351ace8ba19faa0d2e1e1 Reviewed-by: Ivan Komissarov <ABBAPOH@nextmail.ru> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* Fix doc according to current method signatureABBAPOH2012-02-261-1/+0
| | | | | Change-Id: I23d0f7a88f4c092c1e7cd2742fdf6e6f68ad485a Reviewed-by: David Faure <faure@kde.org>
* qmimetypeparser: more optimized definition of string constantsDavid Faure2012-02-242-45/+21
| | | | | Change-Id: I0cbc0fef63814ab037bea66ab35b3aa8b6ec800c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QMimeMagicRule: declare as Q_MOVABLE_TYPEMarc Mutz2012-02-241-0/+1
| | | | | Change-Id: I3725696e7369eb59eeb08095ffe0b8aa7537b4f3 Reviewed-by: David Faure <faure@kde.org>
* Import QMimeType / QMimeDatabase into QtCore.David Faure2012-02-1819-0/+36053
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>