forked from qt-creator/qt-creator
ADS: Fix QHash unite warning for 5.15
Change-Id: I384f810bd15ec0c0b191dcdd0654f089de9e8ecb Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
5db38c5937
commit
aaa9a51511
@@ -166,7 +166,14 @@ QHash<int, QByteArray> WorkspaceModel::roleNames() const
|
|||||||
{PresetWorkspaceRole, "presetWorkspace"},
|
{PresetWorkspaceRole, "presetWorkspace"},
|
||||||
{LastWorkspaceRole, "activeWorkspace"},
|
{LastWorkspaceRole, "activeWorkspace"},
|
||||||
{ActiveWorkspaceRole, "lastWorkspace"}};
|
{ActiveWorkspaceRole, "lastWorkspace"}};
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||||
|
auto defaultRoles = QAbstractTableModel::roleNames();
|
||||||
|
defaultRoles.insert(extraRoles);
|
||||||
|
return defaultRoles;
|
||||||
|
#else
|
||||||
return QAbstractTableModel::roleNames().unite(extraRoles);
|
return QAbstractTableModel::roleNames().unite(extraRoles);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkspaceModel::sort(int column, Qt::SortOrder order)
|
void WorkspaceModel::sort(int column, Qt::SortOrder order)
|
||||||
|
|||||||
Reference in New Issue
Block a user