Commit Graph

4400 Commits

Author SHA1 Message Date
Eike Ziller
19f63a5d8a Merge remote-tracking branch 'origin/3.4' 2015-06-03 08:39:25 +02:00
Robert Loehning
e869d794c8 Revert "Squish: Fix verification in tst_rename_file"
Didn't think of the bug mentioned in my own comment. Sorry.

This reverts commit c7b7fde2bf.

Change-Id: Ida2791a7c985c8036194df437c720a170a39458e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-03 04:52:16 +00:00
Johannes Lorenz
2a966a8917 C++: Support ellipsis on variadic inheritance parsing
Change-Id: I571aefdb1f2aba88ba0c7710f16b6d8ad2e8f5a8
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-02 08:24:17 +00:00
Ray Donnelly
5e61c2dfc7 MinGW-w64 Utils:: compilation fix
The include for utils/environment.h was omitted
unless Q_OS_MSVC, but the code that uses it is
also compiled for MinGW-w64, so change that compile
guard to Q_OS_WIN instead.

Change-Id: I2fa5a09f1864c0ed38d09e3fbb2c6f661fbc8b26
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-01 11:38:37 +00:00
Robert Loehning
c7b7fde2bf Squish: Fix verification in tst_rename_file
This doesn't change anything until we replace the used project.
main.cpp or utility.cpp may get the tempFiletype "Headers" and
then the test will crash because the file can't be opened.
In addition, only files with filetype "Headers" are included in
other files, so verifying including of other files is
pointless.

Change-Id: I30b20269a800eca5ef51de3af209e674da5189bd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-29 10:33:05 +00:00
Robert Loehning
a8cdf035ac Squish: Update to changed behavior when renaming
The bugreport I wrote about this was rated invalid
so now this is the expected behavior.

Change-Id: Ia187062552ad9d4857b5078d4c9c5dde4c8b7521
Task-number: QTCREATORBUG-14469
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-29 09:43:58 +00:00
BogDan Vatra
28d2b16165 Allow plugins to insert custom imports.
This patch allows a plugin to insert custom imports. These imports are
used by QtC for syntax highlighting and code completion. This way a
plugin can register types and objects that are available only at
runtime.

This is an example of an imports function implementation:

QList<Import> MyPlugin::imports(ValueOwner *valueOwner, const Document
*context) const
{
  // context is needed to know from which project is the opened document
  // in this example we don't care about multiple projects

  Import import;
  import.object = new QmlJS::ObjectValue(valueOwner, "<defaults>");
  import.valid = true;
  const ComponentVersion version(1, 0);
  import.info = ImportInfo::moduleImport("MyPlugin", version,
QString());
  auto myType = valueOwner->newObject(nullptr)
  myType->setMember("myProperty", valueOwner->valueOwner->intValue());
  // add more properties & methods/signals to myType

  import.object->setMember("MyType", myType);

  // in this example we return only one, but you care return more than
one
  return QList<Import>(import);
}

Change-Id: I395c273c7b15a9e4ed5a89a81d70ff92db2b7c0c
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-05-28 06:17:58 +00:00
Christian Kandeler
2ed0592dea SSH: Fix error in test.
Change-Id: Ifda41d0fdef54cbc1c5e397be6782bda7a047098
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-05-27 15:03:39 +00:00
Ulf Hermann
7b7dddbbc5 Timeline: Adapt test case for behavior change in selection handling
Change-Id: I560cce362964baf9877d5a4833223ca0669b6d0c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-27 12:10:33 +00:00
Ulf Hermann
15300d8c85 Timeline: Test that model height change signals make sense
Change-Id: I561fb90f163f3ee2bd9f8a28e839392f2501c61f
Task-number: QTCREATORBUG-14507
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-27 12:10:25 +00:00
Orgad Shaneh
588b333669 CppTools: Highlight type for templated using
Task-number: QTCREATORBUG-9944
Change-Id: I614571e05039f24b7d56abdddc15f912581f68f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-27 08:29:36 +00:00
Orgad Shaneh
d004b1b616 CppTools: Fix test_cppsourceprocessor_macroUses on Windows
It assumes LF line-endings

Change-Id: I7bfeb4b6d4db2fd6457030e2d21c240534de9cd2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-27 08:29:22 +00:00
Eike Ziller
3858c33d74 Merge remote-tracking branch 'origin/3.4'
Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
2015-05-26 15:12:42 +02:00
Orgad Shaneh
81721f6781 C++: Fix resolving of recursive typedef
Use-case:
template<typename _Tp>
struct Temp { typedef _Tp value_type; };

