Commit Graph

44349 Commits

Author SHA1 Message Date
Orgad Shaneh
d70968cde8 QmlJSTools: Use Qt5-style connect in comment
Change-Id: I97bbb4cf71e2c99ab7bae9e5104c36d176cf21b0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-20 09:57:53 +00:00
Orgad Shaneh
485fa9c888 Valgrind: De-slot
Change-Id: Id72d2463201107ae53d8be3d0f3ac30ec88530a4
Reviewed-by: hjk <hjk@qt.io>
2017-03-20 09:57:29 +00:00
Orgad Shaneh
b7cd7ca66c QmlDesigner: Delete unused class XUIFileDialog
Change-Id: If1c33a31abf254eb55a7091175eec56ea82e5b13
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-03-20 08:52:01 +00:00
Orgad Shaneh
981cf84903 ResourceEditor: Complete transition to Qt5-style connect
Change-Id: I39380ed83f3d554d326b956cf729bc5f69f612c1
Reviewed-by: hjk <hjk@qt.io>
2017-03-20 08:38:20 +00:00
Orgad Shaneh
f2d8be7c67 Scxml: Use Qt5-style connect
Change-Id: I59d0678e109ba778ef5a0b6f2fb8fb75b1aa437a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-20 08:24:40 +00:00
Orgad Shaneh
3ec5a18990 DiffEditor: De-slot
Change-Id: I132da3f0475ced470ffd7c4cace60825b9dec44f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-03-20 08:05:06 +00:00
Tobias Hunger
9f1a9078c2 CMake: Fix possible crash before the project is fully set up
Change-Id: Iacbf49e296a72176ae828fa11286432212078694
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-17 16:33:23 +00:00
Tobias Hunger
2ff0d30829 ProjectExplorer: Move code to set up default project structure
Move the code used to set up the default project structure from the
Project into the sessionmanager. Now that the models are no longer
connected to the project this is the safer way as less change to the
projects logic is required.

Change-Id: Ib6b897f990a24d2dcce96a9821f090551fe45f13
Reviewed-by: hjk <hjk@qt.io>
2017-03-17 16:33:12 +00:00
Orgad Shaneh
d9a66a5406 BareMetal: Apply "static" pattern to GdbServerProviderManager
Change-Id: I7fe76b5912808ac0855ef09cd6d31afdf9225f6f
Reviewed-by: hjk <hjk@qt.io>
2017-03-17 08:51:12 +00:00
Orgad Shaneh
08ad07baf1 Merge remote-tracking branch 'origin/4.3'
Change-Id: Idcd88f9ef7183779751e64cb878fe5c383d9ef8a
2017-03-17 09:36:30 +02:00
Oleg Yadrov
4fac31015f ManhattanStyle: remove QTabBar position adjustment
QTabBar style was recently updated in QMacStyle (see 175f33ed855b0).
New macOS style requires all tabs to be moved one pixel to the left, so
there's 1 pixel separator line visible between them which is always
left border of the tab with higher index. But once you start moving
a tab, you'll notice that each tab has both left and right borders.

ManhattanStyle is a proxy style what means it falls back on some other
style which can be either platform-specific ("Flat" is an example) or
cross-platform ("Dark" is based on QFusionStyle). Now, even though
ManhattanStyle does not implement a custom look of QTabBar, it does
this 1 pixel adjustment for the very first tab
(QStyleOptionTab::Beginning) and QStyleOptionTab::OnlyOneTab no matter
what style is actually used.

Unfortunately, QStyleOptionTab::TabPosition enumeration does not have a
specific value for the tab which is being moved, so it's painted as
OnlyOneTab. As a result of this additional adjustment left border of the
moving tab goes out of pixmap's geometry on macOS and it looks like it
does not have left border.

This is not right to modify QTabBar's geometry for any theme arguing
it as "otherwise it looks bad" because in general case this statement is
wrong: even Fusion style draws 2 pixel wide line on the left of each
tab. Proper solution would be to implement a custom look of QTabBar in
ManhattanStyle.

