Commit 5b5aa83c authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Add trailing comma to enums

If you want git blame to ignore this revision and formatting revisions run:
git config blame.ignoreRevsFile .git-blame-ignore-revs
parent 1b2aa62b
......@@ -43,7 +43,9 @@ class KTORRENT_EXPORT BNode
{
public:
enum Type {
VALUE, DICT, LIST
VALUE,
DICT,
LIST,
};
/**
......
......@@ -34,10 +34,11 @@ class KTORRENT_EXPORT Value
{
public:
enum Type {
STRING, INT, INT64
STRING,
INT,
INT64,
};
Value();
Value(int val);
Value(Int64 val);
......
......@@ -43,7 +43,7 @@ enum Type {
REQ_MSG,
RSP_MSG,
ERR_MSG,
INVALID
INVALID,
};
enum Method {
......@@ -51,7 +51,7 @@ enum Method {
FIND_NODE,
GET_PEERS,
ANNOUNCE_PEER,
NONE
NONE,
};
const QByteArray TID = QByteArrayLiteral("t");
......
......@@ -59,10 +59,11 @@ public:
~CacheFile() override;
enum Mode {
READ, WRITE, RW
READ,
WRITE,
RW,
};
/**
* Open the file.
* @param path Path of the file
......
......@@ -50,7 +50,7 @@ public:
enum Status {
ON_DISK,
NOT_DOWNLOADED
NOT_DOWNLOADED,
};
/**
......
......@@ -133,7 +133,12 @@ Q_SIGNALS:
private:
enum State {
IDLE, RESOLVING, CONNECTING, ACTIVE, ERROR, CLOSED
IDLE,
RESOLVING,
CONNECTING,
ACTIVE,
ERROR,
CLOSED,
};
struct HttpGet {
......
......@@ -53,7 +53,7 @@ public:
UNKNOWN,
AUDIO,
VIDEO,
NORMAL
NORMAL,
};
/// Get the index of the file
......
......@@ -48,22 +48,20 @@ class WebSeedInterface;
class JobQueue;
class ChunkSelectorInterface;
enum TorrentStartResponse {
START_OK,
USER_CANCELED,
NOT_ENOUGH_DISKSPACE,
MAX_SHARE_RATIO_REACHED,
BUSY_WITH_JOB,
QM_LIMITS_REACHED // Max seeds or downloads reached
QM_LIMITS_REACHED, // Max seeds or downloads reached
};
enum AutoStopReason {
MAX_RATIO_REACHED,
MAX_SEED_TIME_REACHED
MAX_SEED_TIME_REACHED,
};
struct DHTNode {
QString ip;
bt::Uint16 port;
......@@ -71,10 +69,9 @@ struct DHTNode {
enum TorrentFeature {
DHT_FEATURE,
UT_PEX_FEATURE // µTorrent peer exchange
UT_PEX_FEATURE, // µTorrent peer exchange
};
/**
* @author Joris Guisson
* @brief Interface for an object which controls one torrent
......@@ -185,7 +182,8 @@ public:
virtual bool changeTorDir(const QString & new_dir) = 0;
enum ChangeOutputFlags {
MOVE_FILES = 1, FULL_PATH = 2
MOVE_FILES = 1,
FULL_PATH = 2,
};
/**
......
......@@ -28,7 +28,10 @@
namespace bt
{
enum TrackerStatus {
TRACKER_OK, TRACKER_ANNOUNCING, TRACKER_ERROR, TRACKER_IDLE
TRACKER_OK,
TRACKER_ANNOUNCING,
TRACKER_ERROR,
TRACKER_IDLE,
};
/**
......
......@@ -65,7 +65,7 @@ private:
GOT_YB,
FOUND_VC,
WAIT_FOR_PAD_D,
NORMAL_HANDSHAKE
NORMAL_HANDSHAKE,
};
BigInt xa, ya, s, skey, yb;
......
......@@ -60,7 +60,7 @@ private:
FOUND_INFO_HASH,
WAIT_FOR_PAD_C,
WAIT_FOR_IA,
NON_ENCRYPTED_HANDSHAKE
NON_ENCRYPTED_HANDSHAKE,
};
BigInt xb, yb, s, ya;
bt::SHA1Hash skey, info_hash;
......
......@@ -67,7 +67,8 @@ public:
virtual ~Poll();
enum Mode {
INPUT, OUTPUT
INPUT,
OUTPUT,
};
/// Add a file descriptor to the poll (returns the index of it)
......
......@@ -28,7 +28,7 @@ namespace net
{
enum Protocol {
TCP,
UDP
UDP,
};
struct KTORRENT_EXPORT Port {
......
......@@ -39,7 +39,7 @@ public:
CONNECTING,
CONNECTED,
BOUND,
CLOSED
CLOSED,
};
virtual int fd() const = 0;
......
......@@ -78,7 +78,7 @@ public:
enum GroupType {
UPLOAD_GROUP,
DOWNLOAD_GROUP
DOWNLOAD_GROUP,
};
/**
......
......@@ -42,14 +42,14 @@ public:
CONNECTING_TO_SERVER,
CONNECTING_TO_HOST,
CONNECTED,
FAILED
FAILED,
};
enum SetupState {
NONE,
AUTH_REQUEST_SENT,
USERNAME_AND_PASSWORD_SENT,
CONNECT_REQUEST_SENT
CONNECT_REQUEST_SENT,
};
Socks(mse::EncryptedPacketSocket::Ptr sock, const Address & dest);
~Socks() override;
......
......@@ -52,7 +52,7 @@ public:
TCP_WITH_ENCRYPTION,
TCP_WITHOUT_ENCRYPTION,
UTP_WITH_ENCRYPTION,
UTP_WITHOUT_ENCRYPTION
UTP_WITHOUT_ENCRYPTION,
};
PeerConnector(const net::Address & addr, bool local, PeerManager* pman, ConnectionLimit::Token::Ptr token);
......
......@@ -39,7 +39,9 @@ public:
SampleQueue();
~SampleQueue();
enum {SAMPLE_COUNT_MAX = 20};
enum {
SAMPLE_COUNT_MAX = 20,
};
/**
* Inserts new sample into the queue. The oldest sample is overwritten.
......
......@@ -47,7 +47,7 @@ enum TorrentStatus {
NO_SPACE_LEFT,
PAUSED,
SUPERSEEDING,
INVALID_STATUS
INVALID_STATUS,
};
struct KTORRENT_EXPORT TorrentStats {
......
......@@ -79,13 +79,13 @@ private:
NONE = 0,
COMPLETED = 1,
STARTED = 2,
STOPPED = 3
STOPPED = 3,
};
enum Todo {
NOTHING = 0,
SCRAPE_REQUEST = 1,
ANNOUNCE_REQUEST = 2
ANNOUNCE_REQUEST = 2,
};
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment