Commit Graph

50929 Commits

Author SHA1 Message Date
hjk
4e7e5da8eb QtSupport: Don't wait for Help initialization if plugin is disabled
Change-Id: I068d25143399c09393be20b7aa32fe7c6dcb2fe9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-28 11:59:58 +00:00
hjk
1328b04e7b qmake: Simplify QmakeProFileNode::buildDir()
The optional BuildConfiguration parameter is never used.

Change-Id: Ic5773616920702134848507ef2801a7723e8b65c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-28 11:59:46 +00:00
hjk
8b5b1f1de7 CMake: Move CMakeProjectManager::findCbpFile to tealeafreader.cpp
That's the the only user of that code.

Change-Id: Iabc6a1fa9a4ad05c467e8ed64386d3185de25f02
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-28 11:59:07 +00:00
hjk
28b6c4f671 ResourceNode: Add some tests for actual node types
Change-Id: I20297df727adf2058583b64975e7a6848bc80263
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-28 11:32:32 +00:00
Christian Stenger
a2b47b7da2 ClangCodeModel: Fix compile
Change-Id: I648ebd8d898cab3bb121eabf96f2de3d4b28842c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-02-28 11:30:37 +00:00
Eike Ziller
a144160c44 Provide exclusion filters for custom locator filters
Change-Id: Ibd853b456d431ed6fd72d0617b1785b8f305e6c1
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-28 10:48:37 +00:00
Eike Ziller
1f8b2dc361 Advanced search: Add exclusion patterns
All files with full file path matching one of the exclusion patterns are
ignored in the search.
Searching with "git grep" now requires git >= 1.9

Change-Id: Ied5d11499bc1ff21247e50f8e146e8e5011dd2c1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-02-28 10:48:23 +00:00
hjk
99a6d78bba Debugger: Use (only) -thread-group-started as pid notification
The notification exists since GDB 7.4, i.e. no further restriction beyond
our current 7.4.1 minimum requirement, so there's no need to read pids
from tea leaves.

Change-Id: Ibfe14a46059fc1c917ada6ac445b364c958d0b3f
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-02-28 10:19:11 +00:00
hjk
9fd88bbbc3 QtSupport: Add worldsummit16.png to .qrc
Forgotten in 48955493.

Change-Id: I198f8e095d65f835cc2aff822d56ea2a508756ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-28 09:56:57 +00:00
Nikolai Kosjar
d3b51ccda7 Clang: Avoid pointless preamble regeneration on Windows
...on first user modification of the document by ensuring that libclang
sees only one kind of line separators.

This reduces the latency for the very first completion.

Change-Id: I9fdd5641e673a5d07200d61476d56d01db62b89e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-28 09:56:16 +00:00
hjk
7c5f2184c6 Welcome: Move worldsummit16.png to plugins/qtsupport
Alongside the other icons nowadays.

Change-Id: I58bfc605fab1032a2d94a31a46f394bde8c0348e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-28 09:37:43 +00:00
Nikolai Kosjar
d1133916a9 Clang: Fix release build
* The QtTest include is not available in release builds.
* Make the batch file mode only available in debug/test builds as that
  one uses test utilities that are only available in debug builds.

Change-Id: I441c51ec00b14b81a396ad0199882cf46fff10b0
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-28 09:34:55 +00:00
Thomas Hartmann
69ec8054a6 Adjust documentation for QMLPROJECT
Change-Id: Ibb80bf3d966f67577bcfcb499c9dfa5cac405129
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-02-28 09:34:09 +00:00
Thomas Hartmann
ae6874b26d QmlDesigner: Adjust padding
Task-number: QTCREATORBUG-17770
Change-Id: I8dc0b67a365b6ef4a79d440b8fec1a8b6a5dd44a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-28 09:34:00 +00:00
Thomas Hartmann
569cdadebc Wizards: Fix wizard for .qmltypes
The wizard got forgotten during some cleanup.
I changed the name and description to emphasize prototyping.

Task-number: QTCREATORBUG-17771
Task-number: QTCREATORBUG-17708
Change-Id: I1d46737aba40abf3cd13effc50991cdb789980e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-02-28 09:32:52 +00:00
hjk
7c29ae462b Debugger: Fix crash in combined debugging
Fixes regression introduced in f8ad72deb3: Slave engines don't
have a RunControl pointer of their own, use the master pointer.