Change-Id: I9e110f3195d068c6101c412e142d3a1ff7e80852
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-16 16:49:21 +00:00
Ulf Hermann
a45b0d2c05 Make TODO plugin theme aware
Use the theme's colors by default and color the text rather than the
background of items.

Task-number: QTCREATORBUG-17532
Change-Id: I65a2d6da45ce7547b05463a2fb014f8230d0c336
Reviewed-by: Serhii Moroz <frost.asm@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 16:25:58 +00:00
Ulf Hermann
883492c135 TextEditor: Set widthFactor from TextMark ctor
The text marks are added to the document from their ctor. The document
then uses the widthFactor to calculate the space needed for them. If the
widthFactor is only set afterwards, the calculated space is wrong.

Change-Id: Ic7d24f99cc78d1bf084b2b1cfdf6b955496072f3
Task-number: QTCREATORBUG-17833
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 16:19:22 +00:00
Nikolai Kosjar
b2e537baaa ProjectExplorer: Move built-in parser workarounds to built-in code model
...so that only the built-in code model parser sees them, but not the
clang code model, which has problems with them. The specific case here
is due to definition of __int32:

  winnt.h:3077:1: error: functions that differ only in their return type
                  cannot be overloaded
  intrin.h:357:31: note: previous declaration is here

While moving, drop __MSVCRT__, which seems to be a predefined macro of
ancient MSVC versions, see

https://sourceforge.net/p/mpg123/mailman/mpg123-devel/?viewmonth=201010&viewday=24

Change-Id: I4b8c49ed4bdc942a2190dbae3c260f3a1a8078a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-16 16:18:44 +00:00
Nikolai Kosjar
116379b131 ProjectExplorer: Update known predefined macros for MSVC
...and add a comment explaining what we do and why we do it this way.

The added macros were collected as stated in the comment for MSVC
versions (x86, amd64) 2003 - 2017. Note that for Visual Studio 2017
there is no "Predefined macros" page yet.

Change-Id: I7601be08d7a0bbb63077abe9657d203661f76cb9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-16 16:18:38 +00:00
Nikolai Kosjar
3a679ea173 ProjectExplorer: Sort known predefined macros for MSVC
Change-Id: Ife28880b06078e2cd0e39a44ce4ca0ca3546b935
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-16 16:18:31 +00:00
Ulf Hermann
cd31fd1a60 Make the debugger console theme aware
Use the generic output panes colors rather than hand rolled ones. Also,
remove the prompt icon and use the "next" icon instead, and remove the
borders between console items.

Change-Id: I219badbfbbde3aa01d7937ff505205cb9d725a43
Task-number: QTCREATORBUG-17532
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 16:06:04 +00:00
Ulf Hermann
388086211a Qml Debugger: Show fewer messages in the status bar
The QmlDebugConnection can be quite spammy as it repeatedly tries to
connect to the application. Show error messages from this process in the
debugger log and only output a line in the status bar if the connection
is considered to have permanently failed.

Change-Id: I4a5715d9acdac47f690cb8aa67adb5cccff76e11
Task-number: QTCREATORBUG-17492
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 16:03:46 +00:00
Ulf Hermann
1df4757dae Qml Inspector: Don't ignore anonymous objects
Apparently the inspector service does not send a type string for all
objects. As the id string and the object name can also be empty, those
objects are anonymous then. Try to identify them by their source
location and if that doesn't work, just call them "<anonymous>".

Change-Id: I3bd3bad8b78c81ace95bfd7813cdd8bb0f5e14f2
Task-number: QTCREATORBUG-17741
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 15:56:12 +00:00
Tobias Hunger
323117a493 ModelEditor: Fix crash for projects without rootProjectNode
Those projects will be scanned when the file list changes after
the parser is done.

Change-Id: I15d6a19196d373d8dddaaa4f9d7f34df8740f10f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 15:45:35 +00:00
Tobias Hunger
b4049ada7f Qmake: Fix possible SOFT_ASSERT in qmake desktop RC
Change-Id: I48d6a2cab8c27e9082c33361977dca86e606e141
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-16 15:07:43 +00:00
Tobias Hunger
9434fa4888 ProjectTree: Decouple ProjectTree from Projects
Make sure the ProjectTree gets its data exclusively from the Session
and the SessionNode it holds.

