one more optimization

The previous versions stored values as string, so any (even if they are
not used) values being converted into string, and then (if required)
being converted back to float/int/etc. I've changed the mechanism, so
they are stored as QVariant (native value).

Please note that it is possible that this rewrite may cause crash in
some cases (if I've missed smth).
This commit is contained in:
2016-02-10 10:51:01 +03:00
parent d856fa8e97
commit 5c474e822b
6 changed files with 83 additions and 66 deletions

View File

@ -42,6 +42,7 @@ class AWKeysAggregator : public QObject
Float,
FloatTwoSymbols,
Integer,
IntegerFive,
IntegerThree,
List,
// unit specific formaters
@ -78,7 +79,7 @@ public:
public slots:
QStringList registerSource(const QString &source, const QString &units,
const QStringList &keys = QStringList());
const QStringList &keys);
private:
float temperature(const float temp) const;