Fix build with Qt 5.15
This commit is contained in:
parent
979de190dc
commit
10dae7482c
5 changed files with 22 additions and 9 deletions
10
app/utils.h
10
app/utils.h
|
|
@ -1,8 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#define THROW_BAD_ALLOC_IF_NULL(x) \
|
||||
if ((x) == nullptr) throw std::bad_alloc()
|
||||
|
||||
#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
|
||||
|
||||
namespace WMUtils {
|
||||
bool isRunningX11();
|
||||
bool isRunningWayland();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue