Commit Graph

44349 Commits

Author SHA1 Message Date
Jarek Kobus
1414826183 Implement diff on close, on revert and on external modification
Task-number: QTCREATORBUG-1531
Change-Id: I8c9a740d66eb7836b3df6850ac243260fd282b32
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-21 09:20:20 +00:00
Jarek Kobus
72e19c4886 Fix marking files modified externally as modified
It replaces 59c90e00c1
and d0c537ca75

Task-number: QTCREATORBUG-17048
Change-Id: Ief4b1b72f2e5e7b1711be05d4ea8c03bbbf48fdf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-21 09:20:06 +00:00
Jarek Kobus
ca4be197ef Revert "Replace virtual isModified method with a getter/setter/notifier"
This doesn't fix the issue with cleaning the clear state of undo stack.
This introduced the issue when ui file is opened it's marked as modified.
It reverts 59c90e00c1
and d0c537ca75

Change-Id: Ifd4ff8483d6c297461632de500a4502b1fd0871f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-21 09:19:56 +00:00
Nikolai Kosjar
a25a855b6e Clang: Fix typo
Change-Id: I1b1a59dbe041134aad3bc582b77acafa8e67e427
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-21 09:08:08 +00:00
Nikolai Kosjar
434ecfc4f5 Clang: Log messages with time stamp
Change-Id: I0bb56d319328a2773e55609d63b4ac28eea07386
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-21 09:08:04 +00:00
Nikolai Kosjar
8c23b49376 Clang: Shorten output prefix
Change-Id: I89a48a2defa4dbee9a0a0f9206ed996ca7cc1538
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-21 08:49:38 +00:00
Tobias Hunger
a693bd97ef VCS: "final"-ize IVersionControl implementations
Change-Id: I123a8da9b08b2fe5de679d5caac7fa20bfb0ef4a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-21 08:22:27 +00:00
Thomas Hartmann
614689874a QmlDesigner: Fix for item library search filter
Without this patch the item library gets into an
invalid state if the user enters edit mode
with an ative search filter.
When going back to design mode the item library
is completely empty.

This patch clears the filter, so the item library
gets properly populated.

Change-Id: I21f823b8db820589dedd6ba4e4855678fff49e53
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-21 07:51:18 +00:00
David Schulz
4e06822fc5 Cdb: Set frame when using the python engine
Change-Id: Ib84735b58f516dad14c992edba6a0c8e9005ecfc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-21 07:39:55 +00:00
Nikolai Kosjar
07c5cf3a83 Clang: Clean up diagnostic widget
* Use a single QLabel - No need for all the QLabels we used. Also, a
  single QLabel enables selecting and copying all the diagnostics, which
  is handy when displayed in the info bar.
* Avoid call to Utils::ToolTip::hideImmediately() if the location is
  clicked from the info bar.
* Simplify code and API

Change-Id: Ib991364e4d6f40ef02dada8ebbb90fe6ff8ae1a1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-21 07:33:16 +00:00
Orgad Shaneh
75ff9a6fdc GenericHighlighter: Update from latest KTextEditor source
Change-Id: I0caf19cd7698c9934655483304314b5653b69f21
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-21 05:37:00 +00:00
Tim Jenssen
183395831a QmlDesigner: cleanup DocumentManager
- move get origin properties out of the static methods
  to reduce the code

hopefully no behavior change

Change-Id: Icf903f5bcaf48ab35a9db1a779c6d9e5abcf0f80
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-20 12:44:57 +00:00
David Schulz
83da96189e Cdb: Add python function returning all template arguments
Change-Id: Ib0f2eefc63427c8b89288ec72c35c0596cd6c1d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-20 11:43:16 +00:00
David Schulz
bc41012c7d Cdb: Fix getTypeName return value for non existing types
Returning an empty null terminated char[] instead of a nullptr.
This fixes usecases where the return value is implicitly converted
to a std::string.