Change-Id: I1c695a1454cafc3532fb1b79374fac4f3ead607e
Reviewed-by: hjk <hjk@qt.io>
2017-02-28 08:00:05 +00:00
Thiago Macieira
bfb1a084dc Add the JSON syntax highlighting file
Like XML (which is already present), it's very useful.

Source: https://cgit.kde.org/syntax-highlighting.git/plain/data/syntax/json.xml

Change-Id: Idd5ceba1eba34cb78c46fffd14a738f347db0d19
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-02-28 06:35:07 +00:00
Tobias Hunger
ada3f4ba95 ProjectExplorer: Retrieve output from Journald more reliably
Retrieve output from Journald more reliably.

Change-Id: Ic733698e7ed3717841a5a902c4f1e9e94d952885
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-02-27 16:32:44 +00:00
hjk
18fe7b3c7e CMake: Remove unused function CMakeManager::createXmlFile
Change-Id: I084b5dd4f07d709fdf5a1fd65884df8c741bbb86
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 15:24:28 +00:00
Montel Laurent
1da4966b26 CPaster: Replace 0 by nullptr
Change-Id: Ic916a6b464951ea319345333c0c7188852f58d8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-27 14:35:06 +00:00
Eike Ziller
1704c484a8 Merge remote-tracking branch 'origin/4.2'
Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
2017-02-27 15:17:37 +01:00
Orgad Shaneh
0995cf22ab Gerrit: Store full user details in server
This is needed for REST, which never returns user name (only account id,
full name and email)

Change-Id: Ia4e3cca15a80a26b26f5f69edfc83a18e4c1fa1b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 13:57:31 +00:00
Orgad Shaneh
bae0f1406e Gerrit: Some more cleanup in the parser
Remove const QStrings for keys. Use string literals instead.

Change-Id: I03c055b4fb53c5cceb5b67c7c9cd8df708130d05
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 13:57:22 +00:00
Orgad Shaneh
1418d6ab1c Gerrit: Factor out user parsing
This has several advantages:
1. It removes duplicate logic.
2. It is now clear where we use username and where full name.
3. Reviewers now appear with full names (broke by
   9f697128c3).

Change-Id: I5729abc9006cec0d0cb615b01c8ace5def60ce27
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 13:57:16 +00:00
Orgad Shaneh
1e89c617f4 Gerrit: Refactor actual output parsing from its setup
Change-Id: I5cf4c75dfbe1620a59cebc756e4e138957cf635e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 13:57:11 +00:00
Eike Ziller
d64e17ad55 Move mimetype definitions to plugin specs
- 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>
2017-02-27 13:54:59 +00:00
Nikolai Kosjar
ca1d1dfbe2 Clang: Add possibility to "pgo-train" libclang with a batch file
This allows to start Qt Creator in batch processing mode:

  $ export QTC_CLANG_BATCH=/path/to/file
  $ export QT_LOGGING_RULES=qtc.clangcodemodel.batch=true
  $ ./qtcreator -load ClangCodeModel

The batch file will be executed and Qt Creator will exit. Advanced
logging output can be activated as stated above.

Note that it is required that the project was already configured/set up
properly with the used settingspath, otherwise the wrong configuration
will be taken or a pop-up dialog will block the execution.

A small example follows that covers all the understood and so far needed
batch file commands in order to train libclang for profile guided
optimization. ${PWD} expands to the directory of the batch file.

    openProject "${PWD}/calendarwidget.pro"

    # Initial parsing
    openDocument "${PWD}/window.cpp"
    closeAllDocuments
    openDocument "${PWD}/window.cpp"

    # Reparse
    setCursor 478 1
    insertText " "
    insertText " "
    insertText " "

    # Completion
    complete
    complete
    complete

    # Member completion
    insertText "comboBox->"
    complete
    complete
    complete

    # Wait in order to inspect the result
    processEvents 3000

Change-Id: I7dc5dddc6752272ecc2fb4f30497b17cee3f9a9f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-27 13:29:50 +00:00
Tobias Hunger
f8ad72deb3 Debugger: Report PID back to RunControl
Change-Id: I4830d2703de86c3fce8356271a2262c14c8f1307
Reviewed-by: hjk <hjk@qt.io>
2017-02-27 12:34:03 +00:00
Nikolai Kosjar
d8d1511be1 CppEditor: Fix InsertQtPropertyMembers test
Broken by

  commit d6e81eb49e
  CppEditor: Emit member variable for qproperty refactoring

