Initialize QObject in constructor and add explicit

This commit is contained in:
Jonas Kvinge 2020-01-04 23:18:59 +01:00
parent 0308a3f9a5
commit ddc8a5f010
3 changed files with 6 additions and 5 deletions

View File

@ -62,7 +62,7 @@ class SeafileService : public CloudFileService {
public:
enum ApiError { NO_ERROR = 200, NOT_FOUND = 404, TOO_MANY_REQUESTS = 429 };
SeafileService(Application* app, InternetModel* parent);
explicit SeafileService(Application* app, InternetModel* parent);
~SeafileService();
static const char* kServiceName;

View File

@ -24,9 +24,10 @@
#include "core/logging.h"
SeafileTree::SeafileTree() {}
SeafileTree::SeafileTree(QObject* parent) : QObject(parent) {}
SeafileTree::SeafileTree(const SeafileTree& copy) {
SeafileTree::SeafileTree(const SeafileTree& copy, QObject* parent)
: QObject(parent) {
libraries_ = copy.libraries();
}

View File

@ -36,8 +36,8 @@ class SeafileTree : public QObject {
Q_OBJECT
public:
SeafileTree();
SeafileTree(const SeafileTree& copy);
explicit SeafileTree(QObject* parent = nullptr);
explicit SeafileTree(const SeafileTree& copy, QObject* parent = nullptr);
~SeafileTree();
class Entry {