mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Bug fixes and improvements for PropertyIndex discovered during refs #319, mainly contributing to refs #314
* Start index 10 instead 0 for CValueObject (easier to detect bugs) * Fixed wrong indexes * Asserts in CPropertyIndex * Used Icon instead of QPixpmap with indexes, icons are sortable and have a tooltip * Removed redundant toQVariant methods
This commit is contained in:
@@ -23,6 +23,7 @@ namespace BlackMisc
|
||||
*/
|
||||
CPropertyIndex::CPropertyIndex(int singleProperty)
|
||||
{
|
||||
Q_ASSERT(singleProperty >= static_cast<int>(GlobalIndexCValueObject));
|
||||
this->m_indexes.append(singleProperty);
|
||||
this->listToString();
|
||||
}
|
||||
@@ -152,6 +153,7 @@ namespace BlackMisc
|
||||
QString l;
|
||||
foreach(int i, this->m_indexes)
|
||||
{
|
||||
Q_ASSERT(i >= static_cast<int>(GlobalIndexCValueObject));
|
||||
if (!l.isEmpty()) { l.append(";"); }
|
||||
l.append(QString::number(i));
|
||||
}
|
||||
@@ -172,6 +174,7 @@ namespace BlackMisc
|
||||
bool ok;
|
||||
int i = index.toInt(&ok);
|
||||
Q_ASSERT(ok);
|
||||
Q_ASSERT(i >= static_cast<int>(GlobalIndexCValueObject));
|
||||
this->m_indexes.append(i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user