Commit Graph

41351 Commits

Author SHA1 Message Date
Eike Ziller
72c83463f1 Move sort filter proxy model with category logic to utils
It is useful for other tree models as well.

Change-Id: I48262c266229a91d61579ec1dc068fc18bc33ee0
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-10 09:31:38 +00:00
Eike Ziller
b1393d4778 TreeModel: takeItem should return the item
The usual Qt API for "takeXyz()" methods is to return the item that was
"taken".

Change-Id: Ie144051801487a301b3f13e2857735b65f58150b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-10 08:05:32 +00:00
hjk
5309e217e4 Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.

Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.

Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 07:40:27 +00:00
Orgad Shaneh
7d257acb4b GenericHighlighter: Update built-in definitions
Change-Id: I198af839da35f4057fbfda6226f1314127e59e48
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-10 07:20:36 +00:00
Orgad Shaneh
ef3896ea76 GenericHighlighter: Use a recent update url
Change-Id: Ib4fda739eb01a3098d03e0c2f12fd282d2759c62
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-10 07:20:34 +00:00
hjk
0c4e8328c9 Valgrind: Modernize test connections
Change-Id: I945bee28f04c1bba225a8c6a6f785b6cc5c9ac95
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 06:09:40 +00:00
hjk
94e3382756 Debugger: One more Qt 5 connection
Was forgotten in eaf718bdea.

Change-Id: Ia11999d708ca2d9ffd8d8955945361ce888d4330
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 06:09:29 +00:00
Marco Bubke
d217345456 CmbIpc: Fix wrong block size
The block size was one to big and so the command could only read after a
new command arrived.

Change-Id: I64ae47667d27d66e132031b10d4f130c53d3b0e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 15:10:40 +00:00
Marco Bubke
287a263083 CmbIpc: Remove workaround
Is fixed by the right block size.

Change-Id: If3b961625925cd82740fad0f469784b4d224bac1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 15:10:21 +00:00
Orgad Shaneh
97d3d9ac09 C++: Support default template argument lookup for specialization
This fixes std::vector, although it doesn't really resolve numeric
template arguments. It just picks the first specialization.

Use-case:
class Foo {};
template<class T1 = Foo> class Temp;
template<> class Temp<Foo> { int var; };
void func()
{
    Temp<> t;
    t.var; // var not highlighted
}

Task-number: QTCREATORBUG-8922
Change-Id: I593515beb3a6d901b6088db8bc1b8e16c39083d3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 14:18:17 +00:00
Orgad Shaneh
1c7e465c30 C++: Remove scope argument from initializeSubst
Use the template scope instead.

Change-Id: I8144427e14644697c709643da7c0ae0b0841e34d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 14:18:10 +00:00
Orgad Shaneh
997ab425ce C++: Improve accuracy in findSpecialization
* If a template type is specialized as a pointer, accept only pointers (of any
type)
* Same for references and arrays
* Only if the specialized type is not part of the template, match it
  against the input.

Fixes resolving of partial specialization with pointers.

Use-cases:
// 1
struct b {};
struct a : b {};
template<class X, class Y> struct s { float f; };
template<class X> struct s<X, b*> { int i; };
template<class X> struct s<X, a*> { char j; };

void f()
{
    s<int, a*> var;
    var.j; // j not highlighted
}

// 2
template <typename T> struct Temp { T variable; };
template <typename T> struct Temp<T &> { T reference; };
void func()
{
    Temp<int&> templ;
    templ.reference; // reference not highlighted
}

// 3
class false_type {};
class true_type {};
template<class T1, class T2> class and_type { false_type f; };
template<> class and_type<true_type, true_type> { true_type t; };
void func2()
{
    and_type<true_type, false_type> a;
    a.f; // f not highlighted
}

Task-number: QTCREATORBUG-14036
Change-Id: Idee5e3f41d15c0772318d3837cbcd442cb80293a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 14:17:38 +00:00
hjk
b61413fe0c BareMetal: Modernize connections
Change-Id: I1d504da25b44dc60be7dca2b07f5eadbc437826c
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 13:16:35 +00:00
Orgad Shaneh
3fe1b92566 CppTools: Fix highlighting and follow for template using argument
Use-case:
template<class T>
using Foo = Bar<T>; // T not highlighted

Task-number: QTCREATORBUG-9944
Change-Id: I04cb62ea6a21f158f7fb4fb7ac79ccd6eb1bbfbb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 11:31:40 +00:00
Lorenz Haas
7389f46959 CppEditor: ExtractFunction quick fix asks for access specifier
Task-number: QTCREATORBUG-12127
Change-Id: Ifb6ff22282f0f181e49a260e57307ec937f5dfb2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 11:17:20 +00:00
Lorenz Haas
7879aa5fae CppEditor: Fix added newlines for GenerateGetterSetter quick fix
As a nice side effect superfluous new lines - introduced by quick fixes
that are using InsertionPointLocator::methodDefinition - vanished.

