Commit Graph

39249 Commits

Author SHA1 Message Date
Tobias Hunger
1a89f7c7e5 Fix clang warning about uninitialized variable
Change-Id: I9cdfa51dadf1014ee21a37ed97f4c543eb5c8fbb
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-01-06 16:16:54 +01:00
hjk
0be4f01ccc Welcome: clean up welcomeplugin.cpp
Namespaces, style, dead code, unneeded comments, ...

Change-Id: Iaad9623c2c0c1f0ca76d604d493f406f23a6acf2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-01-06 15:15:00 +01:00
Denis Shienkov
165f008dce BareMetal: Allow to manage configurations of HW GDB servers
The user has only one possibility to setup of the remote GDB server
when a new device is created (or to modify it for existing device).
It is possible only in the host/port fields for connection to the
GDB server. It is a little inconvenient for the user. If the user
wants to use other configuration of the GDB server, then need every
time to edit the current configuration.

Improving this it is introduction a new concept with a new entity
named as "GDB server provider". Now to the device debugging purpose
the user can choose any of the GDB provider from the list (by analogy
with toolchain and so on). Each configuration of GDB provider is
created by the user manually on the new "GDB Server Provider" options
page. This can be made before or after creation of device.

A GDB server provider can work in three startup modes (depends on
implementation of concrete provider):

1) NoStartup mode.

This means that we do not want to startup a provider, we just trying
to connect to the already started GDB provider server. This mode uses
the TCP/IP connection with manually specifying of remote host and port.

2) StartupOnNetwork mode.

This means that we want to launch of the GDB provider automatically
before connect to it in process of remote debugging. This mode also
uses the TCP/IP protocol. In addition to it, a GDB provider can has
additional options which are contains a paths to provider executable
file, to configuration files and so on (it is depends on concrete
provider implementation). This mode (with NoStartup) covers about 90%
of usecase, and is supported by most set of the GDB server providers.

3) StartupOnPipe mode.

This is similar to StartupOnNetwork mode and we also automatically
starts the GDB server provider before debugging. But in this case is
used the Pipe mode instead of TCP/IP. Not each of the GDB provider
can support debugging via pipes.

This patch has concrete implementations for a following set of the
GDB server providers:

* "Default" provider which supports only the NoStartup mode.

