models used SIZE_ everywhere

To avoid collisions with Windows header files.
This commit is contained in:
silverqx
2023-05-07 17:49:20 +02:00
parent 98282ab66d
commit 864272d10f
8 changed files with 23 additions and 23 deletions

View File

@@ -11,7 +11,7 @@ namespace Models
using Orm::Constants::ID;
using Orm::Constants::NAME;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::Model;
using Orm::Tiny::Relations::BelongsTo;
@@ -48,7 +48,7 @@ private:
ID,
NAME,
"ext",
SIZE,
SIZE_,
};
};

View File

@@ -9,7 +9,7 @@ namespace Models
using Orm::Constants::NAME;
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::Model;
@@ -35,7 +35,7 @@ class Torrent_GuardedAttribute final : public Model<Torrent_GuardedAttribute>
/*! The attributes that are mass assignable. */
inline static const QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
NAME,
SIZE,
SIZE_,
"progress",
"added_on",
"hash",

View File

@@ -26,7 +26,7 @@ namespace Models
using Orm::Constants::ID;
using Orm::Constants::NAME;
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
//using Orm::Tiny::CastItem;
//using Orm::Tiny::CastType;
@@ -164,7 +164,7 @@ private:
/*! The model's default values for attributes. */
// inline static const QVector<AttributeItem> u_attributes {
// {SIZE, 0},
// {SIZE_, 0},
// {"progress", 0},
// {"added_on", QDateTime({2021, 4, 1}, {15, 10, 10}, Qt::UTC)},
// };
@@ -173,7 +173,7 @@ private:
inline static const QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
ID,
NAME,
SIZE,
SIZE_,
"progress",
"added_on",
"hash",

View File

@@ -12,7 +12,7 @@ namespace Models
using Orm::Constants::NAME;
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::AttributeItem;
using Orm::Tiny::Model;
@@ -60,7 +60,7 @@ private:
/*! The model's default values for attributes. */
inline static const QVector<AttributeItem> u_attributes { // NOLINT(cppcoreguidelines-interfaces-global-init)
{SIZE, 0},
{SIZE_, 0},
{"progress", 0},
{"added_on", QDateTime({2021, 4, 1}, {15, 10, 10}, Qt::UTC)},
};
@@ -68,7 +68,7 @@ private:
/*! The attributes that are mass assignable. */
inline static const QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
NAME,
SIZE,
SIZE_,
"progress",
"added_on",
"hash",

View File

@@ -9,7 +9,7 @@ namespace Models
using Orm::Constants::NAME;
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::AttributeItem;
using Orm::Tiny::Model;
@@ -26,14 +26,14 @@ class TorrentEager_Without_QDateTime final :
/*! The model's default values for attributes. */
inline static const QVector<AttributeItem> u_attributes { // NOLINT(cppcoreguidelines-interfaces-global-init)
{SIZE, 0},
{SIZE_, 0},
{"progress", 0},
};
/*! The attributes that are mass assignable. */
inline static const QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
NAME,
SIZE,
SIZE_,
"progress",
"added_on",
"hash",

View File

@@ -12,7 +12,7 @@ namespace Models
using Orm::Constants::NAME;
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::Relations::BelongsTo;
using Orm::Tiny::Relations::HasOne;
@@ -54,7 +54,7 @@ public:
// Ownership of a unique_ptr()
auto relation = belongsTo<Torrent>();
relation->withDefault({{NAME, "default_torrent_name"}, {SIZE, 123}});
relation->withDefault({{NAME, "default_torrent_name"}, {SIZE_, 123}});
return relation;
}
@@ -83,7 +83,7 @@ public:
{
auto relation = hasOne<TorrentPreviewableFileProperty>("previewable_file_id");
relation->withDefault({{NAME, "default_fileproperty_name"}, {SIZE, 321}});
relation->withDefault({{NAME, "default_fileproperty_name"}, {SIZE_, 321}});
return relation;
}
@@ -113,7 +113,7 @@ private:
inline static QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
"file_index",
"filepath",
SIZE,
SIZE_,
"progress",
NOTE,
};

View File

@@ -10,7 +10,7 @@ namespace Models
{
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::Model;
using Orm::Tiny::Relations::HasOne;
@@ -49,7 +49,7 @@ private:
inline static QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
"file_index",
"filepath",
SIZE,
SIZE_,
"progress",
NOTE,
};

View File

@@ -12,7 +12,7 @@ namespace Models
using Orm::Constants::NAME;
using Orm::Constants::NOTE;
using Orm::Constants::SIZE;
using Orm::Constants::SIZE_;
using Orm::Tiny::Model;
using Orm::Tiny::Relations::BelongsTo;
@@ -58,7 +58,7 @@ public:
auto relation = belongsTo<TorrentEager_WithDefault>(
{}, {}, QString::fromUtf8(__func__)); // NOLINT(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
relation->withDefault({{NAME, "default_torrent_name"}, {SIZE, 123}});
relation->withDefault({{NAME, "default_torrent_name"}, {SIZE_, 123}});
return relation;
}
@@ -92,7 +92,7 @@ public:
auto relation =
hasOne<TorrentPreviewableFilePropertyEager>("previewable_file_id");
relation->withDefault({{NAME, "default_fileproperty_name"}, {SIZE, 321}});
relation->withDefault({{NAME, "default_fileproperty_name"}, {SIZE_, 321}});
return relation;
}
@@ -125,7 +125,7 @@ private:
inline static QStringList u_fillable { // NOLINT(cppcoreguidelines-interfaces-global-init)
"file_index",
"filepath",
SIZE,
SIZE_,
"progress",
NOTE,
};