refactor: clang format line length

This commit is contained in:
Lars Toenning
2024-11-16 19:27:30 +01:00
parent c7779e1461
commit 1a0b2a8c5f
1352 changed files with 25994 additions and 26603 deletions

View File

@@ -33,13 +33,17 @@ using namespace swift::misc::db;
namespace swift::gui::models
{
template <typename T, typename K, bool UseCompare>
CListModelDbObjects<T, K, UseCompare>::CListModelDbObjects(const QString &translationContext, QObject *parent) : CListModelBase<ContainerType, UseCompare>(translationContext, parent)
CListModelDbObjects<T, K, UseCompare>::CListModelDbObjects(const QString &translationContext, QObject *parent)
: CListModelBase<ContainerType, UseCompare>(translationContext, parent)
{
CListModelBaseNonTemplate::m_sortTieBreakers.push_front(ObjectType::keyIndex());
constexpr bool hasIntegerKey = std::is_base_of_v<IDatastoreObjectWithIntegerKey, ObjectType> && std::is_same_v<int, KeyType>;
constexpr bool hasStringKey = std::is_base_of_v<IDatastoreObjectWithStringKey, ObjectType> && std::is_base_of_v<QString, KeyType>;
static_assert(hasIntegerKey || hasStringKey, "ObjectType needs to implement IDatastoreObjectWithXXXXKey and have appropriate KeyType");
constexpr bool hasIntegerKey =
std::is_base_of_v<IDatastoreObjectWithIntegerKey, ObjectType> && std::is_same_v<int, KeyType>;
constexpr bool hasStringKey =
std::is_base_of_v<IDatastoreObjectWithStringKey, ObjectType> && std::is_base_of_v<QString, KeyType>;
static_assert(hasIntegerKey || hasStringKey,
"ObjectType needs to implement IDatastoreObjectWithXXXXKey and have appropriate KeyType");
}
template <typename T, typename K, bool UseCompare>
@@ -66,7 +70,8 @@ namespace swift::gui::models
}
template <typename T, typename K, bool UseCompare>
COrderableListModelDbObjects<T, K, UseCompare>::COrderableListModelDbObjects(const QString &translationContext, QObject *parent)
COrderableListModelDbObjects<T, K, UseCompare>::COrderableListModelDbObjects(const QString &translationContext,
QObject *parent)
: CListModelDbObjects<ContainerType, KeyType, UseCompare>(translationContext, parent)
{}
@@ -76,10 +81,7 @@ namespace swift::gui::models
if (items.isEmpty()) { return; }
ContainerType container(this->container());
int order = 0;
if (position >= 0 && position < container.size())
{
order = container[position].getOrder();
}
if (position >= 0 && position < container.size()) { order = container[position].getOrder(); }
this->setSortColumnToOrder();
container.moveTo(items, order);