2018-04-29 05:14:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-25 01:39:24 +00:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
2018-04-29 05:14:27 +00:00
|
|
|
#define THROW_BAD_ALLOC_IF_NULL(x) \
|
2018-07-19 01:39:33 +00:00
|
|
|
if ((x) == nullptr) throw std::bad_alloc()
|
2018-06-24 01:46:59 +00:00
|
|
|
|
2020-02-25 01:39:24 +00:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
|
|
#define QNETREPLY_GET_ERROR(r) ((r)->networkError())
|
|
|
|
#define QSOCK_GET_ERROR(s) ((s)->socketError())
|
|
|
|
#else
|
|
|
|
#define QNETREPLY_GET_ERROR(r) ((r)->error())
|
|
|
|
#define QSOCK_GET_ERROR(s) ((s)->error())
|
|
|
|
#endif
|
|
|
|
|
2020-02-09 02:47:59 +00:00
|
|
|
namespace WMUtils {
|
|
|
|
bool isRunningX11();
|
|
|
|
bool isRunningWayland();
|
|
|
|
bool isRunningWindowManager();
|
|
|
|
}
|