Commit Graph

6 Commits

Author SHA1 Message Date
hjk
f6715fe52b Utils: Add a ObjectPool convenience class template
The ObjectPool class template provides parts of the functionality
of the global PluginManager object pool but is intented to be
used with smaller set objects, typically with same base type (e.g.
factories) only.

The ObjectPool takes ownership of add items if and only if the item does
not have a QObject parent.

Items owned by the Object pool are destructed when the pool is
destructed, the other items are taken care of by their QObject parent
according to the usual parent/child behavior.

Change-Id: I60886095c8b04eae017e1fb56774b1bf66dbefa1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-03 14:59:44 +00:00
Tobias Hunger
95b0dc9120 Utils: Move template file processing from projectexplorer to utils
I want to use it e.g. for snippets and the TextEditor plugin may
not depend on the ProjectExplorer, so the code has to move.

This adds a dependency on QtQml to Utils, but that does not really
matter since that is loaded into QtCreator anyway.

Change-Id: Iada9f40b2966a1fc41631ab33da09812ad67d967
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-12 11:53:01 +00:00
hjk
7fec1199f3 Tests: Add a basic tree model iteration test
Change-Id: I6b4dff0909e87ab727cb8c5b5be6f6c25b687bf0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-16 14:57:16 +01:00
hjk
4f6279256d Tests: Move auto/utils_stringutils to auto/utils/stringutils
Change-Id: I475a5914f3b65656dc12cf7619bfed34e9fc8b74
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-16 13:32:41 +01:00
Andre Hartmann
0ff2ed6460 AnsiEscapeCodeHandler: Added auto tests.
First simple tests to check:
* pass-trough text without ANSI escape sequences
* text-color change in line
* text-bold change in line

Change-Id: I054a3fb218e95dfd5e160f1ae71dc0638bc5f239
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-09-12 10:31:41 +02:00
Tobias Hunger
0df375a08a FileName: Add method to find parent directories
Change-Id: Ia8382e3f7a9312e0878cce041723973ccf751aae
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-25 17:15:17 +01:00