Added new function null_device(), which returns the name of the NULL device (e.g. "/dev/null" or "NUL") for the current platform.
This commit is contained in:
parent
ce24bd2d05
commit
d4146475d9
@ -264,6 +264,9 @@ namespace MUtils
|
|||||||
MUTILS_API QString get_envvar(const QString &name);
|
MUTILS_API QString get_envvar(const QString &name);
|
||||||
MUTILS_API bool set_envvar(const QString &name, const QString &value);
|
MUTILS_API bool set_envvar(const QString &name, const QString &value);
|
||||||
|
|
||||||
|
//NULL device
|
||||||
|
MUTILS_API const QLatin1String &null_device(void);
|
||||||
|
|
||||||
//Check if debugger is present
|
//Check if debugger is present
|
||||||
MUTILS_API void check_debugger(void);
|
MUTILS_API void check_debugger(void);
|
||||||
|
|
||||||
|
@ -1789,6 +1789,17 @@ bool MUtils::OS::set_envvar(const QString &name, const QString &value)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// NULL DEVICE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static const QLatin1String NULL_DEVICE("NUL");
|
||||||
|
|
||||||
|
const QLatin1String &MUtils::OS::null_device(void)
|
||||||
|
{
|
||||||
|
return NULL_DEVICE;
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// DEBUGGER CHECK
|
// DEBUGGER CHECK
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user