Change-Id: Ic44e1364adf36077018edc972e18815d7f972922
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-16 15:07:37 +00:00
Vladislav Tronko
c308ec7b73 Fix system options not being retained after restart
Auto-suspend unmodified files checkbox was always checked after restart,
and min files to keep opened was set to 30.

Change-Id: I7f52fee41155188ee8389e922fdc265f8c0a6459
Task-number: QTCREATORBUG-17844
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-16 14:26:42 +00:00
Tobias Hunger
a8f64bd1b9 ProjectNodes: Do not crash when adding a nullptr as a node
Change-Id: Ic75ddbf3bd6b72779342e53ea73f7622f6ce2823
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-16 14:26:01 +00:00
Tobias Hunger
9e71f3b08d SDKtool: Write toolchains compatible with Qt Creator 4.2 and 4.3
Make sure the toolchains xml file written by sdktool is compatible
with both Qt Creator 4.2 and 4.3 by mapping the --language field
accordingly.

Change-Id: Ie8c289c8fe7d49ce95e924e89b4e369a62469e64
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-16 14:25:45 +00:00
Tim Jenssen
3520ba2825 QmlDesigner: simplify code
Change-Id: I3269162c25366b4a9b910ba7431eae6b05b799fa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-03-16 12:26:07 +00:00
Robert Loehning
d98276e06d iOS: Fix compilation on Windows
Change-Id: I047d460ca446378781a268005216bdb8d608930b
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-16 11:40:30 +00:00
Thomas Hartmann
f2516e7344 QmlDesigner: Do not move cursor if texteditor has focus
Change-Id: Ie7e45134d00695fc97f0e7ef430926929ac0a6e3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-16 11:33:52 +00:00
Eike Ziller
84dbb7f812 SilverSearcher: Fix missing overrides
Change-Id: I92558b575cfac9302b280f5b742388e00df0db68
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
2017-03-16 11:18:46 +00:00
Eike Ziller
8b6cd04d8c SilverSearcher: Fix release build
Change-Id: Ib55304708454204f14fe3429f02108678f7a3e9e
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
2017-03-16 11:17:52 +00:00
Thomas Hartmann
bfb2248f39 QmlDesigner: Deactivate integrated text editor in detach
We delete the integrated text editor and set the original
text editor as the current one.

Change-Id: I2dd6c7421d4d3078dda8ca9dae8fb04553723240
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-16 10:57:26 +00:00
Thomas Hartmann
149039edf4 QmlDesigner: Show initial warnings and errors
When opening a new document the rewriter is attached first
and the documentMessage notifers are send before the form editor
is attached.

Change-Id: I85d91534fd4b0f9fca55829af36dfeec5a284d57
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-16 10:57:18 +00:00
Thomas Hartmann
a06b3a2329 QmlDesigner: Do not move delegate items
Items that are not in a list should not be movable.
This effects items in back or front in flipable or styling items.

Change-Id: I829aaca7b838b5ea21b96a18c9bfd64c9ae8286d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-16 10:57:12 +00:00
Christian Stenger
b814bea0ab ProjectExplorer: Fix crash on reloading projects
Partially reverts 6e91fe50.

Change-Id: I91f2460fcee79deeeb55cc4955fca4726b5276bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-16 09:48:29 +00:00
Eike Ziller
4f4b02a36c Merge remote-tracking branch 'origin/4.3'
Change-Id: Ib0dc9fe5d7c507eb7330f61daedc945a4308292d
2017-03-16 10:28:07 +01:00
Przemyslaw Gorszkowski
2fcdc2ff0f FindInFiles: Support Silver Searcher
Change-Id: I6f0f55224f228fc1d0496c589cb71ede11d90ea5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-16 09:26:07 +00:00
Vikas Pachdha
30a8e05a00 iOS: Do not boot a simulator in Booted state
It results into a simulator window with an error

Change-Id: I47d55082bf248fc6558e995158b631d75adb8617
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-16 09:23:17 +00:00
Nikolai Kosjar
96010fb8d3 ClangStaticAnalyzer: Remove -fPIC workaround
The option -fPIC predefines the macros __pic__ and __PIC__ and it was
added just to have these macros and thus avoid a parse error somewhere
in qglobal.h.