Change-Id: I5e86f0fb1942a497c4242b6f1890e74eb55b687c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-27 11:40:45 +00:00
Robert Loehning
3b89c766f6 CppEditor: Add guard in CppEditorWidget::projectPart()
All other functions using d->m_modelManager already have
such a guard so I assume it makes sense here, too.

Change-Id: Ie503d126230d266f57fceba9d9bae1b49849c7cd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-02-27 11:02:27 +00:00
Robert Loehning
126a031ee2 Squish: Wait a second in checkNavigator()
Change-Id: I45bad30e28f7374ae10d5b0155e08d8297f44448
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-27 11:01:44 +00:00
Orgad Shaneh
d319e66811 Gerrit: Add curl to settings
Will be used for REST queries.

Change-Id: Iad5c70c8451764da691120b42e45d0991a757149
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-27 09:58:28 +00:00
Christian Stenger
a803ee062b Tests: Avoid race condition when building with multiple jobs
Change-Id: Ia5a110812694d03e6f6e02cf66b4aaf209224910
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-27 08:34:07 +00:00
hjk
bcc20d1a2b PythonEditor: Remove unused tracking of open projects
Change-Id: I740ea3e1b546f0c4760765696fc6adb47790bed5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-27 07:01:13 +00:00
Lorenz Haas
b72fa1f359 Beautifier: Simplify small code fragment
Change-Id: I906d7803ccc6856b09fc25fdea7c7c3d112f4e77
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-25 11:12:58 +00:00
hjk
0264053d9b qmake: Avoid passing some context menu data by side channels
... and the need temporarily storing them by creating them when needed.

Change-Id: I930dd34bc7682f3d4fb40bd8da132f52ba32414b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-24 17:02:57 +00:00
hjk
3e225628ee Revert "Clang: Add possibility to "pgo-train" libclang with a batch file"
This reverts commit 07f4ae6227,
which broke compilation

clangbatchfileprocessor.cpp:170:27: error: ambiguous overload for
    'operator==' (operand types are 'const QChar' and 'char')

and only worked in QT_TEST=1 cases.

Change-Id: I089427359958221882cb4e4369c4b88d71779acf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-24 16:49:18 +00:00
hjk
92d818f327 qmake: Keep list of executables if none is marked qtc_runnable
Change-Id: I9d20e0f81c7140cb400d479f4f11f82f7b56fdaa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-24 16:48:34 +00:00
hjk
4275182cf9 QbsProject: Remove some more cached current item pointers
Access on-the-fly is cheap and guaranteed to not produce outdated
data.

Change-Id: I770760f0216a61309d65ddc29b405991d95fc64b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-02-24 15:19:10 +00:00
Vikas Pachdha
0e814daa5e Android: Ask to uninstall the app on version downgrade
Deploy step succeeds with error INSTALL_FAILED_VERSION_DOWNGRADE

Task-number: QTCREATORBUG-17789
Change-Id: Ib1c3023cbea7df1802ce967f10b549db7208aa17
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-24 14:02:11 +00:00
Nikolai Kosjar
d6e81eb49e CppEditor: Emit member variable for qproperty refactoring
For a line like

    Q_PROPERTY(bool foo READ isFoo WRITE setFoo NOTIFY fooChanged)

the generated setter will now "emit fooChanged(m_foo)" instead of "emit
fooChanged(foo)".

Change-Id: I417607ea614bfde0aafa6de401ffa888daf37c4c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-24 13:57:36 +00:00
Nikolai Kosjar
1aaf840f3f CppEditor: Remove superfluous "..." for qproperty refactoring
Change-Id: I79229b47514f0a420c13351673f018bbf564ae56
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-24 13:57:31 +00:00
hjk
6d723dfa6f ProjectExplorer: Remove arguments from node change signals
This discourages storing the pointers needlessly. The items
are still easy accessible by the static ProjectTree::currentNode()

