Commit Graph

57165 Commits

Author SHA1 Message Date
Ivan Donchevskii
efc39304a1 Clang: Move the majority of completion items sorting to ClangBackend
With this change ClangCodeModel only needs to sort completions by prefix.

Also some other optimization have become possible and are implemented here:
1. Getting completions after '{' for constructor overloads by replacing
   it with '(' inside usaved file.
2. Checking for all overloads requires only previous item check because
   all Class completions are already sorted to go before all CXXConstructor
   completions. Since they are not mixed no extra search is required.

Change-Id: Ie0187ad96a20857a63c1d71ddec74606b803f572
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-02 12:29:23 +00:00
Ivan Donchevskii
931ec39f64 Clang: Change the way completion fix-its are shown
Move the completion information to the tooltip and
show fix-it icon on the right of such item.

Change-Id: I7eff410384104387e547695171e4864760c07fb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-02 12:26:18 +00:00
hjk
089b50f7d3 Debugger: Fix display of upper half of short unsigned ints
Change-Id: Ie15c66c02c15420436b26c65af3cee9a19634e5c
Fixes: QTCREATORBUG-21038
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-02 10:12:33 +00:00
hjk
1c9410e353 ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra'
to them anymore.

Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 08:32:51 +00:00
Orgad Shaneh
2f6c6b632c ProjectExplorer: Remove versionControls argument from scanForFiles
Retrieving the list is cheap, there's no reason to store it and pass
it through all these functions.

Change-Id: I394b512c113af92f60cfb8c2f6561d1617d9cd36
Reviewed-by: hjk <hjk@qt.io>
2018-10-02 06:59:56 +00:00
hjk
377f5badd8 Project: Inline RunConfiguration::wrapWidget helper again
There are no external users left, so there's no need to expose
it in the header anymore. Also saves a cast.

Change-Id: I1ced368ebc9588cbc0058cc7d37f39ab80f9c595
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-02 06:29:46 +00:00
Orgad Shaneh
681297ad7e Git: Fix reading of gitfile
* QFile ctor does not open the file for read.
* Replace readLine with read(8) to avoid needless read.

This amends commit e9eeaf33b3.

Change-Id: I33c230497ad431091d7d6b271846f5af661b4e0d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-10-01 19:21:39 +00:00
Orgad Shaneh
d585b85550 PythonEditor: Support file operations
Change-Id: I0fc5a3e1795fe56c753e300ed1c1ca7514964401
Reviewed-by: hjk <hjk@qt.io>
2018-10-01 16:44:31 +00:00
Orgad Shaneh
a31655cde7 PythonEditor: Avoid file duplication
Every add/remove of a file added another entry of the project file.

Change-Id: I800adc3540c3fc8b109864e86ab590af5374e30b
Reviewed-by: hjk <hjk@qt.io>
2018-10-01 16:44:16 +00:00
Orgad Shaneh
b1c37910f1 PythonEditor: Remove dead code
Change-Id: I55f7d513755857a5759ba8688e5cfeccbdaa379f
Reviewed-by: hjk <hjk@qt.io>
2018-10-01 16:42:43 +00:00
Orgad Shaneh
f2dd427f3d Nim: Remove superfluous lambda on Utils::sort call
Change-Id: I401136a57e88736796397314d7e2d07e30fca4eb
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2018-10-01 16:42:02 +00:00
Jarek Kobus
e90fb40678 Reuse linksForKeyword() from QHelpEngineCore
Change-Id: I740d49222842ec2f16ffc8eec8c20e9b4a7337ec
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-01 12:44:46 +00:00
Eike Ziller
f5647cc2c4 Allow non-host-platform libraries in Add Library wizard
Since much of the available UI and behavior depends on which platform's
library we start with, let the user choose a platform filter.
Default is the host OS.

Task-number: QTCREATORBUG-17995
Change-Id: Ic8bec7ac30eecf08c1684da4f2823a8add8f6d20
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-10-01 12:27:21 +00:00
Robert Loehning
1785b0f561 Squish: Use TestSections in tst_create_proj_wizard
Change-Id: Ib097f629a1815e9f372e4bdf91faa14b3a7b9042
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-01 11:57:17 +00:00
Christian Stenger
c5d961fe01 Squish: Let startQC() return applicationContext
Change-Id: I56aff938095948031ff7b4e5fd522654208e4f6b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-10-01 11:32:27 +00:00
Christian Stenger
c6906304a2 Help: Fix 'Get Started Now' button
Change-Id: If9fed047f29ee069569f1317b8844bf4369f8cb7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-01 09:24:46 +00:00
Eike Ziller
e2e9707510 Fix plugin loading profiling report
We print a report both before and after a plugin's initialization method
is called, but only the time spent till after the method call should be
counted.
This makes a different for the delayedInitialize cycle: Before
delayedInitialize is called of a plugin, there can be a delay after the
previous one. But this delay should not be counted as part of the
initialization time of the plugin.

