forked from qt-creator/qt-creator
QmlDesigner: Fix the build error for CollectionEditor
* fixes the gcc build error on CollectionEditorUtils * fixes the unused parameters error on macOS * fixes the build error for using the unknown template for QPointer Change-Id: I71f6fe319b5b682b858712139084d26079a822fb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -64,8 +64,8 @@ bool CollectionDetailsSortFilterModel::selectColumn(int column)
|
||||
|
||||
CollectionDetailsSortFilterModel::~CollectionDetailsSortFilterModel() = default;
|
||||
|
||||
bool CollectionDetailsSortFilterModel::filterAcceptsRow(int sourceRow,
|
||||
const QModelIndex &sourceParent) const
|
||||
bool CollectionDetailsSortFilterModel::filterAcceptsRow(
|
||||
[[maybe_unused]] int sourceRow, [[maybe_unused]] const QModelIndex &sourceParent) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QPointer>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
@@ -12,6 +12,11 @@ namespace {
|
||||
|
||||
using CollectionDataVariant = std::variant<QString, bool, double, QUrl, QColor>;
|
||||
|
||||
inline bool operator<(const QColor &a, const QColor &b)
|
||||
{
|
||||
return a.name(QColor::HexArgb) < b.name(QColor::HexArgb);
|
||||
}
|
||||
|
||||
inline CollectionDataVariant valueToVariant(const QVariant &value,
|
||||
QmlDesigner::CollectionDetails::DataType type)
|
||||
{
|
||||
@@ -45,12 +50,6 @@ struct LessThanVisitor
|
||||
{
|
||||
return a < b;
|
||||
}
|
||||
|
||||
template<>
|
||||
bool operator()(const QColor &a, const QColor &b) const
|
||||
{
|
||||
return a.name(QColor::HexArgb) < b.name(QColor::HexArgb);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user