mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
Fixed property index for CUser, and as a result also in the list model
This commit is contained in:
@@ -13,13 +13,11 @@ namespace BlackGui
|
|||||||
CUserListModel::CUserListModel(QObject *parent) :
|
CUserListModel::CUserListModel(QObject *parent) :
|
||||||
CListModelBase<BlackMisc::Network::CUser, BlackMisc::Network::CUserList>("ViewUserList", parent)
|
CListModelBase<BlackMisc::Network::CUser, BlackMisc::Network::CUserList>("ViewUserList", parent)
|
||||||
{
|
{
|
||||||
this->m_columns.addColumn(CUser::IndexId, "id");
|
|
||||||
this->m_columns.addColumn(CUser::IndexRealName, "realname");
|
this->m_columns.addColumn(CUser::IndexRealName, "realname");
|
||||||
this->m_columns.addColumn(CUser::IndexId, "userid");
|
this->m_columns.addColumn(CUser::IndexId, "userid");
|
||||||
this->m_columns.addColumn(CUser::IndexEmail, "email");
|
this->m_columns.addColumn(CUser::IndexEmail, "email");
|
||||||
|
|
||||||
// force strings for translation in resource files
|
// force strings for translation in resource files
|
||||||
(void)QT_TRANSLATE_NOOP("ViewUserList", "id");
|
|
||||||
(void)QT_TRANSLATE_NOOP("ViewUserList", "realname");
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "realname");
|
||||||
(void)QT_TRANSLATE_NOOP("ViewUserList", "userid");
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "userid");
|
||||||
(void)QT_TRANSLATE_NOOP("ViewUserList", "email");
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "email");
|
||||||
|
|||||||
@@ -121,20 +121,16 @@ namespace BlackMisc
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Equal operator ==
|
* \brief Equal operator ==
|
||||||
* \param other
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
bool operator ==(const CUser &other) const;
|
bool operator ==(const CUser &other) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Unequal operator ==
|
* \brief Unequal operator !=
|
||||||
* \param other
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
bool operator !=(const CUser &other) const;
|
bool operator !=(const CUser &other) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Value hash
|
* \copydoc CValueObject::getValueHash()
|
||||||
*/
|
*/
|
||||||
virtual uint getValueHash() const;
|
virtual uint getValueHash() const;
|
||||||
|
|
||||||
@@ -144,23 +140,19 @@ namespace BlackMisc
|
|||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This another user exchange missing data
|
* This and another user exchange missing data.
|
||||||
* This user has priority and overrides first
|
* This user has priority and overrides first.
|
||||||
* \param otherUser
|
* \param otherUser
|
||||||
*/
|
*/
|
||||||
void syncronizeData(CUser &otherUser);
|
void syncronizeData(CUser &otherUser);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Property by index
|
* \copydoc CValueObject::propertyByIndex(int)
|
||||||
* \param index
|
|
||||||
* \return
|
|
||||||
*/
|
*/
|
||||||
QVariant propertyByIndex(int index) const;
|
QVariant propertyByIndex(int index) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Property by index
|
* \copydoc CValueObject::propertyByIndex(const QVariant, int)
|
||||||
* \param variant
|
|
||||||
* \param index
|
|
||||||
*/
|
*/
|
||||||
void propertyByIndex(const QVariant &variant, int index);
|
void propertyByIndex(const QVariant &variant, int index);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user