Commit Graph

14 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
737877984d Use QTEST_GUILESS_MAIN where applicable
instead of QTEST_MAIN. Reduces the initialization that is done by the Qt
test applications, and can also reduce interference with normal OS
operations like the current window loosing focus.

Change-Id: If88f289281aa1c8703ac7d4dbe0799d067c16588
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-13 06:06:44 +00:00
Nikolai Kosjar
c9a3d2bea1 RunExtensions: Support specifying thread stack size
...with runAsync().

The stack size cannot be changed after starting a thread, so specifying
the stack size with a pool does not make sense. However, starting
with Qt 5.10 a stack size can be specified for the whole thread pool, if
needed.

Change-Id: I09eded606321388c779f762b77de6223081609fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-04 09:56:50 +00:00
Eike Ziller
f1d3e7c8e7 runextensions: Add convenience method for result handler
Change-Id: Ibe7e62049f165276fdedcd04d8311324f6bc5d19
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-31 09:31:02 +00:00
Eike Ziller
dcf09b0008 runAsync: Support functions wrapped in reference_wrapper
Change-Id: I2dbb793239d432a1316dadb81beee564cc858eaa
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-26 08:35:40 +00:00
Eike Ziller
72af6b7834 runAsync: Remove ResultType template parameter.
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.

Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 10:58:55 +00:00
Eike Ziller
d362abf1e2 runAsync: Support functions without QFutureInterface parameter.
Change-Id: I8e387d683eceab642ddd3fac90a2a5f407a868dc
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-05 08:57:49 +00:00
Eike Ziller
41d4fabf34 runAsync: Allow thread priority without thread pool
Change-Id: I6d4ee8fa1bf45c7a24ff6a004b3c69007c645547
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-04 10:13:20 +00:00
Eike Ziller
b19cac022e runAsync: Add test for move-only types
Excludes MSVC2013 which doesn't really support moving.

Change-Id: I2bffa546f2c90946b4d99e0eee292741b900a386
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-03 14:08:36 +00:00
Eike Ziller
349b49caaa RunExtensions: Allow running functions on arbitrary thread pools
Change-Id: Icf642e7365535e4b2ca6fa4dee90a7033eb39af7
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2016-01-28 12:41:37 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Eike Ziller
6513fc88b3 runAsync: Allow calling member functions
Change-Id: Ide09b5585730fb3dcb4a18718a02a4d8351ef91e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-19 06:07:43 +00:00
Eike Ziller
4b077921e2 runAsync: Allow function references, and non-const parameters.
Change-Id: I258259da7767087a8319d6a4489aa4d6c3b32c6f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-19 06:07:33 +00:00
Eike Ziller
e90ef40336 Add auto tests for Utils::runAsync
Change-Id: I59494d410ec529fd9689c64fea299ada6f6a472b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-19 06:07:23 +00:00