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:
Ali Kianian
2023-10-30 08:54:53 +02:00
parent cfa46fa974
commit 7d6cb2b400
3 changed files with 8 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -3,6 +3,7 @@
#pragma once
#include <QPointer>
#include <QSortFilterProxyModel>
namespace QmlDesigner {

View File

@@ -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