Commit Graph

39877 Commits

Author SHA1 Message Date
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
Robert Loehning 0c0b0c2f45 Squish: Update DiffEditorWidget in objects.map
Change-Id: I7c3a1f85a379afcc48189b38da20fa63adaa7531
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-17 12:22:28 +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
hjk 5699991a2f Debugger: Remove traces of old autotests
Dysfuncional for a while and mostly replaced by tst_dumper.

Change-Id: I8266f2a680be23bd37d29233b91ce5a9a151163b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-17 08:34:59 +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
Orgad Shaneh 9fd5c44f4b Gerrit: Simplify loop in setRemoteBranches
Change-Id: I9f32080c15ca48a2eb9feb1693eabcc1d8f20dd5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-16 15:23:24 +00:00
Tobias Hunger 53b4da93a2 Core: Remove windowActivated signal from MainWindow
That makes no sense now that we potentially have multiple windows.
It is also not available outside of the Core plugin and unused in
Core.

Change-Id: I32b491e4ec078892e9ad3a8fb62616e4567549a6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:20:18 +00:00
Tobias Hunger 75a823a7d2 VcsBase: Convert VcsBaseSubmitEditor to Qt5 style connects
Change-Id: I18919e963e1bb477dd81088344d1b86001a0e8e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-16 15:20:03 +00:00
Tobias Hunger fc2c615c6a VcsBase: Convert submiteditorwidget to Qt5 style connects
Wrap lines that are too long while touching the file.

Change-Id: I209cf0f3c126748508d07ad1a5fdc7dea0d09c71
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-16 15:19:03 +00:00
Tobias Hunger f10f0b73d4 ClearCase: Do not use ProjectTree::currentProject
That is almost certainly not what you want:-) Use
SessionManager::startupProject instead.

Also use state changed from QApplication in favor of having the
mainwindow notify us about updates. That does no longer work, now
that we have multiple windows.

Change-Id: I27563c8e060ea154c0db5e5777d4b92840f31fa7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:15:49 +00:00
Fawzi Mohamed 6a120df7f7 qmljs: do not look up types in the prototypes
looking up types in prototypes leads to a recursive blowup when resolving
the prototype of a type returns (for incorrect code) the type itself.

Change-Id: Iebcbdda7554e5fe01f0ef323ccc2079888c7ef4e
Task-number: QTCREATORBUG-13906
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-02-16 15:15:33 +00:00
Fawzi Mohamed b3f049aa7d qmljs: load qmltypes even if there is no plugin
Change-Id: Ib193113c2c6bf085765d20e4f8d0b89b43cca0e1
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-02-16 15:10:59 +00:00
Daniel Teske 004735ea48 CppEditor: override -> Q_DECL_OVERRIDE
Pre g++4.7 compilers don't know override.

Change-Id: I07306ebe4f9161bb3806e9b4d1d4a143448c0033
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-02-16 14:49:24 +00:00
Daniel Teske f9130866b8 CurrentProjectFilter: Fix if no file is open
Task-number: QTCREATORBUG-13876
Change-Id: I8ff9c7c8eecd1e6c8da21ac7794a571905b538c2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-16 14:19:39 +00:00
Joerg Bornemann 1d14dbf1aa QmlProfiler: add functionality to search for notes
Added a text field to search for notes within the timeline's events.

Task-number: QTCREATORBUG-13417
Change-Id: Ic121ec8ade42b1ef99d5da13d1f732761d244327
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-02-16 13:57:34 +00:00
Tobias Hunger 4caee9fcbf Gerrit: Polish push to gerrit dialog
Make the UI a bit nicer and simplify the code to find remotes.

Task-number: QTCREATORBUG-13718
Change-Id: I3b973fee30061232188c9aed3ad95abc8f8f095d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-16 13:31:05 +00:00
Ulf Hermann 98ccd012af Introduce perf profiler run mode
Change-Id: I6e53dae3ba42e938b418a6657e677953cf7da4e9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-16 12:03:06 +00:00
Eike Ziller 45e544b442 Merge remote-tracking branch 'origin/3.3'
Change-Id: I79fac4a4e8535153da1b3f73a6b1caad1513ea9c
2015-02-16 12:35:54 +01:00
BogDan Vatra bb0dc34c50 Allow the user to add instantiating components
This feature is needed to enable code-completion in a dynamically loaded
qml file e.g. let's say that Main.qml is our application entry point and
in it will load *dynamically* another qml file: MyView.qml. At runtime
MyView.qml will see all Main.qml ids and properties. The problem is that
QtCreator doesn't know that MyView.qml will be loaded dynamically by
Main.qml and it can't offer code-completion of Main.qml ids and
properties. This patch allows the user to inform QtCreator that
MyView.qml will be loaded by Main.qml using a simple annotation in
MyView.qml: // @scope Main.qml

It also works recursively e.g. if MyView.qml loads dynamically another
qml file (MyView1.qml) and in MyView1.qml we can add "// @socpe
MyView.qml" annotation. This way QtCreator will offer code-completion of
MyView.qml and Main.qml ids and properties when coding on MyView1.qml.

Change-Id: If50aee81cae40c8b95dbb4c0653e5a91f7a4cff4
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2015-02-16 10:56:22 +00:00
Joerg Bornemann 5b6d89dd95 QmlProfiler: use QQuickWidget instead of window container
Using QQuickWidget removes the need for some work-arounds.

Task-number: QTCREATORBUG-11822
Change-Id: I1e344f0a9c11b4aa8601e8e1056602d855fb3f4d
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-02-16 10:52:00 +00:00
Thomas Hartmann 83e128ec79 QmlDesigner.Instances: use TypeName instead of QString
A dynamicTypeName has to be always latin1 so we should use TypeName
instead of QString.

Change-Id: I06c945aa61f677788285cbc8ff8f5811f6c61b0b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-02-16 09:43:41 +00:00
Alex Trotsenko b3d9c5e5e9 Fix TextEditor plugin compilation
Declare classes before use them in QObject::connect().

Change-Id: Id9e8b6f753b303948e0d9d1dc9a29d9592bd6807
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 19:12:51 +00:00
hjk 17bbb4eb8c Debugger: Fix PdbEngine 'stepOut'
It's 'return', not 'finish'

Change-Id: I75bd7dc5f7caff2b63caa54badd958cb27e4e7e3
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 18:14:22 +00:00
hjk 5ee6382728 Debugger: More PdbEngine cleanup
Change-Id: I7b17ffba4f2cc48c7a640e6ccc465e38197777dd
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-13 17:49:12 +00:00