mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Ref T456, user statistics monitored at backend
* values for simulator/network * changed concept a bit so crash handler values are used for statistics as well
This commit is contained in:
@@ -35,6 +35,8 @@ namespace BlackMisc
|
||||
{
|
||||
case IndexUserName: return CVariant::fromValue(m_userName);
|
||||
case IndexInfo: return CVariant::fromValue(m_info);
|
||||
case IndexSimulatorString: return CVariant::fromValue(m_simulatorString);
|
||||
case IndexFlightNetworkInfo: return CVariant::fromValue(m_flightNetwork);
|
||||
default: break;
|
||||
}
|
||||
return CValueObject::propertyByIndex(index);
|
||||
@@ -48,6 +50,8 @@ namespace BlackMisc
|
||||
{
|
||||
case IndexUserName: this->setUserName(variant.toQString()); break;
|
||||
case IndexInfo: this->setUserName(variant.toQString()); break;
|
||||
case IndexSimulatorString: this->setSimulatorString(variant.toQString()); break;
|
||||
case IndexFlightNetworkInfo: this->setFlightNetworkString(variant.toQString()); break;
|
||||
default: CValueObject::setPropertyByIndex(index, variant); break;
|
||||
}
|
||||
}
|
||||
@@ -60,6 +64,8 @@ namespace BlackMisc
|
||||
{
|
||||
case IndexUserName: return this->getUserName().compare(compareValue.getUserName());
|
||||
case IndexInfo: return this->getInfo().compare(compareValue.getInfo());
|
||||
case IndexSimulatorString: return this->getSimulatorString().compare(compareValue.getInfo());
|
||||
case IndexFlightNetworkInfo: return this->getFlightNetworkString().compare(compareValue.getFlightNetworkString());
|
||||
default: return CValueObject::comparePropertyByIndex(index.copyFrontRemoved(), compareValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,9 @@ namespace BlackMisc
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexUserName = CPropertyIndex::GlobalIndexCCrashInfo,
|
||||
IndexInfo
|
||||
IndexInfo,
|
||||
IndexSimulatorString,
|
||||
IndexFlightNetworkInfo
|
||||
};
|
||||
|
||||
//! Default constructor.
|
||||
@@ -45,6 +47,18 @@ namespace BlackMisc
|
||||
//! Set info
|
||||
void setInfo(const QString &info) { m_info = info; }
|
||||
|
||||
//! Simulator string
|
||||
const QString &getSimulatorString() const { return m_simulatorString; }
|
||||
|
||||
//! Simulator string
|
||||
void setSimulatorString(const QString &simString) { m_simulatorString = simString; }
|
||||
|
||||
//! Network string
|
||||
const QString &getFlightNetworkString() const { return m_flightNetwork; }
|
||||
|
||||
//! Network string
|
||||
void setFlightNetworkString(const QString &network) { m_flightNetwork = network; }
|
||||
|
||||
//! Append some info
|
||||
void appendInfo(const QString &extraInfo);
|
||||
|
||||
@@ -63,6 +77,8 @@ namespace BlackMisc
|
||||
private:
|
||||
QString m_userName;
|
||||
QString m_info;
|
||||
QString m_simulatorString;
|
||||
QString m_flightNetwork;
|
||||
|
||||
BLACK_METACLASS(
|
||||
CCrashInfo,
|
||||
|
||||
@@ -95,12 +95,12 @@ namespace BlackMisc
|
||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::String::toQString()
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
private:
|
||||
BlackMisc::CNameVariantPairList m_data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user