13using namespace swift::config;
34 return (this->m_platform & otherPlatform.m_platform) > 0;
41 if (p.testFlag(Win32)) c++;
42 if (p.testFlag(Win64)) c++;
43 if (p.testFlag(MacOS)) c++;
44 if (p.testFlag(Linux)) c++;
53 return p.testFlag(Win32) || p.testFlag(Win64);
65 case Win32:
return QStringLiteral(
"Win32");
66 case Win64:
return QStringLiteral(
"Win64");
67 case Linux:
return QStringLiteral(
"Linux");
68 case MacOS:
return QStringLiteral(
"MacOSX");
71 return QStringLiteral(
"unknown");
98 case IndexPlatform: this->
setPlatform(
static_cast<Platform
>(variant.
toInt()));
break;
112 case IndexPlatform:
return Compare::compare(m_platform, compareValue.m_platform);
113 default: Q_ASSERT_X(
false, Q_FUNC_INFO,
"No comparison possible");
126 if (s.
contains(
"linux"))
return Linux;
130 if (s.
contains(
"debian"))
return Linux;
131 if (s.
contains(
"darwin"))
return MacOS;
133 if (s.
contains(
"independent"))
return Independent;
175 static const CPlatform p = private_ns::currentPlatformImpl();
static constexpr bool isRunningOnMacOSPlatform()
Running on MacOS platform?
static constexpr bool isRunningOnWindowsNtPlatform()
Running on Windows NT platform?
static constexpr bool isRunningOnLinuxPlatform()
Running on Linux platform?
static int buildWordSize()
Whether this swift application is build as 32 or 64bit application.
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.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
int compare(T a, T b)
Compare arithmetic values.
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.