Change-Id: I5a3985880632a9bcc07765f8b27329bdd1e83347
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-20 11:43:09 +00:00
David Schulz
ff052d7132 CdbExt: Version bump
Change-Id: Ia51bcb0a313ba43353b3ffe31b38ff42fabd1e8a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-20 11:42:47 +00:00
Øystein Walle
337ce07eaf CMake: forward-declare QDialog
Without this forward declaration compiling cmakekitinformation.cpp yields
a compilation error saying QDialog does not name a type.

Change-Id: I55066706e9850a947cac47e6e7150928c2fc6c51
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-20 10:30:03 +00:00
Alessandro Portale
2c8087d9ba ProjectExplorer: "Build" and "Run" icons for the projects mode tree
Task-number: QTCREATORBUG-17127
Change-Id: I5db19d65eaf7bf69c39ab39bb35e7e4f34e91a6f
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-19 13:18:41 +00:00
Alexander Drozdov
72d3f4383e CMake: handle CMake files saving only for active build configuration
...otherwise all previously selected build configurations begins to
process changes in CMakeLists.txt or other cmake-related files after
save it.

Change-Id: I86ff59022c85d88052ff434480e670ebddd90864
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-19 12:49:05 +00:00
Christian Kandeler
a97f1bd0bb QbsProjectManager: Do not set an empty compiler name
If one of the two compiler types in the Kit is not set, leave the
respective value in qbs at its default. Things will likely work anyway,
whereas setting an empty compiler name is guaranteed to break.

Task-number: QTCREATORBUG-17109
Change-Id: I2b4153cb9a9daafb2f57659e16622e00d3921005
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-19 09:29:57 +00:00
Alessandro Portale
cca8d6f796 CppEditor: Native dir separators in ResourcePreviewHoverHandler
Change-Id: I83aaf5a0aff5f679395801ecaccad46a8ff7acb3
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-19 08:57:59 +00:00
Christian Kandeler
8707c7bb1b QbsProjectManager: Do not set up generated files for disabled products
Such products are not guaranteed to have a valid build directory.

Change-Id: I3e6ec211edb8fb9a13e3b785cd19b795f7adee12
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-19 08:04:41 +00:00
Christian Kandeler
4470c1a5a4 Update qbs submodule
To HEAD of master branch.

Change-Id: I5b15266209328623f8df86102481ee9e06ab8fdc
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-19 08:04:07 +00:00
Alessandro Portale
c465a25edc ScxmlEditor: Themable, HighDPI-able export-canvas icon
Change-Id: I966dee7c22903921d814141bc749b39dec7cf8d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-18 17:22:20 +00:00
Alessandro Portale
18f666aea5 ScxmlEditor: Use Utils::Icons::SNAPSHOT_TOOLBAR
Change-Id: Ic7b873aac60bf07780a11dbcfae10dac6a81035b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-18 17:13:50 +00:00
Alessandro Portale
48be215c9b TextEditor: Improved lightbulb icon
Hopefully now looks more like a light bulb than like an ice cream.

Change-Id: Icc27fe786ea0cc1ca8c504ea6e766cb7d54e5050
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-18 17:08:50 +00:00
Alessandro Portale
69486b5a5d Utils: Add a "snapshot" icon
Change-Id: Ife531bb493aa22db660e73d9e5b89bc882fac610
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-18 17:08:02 +00:00
Nikolai Kosjar
df581265c3 Clang*: Workaround parsing mingw's <type_traits> with clang 3.9
...for -std=gnu++0x.

Define the unknown identifier/type "__float128" so at least the headers can be
parsed successfully. Of course this does not help for parsing client code
referencing that identifier, but this should be the less common case.

Task-number: QTCREATORBUG-17126
Change-Id: Id321311713029d8aa77e068b02361d86debfada6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-18 15:07:15 +00:00
Nikolai Kosjar
57ac8d96c7 Clang: Avoid running into gcc/mingw intrinsics
Same as for the Clang Static Analyzer, so move the implementation into the base
class and use it.