struct Foo { int bar; };

void func()
{
    Temp<Temp<Foo> >::value_type::value_type *p;
    p->bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14237
Change-Id: Ie0b21b81526d610437ed2d2877083bb929c25047
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-20 11:14:20 +00:00
Ulf Hermann
aa1b52aec9 Timeline: Use QSGSimpleRectNode for testing render state
Apparently on some Qt versions we cannot add geometry nodes without
material to the tree.

Change-Id: Id6d7debefd2060190f101ab365f27cae2f461d8d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-19 12:38:56 +00:00
Robert Loehning
da2b1cfa4e Squish: Don't analyze kits which take too long
Change-Id: I18e2cb163f2aef81ca34994a38ceb4865b2ae5ad
Task-number: QTCREATORBUG-14307
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-19 09:08:56 +00:00
Christian Kandeler
de133ee89c Timeline: Fix qbs build.
Change-Id: If28191975c4290eb364e2b2849cf2b9e3daa6c13
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-05-19 08:36:48 +00:00
Ulf Hermann
f356aae5f9 Timeline: Test TimelineZoomControl
Change-Id: I7053848aa5c77228ef2ce760899f411cf35c3c25
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:38:33 +00:00
Ulf Hermann
445c7f0014 Timeline: Test TimelineSelectionRenderPass
Change-Id: Ica6c007dd3f6d1e3d1347b7d805273e63e233483
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:38:29 +00:00
Ulf Hermann
3d09c1411a Timeline: Test TimelineRenderState
Change-Id: Ic89642b6b66f7daf83ba0fa6f74f80ef6af857b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:38:25 +00:00
Ulf Hermann
a4945a9f01 Timeline: Test TimelineRenderPass
Change-Id: I20cede53c2a61bfd1a8cf216c4e7054d72c0fb3f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:38:22 +00:00
Ulf Hermann
e460c7d1e2 Timeline: Test TimelineRenderer
Change-Id: I0297601767b5660673b92c7f560e57b114a3523d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:38:19 +00:00
Ulf Hermann
b6b8697bef Timeline: Test TimelineOverviewRenderer
Change-Id: I9450f9e260bb11c9e94f7bfe4beb0a9e47ad3ca7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:38:14 +00:00
Ulf Hermann
2ce83b5193 Timeline: Test TimelineNotesRenderPass
Change-Id: If4778e6cc661c76278a13a61f742e8bb0c2d2dad
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:34:14 +00:00
Ulf Hermann
dad60dfca5 Timeline: Extract common test code into separate files
Change-Id: I812c9343a73f8027a02d4e5670a9751c8b8790c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:34:10 +00:00
Ulf Hermann
de7caa70d1 Timeline: Test TimelineNotesModel
Change-Id: Ic29538d4e6f432a504f076665eb489100592d931
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 12:34:02 +00:00
Ulf Hermann
70e8015fa7 Timeline: Move clearing of dirty flags into TimelineAbstractRenderer
As TimelineAbstractRenderer sets the flags it should also clear them.

Change-Id: I78245a9d9048ed50cd0819cc48d22bed89531883
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 11:17:49 +00:00
Ulf Hermann
94b42da80a Timeline: Make 0-width events visible again.
Events with duration == 0 were erroneously filtered out by the items
render pass. Also, we have to give them a very small width in order for
the "stretching" mechanism in the vertex shader to work.

Change-Id: Icb76168f0831547a3ca55ab79df7161736ed4dc4
Task-number: QTCREATORBUG-14446
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-18 08:20:43 +00:00
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
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
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
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
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
Robert Loehning
82f536c24e Squish: Weaken test for git summary in first commit
Linux test machines count 1673 files instead of 1675.
If this is a bug at all, I don't expect it to be in Creator.

Change-Id: I8202aae88ceda6b8bf472d8b9a7506862ad2473c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-11 08:29:22 +00:00
Eike Ziller
4058ff6fe9 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/extensionsystem/pluginview.cpp

Change-Id: I410156c1003d5dc81e915110c6d432bcd71da010
2015-05-07 14:42:46 +02:00
Orgad Shaneh
33d270976e C++: Fix highlighting of member on indirect specialization typedef
Missed a spot in ad4cb444fb

Task-number: QTCREATORBUG-14141
Change-Id: I1a6a25ce3e9c2a680e1b8eebec01a17749cdb026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-05 08:59:28 +00:00
Christian Kandeler
271794fbc9 Remove some superfluous QT_VERSION_CHECKs.
5.4.0 is required these days.

Change-Id: I0dc4c788b058f4c3fd2b9026fd7d6c7ab2840884
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-30 10:20:45 +00:00
Robert Loehning
6febfc802e Squish: Test showing Creator's first commit
Change-Id: Ibbd7a2ed6ac7c54a304fec057a61357fed3b4274
Task-number: QTCREATORBUG-14322
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-29 12:31:26 +00:00
Orgad Shaneh
6a9bd957cb C++: Fix instantiation of typedefed type in block
Use-case:
template<typename T>
struct Temp { T t; };

struct Foo { int bar; };

void func()
{
    typedef Foo *pointer;
    Temp<pointer> temp;
    temp.t->bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14351
Change-Id: I13ca6145a0069bbc7a7207f69b43011c69ec72c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-28 13:54:40 +00:00
Orgad Shaneh
ad4cb444fb C++: Fix specialization resolution for nested types
Use-cases:

template<typename T>
struct Traits { typedef typename T::pointer pointer; };

template<typename _Tp>
struct Traits<_Tp*> { typedef _Tp *pointer; };

struct Foo { int bar; };

// 1
template<typename T>
class Temp
{
protected:
   typedef Traits<T> TraitsT;

public:
   typedef typename TraitsT::pointer pointer;
   pointer p;
};

void func()
{
   Temp<Foo *> t;
   t.p-> // complete
}

// 2
class Temp2
{
protected:
   typedef Foo *FooPtr;
   typedef Traits<FooPtr> TraitsT;

public:
   typedef typename TraitsT::pointer pointer;
   pointer p;
};

void func2()
{
   Temp2 t;
   t.p-> // complete
}

Task-number: QTCREATORBUG-14141
Change-Id: Id3459671117c0c81bcde7c9714b42750634c0225
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-28 13:54:25 +00:00
Daniel Teske
3f183b7ee0 Purge deployment.pri
It was only used by the plain C and plain C++ templates. Given how ugly
and unmaintained deployment.pri is that is probably not a smart choice.

Change-Id: Idfdd4ec2b8e353d39505b603c3f4ca92bb34efcf
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-04-28 09:32:07 +00:00
Orgad Shaneh
8a84a7305e C++: Add failing template-related tests to CheckSymbols
Runs much faster than plugin tests.

Change-Id: Ie90d10c7d88b63f36bc00077af67d67e24cb4c50
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-23 08:18:44 +00:00
Eike Ziller
6c2c505228 Merge remote-tracking branch 'origin/3.4' 2015-04-23 09:39:09 +02:00
Nikita Baryshnikov
f32eb69a3e TreeModel.test compile fix
for 2b19081cb0

Change-Id: I0b93014602a8a960d9357017bf3b3b096aa2b37c
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-22 16:10:01 +00:00
hjk
2b19081cb0 TreeModel: More API cleanup
- introduce topLevelItemCount (similar to QTreeWidget)
- squash untypedTreeLevelItems()
- rename removeItems() to clear()
- rename removeItem() to takeItem()
- rename treeLevelItems<> to itemsAtLevel<>

Change-Id: I0f1bb4110f7687b20da3d92e3d943858645a9fa2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-22 13:48:18 +00:00
kai666_73
b30b69bbf3 C++: Find template member access in find usages
Example:
struct Foo {};
struct Bar {
  template <typename T>
  T *templateFunc() { return 0; }
};
struct Test {
  Bar member;
  void testFunc();
};
void Test::testFunc() {
  member.templateFunc<Foo>();   // "templateFunc" and "Foo" outside of FindUsages
}

Change-Id: I0c5109d00c67054fe15b3fb98cf8cbca69123d8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-22 13:17:15 +00:00
Christian Stenger
9f269dfb63 Squish: Fix accessing objects on project's Build & Run settings
Change-Id: I4a91b920796cd4cdfd383ac24282ef59c0c4a421
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
2015-04-22 11:58:56 +00:00
Orgad Shaneh
13e3c9bc03 C++: Cleanup long CheckSymbols test
Change-Id: I2d1d75d150e4072e649f77e6e46c9a3256f3194b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-22 11:47:08 +00:00
Orgad Shaneh
cb350bfeb2 C++: Rename ClassOrNamespace -> LookupScope
Change-Id: Ide74482b133dd1fec40a725d9aa81bd749385f37
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-20 14:51:56 +00:00
Orgad Shaneh
29ac9fc65f C++: Remove DeprecatedGenTemplateInstance
It's, well, deprecated...

Change-Id: Ie9d7e80345a8d9404f702dd877b3e940a1a49d93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-20 13:37:35 +00:00