aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/mimetypes/mimedatabase.h
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Consistently use nullptrTobias Hunger2018-05-131-1/+1
| | | | | | | Fixed by clang-tidy modernize-use-nullptr. Change-Id: I93edae67271a521e3b2a1f97f486e5fa97009836 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Utils: Wrap MimeDatabase into static functionshjk2017-03-031-58/+31
| | | | | | | | To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra all over the place. Change-Id: I4bfef62e73275a991455141671d6071162788e9d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Move mimetype definitions to plugin specsEike Ziller2017-02-271-1/+1
| | | | | | | | | | | | - Avoids the hassle of QRC files and manually registering mime types - Avoids performance regressions because of mime types that are registered after mime database has been used - Makes it technically possible to detect that a disabled plugin could handle a mime type if it was enabled Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* MimeDatabase: Add some startup phase trackinghjk2017-01-111-0/+10
| | | | | | | | | ... to warn about situations where Mime types are registered too late (i.e. after Plugin::initialize() or used too early (i.e. before Plugin::extensionsInitialized()) Change-Id: I22681e94bfdd508e954bb3457b834ec3ad1f0fee Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix that it was not possible to save with arbitrary file extensionEike Ziller2016-11-151-0/+1
| | | | | | | | On Windows. Task-number: QTCREATORBUG-15862 Change-Id: I5cc76662e4996bfa26eece09f2e30dc3ce873eb5 Reviewed-by: David Schulz <david.schulz@qt.io>
* Wholesale conversion to #pragma oncehjk2016-03-301-4/+1
| | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-15/+21
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* MimeDatabase: Remove bestMatch, which was broken beyond repairEike Ziller2015-02-271-1/+0
| | | | | | | | | | | | The problem is that, if you check e.g. a .pro file against all C/C++ mime types, and these define magic matchers, it would find that .pro doesn't match C/C++ mime types by extension, so it would open the file to find a magic match. Even though the extension .pro would identify it already as a qmake .pro file when checking for the mime type globally. Change-Id: I3341187e88e2263bf38169c3c99e5d2161e2a9ee Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* MimeDatabase: Allow overriding pattern and magic matchers of mime typesEike Ziller2015-02-171-0/+3
| | | | | Change-Id: I1e2f59c98ab69ccee1eb2eaa8bc6ce918302c6cb Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* MimeDatabase: Provide access to mime magic rulesEike Ziller2015-02-171-0/+2
| | | | | Change-Id: I9d03db685200e86f71e15fe596b67db1d386eb19 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* MimeDatabase: Add bestMatch(fileName, listOfMimeTypesToCheck) method.Eike Ziller2015-02-171-0/+1
| | | | | | | | | | The use case is Qt Creator's C++ model / project parts, where the files of the projects are sorted into C/C++/Objective-C++ Header/Source categories, so we only want to know if a file has one of these 6 mime types. Change-Id: Ia600fa34beb8dfd2fb406c04b2f36e6ab6b25730 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* MimeDatabase: Add allGlobPatterns and allFiltersStringEike Ziller2015-02-171-0/+2
| | | | | Change-Id: I255d1ef3140b220de9bdc279788abf3fecb16af9 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* MimeDatabase: Add API for adding mime types from xml filesEike Ziller2015-02-171-0/+3
| | | | | Change-Id: I43e5ef02322636b8212c860f419309323f23445b Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Add copy of QMimeDatabaseEike Ziller2015-02-171-0/+91
Adapting the names and namespaces. Change-Id: I15b161dfafd5a4112b420160816ee8336e3ebdac Reviewed-by: David Schulz <david.schulz@theqtcompany.com>