Commit Graph

41089 Commits

Author SHA1 Message Date
Orgad Shaneh
372173331c C++: Fix explicit typedef from base type in templated class
Use-case:

struct Foo { int bar; };

template<typename T>
struct Base { typedef T F; };

template<typename T>
struct Derived : Base<T>
{
    typedef typename Base<T>::F F;
    F f;
};

void func()
{
    Derived<Foo> d;
    d.f.bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14218
Change-Id: Ic0b22b2f8adf80ff88a2f8b7359c276a744f89e8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-15 14:22:10 +00:00
Nikolai Kosjar
cf66beffb6 CppTools: Tests: Fix memory leak
Detected by leak detector of Address Sanitizer.

Change-Id: I2aae2ba6fa2f218c9754d912dce7c398b1b384cb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-15 14:22:09 +00:00
Nikolai Kosjar
df582f88ae CppEditor: Fix potential null pointer dereference
Detected by Address Sanitizer.

Change-Id: Ieab9c201e1fe6a7cf5c32747b2ce3d4562f4e598
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-15 14:22:05 +00:00
Orgad Shaneh
9b30795c02 C++: Fix lookup for instantiation by class object
Task-number: QTCREATORBUG-14352
Change-Id: I2ce4bc1d0dba2414afe050e80607b581686081a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-15 14:21:45 +00:00
Orgad Shaneh
ee37f60bff CppEditor: Avoid local TypeOfExpression objects in VirtualFunctionHelper
Change-Id: Ifd9417b4573dab35dde72b84c261b58fec574ede
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-15 14:21:18 +00:00
Nikolai Kosjar
f27aa09ac5 C++: Fix crash on auto deduction with debug enabled
By adding the expression document to the bindings object.

Since ResolveExpression is always initialized with the context of a
TypeOfExpression object, the symbols and names in the expression
document will at least live as long as the most outer TypeOfExpression
object.

Done-with: Orgad Shaneh <orgads@gmail.com>
Task-number: QTCREATORBUG-14253
Change-Id: Ia97c7401a2ada9a36113a04cf39e2283393421dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-15 14:20:47 +00:00
Alessandro Portale
8ae18a9ca8 ProjectManager: Qt Quick application templates via json wizard
Using the new .json wizard engine allows us to get rid of much old
custom wizard logic. As additional benefit for the end user of
Qt Creator, the .qml.ui split is now optional.

Change-Id: I4b5ebcc35a585fad6ebc2e994711ca23e3300717
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-05-15 13:14:37 +00:00
Eike Ziller
caaf460cdf Fix that activation mode default was accidentally changed to single click
Sort of introduced by recent form layout fix for OS X.
Add the missing break statements.

Change-Id: I0862c34f31e4afc7d1834fa436c6193345205b9b
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-15 10:30:58 +00:00
Marcel Krems
32d63165c4 Replace QRegExp with QRegularExpression in FileSearch.
This fixes a race condition when searching in multiple files.

Task-number: QTCREATORBUG-14403
Change-Id: I5572d7f2cd9fe3c399efdf37e874d9773be76f57
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-15 10:30:22 +00:00
Eike Ziller
3a2e9c13dd FileSearch: Avoid copy of function object.
Converting std::unary_function to std::function will create a copy,
which we do not want. Actually std::unary_function as a base class
doesn't serve a purpose at all in this context, so we can just remove
it. Bind a std::function to a pointer to our search object instead.

Change-Id: I31db62312eefdff19b09fbb4eb20e8e666125874
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-15 10:30:12 +00:00
Tobias Hunger
0b91b77cdc Subversion: Replace Subversion Checkout wizard
Replace the subversion checkout wizard with a Json wizard.

Change-Id: I969ff00e2e6fdc8088f8c7a928f80454cd987164
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-05-15 09:11:44 +00:00
Tobias Hunger
4f4c6b6288 CVS: Replace CVS checkout wizard with a Json wizard
Change-Id: I27c5c76923bae3e4df514e228873330fd8232c7f
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-05-15 09:11:23 +00:00
Tobias Hunger
9a5aceb7fd ProjectSummaryPage: Report no VersionControl as ""
Returning QString() from here for unset vc will result in the
substitution to fail and thus will leave "%{VersionControl}" as
the text.

Returning a empty non-Null string will make turn the replacement
into "" instead, which is what is expected.

Change-Id: I9dc890deb5f9ea1ac28c1546e4c1bce804d196ef
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-15 09:10:11 +00:00
Eike Ziller
af2db92523 QmlProfiler: Improvements to searching timeline event notes
- Open timeline view when clicking search button
- Use the usual search tool bar
- Implement incremental search and the various search options

Change-Id: Id83ab502cf4175738a825f531d9e454169663765
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-05-15 06:44:47 +00:00
hjk
445cf25812 Valgrind: Code cosmetics
Use covariant return types for aspect creation,
other aspects already did, it does no harm, so follow suit.
Add 'override'. Remove empty line.

Change-Id: I68e85f64e60becf47ee407eb6d1800f43c4d0755
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-13 14:25:31 +00:00
Tobias Hunger
078f3c6eea EditorManager: Fix opening of editors based on editor id
Make sure the editor with the requested id will be in the
list of editors to use to open files. This unbreaks e.g.
the git submit editor which opens an empty file.

Change-Id: I51c76ae13ddf0077e895ca0a9b7797f664888c0f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-13 12:02:26 +00:00
Tobias Hunger
e1f47f67b2 JsonFieldPage: Make the page honor the theme settings
Change-Id: I9a286fa73392a86b6d7ed39389a7601450a42b88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-13 10:07:03 +00:00
Nikolai Kosjar
ad377730e4 TextEditor: Optimize alignment in class Parenthesis
Change-Id: I25d00a7d68fb85797c9d6edc5a3e70b698ce6b9b
Task-number: QTCREATORBUG-14390
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-13 08:08:19 +00:00
Eike Ziller
c9af39eb34 Examples: Better check for non-writable location
Checking the .pro file is actually not too relevant, so extend the check
to the .pro files directory, and more importantly, to the directory
above, which will be used as the default location for shadow build
directories.

Change-Id: I867118902abb2cf4b621e976b6ba953ef8f0431a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-13 07:29:07 +00:00
Tobias Hunger
63373ecc1d JsonFieldPage: Support tooltips for all fields
Change-Id: Ie84e659d7cecf68753056db63a389173d725ebe4
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-12 15:17:52 +00:00
Tobias Hunger
5d05db8d58 JsExpander: Add methods to test file/directory existence
Change-Id: Ia51b8d47299d855dd11e8bbcb05b22aea875e458
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 15:17:39 +00:00
Orgad Shaneh
6665ace5cd C++: Remove Dumpers
Superseded by Overview

Change-Id: I2ae193b1b9265ed59b73315486a35c53f6c8068f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-12 14:13:24 +00:00
hjk
54e85ad100 Debugger: Disable watcher removals
... when engine does not support watcher insertion while running.

Change-Id: I1b4500f75b43176df7dc31f4a5840afb2347dd36
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-12 14:12:38 +00:00
hjk
b45bfbf69c Add TerminalAspect convenience accessor
Unbreaks build after 90f19ce.

Change-Id: I0f1ddec10abda39149dd3743bdff1d0186d1de31
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-12 12:43:53 +00:00
Tobias Hunger
c9ad077ee3 JsonWizard: Trigger complete change when triggering Checkboxes
Change-Id: Idb81fee165f5950d8a4dbe51fc79822594f9b3c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:18:50 +00:00
Tobias Hunger
16e0656d95 JsonWizard: Handle Keepers when asking to override files
Change-Id: Ib33311416ebc468a7755a76dabcf47155ca3f1f6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:18:06 +00:00
Christian Stenger
ad34764605 Make shootout test work on OSX
Change-Id: I0cac98b68ee67eb016e32eeb17fc41a2cce38d9b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-12 12:15:27 +00:00
Tobias Hunger
0b4e958fb3 JsonFieldPage: Add isComplete and incompleteMessage to Fields
This allows to do more sophisticated checks on the completion state
of the page.

Change-Id: Ibb6593fdc4e9c9f37e7d70c516f1a1410123191f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:07:54 +00:00
Tobias Hunger
b2076ca71e ShellCommandPage: Handle reject
Change-Id: I310b55a4832c169df68d5fd13311bba66dbd973f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:07:50 +00:00
Tobias Hunger
52d6c09183 JsonWizard: Allow to delegate accept/reject to the current page
Change-Id: I1d2826159ce1cd4f531a576720b9ba6f204d15fb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:07:45 +00:00
Tobias Hunger
bbf2d59981 ShellCommandPage: Disable/enable back button
Change-Id: I19bed185ea89d47871efd07b34cc99b4739b7659
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:07:40 +00:00
Tobias Hunger
1b1d97f9ed Vcs: Make VcsCommandPage available to JsonWizards
Add a page to run checkout commands with.

Change-Id: I4c6a6f662c3dfa19fd8f837934e8173412ee6f36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:07:37 +00:00
hjk
192b3fc994 CMake: Use TerminalAspect in CMakeRunConfiguration
Change-Id: I293252c2beadc6fc4b4650dbf09127aa5e7898f6
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-12 11:51:29 +00:00
hjk
2dbc5b1032 Qbs: Use WorkingDirectoryAspect in QbsRunConfiguration
Change-Id: I65811ff8afb5c8a637c68d5b0dba81ccee71c462
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-12 10:50:21 +00:00
hjk
98c0713a41 ProjectExplorer: Rename TerminalAspect::m_isForced -> m_userSet
Change-Id: I209abef3e6682b2d3725e0e58e0289cd5757c497
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-12 10:37:28 +00:00
Tobias Hunger
89f100adf6 JsonWizard: Add a generator that just scans an existing directory
This will be used in the VCS checkout wizards.

Change-Id: I68bbdefa6b8287dc50a4ec8a9ca6136831571d3b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 09:30:07 +00:00
hjk
40a76e2b45 Add std::map case for initializer list codesize shootout test
Change-Id: Iffb1193bfb741533645521b30d9181aa61dc5c12
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-12 09:29:59 +00:00
hjk
f9f9feb7ea FakeVim: Use more direct construction in vimKeyNames
Change-Id: Ic230eaa95e4e9a4ad614af50297d6028fefaae6b
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-12 07:58:14 +00:00
hjk
678de21337 Add codesize shootout test for map initialization
1286 bytes when using an initializer list,
7414 bytes for the insert(..., ...) sequence.

Change-Id: I10ad8b10fea962feb01e9dbb31a542a4b66680a7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-12 07:58:01 +00:00
Daniel Teske
15d8b6ba81 EditorManager: If opening a editor fails, offer other editors factories
Change-Id: Ia8cf298c1a62e01d6df6f9f871a8d3eafde5821d
Task-number: QTCREATORBUG-14064
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-12 07:43:50 +00:00
Tobias Hunger
f5e4b8e8cb JsonWizard: Add default implementation
Add default implementations for some generator methods

Change-Id: Id7c2dc76bd3f96bc9f2560e835981fcdad167f92
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 06:09:13 +00:00
Tobias Hunger
162c36dbdf JsonWizard: Move code for opening files into JsonWizard
Move code opening files and projects directly into the JsonWizard.
It makes no sense to keep reimplementing this functionality in
generators.

Change-Id: Ib4686a262fa9b2c78028146d138c5bba5d5b604a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 06:09:00 +00:00
Ray Donnelly
b8256ddd3a autotools: Set a default buildDir
So that the un-changed optimization in setBuildDirectory works
correctly.

Change-Id: Ie31fb2722c663cd0f998458d536181f47c83a37d
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-11 17:29:38 +00:00
Lukas Holecek
1ef66857cb FakeVim: Allow to remap shortcuts
Allows to remap main window shortcuts with command for passing keys.

    noremap <C-S> ,<C-S>
    noremap ZZ ,<C-S>,<C-W>
    noremap f<C-O> ,<C-O>
    noremap f<C-F> ,<C-F>

Task-number: QTCREATORBUG-14413
Change-Id: Ib86637d55223b1f4ce31a88c1c7ae2e05cb2aff1
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-11 14:36:44 +00:00
Tobias Hunger
8211e6a084 JsonWizard: Simplify handling of bools via JS
Change-Id: I5381e83f6714886b7bf8cbcb859e1dd3b115a6c3
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-11 13:33:10 +00:00
Tobias Hunger
94dc35694a CheckoutWizards: Use IVersionControl::createInitialCheckoutCommand
Change-Id: I09dd38f66b9cad46d561493c2e27a833595d8728
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-11 13:22:49 +00:00
Tobias Hunger
f21d2023e8 Utils: Add a WizardPage to show progress of a ShellCommand
Use the new page in favor of the CheckoutProgressWizardPage.

Change-Id: I7801c146fa67d6fcf550616f3798a7a919aafb96
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-11 13:21:35 +00:00
Tobias Hunger
caca9dfa6f CheckoutWizards: Simplify code to look up specific pages
Change-Id: I0098e17585d73e05632027676e7712ef9c843da2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-11 11:52:00 +00:00
Tobias Hunger
75f067550f IVersionControl: Add method to get a ShellCommand for initial checkouts
Change-Id: Iabc056dad186d788003b221afb34303c37fef728
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-11 11:51:53 +00:00
Ray Donnelly
f5dcc93b7e Debugger: Handle case of os.path.sep being '/'
On MSYS2, if QtCreator is launched from one of the msys2 shells
then the MSYSTEM env. var is set and our Pythons set os.sep and
os.path.sep to '/' so that it aligns with the default separator
of those shells.

fromNativePath(str) then fails to convert '\' seprators embedded
in binaries since str.replace('/', '/') is a noop. The operation
we want here is to convert all '\' to '/' anyway so this is more
explicit regardless of any opinions on our choice to dynamically
vary os.sep and os.path.sep

Change-Id: I76c05b188abca41c6a1b516c68b584e0c06e7235
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-11 11:23:11 +00:00