Application info style

This commit is contained in:
Klaus Basan
2018-10-14 01:55:00 +02:00
parent 895bb6b58f
commit bcc2f557a1
2 changed files with 7 additions and 7 deletions

View File

@@ -7,8 +7,6 @@
* contained in the LICENSE file.
*/
//! \file
#include "blackmisc/applicationinfo.h"
#include "blackmisc/iconlist.h"
#include "blackmisc/comparefunctions.h"
@@ -94,7 +92,7 @@ namespace BlackMisc
QString CApplicationInfo::convertToQString(bool i18n) const
{
return QString("{ %1, %2, %3, %4 }").arg(this->getApplicationAsString(), m_exePath, m_version, m_process.convertToQString(i18n));
return QStringLiteral("{ %1, %2, %3, %4 }").arg(this->getApplicationAsString(), m_exePath, m_version, m_process.convertToQString(i18n));
}
CIcon CApplicationInfo::toIcon() const
@@ -147,8 +145,9 @@ namespace BlackMisc
case IndexProcessInfo: m_process.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
case IndexVersionString: this->setVersionString(variant.toQString()); break;
case IndexWordSize: this->setWordSize(variant.toInt()); break;
default: CValueObject::setPropertyByIndex(index, variant); break;
default: break;
}
CValueObject::setPropertyByIndex(index, variant);
}
int CApplicationInfo::comparePropertyByIndex(const CPropertyIndex &index, const CApplicationInfo &compareValue) const
@@ -167,8 +166,8 @@ namespace BlackMisc
case IndexWordSize: return Compare::compare(this->getWordSize(), compareValue.getWordSize());
case IndexApplication:
case IndexApplicationAsString:
default:
return this->getApplicationAsString().compare(compareValue.getApplicationAsString());
return Compare::compare(m_app, compareValue.m_app);
default: return CValueObject::comparePropertyByIndex(index.copyFrontRemoved(), compareValue);
}
}

View File

@@ -13,6 +13,7 @@
#define BLACKMISC_APPLICATIONINFO_H
#include "blackmisc/processinfo.h"
#include <QString>
#include <QMetaType>
#include <QFlags>
@@ -51,7 +52,7 @@ namespace BlackMisc
IndexPlatformInfo,
IndexProcessInfo,
IndexVersionString,
IndexWordSize,
IndexWordSize
};
//! Default constructor.