* "Open On-Chip Debugger" (http://openocd.sourceforge.net/)
  provider which supports all modes.

* "STLinkUtil" (https://github.com/texane/stlink)
  provider which supports NoStartup and StartupOnNetwork modes.

Tested on Windows and Linux with:

* target HW: ARM Stm32F4Discovery board with HW debugger STLink-v2
* provider: OpenOCD v0.8.0 (tested on Windows and Linux)
* provider: STLink-Util (tested on Linux only)
* toolchain: ARM GCC v4.9.2
* debugger: GDB v7.8.1 (with Python support)
* QtCreator with QBS project

Task-number: QTCREATORBUG-13686
Change-Id: I59c775d91b0a4227d931188879850c536290e1ba
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-06 15:04:47 +01:00
Robert Loehning
18aa49e7c2 String improvements
Change-Id: I45778c9562ba530a36ddaf201f0c61d380d701cf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-01-06 11:50:19 +01:00
hjk
0d9fa1c714 Coding Style: Clarify the use of the Q_OBJECT macro
The old definition sounded like strong but was qualified by an big
'if' at the end, resulting in stating the obvious for a single case
("use it when you need it for qobject_cast").

Having the reminder there is ok, if it is a common thing to forget,
but it should be recognizable as such, and can include "the other
case" where it is typically used.

Change-Id: I0183a12d14c414db9ff8b19598cb9dd22cedda8e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-06 11:35:01 +01:00
Nikita Baryshnikov
67788b6f0a Help: show ToolTips on links hovers
Change-Id: Icce21b848f38b4f45b58ccff626b2e23a7e8ef98
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-06 10:32:25 +01:00
Nikolai Kosjar
422b579032 Plugin Tests: Exit code returns number of failures
...as it's done in e.g. QTEST_MAIN.

Change-Id: I7056f3204d0ed76d21f09e5c1f3dc79e83c6cd48
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-06 10:21:06 +01:00
Nikolai Kosjar
ad323e4cfd PluginManager: Clean up
* Remove unused testDataDirectory()
* Move startTests() to PluginManagerPrivate

Change-Id: I3ad582a7ea35c8f08d1455ea3536baed88ecb2ad
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-06 10:20:36 +01:00
Eike Ziller
6fd79de664 Welcome: unify code paths for adding pages
Change-Id: I5c581cb00b186fe7d6075d5ebb398982adfb16b3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-01-06 10:18:26 +01:00
Eike Ziller
5c2229a73f Editor: Open only one editor for symlink and its target.
We do not want to open separate editors for file names that factually
point to the same file through symlinking.

Change-Id: I70ce31d420accb284c1872781807a6e5c2f2e3b0
Task-number: QTCREATORBUG-5941
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-01-06 10:13:57 +01:00
Orgad Shaneh
9180555f26 Revert "C++: Fix completion for enum inside member functions"
Breaks loading of qtcreator project.

This reverts commit 4c6ad5e305.

Change-Id: I7c4cdaf57eed16d7643d05b9456e03d5120259b3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-06 10:02:12 +01:00
David Schulz
13c57348ac Utils: Add a do not show again information message box.
The existent do not ask again question message box
isn't suitable for printing out information where
the user has no influence on an action.

Change-Id: Ief8d2a73b4621e05374ca9a1a4355d9768c69bcc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-06 09:42:07 +01:00
Orgad Shaneh
4c6ad5e305 C++: Fix completion for enum inside member functions
Task-number: QTCREATORBUG-13757
Change-Id: I283306b0c8348ee82e8e9bf47d404c1ecd473fde
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-06 09:34:45 +01:00
Orgad Shaneh
fb396ffbd4 CppTools: Cover all permutations for each enum testcase
* named enum, access by value names
* named enum, access by enum name (C++11)
* anonymous enum

+ Add some failing tests

Task-number: QTCREATORBUG-13757
Change-Id: I7b0a859805a5979c3c886a6dbec703639fb374be
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-06 09:23:08 +01:00
Andre Hartmann
738572a4f2 OutputFormatter: Remove superfluous zero check
m_escapeCodeHandler is allocated in the constructor
and deleted in the destructor and therefore available
during the whole object lifetime.

Change-Id: I7882ac3e9954845c492b39dff6cd39ab81367d5b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-06 08:54:55 +01:00
hjk
ab1ae75ba7 Coding Style: Mention preference for Qt5-style connects
Change-Id: I7bcae5c87a6588b1817a1f8038471eebeb5ba2b9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-01-05 17:03:03 +01:00
Robert Loehning
c2e23b6fe2 FakeVim: Compile fix
Change-Id: I630c6603bf46a28942c71e9e67cc9745ea8e4c36
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-05 16:54:27 +01:00
Eike Ziller
225e599c94 Register wizard windows so they appear in window list and get shortcuts
Change-Id: I69b3a49ba2e2162585502a523be835918b7b9533
Task-number: QTCREATORBUG-13766
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-05 16:04:52 +01:00
Orgad Shaneh
98dbe9adca Gerrit: Move QueryValidatingLineEdit to cpp
Change-Id: Ia0564ffb9354b31df77cb9877937c87f1247a4a6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-05 12:54:13 +01:00
Lukas Holecek
1203ef5b2f FakeVim: Update inserted text data only in focused editor
If there are multiple instance of FakeVim handler for single buffer
(this happens when there are splits with the same document), buffer data
are modified only in the instance that handles the last focused editor.

Task-number: QTCREATORBUG-13481
Change-Id: Idfd2727917262bfffb410396a911519e85dfd463
Reviewed-by: hjk <hjk121@nokiamail.com>
2015-01-05 09:19:55 +01:00
hjk
115acfe127 TreeModel: Add some convenience functions
Add functions to remove a single item, to access the last child
of an item and a simple way to construct items that only display
static data.

Change-Id: I89347fbb6bbbac6b77fcfb23fa0b780a13643d6f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-05 08:57:38 +01:00
Christian Kandeler
394c9dd550 SshConnectionManager: s/break/continue
Probably just a thinko in the original code.

Change-Id: Ie089737a3501c5aede9a2234c10e4f1c1611d952
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-12-19 16:17:26 +01:00
Christian Kandeler
1199a93fc0 qbs build: Make use of AutotestRunner.
And fix some autotest project file problems uncovered by this.

Change-Id: Id2f46aeab31ccfbcffe43bd23af8115c69f57849
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-12-19 15:10:36 +01:00
Christian Kandeler
d5a19a6005 Update qbs submodule.
To HEAD of master branch.

Change-Id: I98f75b561d60cf63673446222762148c1ce4913d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-12-19 15:10:18 +01:00
Eike Ziller
6b88dcbe8e Welcome: Move IWelcomePage to core plugin
IWelcomePage now uses Core::Id, and it can only used by plugins anyhow.

Change-Id: I21f035fee9dec66830d3aa7b7eb2242f703095cb
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-19 14:22:31 +01:00
Tim Jenssen
ff658ccc99 fix spelling commmand -> command
Change-Id: I293a3d2be055634c3fd798c4f344a6d77d50206c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-19 13:54:21 +01:00
Christian Stenger
082a4836ff Debugger: Further cleanup
Change-Id: I9c744202efe3af56f60fe5f09358d9b39e0eaafe
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-19 13:06:44 +01:00
Eike Ziller
7270636cb1 Help/OS X: Use native viewer by default if welcome uses QQuickWidget
Since using window container breaks the native view hierarchy
(QTBUG-39363), we can use the native viewer only if we use QQuickWidget
for the welcome screen.

Task-number: QTBUG-39363
Change-Id: I26407a5c1db558d9a8ac6d79c37e3ffa0e009ed6
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:41:35 +01:00
Eike Ziller
ee63594182 Help: Do not pass zoom factor to constructor
Introduce HelpViewer::setScale instead

Change-Id: I9d50483bc1fa4de89de53db40eda348379bd0ae9
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-19 10:40:50 +01:00
Nikolai Kosjar
6cafc424e8 CppTools: Tests: Stop writing into source dir
Instead, always write into a unique temporary directory in
QDir::tempPath().

Where applicable, read the test source from files instead of first
writing the file.

Some clean ups in test_codegen*.

Change-Id: Id48dc50c6ca16252edfd9fc8a86ba0de9f9be486
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:29:16 +01:00
Nikolai Kosjar
cb3c7538be CppTools: Fix flaky test_cpplocatorfilters_CppLocatorFilter
The GenericProjectManager tests left over some state in CppModelManager.

Change-Id: I3f5c5bf27b9443e6753eb6c24114e2e5b99e7372
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-19 10:25:03 +01:00
Nikolai Kosjar
b94b7b3ee6 CppTools: Fix test_modelmanager_extraeditorsupport_uiFiles
The test was broken since the QmakeProject was changed to work
asynchronously.

FAIL!  : CppTools::Internal::CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles() Compared values are not the same
   Actual   (workingCopy.size()): 1
   Expected (2)                 : 2

Change-Id: I6f7d05fb70af3def5fc371a9783b606309686e32
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-19 10:24:55 +01:00
Nikolai Kosjar
ef403a4515 GenericProjectManager: Tests: Clean up
* Get rid of CppModelManagerHelper.
  Now we simply use CppModelManager::projectInfo(someProject).isValid() to
  test whether a project is loaded.

* Copy project data to temporary dir before opening the projects.
  This avoids creating *.user files in the Qt Creator source tree and
  annoying pop ups on test start.

Change-Id: I1a57441ca2099beb6bb96cf620390d669fb47601
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-19 10:24:48 +01:00
Nikolai Kosjar
613304edfc CppEditor: Fix test_doxygen_comments_no_leading_asterisks
The settings from the test were not set.

Change-Id: I0e241ee1a60e4c4804c9e3e6819cbf0ecaa80d3d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-19 10:24:38 +01:00
Nikolai Kosjar
fb8e3b9963 CppTools: Clean up commentssettings
Change-Id: I397195a3e6d8b40a55d2a68429daf6c812f52da2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:24:26 +01:00
Nikolai Kosjar
205170a9e5 CppTools: Create ProjectInfos explicitly
...instead of going through CppModelManager::projectInfo().

Now CppModelManager::projectInfo() returns an invalid ProjectInfo in
case there is no valid data for the given Project.

Change-Id: I11908bf2ddf865b1d3d71ff176eaf4139292b21c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:16:37 +01:00
Friedemann Kleint
be7d63c99a Fix build of ProjectExplorer with g++ 4.8.2.
The compiler is unable to match the arguments of the connect
statement when a QPointer is involved.

Change-Id: I87d3c11b9452f07739bf4e905a18071145c4e21d
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-19 09:59:47 +01:00
Marco Bubke
f6c0e573bf CppEditor: Use AsynchronousMessageBox
Event loops can lead to crashes so it is better to use a dialog which has
not it's own event loop.

Change-Id: I53b5dee15e7207df91df45fd531e4520d502481b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-12-18 18:22:16 +01:00
hjk
c3650bf269 Debugger: Use an enum for column numbers in stack view
Easier to read.

Change-Id: I85abf6e8c881b4d521f7791625cff37bbd2fffdc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-18 15:51:33 +01:00
Erik Verbruggen
242b3f4110 C++: clean up numeric literal parsing and add support for n3472.
Separate the messy pp-number parsing from the numeric literal parsing.
The C/C++ preprocessor makes a grown man cry, but at least we have
"proper" literal parsing when we want it, including C++1y binary
literals.

Next step is digit separators (n3781).

Change-Id: Ia069eef454ed5c056f77694a5b8a595d0b76adc4
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-18 15:46:22 +01:00
Nikolai Kosjar
16becbd29c Plugin Tests: Create settings dir with QTemporaryDir
Create a clean and unique settings directory for "-test" runs if no
settings path is provided explicitly.

Change-Id: Ida2f5a74d42a5292963dd8d5d1f9dcddcdd24fd4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-18 15:43:49 +01:00
Eike Ziller
fd6ba0e2a6 OS X: Welcome/QQuickWidget fixes
The rendered text is still ugly, but the fuzzy text is better than the
alternative currently.

Change-Id: Id9e54fb406ee964e0b9b5c40b7a8108b45c15f85
Task-number: QTBUG-42861
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-18 15:39:18 +01:00
Eike Ziller
196e0d76e6 Welcome: Fix compilation with QQuickWidget
Use the background color property in the QML code instead of relying on
QQuickView::setColor

Change-Id: I556515a42d9483f88500fa5a5c56ea21f48fa685
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-12-18 15:37:43 +01:00
Eike Ziller
4cf7742fed Welcome: Use Core::Id instead of enum
Change-Id: Id65eb262d02bb4db765abefa361d407837b45782
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-12-18 15:37:22 +01:00
Christian Stenger
dfa76d74e0 ProjectExplorer: Fix compile for Qt version less than 5.4
Change-Id: Ic2500d009d2195d19651ac691c42d55a612fde04
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-18 14:17:43 +01:00
Christian Kandeler
7b226fffd7 ProjectExplorer: Hotfix for crash on session switch.
In ProjectTree::update() as well as in
CurrentProjectFilter::currentProjectChanged(), there are crashes due to
accesses to a pointer to a deleted project. Wrap the pointer in a
QPointer to prevent this.
May or may not be the correct long-term solution, but does fix the
crash.

Change-Id: I4182a4753578cc4765b9120a36cd8701d07c94c1
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-18 13:55:16 +01:00
Nikolai Kosjar
bd70ae3255 CppEditor: First un-register, then register in CppModelManager
...on a file path change.

Change-Id: Id4f67c9f133e53ddb3fea6c0ec3322f87914469b
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-18 13:44:48 +01:00
Christian Kandeler
19ff4c415f SSH: Close unused cached connections after a period of inactivity.
We keep connections open to avoid re-doing the authentication procedure
when the user runs or deploys a remote app repeatedly.
However, the connections should not be around indefinitely; we therefore
now close them after about five minutes of inactivity.

Change-Id: Ie677eb133b618d34c08528da2f2bc221472316b3
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2014-12-18 13:40:40 +01:00
Ulf Hermann
4c793f58ca Timeline: make notes model optional
If you pass 0 as notes model to the aggregator then all the notes
features are hidden.

Change-Id: I432f2820812c472221a0330de5b8f5d8d0fcad13
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-18 13:04:59 +01:00
Ulf Hermann
dac7e8644e Timeline: test TimelineAbstractRenderer
Change-Id: I9860af4b6aedbd656103bf5def38f1830b1352e1
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-18 13:04:28 +01:00