mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 19:00:22 +08:00
parent
268c56a6eb
commit
834dca8bf8
@ -1 +1 @@
|
|||||||
934
|
936
|
||||||
|
@ -71,13 +71,30 @@
|
|||||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SAFE_TYPEDEF(Base, name) \
|
||||||
|
class name : public Base { \
|
||||||
|
public: \
|
||||||
|
template <class... Args> \
|
||||||
|
explicit name (Args... args) : Base(args...) {} \
|
||||||
|
const Base& raw() const { return *this; } \
|
||||||
|
};
|
||||||
|
|
||||||
namespace Qv2ray
|
namespace Qv2ray
|
||||||
{
|
{
|
||||||
|
// To prevent anonying QJsonObject misuse
|
||||||
|
SAFE_TYPEDEF(QJsonObject, INBOUND)
|
||||||
|
SAFE_TYPEDEF(QJsonObject, OUTBOUND)
|
||||||
|
SAFE_TYPEDEF(QJsonObject, ROOT)
|
||||||
|
SAFE_TYPEDEF(QJsonArray, OUTBOUNDS)
|
||||||
|
SAFE_TYPEDEF(QJsonArray, INBOUNDS)
|
||||||
|
SAFE_TYPEDEF(QJsonArray, ROUTING)
|
||||||
|
SAFE_TYPEDEF(QJsonObject, ROUTERULE)
|
||||||
|
//
|
||||||
// Extra header for QvConfigUpgrade.cpp
|
// Extra header for QvConfigUpgrade.cpp
|
||||||
QJsonObject UpgradeConfig(int fromVersion, int toVersion, QJsonObject root);
|
QJsonObject UpgradeConfig(int fromVersion, int toVersion, QJsonObject root);
|
||||||
|
|
||||||
struct QvBarLine {
|
struct QvBarLine {
|
||||||
string Family;
|
string Family;
|
||||||
bool Bold;
|
bool Bold;
|
||||||
bool Italic;
|
bool Italic;
|
||||||
int ColorA;
|
int ColorA;
|
||||||
@ -86,7 +103,7 @@ namespace Qv2ray
|
|||||||
int ColorB;
|
int ColorB;
|
||||||
int ContentType;
|
int ContentType;
|
||||||
double Size;
|
double Size;
|
||||||
string Message;
|
string Message;
|
||||||
QvBarLine()
|
QvBarLine()
|
||||||
: Family("Consolas")
|
: Family("Consolas")
|
||||||
, Bold(true)
|
, Bold(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user