forked from qt-creator/qt-creator
QmlDesigner: Clean up PropertyTree Model
* Remove call to test * Remve qdebugs * Fix priorityListSignals Change-Id: I0828a9eb7b90c6d7a4903f2cbaf4382e1f3a413e Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -152,7 +152,6 @@ void PropertyTreeModel::resetModel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
endResetModel();
|
endResetModel();
|
||||||
testModel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString stripQualification(const QString &string)
|
QString stripQualification(const QString &string)
|
||||||
@@ -563,32 +562,7 @@ const std::vector<PropertyName> PropertyTreeModel::sortedAndFilteredSignalNames(
|
|||||||
{
|
{
|
||||||
Q_UNUSED(recursive);
|
Q_UNUSED(recursive);
|
||||||
|
|
||||||
const std::vector<PropertyName> priorityListSignals = {"clicked",
|
auto filtered = Utils::filtered(metaInfo.signalNames(), [](const PropertyName &name) {
|
||||||
"doubleClicked",
|
|
||||||
"pressed",
|
|
||||||
"released",
|
|
||||||
"toggled",
|
|
||||||
"valueModified",
|
|
||||||
"valueChanged",
|
|
||||||
"checkedChanged",
|
|
||||||
"moved",
|
|
||||||
"accepted",
|
|
||||||
"editingFinished",
|
|
||||||
"entered",
|
|
||||||
"exited",
|
|
||||||
"canceled",
|
|
||||||
"triggered",
|
|
||||||
"stateChanged",
|
|
||||||
"started",
|
|
||||||
"stopped",
|
|
||||||
"finished"
|
|
||||||
"enabledChanged",
|
|
||||||
"visibleChanged",
|
|
||||||
"opacityChanged",
|
|
||||||
"rotationChanged"};
|
|
||||||
|
|
||||||
auto filtered
|
|
||||||
= Utils::filtered(metaInfo.signalNames(), [&priorityListSignals](const PropertyName &name) {
|
|
||||||
if (std::find(priorityListSignals.cbegin(), priorityListSignals.cend(), name)
|
if (std::find(priorityListSignals.cbegin(), priorityListSignals.cend(), name)
|
||||||
!= priorityListSignals.cend())
|
!= priorityListSignals.cend())
|
||||||
return true;
|
return true;
|
||||||
@@ -796,7 +770,6 @@ void PropertyListProxyModel::resetModel()
|
|||||||
|
|
||||||
void PropertyListProxyModel::setRowAndInternalId(int row, quintptr internalId)
|
void PropertyListProxyModel::setRowAndInternalId(int row, quintptr internalId)
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << row << internalId;
|
|
||||||
QTC_ASSERT(m_treeModel, return );
|
QTC_ASSERT(m_treeModel, return );
|
||||||
|
|
||||||
if (internalId == internalRootIndex)
|
if (internalId == internalRootIndex)
|
||||||
@@ -830,7 +803,6 @@ QHash<int, QByteArray> PropertyListProxyModel::roleNames() const
|
|||||||
|
|
||||||
void PropertyListProxyModel::goInto(int row)
|
void PropertyListProxyModel::goInto(int row)
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << row << m_parentIndex.internalId();
|
|
||||||
setRowAndInternalId(row, 0); //m_parentIndex.internalId());
|
setRowAndInternalId(row, 0); //m_parentIndex.internalId());
|
||||||
|
|
||||||
emit parentNameChanged();
|
emit parentNameChanged();
|
||||||
@@ -838,8 +810,6 @@ void PropertyListProxyModel::goInto(int row)
|
|||||||
|
|
||||||
void PropertyListProxyModel::goUp()
|
void PropertyListProxyModel::goUp()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
if (m_parentIndex.internalId() == internalRootIndex)
|
if (m_parentIndex.internalId() == internalRootIndex)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user