Change-Id: I3c0cd019e9fdc382afacbc9d9de3b97d5f58ae1e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-24 13:17:46 +00:00
Marco Benelli
a7809d4f5e SCXML Editor: fix behavior of else and elseif tags
SCXML specify that the <if> tag contains elements separated by tags
<else/> and <elseif/>.
The SCXML Editor used to nest instruction inside the <else/> and
<elseif/> tags.
This patch implement the correct behavior, so each new inserted element
is appended inside the wrapping <if>.  Note that the new elements are
always inserted as last child of <if>.

Task-number: QTCREATORBUG-17674
Change-Id: I327941bbbd8b0cc04b0c26553257ccb2a24c8306
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-02-24 12:18:09 +00:00
Ulf Hermann
c84f650fb2 QmlProfiler: Integrate QmlProfilerDataModel into model manager
There is no need to keep them separate as the data model is not
accessed from the outside anymore. This removes a lot of indirection.

Change-Id: I91da4dfa816295300c8cfcca22430d5c5b3298c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-02-24 11:55:53 +00:00
Ulf Hermann
78daf47a25 QmlProfiler: Remove references to QmlProfilerDataModel
We keep it private to QmlProfilerModelManager and proxy the last few
methods that were directly called on the model. This enables us to
remove the QmlProfilerDataModel class by integrating what is left of it
into QmlProfilerModelManagerPrivate in a next step.

Change-Id: Ie9b4e03fb286e5a0040374d00b7b26f810426278
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-02-24 11:55:45 +00:00
Ulf Hermann
2b75df2139 QmlProfiler: Simplify buffer handling when loading trace
The inserting of events into the buffer is not the bottleneck here.
The book keeping is probably more expensive than just always using
all the events contained in a chuck from the file for one batch.

Change-Id: I75a936fdf9e3a1d9675b44d67b98f14594f87ffd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-02-24 11:55:34 +00:00
Ulf Hermann
bf69eb9467 QmlProfiler: Guard against the temporary trace file going away
If we cannot open a temporary file to cache a trace or retrieve a
previously cached trace, the QML profiler won't work correctly. Show
an error in this case.

Change-Id: I468d74d9c33033b9ad19501bccbd69a9fe164fed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-02-24 11:55:16 +00:00
Ulf Hermann
1ee8d0fb64 QmlProfiler: Improve error and progress handling for loading and saving
* Clear the trace and send the loadingFinished() signal when loading
  fails or is canceled. loadingFinished() re-enables the UI, which is
  in fact important.

* Check more consistently for whether the operation was canceled and
  add a separate signal for that.

* When saving fails or is canceled, remove the half-written file.

* Don't try to guess the number of events for progress reporting when
  saving. Use the event timestamps and start/end time instead.

* Properly initialize the progress range in all cases.

* Drop the bool return value from the load methods. Nobody uses that.

* Send loadFinished() only after loading a file, not every time we
  reach the Done state.

Change-Id: I507f11c667e20534ea335e84798de11aa06fb6f2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-02-24 11:55:10 +00:00
Nikolai Kosjar
07f4ae6227 Clang: Add possibility to "pgo-train" libclang with a batch file
This allows to start Qt Creator in batch processing mode:

  $ export QTC_CLANG_BATCH=/path/to/file
  $ export QT_LOGGING_RULES=qtc.clangcodemodel.batch=true
  $ ./qtcreator -load ClangCodeModel

The batch file will be executed and Qt Creator will exit. Advanced
logging output can be activated as stated above.

Note that it is required that the project was already configured/set up
properly with the used settingspath, otherwise the wrong configuration
will be taken or a pop-up dialog will block the execution.

A small example follows that covers all the understood and so far needed
batch file commands in order to train libclang for profile guided
optimization. ${PWD} expands to the directory of the batch file.

    openProject "${PWD}/calendarwidget.pro"

    # Initial parsing
    openDocument "${PWD}/window.cpp"
    closeAllDocuments
    openDocument "${PWD}/window.cpp"

    # Reparse
    setCursor 478 1
    insertText " "
    insertText " "
    insertText " "

    # Completion
    complete
    complete
    complete

    # Member completion
    insertText "comboBox->"
    complete
    complete
    complete

    # Wait in order to inspect the result
    processEvents 3000

Change-Id: Ib30526036f999e530f0c01d42a196a1e311e2c4c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-24 11:12:15 +00:00