refactor(registry,util): use default contructors instead of empty

This commit is contained in:
Oleg Shparber 2019-01-26 22:45:24 -05:00
parent e114a7fc3c
commit 62b772089c
6 changed files with 3 additions and 16 deletions

View File

@ -32,10 +32,6 @@
using namespace Zeal::Registry; using namespace Zeal::Registry;
DocsetMetadata::DocsetMetadata()
{
}
DocsetMetadata::DocsetMetadata(const QJsonObject &jsonObject) DocsetMetadata::DocsetMetadata(const QJsonObject &jsonObject)
{ {
m_name = jsonObject[QStringLiteral("name")].toString(); m_name = jsonObject[QStringLiteral("name")].toString();

View File

@ -35,7 +35,7 @@ namespace Registry {
class DocsetMetadata class DocsetMetadata
{ {
public: public:
explicit DocsetMetadata(); explicit DocsetMetadata() = default;
explicit DocsetMetadata(const QJsonObject &jsonObject); explicit DocsetMetadata(const QJsonObject &jsonObject);
void save(const QString &path, const QString &version); void save(const QString &path, const QString &version);

View File

@ -32,10 +32,6 @@ const char prefixSeparator = ':';
const char keywordSeparator = ','; const char keywordSeparator = ',';
} }
SearchQuery::SearchQuery()
{
}
SearchQuery::SearchQuery(QString query, const QStringList &keywords) : SearchQuery::SearchQuery(QString query, const QStringList &keywords) :
m_query(std::move(query)) m_query(std::move(query))
{ {

View File

@ -35,7 +35,7 @@ namespace Registry {
class SearchQuery class SearchQuery
{ {
public: public:
explicit SearchQuery(); explicit SearchQuery() = default;
explicit SearchQuery(QString query, const QStringList &keywords = QStringList()); explicit SearchQuery(QString query, const QStringList &keywords = QStringList());
/// Creates a search query from a string. Single separator will be /// Creates a search query from a string. Single separator will be

View File

@ -27,11 +27,6 @@
using namespace Zeal::Util; using namespace Zeal::Util;
Plist::Plist() :
QHash<QString, QVariant>()
{
}
bool Plist::read(const QString &fileName) bool Plist::read(const QString &fileName)
{ {
QScopedPointer<QFile> file(new QFile(fileName)); QScopedPointer<QFile> file(new QFile(fileName));

View File

@ -32,7 +32,7 @@ namespace Util {
class Plist : public QHash<QString, QVariant> class Plist : public QHash<QString, QVariant>
{ {
public: public:
Plist(); Plist() = default;
bool read(const QString &fileName); bool read(const QString &fileName);
bool hasError() const; bool hasError() const;