Change-Id: I4e5fb53cd83cb36a45a599cfc3f1f8539f6327f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-01 08:13:57 +00:00
Eike Ziller
18a6265f13 ProjectExplorer: Make kits available earlier during startup
delayedInitialize is run in reverse dependency order, so
ProjectExplorer's will naturally be run very late during startup.
It also depends on which other plugins do what during delayed
initialization.
Since we want the kits to be available early during startup, so the user
can e.g. click on a project in Welcome mode and have them available,
it is better to use a custom, short timer for this instead.

Task-number: QTCREATORBUG-19381
Change-Id: I7bafa9cf77b86c11d420bb684eadf51c48abd5ed
Reviewed-by: hjk <hjk@qt.io>
2018-10-01 07:39:06 +00:00
Christian Stenger
7d779bad7c AutoTest: Fix icons for results pane
Summary items with type pass or fail including warnings
had wrong or no icon at all.

Change-Id: I2ce3c7c8f0c9c93e80809281ede0aba17fc59e82
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-01 07:25:20 +00:00
Christian Stenger
488f3c61d2 AutoTest: Add filter for interfering option
Bring GTest options and environment variables on par.

Change-Id: If350fac04f965a1d493fe0cff0fe3eb8d1dddae0
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-01 07:22:42 +00:00
Orgad Shaneh
e9eeaf33b3 Git: Detect also gitfile in isVcsFileOrDirectory
Change-Id: Ic182407505fbcb9b5bd1768126885c4b06a30280
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-30 13:18:44 +00:00
Sergey Morozov
f01ee04f4f Cppcheck: Kill current check process only when needed
Kill only if it processes specified files

Change-Id: I5dee99ec8aeaf3bf4d9dbf6aad195f54176170a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-30 07:38:40 +00:00
Andre Hartmann
546956a302 Git: Allow creating a new repository from branch view
... when clicking "Add Branch" in a project that is not
under git version control.

The "Add Branch" serves no purpose here, so re-use it
to call this (already existing) function.

Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: Ib23d2cbeec0598e0b6f00cbde265793cc25e6142
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-30 05:37:09 +00:00
Andre Hartmann
017f4d7c4d Git: Add shortcut to "manage remotes" to branch view
Change-Id: I36d9196a41869176f8ad602f1ba406402fc5b77c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-30 05:36:53 +00:00
Orgad Shaneh
754fd66a0b Git: Suppress error messages for newly initialized repository
Change-Id: Ib7161e165fdf9cc2b1167b683e8e3dac17e0f1d6
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-29 16:51:45 +00:00
Sergey Morozov
a108a912dd Cppcheck: Fix progress parsing
Change-Id: I14bc5b93b00fee25d9e307606c4fc7b30ca23fe8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-28 15:44:14 +00:00
Eike Ziller
a5d5397964 UpdateInfo: Fix unnecessary initialization delay
No need to start a one minute timer in delayedInitialize and then even
delay the next one by returning true from there.
Just start the timer in extensionsInitialized directly.

Change-Id: Ie36c8cef588603b1e9cb27a3a14db5d1dec1dae9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-28 12:53:30 +00:00
Orgad Shaneh
25f3fe145d RemoteLinux: Remove usage of deprecated QDateTime::toTime_t
Change-Id: I84708eea3f7a24400776169ffaea122e50100d8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-28 11:51:30 +00:00
Eike Ziller
20d7305318 Merge remote-tracking branch 'origin/4.7' into 4.8
Change-Id: I9d988b8b708d7908c6d1eab7d95d8bb1e68beeb8
2018-09-28 11:03:39 +02:00
Eike Ziller
327d5af311 openProjects: Correctly identify already open projects and simplify
Use FileName for comparison of already open projects, and use algorithm
to get rid of loop.

Change-Id: Ic4d5a1964ed96c4b5db659380427323f81b3606e
Reviewed-by: hjk <hjk@qt.io>
2018-09-28 08:58:53 +00:00
David Schulz
b6b756e737 Editor: Do not jump over invisible blocks in paintEvent sub routine
The paintEvent relies on invisible blocks to find
collapsed blocks and paint the collapsed block popup.

Task-number: QTCREATORBUG-21040
Change-Id: Id50e8602722fd807e57fa008cf9fd8106ffdafe1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-28 08:55:03 +00:00
hjk
92325c90ce Debugger: Rename snapshothandler.{cpp,h} to enginemanager.{cpp,h}
That's what they are nowadays.

Change-Id: I1bd6db18f2142ecf488eba51ca739675eac753c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-28 07:38:55 +00:00
Orgad Shaneh
b3e2c580f2 Git: Fix return value of BranchModel::refresh
Return false if for-each-ref fails, and true if not applicable (this is not
an error).

Fixes: QTCREATORBUG-21189
Change-Id: I895046f8c15c30abeddaa8b4231fb4bd46c343ef
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-27 18:36:48 +00:00
Nikolai Kosjar
8b93eee3b1 Git: Double click on branch shows log
...instead of allowing to rename inline. Renaming can still be done with
the context menu.

