Better error handling and safer pointer initialization plus some more fixes

This commit is contained in:
woblight
2019-08-24 00:11:31 +02:00
parent 0c98f06a15
commit ee1550991c
4 changed files with 141 additions and 78 deletions
+10 -10
View File
@@ -1,4 +1,4 @@
/* Copyright 2018 WobLight
/* Copyright 2018-2019 WobLight
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -75,15 +75,15 @@ public:
Q_PROPERTY(Status status READ status WRITE setStatus NOTIFY statusChanged)
enum GitStatusFlag {
Error = -1,
UpToDate = 0,
Ahead = 1,
Behind = 2,
Diverged = 3,
FastForward = 4,
Merge = 5,
Conflict = 6,
MergeStatusMask = 0x1100
Error = 0x1,
UpToDate = 0x2,
Ahead = 0x4,
Behind = 0x8,
Diverged = 0x10,
FastForward = 0x20,
Merge = 0x40,
Conflict = 0x80,
MergeStatusMask = 0x0C00
};
Q_ENUM(GitStatusFlag)
Q_DECLARE_FLAGS(GitStatus, GitStatusFlag)