Task-number: QTCREATORBUG-13872
Change-Id: Ib3df2b2acbc22449f16f4444092a57ae93d53d35
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 10:11:56 +00:00
hjk
03212d6e49 Debugger: Use Utils::QtcProcess instead of GdbProcess
The original use case of running GDB itself remotely
is not present anymore.

Change-Id: I283a27216d6a8849fea7d9ca8df6b94571fb99fd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 09:04:33 +00:00
hjk
ad51a43c73 Debugger: More Debugger{Start,Run}Parameter separation
Fixes also the recent regression due to slicing when attaching
to a running application.

Change-Id: I6a7712811d6820b0c57658db10c5ff9790b4a338
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-09 08:16:56 +00:00
Christian Stenger
1db8775675 ResourceEditor: Fix qbs compile
Change-Id: I49412b3e64ad63a33d03f741a9d4fdc6ba07f632
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-09 07:40:48 +00:00
hjk
9f7725da97 Debugger: Code cosmetics
Namespace, override, re-shuffle.

Change-Id: I6327b032707294b680a5411a652970a5f9b38c75
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 07:22:11 +00:00
hjk
3737986a88 Debugger: Add a comment on what WatchHandler::resetValueCache does
Change-Id: I7bb67fd91fb1338f2d42ceee3e47bad20b36a81b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 07:13:50 +00:00
Orgad Shaneh
63433e7b98 C++: Unindent findSpecialization
Change-Id: I5759c4e5b061865d53b00c7eeb0b1cee54f8398e
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
2015-06-09 05:51:17 +00:00
Orgad Shaneh
b365387f0d C++: Add some debug output for specialization choosing
Change-Id: I13082288a56f6f7fe58c69f01824c56294ca258d
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
2015-06-09 05:37:36 +00:00
Eike Ziller
e00aa54f4e Add override keyword to IEditor & TextEditorWidget implementations
Change-Id: I403101d788d9edfea5c5c9440ab4f39ad00e81f7
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-09 04:17:42 +00:00
Eike Ziller
686def2dc2 Resource editor: Remove lots of indirections
Because only the tree view had access to the resource model, many
methods in the IEditor instance and document were going their way
through IEditor -> QRC editor widget -> tree view -> model.
Create the model in the document instead, pass that model to the tree
view, and let the document work on the model directly.

Change-Id: I76405e60f118e2bbf63d3f9a4d39cd73be64aa14
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-06-09 04:17:33 +00:00
Tobias Hunger
ae477c3a4b qml2puppet: s/Q_DECL_OVERRIDE/override/g
Change-Id: I4c582486572df9d94c53163321212b15dcc042cf
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-06-08 10:51:24 +00:00
Tobias Hunger
8264b806af qmldesigner: s/Q_DECL_OVERRIDE/override/g
Change-Id: I8853e3e8c6fe6e6a54d73ce0014f1ae37d377378
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-06-08 10:51:01 +00:00
Nikita Baryshnikov
9a40d3c477 Coding style: mention inlined virtual dtors
in exported classes

Change-Id: I9ff274f05e26baa9d4377f69b0ba441606893357
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-08 08:44:28 +00:00
Orgad Shaneh
30e14b2d24 Do not build main application with testlib
Passing TEST=1 to qmake makes the application run in console.

There are no tests in main.cpp anyway.

Change-Id: Ia5d1e02feb38e635f48169cc47d45738e4556f79
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-08 08:34:00 +00:00
hjk
9af735e2ae Debugger: Use QtcProcess instead of QProcess for LLDB
More similar to what GDB does.

Change-Id: I2c5e952261119f04a515f8b8e79a66c397bff6df
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-08 06:09:28 +00:00
Nikolai Kosjar
9890ddfc9a Check if LLVM_INSTALL_DIR exists
Change-Id: If7122b58c8ee8be8007af4b0ad9a9f726d5c0560
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-05 07:36:25 +00:00
hjk
952a66bf41 Debugger: Remove WatchModel double sorting
Change-Id: Ia26cdcddf086546650525c779c21b0100a616af3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-05 06:18:42 +00:00
David Schulz
20d5c1a826 Cdbext: Add option to return alphabetically sorted locals.
Change-Id: Ida0e8aec41bade10ad1e3ac517812a3a8c120473
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-05 06:16:51 +00:00
Orgad Shaneh
ec4d242bb3 C++: Fix resolving of templated partial specialization
Use-case:
template<class T> struct t {};