Nowadays we get these macros from the project/toolchain, so remove this
workaround.

Change-Id: Ib6106cf217f7d8a08da6f7dde435bcadd04b6ba8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-03-16 09:07:54 +00:00
Christian Stenger
3d6b108971 AutoTest: Fix handling of subtyping TestCase again
We need a more present snapshot when inspecting the AST of QML files
we need to process.
Due to handling all problematic accesses inside the QmlJS model by
guarding it with mutexes it is no problem even when parsing multi threaded.
The former fix collided with another patch and therefore went in
without fixing the issue.

Task-number: QTCREATORBUG-17787
Change-Id: I460bae4b09cdc9a0cd38bc3383fd593c3abdfaad
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-16 08:02:48 +00:00
Robert Loehning
5c3fce7f97 QmlJS: Fix version detection in updateProjectInfo
Change-Id: Ib8b53e8fdf5e69caf843a34390e820e9221a8be5
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-15 18:43:16 +00:00
hjk
408e384e9b ProjectWizardPage: Simplify tree walking
Change-Id: I74eb980a762b6a880ec40a359afb6b36a6bab419
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-15 16:57:15 +00:00
Ulf Hermann
53a32f7fc6 ScxmlEditor: Don't generate invalid state names
'(' and ')' should be avoided when copy/pasting states.

Change-Id: Ic54528ed51b2f4596651bb1d23f282e70210f3a7
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-15 16:51:18 +00:00
Ulf Hermann
7236f2124a Qml Debugger: Set detailed options rather than "sanity"
The v4 debug service doesn't understand "sanity" after all, but wants
to know the features we support. So state that we don't need redundant
references and that we understand names when sent as strings.

Change-Id: Ie973dd8002935a113a367d098337983d61663265
Reviewed-by: hjk <hjk@qt.io>
2017-03-15 13:10:32 +00:00
Orgad Shaneh
8457949dbc Debugger: Fix MSVC warning
Implicit cast from size_t to int.

Change-Id: I8e53a6511afa4a3435f571217d736725771fef9c
Reviewed-by: hjk <hjk@qt.io>
2017-03-15 12:18:36 +00:00
Tobias Hunger
802eff3485 CppTools: Add target information to ProjectPart
This is important to be able to map sources to actual things that are
going to be built.

Change-Id: I1aef940767d60192642ed79a1703cff8dfdad9e1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-15 11:03:45 +00:00
Tobias Hunger
831864c56c ProjectExplorer: Report VCS topics in all cases
Report VCS topics when the top level project node is a file or
a directory.

Task-number: QTCREATORBUG-17498
Change-Id: Ie20109b228afc79bfc2ac21505a8798d9fd5efd6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-15 10:28:23 +00:00
Orgad Shaneh
181766c41d Qmake: Fix "Build File" for sub-projects in pri
For example, locatorwidget.cpp which is in locator.pri under
coreplugin.pro.

Change-Id: I93e6d06ad19b14280c6c3c9e701c64dca3a51856
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-15 10:28:09 +00:00
Orgad Shaneh
423cca3521 Qmake: Fix "Build File" for initial opened file
If a session contains an open file, when Qt Creator loads this session on
startup, Build File is invisible, and doesn't work.

Change-Id: Icbc918a4b74f6293d100c04bae0a070d99ce7196
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-15 10:28:06 +00:00
Tobias Hunger
1621aaa26e CMake: Fix some more SOFT-ASSERTS in CMake server-mode
Fix two more SOFT-ASSERTs in CMake server-mode that could be triggered
by complex projects.

Move and simplify search functionality into FolderNode and use that instead
of hand-crafting a custom tree search in CMake.

Change-Id: If4bde5c4a7ff84c7d5dba4f595e99b39f54ac8aa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-15 10:23:14 +00:00
Tobias Hunger
6e91fe5046 CMake: Use a CMakeProjectNode as top level cmake node
Change-Id: I6e68b971cf490b9b064a2866bd99865a7f4a7bd9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-15 10:23:09 +00:00