This has gone unnoticed so far because it looks like that the error diagnostic
from the bug report can be extracted with libclang (as shown in the info bar),
but is not printed from libclang or clang.exe itself.

Change-Id: I5b714ba374c5fdefe234faf012a3515e96c9a08c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-18 15:04:16 +00:00
Nikolai Kosjar
b0a49ca1c1 Clang: Fix parsing MSVC's crtdefs.h for 64 Bit
...by specifying the word width, as for the Clang Static Analyzer.

This has gone unnoticed so far because it looks like that the error diagnostic
from the bug report can be extracted with libclang (as shown in the info bar),
but is not printed from libclang or clang.exe itself.

Task-number: QTCREATORBUG-17130
Change-Id: Ia7a5ee3825c7211cdf80c2166a9eb454ce48cac1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-18 15:03:52 +00:00
Alessandro Portale
ddf1072d53 TextEditor: Tweak the refactoroverlay painting for HighDPI
The lightbulb was slightly scaled up on HighDPI.

Change-Id: Iea00532ebbf93ce185651ec01364efdbd924a067
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-18 13:56:58 +00:00
Nikolai Kosjar
1fd5cd4dbc Clang: Use compiler specific undefine option
libclang generated:

    warning: /U__cpp_aggregate_nsdmi: 'linker' input unused [-Wunused-command-line-argument]
    warning: /U__cpp_alias_templates: 'linker' input unused [-Wunused-command-line-argument]
    ...

It needs -U.

