Commit Graph

44349 Commits

Author SHA1 Message Date
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
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
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
Christian Stenger
74fb4bb014 AutoTest: Use better names and remove unused code
Change-Id: Ifb7f252e7c3fd020537eb46c62d8f5700b8a55ef
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-24 09:36:28 +00:00
Tobias Hunger
721c902cd8 Qbs: Simplify QbsProjectManager a bit by using member initialization
Change-Id: I848b61bb67023852db51043e9eca0b417c2e6725
Reviewed-by: hjk <hjk@qt.io>
2017-02-24 08:41:38 +00:00
Tobias Hunger
9e8b427a70 ProjectExplorer: Nodes: Do not makeEmpty() as part of buildTree()
Do not call makeEmpty() as part of buildTree(). That makes it
impossible to combine buildTree with manual tree setup.

Change-Id: If0a0d9432fe39870917a6ba31594e8dcd6d31868
Reviewed-by: hjk <hjk@qt.io>
2017-02-24 08:40:04 +00:00
Lorenz Haas
f04c535ad2 Beautifier: Get rid of QRegExp
Change-Id: If3f7e6d93ef1f0b6920f0958f1e2eb00c37462bf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-02-23 21:42:45 +00:00
Orgad Shaneh
037a96aefd Gerrit: Minor cleanup in GerritModel
Simplify argument list handling

Change-Id: I4d3b676f3de0b0b1ba54edae3cd8a27e9069493a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-02-23 21:12:19 +00:00
Orgad Shaneh
7a3b216961 Gerrit: Minor de-noise
Change-Id: I5ed6fcd8f74b982a7b17d924234bffe7c1a8019b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-02-23 21:06:24 +00:00
hjk
70a7f80dba Nim: Adapt file collecting code to new infrastructure
Change-Id: Iaeb931cb93a6020ef40f071fe1b3b51d411d2790
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2017-02-23 15:39:15 +00:00
hjk
fd5e0a1486 ProjectExplorer: Remove Node::asSessionNode()
The only remaining uses could be removed or replaced by a
check for no parent node.

Change-Id: I13eba8ae418cf3d404bb3df7d389d72091af38d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 15:21:18 +00:00
hjk
4f47a8d745 ProjectExplorer: Remove FolderNode::projectNodes()
Merged into the using code now.

Change-Id: I4b39998799dde530ab48c504ac2a389d72705c4f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 15:21:11 +00:00
Nikolai Kosjar
fe27f947b9 C++: Avoid inline namespaces in generated code
Task-number: QTCREATORBUG-16086
Change-Id: Ic2f3fd38ae6cc93725bc214c24320f40a0a519a8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-23 14:49:31 +00:00
Orgad Shaneh
151ae22bb9 Git: Fix "additional tools" path with "Git for Windows"
They're in usr/bin now.

Change-Id: I5efe5f7fcaf1f74393624b9bb8dd0ab3f0075d3e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 13:07:08 +00:00
Orgad Shaneh
351f6b8f11 Gerrit: Improve default SSH lookup
* Append exe suffix
* Detect also if not found (for example, when upgrading from msysGit to
  Git for Windows).

Change-Id: I9c47f0f4e54e957e21e224f100c2959dc1884ec2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 13:06:11 +00:00
Orgad Shaneh
f3f5a16f27 Gerrit: Fix initial refresh
when the fallback host matches the remote.

Change-Id: I2c630739db4b698acdcf51f6b663070cfd5ecc4d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 12:15:26 +00:00
Orgad Shaneh
da3f9379c1 Gerrit: Improve server encapsulation
Change-Id: If78fa05e0b328a86e699ba79673999650b05a7ef
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 12:14:57 +00:00
Orgad Shaneh
71c2352e4b Git: Fix parsing of "already merged" files in merge tool
If you have several files that require merging, and you externally resolve
(and git add) some of them, the following message appears:

foo.cpp: file does not need merging
Continue merging other unresolved paths [y/n]?

We don't identify the first line, so the second one is lost too.

Change-Id: I54c579910656c07be7e6b3236551257443fe8fb9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 12:13:58 +00:00
Orgad Shaneh
86f32f5b9c Gerrit: Ignore default port when comparing servers
The user can have the default port set in .ssh/config

Change-Id: I2b59b224c15ed32326e7daa2e33dbb9fe398a137
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 12:13:00 +00:00
Thomas Hartmann
b6a9aeef59 QmlDesigner: Add logging category for viewmanager
Change-Id: I7e605f617b32fb271fb6303fc6475ab176a8ef1a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-23 12:11:52 +00:00
Tobias Hunger
021ea165dd CMake: Export CMakeParser
Task-number: QTCREATORBUG-17731
Change-Id: Iae2fdb0fd06489c558a58c698553edeaec9924ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-23 12:00:16 +00:00
hjk
4637b3fed7 Debugger: Don't crash if targets vanish if the last kit is deleted
Task-number: QTCREATORBUG-17702
Change-Id: I42cc08cab67f57d749898f5b01925b7ef3658165
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-23 10:04:32 +00:00
Eike Ziller
311bed936c Fix that last session could reset to default session
E.g. when opening and closing Qt Creator without opening a session.
The last session may only be updated to the "active" session, if it is
not the default-virgin session (which is actually a "no session" value).

Change-Id: If47da30d94c20df62d45960224e3137bcc6ba1b8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 09:57:48 +00:00
hjk
7045a07d5d ProjectExplorer: Remove some more uses of FolderNode::projectNodes()
Avoids some temporary intermediate containers.

Change-Id: Id8dd2387c06a1f4fdbc5524359a624876534a569
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-23 09:43:24 +00:00
David Schulz
330d8cab16 Debugger: Fix Qt 5.8 QDateTime dumper for cdbextension
Change-Id: Ic621cc67d647ab6396ddbef214ffcd104b66a1da
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-23 09:42:43 +00:00