Commit Graph

57 Commits

Author SHA1 Message Date
Mat Sutcliffe
2435350e17 Issue #77 Break cyclic dependency between CVariant and CVariantList 2020-12-19 18:50:38 +00:00
Mat Sutcliffe
1991b4847a Issue #77 Break cyclic dependency between CPropertyIndex and all other value classes 2020-12-19 18:50:36 +00:00
Mat Sutcliffe
0971c8ce68 Issue #77 All classes propertyindex methods use CPropertyIndexRef and QVariant 2020-12-19 18:50:35 +00:00
Mat Sutcliffe
c2ac37f552 Issue #77 Remove unused methods 2020-12-19 18:50:34 +00:00
Mat Sutcliffe
647e9064b0 Issue #77 Break cyclic dependency between CIcon and all other value classes 2020-12-19 18:50:32 +00:00
Mat Sutcliffe
b1185eb541 Issue #77 toIcon returns a simple enum instead of a full object 2020-12-19 18:50:31 +00:00
Mat Sutcliffe
89659fdeaa Issue #77 Break cyclic dependency statusmessage <-> jsonexception 2020-08-29 14:16:19 +01:00
Mat Sutcliffe
b80114213d Issue #77 Move mixin classes to separate files
By separating them from unrelated code, their dependents
can use them without depending on unrelated code, which
in turn helps to reduce cyclic dependencies.
2020-08-29 14:16:17 +01:00
Mat Sutcliffe
2dc86652c2 Issue #77 Include style 2020-08-28 00:45:26 +01:00
Mat Sutcliffe
073f1549a2 Issue #15 Added CVariant::matches()
If the contained object type has a matches() method, CVariant::matches()
will call that method and return its result.
(This is a utility to allow using CVariant to represent an event subscription.)
2020-08-01 13:18:56 +01:00
Mat Sutcliffe
07f6c8b73c Issue #15 CVariant can convert between CVariantList and our other container classes 2020-08-01 13:18:55 +01:00
Mat Sutcliffe
6d9f9a286d Ref T552 Using QDataStream marshalling mixins in value classes. 2019-04-12 13:30:55 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Klaus Basan
d7026dbf42 Ref T442, directly return image/icon types from CVariant 2018-12-05 04:03:44 +01:00
Klaus Basan
183280fa75 Ref T308, using an optimized (faster) function for YYYYmmdd string parsing
Ref T309, found that QDateTime::fromString returns a QDateTime object with local timestamp. Using a optimized version returns UTC objects now.