Change-Id: Ibbd2f97e6f806215e3008803f57608b9b6b4c641
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-18 13:02:28 +00:00
Nikolai Kosjar
4fbdbdb1ee Clang: Fix delayed reparse of dirty and visible but not current documents
1. Open document foo.h
2. Create a split and open foo.cpp (#including "foo.h")
3. Edit foo.h (e.g. by introducing a syntax error, so that foo.cpp will
   indicate header errors in the toolbar or as info bar)
=> Actual: foo.cpp will be reparsed immediately.
 Expected: foo.cpp should be reparsed after a delay.

This saves resources (cpu time) and minimizes poping up of the header
info bar while editing header files in splits.

Regression introduced by

    commit 380d756a03
    Clang: Hook up supportive translation unit on first edit

Change-Id: Ib5fd90e49415dfc3aefacab7cd627b0e1937f5fc
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-18 11:39:01 +00:00
Nikolai Kosjar
d29781fcd8 Clang: Remove left-over functions
...that helped modifying the delayed parse timeout. Those are pointless
now (at least in the backend) because we have a non-blocking translation
unit (except for the first edit) around.

The only client using the timer value is currently
ClangCodeModelServer::registerUnsavedFilesForEditor - a case for which
no configuration should be needed.

Change-Id: I0f4171d6ee98bcac229aa5a207b6aa17b336a29a
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-18 11:08:00 +00:00
Eike Ziller
60ab12342d Merge remote-tracking branch 'origin/4.2'
Change-Id: I683a013896b3df773015050d5d30691d0147d320
2016-10-18 12:07:00 +02:00
David Schulz
3c10e586e7 Cdb: Setup symbol paths before attaching to a process
Change-Id: I075661ac95da3937dae8c918b83fcc4449d9b56e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-18 08:52:45 +00:00
Thomas Hartmann
b652889e4a QmlDesigner: Using ':' consistently in the settings
Change-Id: I320ee192b1b76e88d97eab293634640aa194cc3b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-18 08:29:21 +00:00
Alessandro Portale
edb5bf1162 3rdparty: Update Source Code Pro font
Roman fonts version 2.030 and Italic fonts version 1.050

Change-Id: Ib5142f373531b3ad20f7b497b708b8f458275a7b
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-18 08:26:24 +00:00
Christian Stenger
93c0ba247d Revert "iOS: Replaced deprecated signal QProcess::error. Fixes compilation issues with GCC"
This reverts commit a9f00a2da3 as this commit
uses functions that are available from Qt5.6 onwards but we still have
Qt5.5 as minimum requirement.

Change-Id: Ice16d4faeb3417dc80431299b308b37ab2b56c1f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-10-18 06:38:22 +00:00
Eike Ziller
c4f92146be Merge remote-tracking branch 'origin/4.1' into 4.2
Conflicts:
	src/plugins/ios/iostoolhandler.cpp

Change-Id: Iff2a56e8d74ffdb4342ef75020099cced297a0bc
2016-10-18 08:02:35 +02:00
Christian Stenger
993c18197b iOS: Fix invalid static_cast
Change-Id: I44184a8054ff0a80b9f65c3ccc227b4a6453ba8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-18 05:53:47 +00:00
Christian Kandeler
bc7b8bf20c Fix qbs build
Change-Id: Ia3f0d8b65d0ac1d081934540e4fb04f5b5216b6f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-18 04:37:50 +00:00
Christian Kandeler
bd07b29b7b iOS: Fix build with namespaced Qt
Change-Id: I09f07ed853e0c9fba8b856d1851b5994f4318945
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-18 04:37:45 +00:00
hjk
7157e5c1d2 ProjectExplorer: Revive project importer
Fixes a regression introduced in recent changes. Import project from
build is now available again on the target setup page (shown when
no kit is active) and in the context menu of the left pane.

Task-number: QTCREATORBUG-17046
Change-Id: I5a1285624084f0cb6e0947560516ae88d4b3e376
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-17 16:17:57 +00:00
Alessandro Portale
d19f25c14a ScxmlEditor: toolbar variants of undo/redo/cut/copy/paste icons
In fact these icons should not be in the toolbar at all. But integrating
Cut/Copy/Paste into Qt Creator's ActionManager is too much for 4.2.

Change-Id: If9ec2f946dd1c500bb7d537d412a342aec929200
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-17 15:50:17 +00:00
Vikas Pachdha
a9f00a2da3 iOS: Replaced deprecated signal QProcess::error. Fixes compilation issues with GCC
Change-Id: I4945b345032023c3c2e8d1fa7f51dadbbb0bc9d9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-10-17 15:47:36 +00:00
Tim Jenssen
0ca924ad10 QmlDesigner: fix HighDPI wrong font sizes
Task-number: QTCREATORBUG-16266
Change-Id: Ie998556961694d269d3288ea4993cf79499e1fc6
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-17 15:28:08 +00:00
Jarek Kobus
d0c537ca75 Mark file modified externally as modified after the prompt
In case when the user has chosen not to reload the file.

Task-number: QTCREATORBUG-17048
Change-Id: I4eb78af2dbc655ab5e0f3fa19f506aa2302d7877
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-17 14:44:36 +00:00
Jarek Kobus
59c90e00c1 Replace virtual isModified method with a getter/setter/notifier
We have lacked the setter and dedicated notifier before.

Change-Id: I58845a48259d260c5cc90ae94b173c79cddcfef9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-17 14:44:08 +00:00
Tobias Hunger
17977b3de7 CMake: Turn CMakeConfigItem into a CMake argument
Add a method to turn a CMakeConfigItem into a string suitable to be passed
to CMake.

Change-Id: Ia7834f1c2fad387dd6e6eaa3863f93385d48ca71
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-17 14:41:47 +00:00
Tobias Hunger
cc9090891c CMake: CMakeConfigItem uses macroexpander when turning into String
Make CMakeConfigItem use an (optional) macroexpander when asked to turn
a CMakeConfigItem into a string.

Change-Id: I7189fc4e5189d86809d002be3951934c37d98f12
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-17 14:41:43 +00:00