Commit Graph

50929 Commits

Author SHA1 Message Date
Leena Miettinen
3b901b25a8 Doc: Describe changing QML type of item in Qt Quick Designer
You can now change the type of an item by double clicking
the Type field in the Properties pane.

Change-Id: Iacd70a595d693eb83d1b6d9fbfdf38429fd2706b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-05-04 06:44:19 +00:00
Leena Miettinen
66a22bb608 Doc: Describe the new toolbar in Qt Quick Designer
Some regularly used context-menu items can now be selected
on the toolbar. Some of the icons are constructed at runtime,
so images are needed for them. Some are in a new location that
has to be added to the configuration file.

Change-Id: Ibfc38ec21ed5526702abf89e64899efa5b978700
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-05-04 06:44:03 +00:00
Friedemann Kleint
1c25721ec0 qtcreatorcdbext: Fix build with MSVC2017
Fix error:
.\containers.cpp(616): error C2664: 'void RedBlackTreeNode::debug<void(__cdecl *)(const SymbolGroupValue &,std::ostream &,unsigned int)>(std::ostream &,DebugFunction,unsigned int) const': cannot convert argument 1 from 'DebugPrint' to 'std::ostream &'
        with
        [
            DebugFunction=void (__cdecl *)(const SymbolGroupValue &,std::ostream &,unsigned int)
        ]
.\containers.cpp(616): note: A non-const reference may only be bound to an lvalue

Change-Id: Ic4168fe8e3952c4c6b2bd6561f05c138094cb56e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-04 06:28:59 +00:00
Mitch Curtis
fcb504dede Flat Dark theme: make "changed variable" color in watch window readable
It was a dark red, which is really hard to read against a dark
background. This patch makes it a pastel red, as was done for the
Dark theme in bbb0de0553.

Change-Id: Ieb78522b1e5282e2c35b18ec65c31f4aeb246ad8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-03 14:10:49 +00:00
Tobias Hunger
b84aa8e837 ResourceNode: Set proper fileType based on file name
Set the fileType of ResourceFiles based on their file name. This
makes sure that QML files will be treated as QML, which fixes e.g.
QTCREATORBUG-18032 (and probably other strange bugs).

Task-number: QTCREATORBUG-18032
Change-Id: I05b1048d998ea1bed196611d529771c582bce441
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-05-03 12:28:04 +00:00
Tobias Hunger
ccdf335425 CMake: Fix possible nullptr dereference
Change-Id: Iadb62b671e115b2348dbe1d927212fd79a7fdf33
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-03 11:53:01 +00:00
Nikolai Kosjar
3438b42719 CodeAssist: Fix use-after-free crash
...caused by

  commit fab4dd068e
  CodeAssist: Fix auto completion if function signature is shown

The crash occurs when e.g. typing "lib" in a *.pro file.

Ensure to remove duplicates before filtering, otherwise the duplicates
are removed afterwards and leave dangling pointers in the already
filtered items (GenericProposalModel::m_currentItems).

Change-Id: If6f027378beea2386d25389e366047a29513b553
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-03 10:36:35 +00:00
Christian Kandeler
db352bfc80 buildoutputparser: Adapt to removal of "slot" keyword
Was forgotten in 7b71ac3821.

Change-Id: I5f2d5dc17092d2761c8ba98df8e82fb644954833
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-02 15:11:38 +00:00
Thomas Hartmann
b07d26d43e QmlDesigner: Set the minimum width of navigator
We set the same minimum width the item library has.
This avoids overlapping icons, depending on the depth of the tree.
Since we are rewriting the tree view anyway this should be good
enough for now.

Task-number: QTCREATORBUG-18131
Change-Id: Id5f018c118499a8a47785282a25a29d40e0685b3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-02 12:45:20 +00:00
Nikolai Kosjar
fab4dd068e CodeAssist: Fix auto completion if function signature is shown
This reverts

    commit 3bf19030ab.
    CodeAssist: Fragile proposals aren't closed by automatic proposals.

which fixed the case [1] but introduced the regression in case [2]. Re-
implement the fix for [1] in a different way: Check whether the new
proposal has any items to show before closing the function signature
hint.

