13 using namespace swift::config;
19 CPlatform::CPlatform(
const QString &p) : m_platform(stringToPlatform(p)) {}
31 return (this->m_platform & otherPlatform.m_platform) > 0;
38 if (p.testFlag(Win32)) c++;
39 if (p.testFlag(Win64)) c++;
40 if (p.testFlag(MacOS)) c++;
41 if (p.testFlag(Linux)) c++;
50 return p.testFlag(Win32) || p.testFlag(Win64);
62 case Win32:
return QStringLiteral(
"Win32");
63 case Win64:
return QStringLiteral(
"Win64");
64 case Linux:
return QStringLiteral(
"Linux");
65 case MacOS:
return QStringLiteral(
"MacOSX");
68 return QStringLiteral(
"unknown");
92 case IndexPlatform: this->
setPlatform(
static_cast<Platform
>(variant.
toInt()));
break;
99 if (index.
isMyself()) {
return Compare::compare(m_platform, compareValue.m_platform); }
103 case IndexPlatform:
return Compare::compare(m_platform, compareValue.m_platform);
104 default: Q_ASSERT_X(
false, Q_FUNC_INFO,
"No comparison possible");
117 if (s.
contains(
"linux"))
return Linux;
121 if (s.
contains(
"debian"))
return Linux;
122 if (s.
contains(
"darwin"))
return MacOS;
124 if (s.
contains(
"independent"))
return Independent;
146 if (CBuildConfig::isRunningOnWindowsNtPlatform())
148 const int wordSize = CBuildConfig::buildWordSize();
160 static const CPlatform p = private_ns::currentPlatformImpl();
166 if (platform.
isEmpty()) {
return false; }
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
ColumnIndex
Base class enums.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Free functions in swift::misc.
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString toLower() const const
QString trimmed() const const
QVariant fromValue(T &&value)
int toInt(bool *ok) const const
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.