Commit Graph

32962 Commits

Author SHA1 Message Date
Christian Kandeler
030c380444 Fix qbs build.
Change-Id: I60ebf68a9885054802ee48f80f260ea45c1257ef
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 17:59:16 +00:00
Eike Ziller
aa33ad8d6a Mime settings: Allow editing mime type patterns and magic rules
Change-Id: Icb4b1d5ad5f3535545b5b4e5d398ef27d32b907c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 17:27:06 +00:00
Eike Ziller
bb08bb3f13 MimeDatabase: Fix compilation with namespaced Qt
Change-Id: I977a115e75302a5341352b593bf3182c0b093031
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-17 17:01:08 +00:00
Eike Ziller
4f5f5d75b4 MimeDatabase: Never use installed mime data.
It gets in the way, e.g. "No plugin can open project type "application/
x-kicad-project"" when trying to open .pro files.

Change-Id: I5d8dcb52b65b1e617fe0c6dfcdc94e2cf8fc5f5d
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 15:55:02 +00:00
Eike Ziller
0e39023cb0 MimeDatabase: expose MimeMagicRule::makePattern
It is necessary for validating pattern values and masks before trying to
create a MimeMagicRule instance (which asserts on invalid entries).

Change-Id: I6aa31dc9b1f700317e9696be8193bbc8aaf5ace2
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 15:19:19 +00:00
Eike Ziller
2ed31967c4 Mime type settings: Restore user changes
Change-Id: I6c83989113de3beb5d27eb7c39b5c9e825b541e8
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 15:19:17 +00:00
Eike Ziller
afa2212f8d MimeDatabase: Allow overriding pattern and magic matchers of mime types
Change-Id: I1e2f59c98ab69ccee1eb2eaa8bc6ce918302c6cb
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 15:19:13 +00:00
Eike Ziller
3373390048 Mime type settings: Show magic matchers for mime types
Change-Id: I40f024b51e20717aa4bc74351bb5996b31f3a869
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 15:19:10 +00:00
Eike Ziller
178b023f94 MimeDatabase: Provide access to mime magic rules
Change-Id: I9d03db685200e86f71e15fe596b67db1d386eb19
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 15:19:07 +00:00
Nikita Baryshnikov
d3de8bb386 Locator: small clean up
Change-Id: I748ed068af3f698e256505c547e16480a26b57b9
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 14:47:56 +00:00
Daniel Teske
450d4fd225 QmakeProjectManager: Remove unnecessary imports into namespace
Change-Id: Iba009ff33cc3f2f12a3561dc92f2a6dd175147af
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-17 14:02:56 +00:00
Daniel Teske
a19bda48fc ProjectExplorer: Remove setNodeType
The only two cases where it is used, the type can easily be passed to
the constructor. So do that.