Case [1]
  void f(int);
  void g()
  {
      f(bar // This is what we will have in the end. The steps are:
            // 1. Type "f("
            //    --> OK, function signature pop up is shown.
            // 2. Type "bar"
            //    --> OPS, function signature pop up is closed and no
            //        new completion list is shown because "bar" does
            //        not match any declarations.
  }

Case [2]
  int barman = 0;
  void f(int);
  void g()
  {
      f(bar // This is what we will have in the end. The steps are:
            // 1. Type "f("
            //    --> OK, function signature pop up is shown.
            // 2. Type "bar"
            //    --> OPS, no auto completion list for "barman" is
            //        proposed.
  }

Task-number: QTCREATORBUG-16934
Change-Id: I8456275d951de9e6fc53285a5dbcbd448d49ad08
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-02 11:07:48 +00:00
Vikas Pachdha
a4a78ae8b1 iOS: Fix run without deploy on iOS simulator
Task-number: QTCREATORBUG-18107
Change-Id: Ie847cdab672ff2df7af0c2fee742901de0783861
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-02 10:32:07 +00:00
Robert Loehning
f2e296f7c7 Tests: Add some lines to test editing of strings in debugger
Change-Id: I5178724e693db53ffcd99e3d17c3f6d18da0ef09
Reviewed-by: hjk <hjk@qt.io>
2017-05-02 10:31:48 +00:00
Robert Loehning
4ea64b902e Squish: Update tst_HELP02 to use QTCREATOR_DISPLAY_VERSION
Change-Id: I7cffa591f036ea7ff1803a49a605030612dd787b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-02 10:31:24 +00:00
hjk
1e9cc97220 Debugger: Improve handling of static members in shared objects
Change-Id: I4978094dc5dcd0e57bb6790cfc8476a9db77724d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-02 10:22:14 +00:00
Christian Kandeler
dacf13948e QbsProjectManager: Fix updating of run environment
When the build environment was changed, the run environment widget would
not update.

Change-Id: I8a318d86b5ac56ca9233cf4c694ca3c9f88870ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-02 10:08:44 +00:00
Eike Ziller
1b30990f24 Fix left sidebar width after switching modes
After switching to debug mode, hiding left sidebar, switching back to
edit, and showing left sidebar, the sidebar had very small width.

We may not calculate the splitter sizes for each placeholder
individually, because setting them on the splitter might distribute them
in a weird way when widgets are hidden. In the above example switching
back to edit mode while both sidebars are hidden triggered something
similar to the following updates:

Left side bar update:
- calculated: (300, 1000, 0)
- actual resulting: (0, 1000, 0)

Right side bar update:
- calculated: (0, 1000, 300)
- actual resulting: (100, 900, 0)

In the longer run it would probably be better handle the resizing in a
more centralized way, since now it sets the same sizes twice (once for
each side bar update).

Task-number: QTCREATORBUG-18009
Change-Id: Ife5d6f1caded55f444245f4c3c98ae05371363b8
Reviewed-by: Serhii Moroz <frost.asm@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-02 09:19:03 +00:00
Robert Loehning
8eacd5af69 Tests: Fix warning from MSVC2015
Change-Id: Icdf1ffa36ea76d9fb0e6c511924d3e014346776f
Reviewed-by: hjk <hjk@qt.io>
2017-05-02 09:15:32 +00:00
Eike Ziller
aeb0e0eda3 Increase timeout for update check
10 seconds are not enough for retrieving all the information from the
servers.

Change-Id: Ic1372a8b558f1c1f80ff6703b2d70ee92dd8652c
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
2017-05-02 07:59:50 +00:00
Laurent Montel
cbe163584d Avoid some memory allocations
Change-Id: I6f3cba58307babd9e34be0c3f52e25b5f67b23e3
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-01 17:28:38 +00:00
Ulf Hermann
47b4a0811f Revert "Android: Improve application output window by adding filters"
This reverts commit d4ca232d54 and fixes
QML profiling on android.

Task-number: QTCREATORBUG-18120
Change-Id: I09b9062da197a4c6c0a7034f98a2bb0b41f1d559
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-28 14:43:47 +00:00
Tobias Hunger
7c8125b480 Qbs: Set displayName from rootProjectNode
Set the displayName of QbsProjects from the rootProjectNode if that
exists. This fixes the project name not updating based on the name
set inside the qbs files.

Extract that into a new method so that it can be used consistently.

Task-number: QTCREATORBUG-18100
Change-Id: I417264ee8843a9e0665bbc190f1dbc7869eed0e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-28 14:17:18 +00:00
Tobias Hunger
72f769c9ba Qbs: Make QbsNodeTreeBuilder handled uninitialized project
Make QbsNodeTreeBuilder handle uninitialized projects more gracefully.

Return a nullptr, so that the ContainerNode with the main project file
is used in that case.

Change-Id: I7ab90231c3fc24b7b676326f98f79c4b79018327
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-28 14:17:03 +00:00
Christian Kandeler
b5c3bd7a64 Update qbs submodule
To HEAD of 1.8 branch.

Change-Id: I519b9035bfe460a0b9369fdf208a04d8665f9d0d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-28 14:16:15 +00:00
Christian Stenger
10c285db86 CMakePM: Fix compile using Qt5.6 and gcc4.9
Change-Id: I192a213a8825c636dc42702a32a065ad541bd2af
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-28 06:30:29 +00:00
Tobias Hunger
f0d14da7b9 Revert "CMake: Use canonical source directory when talking to cmake server-mode"
This reverts commit b2fe7c9ad1.

QTCREATORBUG-18105 reports that this makes cmake work, but then in later stages files get filtered from the project tree as paths no longer match up.

Change-Id: I9484c7311a15a0397d9078ed60c8a65ef82f8449
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:45 +00:00
Tobias Hunger
11c87bd918 CMake: Unify setup of default build target in CMakeBuildStep
Change-Id: I3d087356a4dd5a3b8ab07d5b64cd5aeb93ae0f47
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:16 +00:00
Tobias Hunger
10d6a3bc3d CMake: Fix signal emission from CMakeBuildStep
This fixes the summary in the UI.

Change-Id: I8eb93a1785d8788d9021e06b75a10cb36f119f0f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:10 +00:00
Tobias Hunger
d8d2dc6adb CMake: Report special utility targets in BuildDirManager::buildTargets
Report special utility targets like "all", "clean" and "install" from
the BuildDirManager and update UI accordingly.

Change-Id: I01d0dcfa23d5bddc124c8f9ee1040475184c9c1e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:51:01 +00:00
Tobias Hunger
e7b4e91fec CMake: Define an "install" target
Change-Id: I036ddc3bfb91fc3a5a9e8923db2befbf60e89a77
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:50:54 +00:00
Tobias Hunger
1829eb6915 Qmake: Update QmakeRunConfiguration in constructor
Update QmakeRunConfiguration's aspects in the constructor. This is necessary
since this RC is only created after the project was parsed for the first time,
so the logic tied to the pro-file parsing updates did not work the first time
round.

Also move the logic from the UI into the RC itself.

Task-number: QTCREATORBUG-18059
Change-Id: Ifa6eeade549ef33aae5c825238fc8a1d76604195
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-27 09:50:13 +00:00
Tobias Hunger
25a507d12f CurrentProjectFind: Forward displayNameChanged() signals from project
Forward the displayNameChanged() signals from the current project so
that the project name gets updated in the Advanced Find pane.

Change-Id: I3ed77b7f8e6f2796b890f2de52cf9665404aeecf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
2017-04-26 14:22:46 +00:00
Nikolai Kosjar
53b80e9b51 Clang: Check for nullptr
Task-number: QTCREATORBUG-18087
Change-Id: Icf8100d84a415995a8d913bc776699c895882e97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 10:56:36 +00:00
hjk
f38f120031 Debugger: Add a dumper for QLazilyAllocated
Task-number: QTCREATORBUG-18060
Change-Id: I5eec7bd10f54278a1d40cf9fce97fba56f4aa2e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 10:51:39 +00:00
hjk
81d9315587 Debugger: Add a boost::variant dumper
This requires making template argument extraction a bit more robust

GCC 5.4.1 created debug info only reports the first argument for
boost::variant<int, bool>:

    #include <boost/variant/variant.hpp
    int main() { boost::variant<int, float> v = 1; return 0; }

    py print(gdb.parse_and_eval('v').type)

      -> boost::variant<int, float>

    py print(gdb.parse_and_eval('v').type.template_argument(0))

      -> int

    py print(gdb.parse_and_eval('v').type.template_argument(1))

       -> Traceback (most recent call last):
          File \"<string>\", line 1, in <module>
          RuntimeError: No argument 1 in template.
          Error while executing Python code.

Change-Id: Iedca8b073078c93449ab61bb2cab05d6cd9803ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 09:23:18 +00:00
Robert Loehning
1ee59f1879 GccToolChain: Fix detection of 32 bit MinGW on 64 bit system
Change-Id: Ic5f8651c8e0f9fb61c3ba94aa88309af2c585ca4
Done-by: Tobias Hunger
Task-number: QTCREATORBUG-17989
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-26 09:21:51 +00:00
Orgad Shaneh
2129ffc954 Clang: Fix MSVC64 warnings
size_t -> uint conversion

Change-Id: Id86168a9e2b9b7f9793cedccc41a6d15c0a8dfd4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-26 09:03:47 +00:00
Leena Miettinen
b6bf1fdf38 Doc: Describe adding and resetting CMake build steps
Also update the screenshot.

Change-Id: Ic717b01baf46bc83b0a1abe3002a3eb487fb68e3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-26 07:28:53 +00:00
Tobias Hunger
b2fe7c9ad1 CMake: Use canonical source directory when talking to cmake server-mode
Use the canonical form of the source directory when talking to cmake.

Cmake will save the canonical source directory in its settings and will
fail if that is not passed in again.

Change-Id: I1ea578053c8d5136d09b3f503443bd0188ebca4f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:21 +00:00
Tobias Hunger
b913e9d548 ProjectExplorer: Make imported buildconfiguration active
Make the new buildconfiguration active after it was imported via
Project Mode. Before the buildconfiguration was added but the
current one was still set, which lead people to believe that the
build directory was wrong.

Task-number: QTCREATORBUG-18082
Change-Id: I10412d94326d9e21820dfcac89adbe2c5da948ae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:14 +00:00
Tobias Hunger
eb8075f569 CMake: Compare canonical paths when checking source directory
Compare the CMAKE_HOME_DIRECTORY to the canonical project paths during
cmake project import. CMake makes sure to store the canonical path
there.

Change-Id: I4ae3ad1f8fab66a50ba98d4266c78cdb4d21f2ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:06 +00:00
hjk
77f8a4168f ProjectExplorer: Try harder to sort ProjectTree entries
Task-number: QTCREATORBUG-18081
Change-Id: Ie924a5969ee38b1a634fcd7cbbc46c0540f9d8a4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-25 15:25:35 +00:00
Eike Ziller
e574860cf0 Show "display" version number in documentation
I.e. 4.3.0-rc1 instead of 4.2.83

Change-Id: I67feebc9071a8a08b5ac4c701017095e28deaa13
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-04-25 13:58:53 +00:00
Eike Ziller
f901cbffba Merge remote-tracking branch 'origin/4.2' into 4.3
Change-Id: If2076ea858d166093c37e9cf52d38f3ad9115012
2017-04-25 15:33:59 +02:00
hjk
1a4531dffd Debugger: Split a long line
Change-Id: If791d45c59e4aadce0c46886e238955891b27a49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-25 13:26:51 +00:00
Thomas Hartmann
56e1749599 QmlDesigner: Do not override home and end keys
Those are not used and will not be used by the designer
and user reconfigure them e.g. on macOS.

Task-number: QTCREATORBUG-17968
Change-Id: I39d679cbce60de4c6951a82fa12d3c7c4fc630f3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 12:57:12 +00:00
Thomas Hartmann
2ad7b7bfcc QmlDesigner: Fix glitch in Add TabBar
With Qt 5.9 we have to first anchor the TabBar.
Otherwise the tab buttons are not layouted properly.

Change-Id: Ia20f2f6bbe8659f3b0be36ae3b56e8ce07b2dca1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 12:48:23 +00:00
hjk
5784a96596 Debugger: Extract printing of dereferenced pointers into method
It's used twice, always for 'this', and whenever asked for by the
user's 'Dereference Pointers Automatically' choice, but needs to
be done at different times.

Change-Id: I4dc7340d0a4cb3eb0c7ff17d59e39be0e3870aa0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-25 10:24:50 +00:00
Thomas Hartmann
b952d0420e QmlDesigner: Update item library if error is fixed
If the document has an error (e.g. incomplete type information),
then it is required to update the item library if this error is fixed.

Change-Id: Iee9629879a0d3ee4bbc76dc0701f023e3c12f394
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 10:23:58 +00:00
hjk
fa6caa3b02 Debugger: Use proper placeholder in error message
Task-number: QTCREATORBUG-18078
Change-Id: I48cd8c24ca1236c69150f0d93b525a5a85447fff
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-04-25 09:51:48 +00:00
Tobias Hunger
1e178915df AbstractProcessStep: Free output parser chain in error case
Change-Id: Ie0dc094068bfa56f728d84ee13e70efbc980f8b3
Reviewed-by: hjk <hjk@qt.io>
2017-04-25 09:23:21 +00:00