Inspecting the log is a more common operation.

Change-Id: Idb3fb8fe01b6a5ae57a2eba09b27a36f677e566a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-27 14:15:40 +00:00
Eike Ziller
d982c362c1 Update change log for 4.8
Up to c9ad2a49b6

Change-Id: I37ce553eccd2901a8ed52b3ff14e708a9dd02d5a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-09-27 12:07:37 +00:00
Eike Ziller
6507db19e4 Merge remote-tracking branch 'origin/4.7' into 4.8
Change-Id: Ia215af4ddad73053582284d3ce8d56b92dbbc8f3
2018-09-27 09:07:07 +02:00
Frank Meerkoetter
6f56feef29 CppEditor: better detection of the system a numeric literal is in
Fixes:
The literal 1 (or any decimal of length 1) was misdetected as not
already a
decimal literal which resulted in a quickfix "Convert to decimal".

Improves:
More consistent handling of 0. Octal is now handled like the other
cases. The user is offered to turn 0, 0x0, or 0b0 into 00.

Change-Id: I9a559fc328d0b49bfe0e53b933e8b4fee5af27a5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-27 07:01:39 +00:00
Tim Jenssen
c9ad2a49b6 QmlDesigner: take the right error string
Change-Id: I2e608eaad219db265b91457eb8f70f568f920584
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-09-26 13:29:18 +00:00
Christian Stenger
44e5a8f077 Debugger: Avoid crash when loading to core file
Otherwise QC crashes on macOS when loading a core file.

Change-Id: I985eb41026ce9e1da1f49e2cbec448228172ad57
Reviewed-by: hjk <hjk@qt.io>
2018-09-26 13:19:59 +00:00
hjk
2593baadc6 Core: Guard against overlong lines in the output pane
The scenario mentioned in the task does not lead to crashs in observable
times, some guarding against really long lines is in order.

Task-number: QTCREATORBUG-18172
Change-Id: Ie4a7555e05a7415bd95c4f56220d0ed2fdc50d9e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-26 13:08:48 +00:00
Eike Ziller
70e5cab569 Core: Use restrictions on character count instead of line counts
Assume lines with an average of 100 characters for the transition
and use the character limit already in two cases.

Change-Id: I43316d51d7d5017aa413d6c910d3784a14237e9f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-26 13:08:37 +00:00
Ivan Donchevskii
65ea6f8e83 Clang: Introduce Token class to work with CXToken pointers
Make tokenization and tokens annotation simpler.

Task-number: QTCREATORBUG-21143
Task-number: QTCREATORBUG-21144
Change-Id: I580091b7b63dd973228fd2e21cf2e74c7d0e7df2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-26 11:46:18 +00:00
David Schulz
8d609692b3 Utils: Fix file saver for delete locked files
If we can not delete a file via the ReplaceFile operation, because we ca
not get the DELETE access right we still can try to replace it contents.

Task-number: QTCREATORBUG-7668
Change-Id: I8804133a0e118518307f33976b821d5b2fdc9b8d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-26 10:58:11 +00:00
Nikolai Kosjar
aa290912b8 Clang: Remove project tracking on clangbackend side
...as it is not needed. Just provide the compilation arguments as part
of the Document.

As a side effect, re-initializing the backend after a crash is cheaper
and will not freeze the UI anymore (referenced bug).

Task-number: QTCREATORBUG-21097
Change-Id: I866e25ef1fd5e4d318df16612a7564469e6baa11
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-26 10:45:41 +00:00
Marco Bubke
25ea9a4d24 TextEditor: Handle overloaded operators as functions
Overloaded operators are semantically very similar to functions. So it make
sense to highlight them the same. It provides the user also with feedback
that he can jump to the declaration of the operator etc..

Change-Id: I110084e3e53882c9d5cbfa88442a93914792db17
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-09-26 10:40:02 +00:00
Christian Stenger
6f14b6f399 Tests: Fix compile
Amends 4b42789bda.

Change-Id: Ibd4d024ad836accf4fdda880eb342c61a6c32219
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-26 10:05:18 +00:00
Orgad Shaneh
7f2bbe9cfb Cppcheck: Reduce uses of auto
Conform to coding rules.

Change-Id: I57600bd450665d5db87710bb2444e39e7ecbf3e3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-26 10:02:32 +00:00
Orgad Shaneh
9644745b3d Cppcheck: Replace another assertion with a condition
Missed in 3f4438e2eb.

Change-Id: Ie0ddeb7aad5dc70aec788b9df1954e884684cba1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-26 10:02:21 +00:00
Eike Ziller
4d7f825deb More changelog
Change-Id: I2de07e518e8be48afee271e5e4674ce2e7dd6d86
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-09-26 09:42:54 +00:00
Ivan Donchevskii
f18f833584 Clang: Rename member variables according to the code style
Change-Id: I2ca6127d04321cfb5ac933475b54c669fbee729d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-26 08:37:15 +00:00