From 139554578c38ad5cc5ea8c0508d53357f565092d Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 18 Apr 2016 09:33:35 +0300 Subject: [PATCH] fix bug introduced by 5c474e822bdb3a603fb322aca75e8a5f612da1b8 No conversion has been applied for total memory values --- sources/awesome-widget/plugin/awkeysaggregator.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sources/awesome-widget/plugin/awkeysaggregator.cpp b/sources/awesome-widget/plugin/awkeysaggregator.cpp index d5b651a..791968f 100644 --- a/sources/awesome-widget/plugin/awkeysaggregator.cpp +++ b/sources/awesome-widget/plugin/awkeysaggregator.cpp @@ -34,8 +34,8 @@ AWKeysAggregator::AWKeysAggregator(QObject *parent) // default formaters // memory m_formater[QString("mem")] = FormaterType::Float; - m_formater[QString("memtotmb")] = FormaterType::IntegerFive; - m_formater[QString("memtotgb")] = FormaterType::Float; + m_formater[QString("memtotmb")] = FormaterType::MemMBFormat; + m_formater[QString("memtotgb")] = FormaterType::MemGBFormat; // network m_formater[QString("down")] = FormaterType::NetSmartFormat; m_formater[QString("downkb")] = FormaterType::Integer; @@ -45,8 +45,8 @@ AWKeysAggregator::AWKeysAggregator(QObject *parent) m_formater[QString("upunits")] = FormaterType::NetSmartUnits; // swap m_formater[QString("swap")] = FormaterType::Float; - m_formater[QString("swaptotmb")] = FormaterType::IntegerFive; - m_formater[QString("swaptotgb")] = FormaterType::Float; + m_formater[QString("swaptotmb")] = FormaterType::MemMBFormat; + m_formater[QString("swaptotgb")] = FormaterType::MemGBFormat; } @@ -336,8 +336,9 @@ QStringList AWKeysAggregator::registerSource(const QString &source, m_formater[key] = FormaterType::Float; // additional keys m_formater[QString("hddtotmb%1").arg(index)] - = FormaterType::IntegerFive; - m_formater[QString("hddtotgb%1").arg(index)] = FormaterType::Float; + = FormaterType::MemMBFormat; + m_formater[QString("hddtotgb%1").arg(index)] + = FormaterType::MemGBFormat; } } else if (source.contains(mountFreeRegExp)) { // free space