template<class> struct s { float f; };
template<class X> struct s<t<X>> { int i; };

void f()
{
    s<t<char>> var;
    var.i; // i not highlighted
}

Task-number: QTCREATORBUG-14034
Change-Id: I5d00bc3247352fca4af4c41a47c208ec3e193c8e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-04 19:23:50 +00:00
Orgad Shaneh
2070431d8c C++: Fix resolving of partial specialization
Use-case:
struct b {};
template<class X, class Y> struct s { float f; };
template<class X> struct s<X, b> { int i; };

void f()
{
    s<int, b> var;
    var.i; // i not highlighted
}

Task-number: QTCREATORBUG-14036
Change-Id: I70a87499e0a375e84d992ca0a79d77270a3419e8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-04 19:23:40 +00:00
Alessandro Portale
d8c012e29b JsonWizard: Remove homebrew QValue(bool).toString()
QValue(bool).toString() does return "true":"false".

Change-Id: I01021eeb6be8a6e65b2fdd61c5adfee1766dbf31
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 17:44:59 +00:00
Tobias Hunger
01a5f9cfc7 MacroExpander: Allow "comment" expansion
%{#: is now treated as a comment and expands to an empty string }

This is useful to add comments about copyright, etc. into the
wizard templates.

Change-Id: I6e25c724edfa4b865d2d4f74b0f4900982d9ea47
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-06-04 15:30:05 +00:00
Tobias Hunger
33a1220019 JsonWizard: Fix expansion of complex macros
Fix expansion of bool macros and empty string macros embedded into
other macros.

Change-Id: I7d65a4692c48c6299956cc8c4c2c28efb1c8e149
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 15:26:32 +00:00
Tobias Hunger
de5f22a9ba JsonWizard: Small code cleanup on summary page
Use constants for strings, simplify signal handling a bit

Change-Id: I80f2985c8e75e98d5f1638626f21c2d9c2efac9c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-06-04 15:26:07 +00:00
Tobias Hunger
dff9ceb929 qmljseditor: s/Q_DECL_OVERRIDE/override/g
Change-Id: Ie01505be57f8e16b782ebd8ed1ff339cfb63cd8c
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 14:42:15 +00:00
Eike Ziller
4890307b0c Wizards: Do not crash when dialogs are still open on quit
Change-Id: I49622484e316b902699e5b63ea3eea827d2f2680
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 14:40:37 +00:00
hjk
eaf718bdea Debugger: Modernize qmlinspectoradapter.cpp
Change-Id: Idb65d85664632121e80a91fd5fae021315c9b33f
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-06-04 14:22:56 +00:00
Tobias Hunger
76a071757d QmlJs: More override changes
Change-Id: Ia2ea4d8ced3a23b38911517d1015b20d3412554e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-04 13:32:46 +00:00
Nikolai Kosjar
99eb408ba1 Codemodelbackend: Use QTC_LIB_DEPENDS
Change-Id: I1bac8210efa636af57822fc5b507909c22638ec6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-04 13:21:13 +00:00
Alessandro Portale
7da2b4a3cb Startup: Limit devicePixelRatio tweaking to Windows
Setting DEVICE_PIXEL_RATIO on Linux to "auto" will disable font hinting
even on systems with a DPR of 1.

This patch limits our tweak to Windows. On OSX, it works reliably,
anyways.

Task-number: QTCREATORBUG-14516
Change-Id: I3c22c264c7f5019d22e1e3692b6d94c1d0777fc6
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-04 13:02:52 +00:00
Tobias Hunger
b4b902eb48 qmljstools: s/Q_DECL_OVERRIDE/override/g
Change-Id: I09e7eae37107c1294555ff5d2021e0b131abd3d7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-04 13:02:14 +00:00
Tobias Hunger
aefc70cb57 clangcodemodel: s/Q_DECL_OVERRIDE/override/g
Change-Id: Ifeb0361832f57435c653ccbdff2f1f6cbba7ef7a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-04 13:01:32 +00:00
Tobias Hunger
4f324c1c20 BaseFileWizard: Initialize pages again
This was broken when getting rid of the WizardEventLoop.

Change-Id: I34488a80c01c39974380b5b9f57e028ca0d5f06c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-04 12:43:37 +00:00
Tobias Hunger
a1b8e94f0b cppeditor: s/Q_DECL_OVERRIDE/override/g
Change-Id: Ie0b75ea64ec3927732b484983311990c8ca0d057
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-04 12:25:58 +00:00
Tobias Hunger
e5da3d8aeb cpptools: s/Q_DECL_OVERRIDE/override/g
Change-Id: I1b239a666b6605035e0f9c140d940e8c260bafd3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-04 12:25:51 +00:00