Rename BasicSettingsAccessor to SettingsAccessor, now that the name
is available again.
Change-Id: I49473f0c701976f992209f06d48decf047ab19de
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Test picking the expected file when several exist in
BackingUpSettingsAccessor.
Change-Id: I09d346a98a8df13d6cf3ee53ee20ce34e45e8d28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Move functionality related to merging settings into MergingSettingsAccessor,
move code specific to the .user-files into UserFileAccessor.
Remove SettingsAccessor class, now that all code has been moved out of it.
This patch changes the merge mechanism a bit: It used to upgrade
the user and tha shared file to the higher version of these two, merge,
and then upgrade the merged result to the newest version.
Now it upgrades both the user as well as the shared file to the newest
version and only merges afterwards.
Change-Id: I2a1605cbe9b9fb1404fcfa9954a9f3410da0abb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Extract upgrading functionality from SettingsAccessor into
UpgradingSettingsAccessor.
Fixes surprising behavior in test
ProjectExplorerPlugin::testUserFileAccessor_prepareToReadSettingsObsoleteVersionNewVersion
where the Version was thrown away.
Also adds a error/warning distinction to BasicSettingsAccessor::Issue,
so that the non-critical ones can be ignored later.
Change-Id: Ia38d074f91cd8d8f820f9bec96d3330d748564c7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Extract the code that handles backups from the SettingsAccessor into
a BackingUpSettingsAccessor.
Move code up from SettingsAccessor into UserFileAccessor where it belongs.
This became possible due to the extraction.
Change-Id: Icacaa4e7231b3c0c520154c76f9338227f96a614
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Function to convert char[] into QString has been deleted.
Change-Id: Iedf5db322b907d4ea1a20cc5c70394388d54f214
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
... and use it for the hidden "sequence" feature.
Change-Id: I3430a24774264a573687ee818064314a8bca7212
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The scale parameters are converted to single precision float anyway as
soon as we do something with them. We might as well change all the
methods to be single precision, too.
The min/max row values should really be 64bit as 32bit values are not
enough to express memory usage.
Change-Id: I2b058b112286eabb1c077f7e746c48b6b99cb416
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Move file access and error reporting out of SettingsAccessor and into
BasicSettingsAccessor.
Change-Id: If6cc9157c1a532f117c48b929c05f55d89a339eb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Linux/gdb only, pretty print the cases of default constructed objects
and real function pointers.
Task-number: QTCREATORBUG-19410
Change-Id: I08332af649bda861d9f53c0e0feb1f37db72b875
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add support for output as std::map/unordered_map/set and QMap and QHash,
when giving the full result type as template argument. For std::
(unordered_)map, the function must return a std::pair<Key,Value>, for
QMap and QHash it can also be QPair<Key,Value>.
Change-Id: If3dff17ab6aa5d1b11abc244813fd885d10c75a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Support containers without reserve() as result container, for example
std::set/deque/list
Change-Id: Ia96b834c67d5ee74bfb9de2cf6b86639f6b3d5d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Sometimes you want to get raw pointer container from smart pointer
container and reference container from value container.
Change-Id: Ia018d572ac0a7bf742f3937dc38ee30670a3ca73
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Can come in handy when the function or member does not directly return
the right value type for the result list, but is implicitly convertable
to it. For example from pointer to class to pointer to superclass, or
from int to double.
const auto result
= Utils::transform<QVector<double>>(v, &ValueType::intMember)
Change-Id: I0e1914d70bb2580b91098dd37e85a31ca14b0ae6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Support std::vector and similar classes as input and output.
Change-Id: I1d202d54c18e868ce0e71e4c2b6288565710baa8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Consistently use anyOf to implement contains.
* Support contains over an container of std::unique_ptr matching a pointer.
Change-Id: I0180f3ec3d5935d8afeeac67a745d4b38a01674d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Add setters to VersionUpgrader and use them. This shortens the
implementation classes a bit.
Change-Id: I5ffe6f085752bf39bbcb08c286844cc1088eeea5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Template code inside utils/algorithm.h is not correctly instantiated when
respective containers that shall use these functions are included after
the algorithm file.
Additionally there had been issues using nullptr as comparison inside
QCOMPARE().
Change-Id: I2bd6baf3890090c5f5bbbd6229afb9aeeb7617ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Make sure that the input data is returned unchanged if an invalid update
attempt is attempted.
Update tests accordingly.
Change-Id: If5c410bf1a757f984593bda871763af64d8dd972
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Improve the behavior of isBetterMatch, so that it now handles
invalid versions as well as invalid ids. Simplify code where possible.
Change-Id: I2e65c0cc01d32fa77df8b5ec0d62b765e6c458f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>