mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Ref T419, utility functions for platform
This commit is contained in:
committed by
Mat Sutcliffe
parent
b0b8e82a2d
commit
2cc53ce67c
@@ -181,6 +181,17 @@ namespace BlackMisc
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CPlatform::isCurrentPlatform(const QString &platform)
|
||||||
|
{
|
||||||
|
if (platform.isEmpty()) { return false; }
|
||||||
|
return isCurrentPlatform(CPlatform::stringToPlatform(platform));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CPlatform::isCurrentPlatform(const CPlatform &platform)
|
||||||
|
{
|
||||||
|
return platform == CPlatform::currentPlatform();
|
||||||
|
}
|
||||||
|
|
||||||
const CPlatform &CPlatform::win32Platform()
|
const CPlatform &CPlatform::win32Platform()
|
||||||
{
|
{
|
||||||
static const CPlatform p(Win32);
|
static const CPlatform p(Win32);
|
||||||
|
|||||||
@@ -118,6 +118,12 @@ namespace BlackMisc
|
|||||||
//! Current platform
|
//! Current platform
|
||||||
static const CPlatform ¤tPlatform();
|
static const CPlatform ¤tPlatform();
|
||||||
|
|
||||||
|
//! Is this the current platform
|
||||||
|
static bool isCurrentPlatform(const QString &platform);
|
||||||
|
|
||||||
|
//! Is this the current platform
|
||||||
|
static bool isCurrentPlatform(const CPlatform &platform);
|
||||||
|
|
||||||
//! Win32
|
//! Win32
|
||||||
static const CPlatform &win32Platform();
|
static const CPlatform &win32Platform();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user