- The bug was found writing a unit test for Ref T308
- Slack: https://swift-project.slack.com/archives/G7GD2UP9C/p1534848725000100
2018-08-22 12:31:53 +02:00
Klaus Basan
117862e756 Ref T270, added CVariant long long functions and used those in formatter 2018-05-26 21:19:22 +02:00
Klaus Basan
fc35e8b654 Formatting, style 2018-05-22 13:23:47 +02:00
Klaus Basan
afe4a09218 Formatting 2018-05-18 00:25:10 +02:00
Klaus Basan
50a625d2bc Ref T267, allow to call "convertFromMemoizedJson", but also convert via "convertFromJson"
The variant convertFromMemoizedJson trait did already do something similar, calling "convertFromJson" if the memoized version is not avilable. Now the function also "decides" based on the passed data itself.
2018-05-18 00:25:08 +02:00
Klaus Basan
08f8916344 refs #922, refs #911, JSON cut/copy/paste
* utility function for CVariant
* use CVariant for cut/copy/paste
2017-04-18 00:06:15 +01:00
Mathew Sutcliffe
baf5c62502 refs #884 Use CJsonException instead of CLogMessage when CVariant::convertFromJson fails. 2017-02-28 17:05:35 +00:00
Mathew Sutcliffe
01a84252db refs #884 Fixed JSON deserialization of qint64 when stored inside CVariant. 2017-02-28 17:02:20 +00:00
Mathew Sutcliffe
4f6d3ed3a3 refs #815 Added convertFromJsonNoThrow methods which catch CJsonException and return CStatusMessage. 2017-01-10 23:46:34 +00:00
Mathew Sutcliffe
bbdbd26f82 refs #815 Throw CJsonException when required JSON objects are not found. 2017-01-10 23:46:33 +00:00
Mathew Sutcliffe
72a5a0e670 refs #784 CVariant can detect whether a value object supports memoized JSON and pick the appropriate methods to call. 2016-12-13 19:00:20 +01:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Klaus Basan
0f5d2a29a8 refs #655, Change signature (order) of setProperty/compareProperty 2016-05-13 16:44:17 +02:00
Michał Garapich
1a3e610cbf refs #513 Make plugin selection persistent
* Saved listeners are started on application startup
* CVariant has support for QStringList
2016-05-04 22:58:08 +02:00
Mathew Sutcliffe
c934384622 refs #626 Empty type name indicates an empty variant, no warning in this case. 2016-04-03 20:55:00 +01:00
Mathew Sutcliffe
d36f003817 refs #626 Update CVariant warnings to current style. 2016-04-03 18:17:47 +01:00
Mathew Sutcliffe
79121e0088 refs #626 Warnings in case CVariant convertFromJson or unmarshallFromDbus gets an unregistered type name. 2016-04-03 18:17:46 +01:00
Klaus Basan
c3722f9198 refs #485, refs #584 removed include blackmiscfreefunctions.h 2016-03-18 01:07:49 +00:00
Roland Winklmeier
1ea2f34f75 Fix doxygen documentation in src, samples and tests
refs #594
2016-02-16 20:01:33 +01:00
Klaus Basan
1fc7300982 refs #507, split up blackmiscfreefunctions
* single register metadata functions
* string utils
* metadata utils
* some formatting / license header where applicable
2015-11-22 02:42:29 +01:00
Klaus Basan
a32c32f7f4 Fix handling of invalid variant
(Slack MS/KB)
2015-11-19 21:06:52 +00:00
Mathew Sutcliffe
f03b24022e refs #466 Resolved TODO item in GUI. 2015-11-19 21:01:04 +00:00
Klaus Basan
51e8a6a208 refs #452, added getClassName for variant
(as discussed with MS)
2015-11-19 20:58:34 +00:00
Mathew Sutcliffe
0e2f8f51ba refs #450 CVariant has to work around the fact that QtDBus can't marshal an invalid QVariant. 2015-11-19 20:58:29 +00:00
Mathew Sutcliffe
ca9256be82 refs #450 Corrected emission of log messages from value cache validation. 2015-11-19 20:58:09 +00:00
Mathew Sutcliffe
71d93f1690 Fixed switch case fall-through mistake in CVariant JSON methods. 2015-11-19 20:51:21 +00:00
Mathew Sutcliffe
27ce1eb914 Added toJson/convertFromJson support for CVariant containing QDateTime, QDate, QTime.
(cherry picked from commit af7f032daf4e5031a881bfb5025734d38817ed97)
2015-05-12 20:46:31 +01:00
Mathew Sutcliffe
9cdacf8d86 refs #413 To signal when contained object doesn't support an operation, throw exception in CValueObjectMetaInfo and catch in CVariant. 2015-05-12 20:37:58 +01:00
Mathew Sutcliffe
9867b4a6df refs #413 Extend Private::CValueObjectMetaInfo with more fallback helpers, and extend CVariant with toIcon method. 2015-05-12 20:37:56 +01:00
Mathew Sutcliffe
d878f879aa refs #356 Minor refactoring to Compare policy, preparation for removing CValueObject. 2015-03-27 19:08:50 +00:00
Mathew Sutcliffe
2ea9d031ea refs #356 Extend CVariant to support accessing properties by index of the contained value object. 2015-03-27 19:08:49 +00:00
Mathew Sutcliffe
155b957cee refs #247 CVariant can inherit from CValueObjectStdTuple.
But if valueobject.h includes variant.h then it would create a circular dependency.
2014-12-13 01:41:49 +00:00
Mathew Sutcliffe
f68fc32f3d refs #247 CVariant uses our new metadata system to provide access to CValueObject operations in a safe manner. 2014-12-13 01:41:48 +00:00
Mathew Sutcliffe
c5b463fafb refs #247 Created a facility to register our own custom metatype metadata. 2014-12-13 01:41:46 +00:00
Mathew Sutcliffe
16e285cecd refs #247 Style. 2014-12-13 01:38:53 +00:00