Change-Id: I1658a377aac56b5332992c445fba39b00620a74b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-17 14:02:50 +00:00
Nikita Baryshnikov
f5a3462542 MimeDatabase: compile fix
Change-Id: Ib44e4ee0855e46a444ae7bdb3603f798892f0625
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:54:14 +00:00
Nikolai Kosjar
9fb5b0be15 CppTools: Add basic completion support for qt5 style signals/slots
Trigger completion for Qt5 signals/slots as soon as the user types '&'
in

    connect(object, &
    connect(object, &Foo:signal, object2, &

Change-Id: I338a26415196959e3dc413bdfd023314812f3aaa
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-17 13:47:38 +00:00
Tobias Hunger
6546a292c2 Gerrit: Properly sort timestamps in Gerrit dialog
Task-number: QTCREATORBUG-13602
Change-Id: Iba4b2d85d6b75752214b4f53684b9e90df9b1b69
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-17 13:46:02 +00:00
Nikolai Kosjar
ee64a062b1 Clang: Fix compilation
clangcompletion.cpp:1098:5: error: no type named 'MimeDatabase' in
    namespace 'ClangCodeModel::Utils'

clangcompletion.cpp:1099:11: error: no type named 'MimeType' in
    namespace 'ClangCodeModel::Utils'

Change-Id: If83c09f7b7b6d4599b862c2d9a0fa49e446178f0
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:39:32 +00:00
Lorenz Haas
b4902e5f1b CppEditor: Fix Doxygen continuation handling for "//!"
Change-Id: Ib1e3183a85b55a894964f56458512aca1fafc2ea
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-17 13:16:14 +00:00
Eike Ziller
5a3a940ad3 Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:00:07 +00:00
Eike Ziller
365c1ddb90 MimeDatabase: Add bestMatch(fileName, listOfMimeTypesToCheck) method.
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>
2015-02-17 12:41:09 +00:00
Eike Ziller
013e10fda8 MimeDatabase: Add allGlobPatterns and allFiltersString
Change-Id: I255d1ef3140b220de9bdc279788abf3fecb16af9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 12:41:01 +00:00
Eike Ziller
b4f494f6c7 MimeType: Add matchesName and setPreferredSuffix
Change-Id: Ieef09fb6d483a6c056f3ae586db30583c634953a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 12:40:58 +00:00
Eike Ziller
f132649864 MimeDatabase: Add API for adding mime types from xml files
Change-Id: I43e5ef02322636b8212c860f419309323f23445b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 12:40:55 +00:00
Eike Ziller
27a3c0703f MimeDatabase: Never read XML files multiple times.
Change-Id: I84bf07b2524d87ace7ce33fe21854f4ae2609f44
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 12:40:52 +00:00
Eike Ziller
306b28dd8d MimeDatabase: Restrict to using XML mime provider
Change-Id: I335a675d24cd319a5d1d47bb8e8e1ab154d10cef
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 12:40:49 +00:00
Eike Ziller
15d748b4eb Add copy of QMimeDatabase
Adapting the names and namespaces.

Change-Id: I15b161dfafd5a4112b420160816ee8336e3ebdac
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-17 12:40:41 +00:00
Christian Kandeler
fb23daaf0a Update qbs submodule.
To HEAD of 1.3 branch.

Change-Id: I4abd1fa5392794edb445cfd31a671570864438a6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 12:34:09 +00:00
Thomas Hartmann
ed49052f6a QmlJSEditor: Adding and exporting helper function for usages
This patch adds and exports findUsageOfType() which can be used in
e.g. the Qt Quick Desigener.

Change-Id: I6e87df746bdb377485da052823f86b89d638ac2f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2015-02-17 11:19:59 +00:00
Christian Kandeler
38609296d1 Find widget: Give feedback to user about whether search has succeeded.
Right now, the only way for a user to find out whether a search term was
found is to scan the editor window for marked strings, which is a drag
in the negative case. Also, an ongoing search is practically
indistinguishable from a failed one.
Therefore, color the search term red if the search has failed.

Change-Id: I57441c3804043e1dcfb33638844b4550abd5ac46
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 10:28:11 +00:00
Daniel Teske
14fd54e900 Android Device Dialog: Makie error reason bold
Change-Id: Id96d2ac1b61fb1c4701db4fd4532c711689aac58
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-02-17 10:15:37 +00:00
Orgad Shaneh
831fb6181e CppTools: Remove assertions for CppModelManager::instance()
It cannot return null.

Change-Id: I3ac5f33e7e02554edc8df067c7b85518e58c1fc2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-17 10:11:29 +00:00
Eike Ziller
a22dc36aaf Generic highlighter: Fix matching the right definition
No longer uses artificial mime types for highlighting files that do not
specify a mime type. No longer registers mime types that are specified
but that Qt Creator does not know about.

Instead, try to match the mime type, and if that fails, or if the result
does not match the file name pattern, try to match file name patterns
instead.

This also fixes the potential problem that mime types were always only
added, never removed, even if the user removed definitions and triggered
a reparse.

Also fixes that a highlight definition in the fallback location could
overwrite a highlight definition in the preferred location, if it has a
higher priority setting.

Task-number: QTCREATORBUG-13912
Change-Id: I86ce10f4f4341f6add0d2b58a04f080501d0cbf4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 09:55:30 +00:00
Adam Strzelecki
425811291d C++: Basic support for C++11 user-defined literals
1. Extends lexer so digit or string can be followed by underscore '_' and
   alphanumeric defining literal.

2. Extends parser so it accepts operator"" _abc(...) user-defined literal
   definition.

3. Adds Token::Flags.userDefinedLiteral bool flag field representing if token
   carries user-defined literal.

4. Adds C++11 auto tests case with: 12_km, 0.5_Pa, 'c'_X, "abd"_L, u"xyz"_M

5. All optional suffix scanning methods now return boolean if the suffix was
   found.

6. Adds C++ Lexer tests for user-defined literals with C++11 feature enabled.

This change however does not make QtCreator understand user-defined literal
semantics, e.g. properly resolve type when applying custom literal operator.

Change-Id: I30e62f025ec9fb11c39261985ea4d772b1a80949
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-17 09:45:34 +00:00
Tobias Hunger
c1dbcfb204 DiffEditor: Move SelectableTextEditorWidget to internal
Change-Id: I4fefca2c780f17c68e73bbdaee9528c8945c00e4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 17:15:10 +00:00
Tobias Hunger
f10fd0ef5e DiffEditor: Make DiffEditor internal
Change-Id: Ife1d3d1efa2b89e3eccadec26d7c22cf86620911
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 17:15:04 +00:00
hjk
233da494b2 ProgressManager: Return ProgressManager* from instance
Works better with Qt5-style connects.

Change-Id: I7916369762fa51f24664149f85208b1eb5c7a62e
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 17:13:43 +00:00
Orgad Shaneh
f5fcb3dd92 Core: Use FileName for DocumentModel::Entry::fileName
Change-Id: I81d0aea2354a9d0461646590f06bb38bd4366f29
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 16:14:01 +00:00
Joerg Bornemann
92b545807f Utils: fix QtConcurrent::run(std::function)
The std::function template parameter must be the same for run
and StoredInterfaceFunctionCall0. Otherwise gcc 4.9.1-19 yields
errors.

Change-Id: I9d4af89320cebd33451d5643ec3d7af08595a786
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-02-16 16:11:10 +00:00
Daniel Teske
cb48e4854a Android 64bit toolchains
Change-Id: Ia2b57013b392237434ea3649c4f60a671e84ceb5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-02-16 16:04:03 +00:00
Daniel Teske
e1c426f2bc Android: Offer api level 21 in AndroidManifestEditor
Change-Id: Ieeea779378c63def7321731efa5bd29994dade35
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-02-16 16:00:01 +00:00
Daniel Teske
6db05d7c8e Android: Fix connection to slot isAutoDetected
Change-Id: I7c3ba4dd2048b304d95a429c37083f78c8561c29
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-02-16 15:59:55 +00:00
Tobias Hunger
1cc01fa18d DiffEditor: Make SideBySideDiffEditorWidget internal
Change-Id: I794282d23dc13525fbc9ad327cfa8dce2c28fbca
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:29 +00:00
Tobias Hunger
a96a62c941 DiffEditor: Make UnifiedDiffEditorWidget internal
Change-Id: I4c65190be212ed43cd0150d6f33a944e8accd73d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:25 +00:00
Tobias Hunger
2a01738ffb DiffEditor: Make DiffEditorGuiController internal
Change-Id: I657085535b7f141c97bc3d054e9edfd236209981
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:20 +00:00
Tobias Hunger
956abd2803 DiffEditor: Make DiffEditorDocument internal
Only expose Core::IDocument and keep DiffEditorDocument internal
to the DiffEditor plugin.

Change-Id: If39b82e2f20d40a65284503b4d4fd8dad919ad3a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:16 +00:00
Eike Ziller
e7fb05e038 TextEditor: Simplify configuring generic highlighter
* configureMimeType -> configureGenericHighlighter, since that is what
  it actually does.
* setupAsPlainEditor -> setupGenericHighlighter, since that is what it
  actually does
* avoid multiple highlighting definition lookups
* unify code paths by not separately creating generic highlighters
  through the factories

Change-Id: I9579ca5736bbf08c01b8e41b63c6b9f36bdc725e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-16 15:45:36 +00:00
Alessandro Portale
2aa315d05c Qt Quick Designer: Move valgrind icon to valgrind plugin
The "eye_crossed" icon is defined in one place and used in a
totally different up.

Change-Id: I392b5c1b8cf80803d0416ae272ded369f06ca405
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-02-16 15:45:03 +00:00
Orgad Shaneh
a260afe004 Gerrit: Place gerrit and origin remotes first
Change-Id: Icf74210934b92c3f794ccc764b8e526d51eafc2b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-16 15:29:39 +00:00
Orgad Shaneh
7471187404 Gerrit: List remote branches also for non-fetched remotes
Task-number: QTCREATORBUG-13718
Change-Id: I0259d06f4f06b68af459d747176dc46b14a55008
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-16 15:29:25 +00:00
Orgad Shaneh
bd5afaf4c6 Gerrit: Gracefully handle error retrieving branch distance
Change-Id: If4f6babe654a6f667c36ac3afb851b078439d3b6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-16 15:29:21 +00:00
Marco Bubke
143e23f4d1 Cvs: Use AsynchronousMessageBox
Event loops can lead to crashes so it is better to use a dialog which has
not it's own event loop.

Change-Id: Iaa97b7696c693b064ac4fa2f00d57a09e7e3c303
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-02-16 15:27:11 +00:00