mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-27 01:53:06 +03:00
refactor(registry,util): use default contructors instead of empty
This commit is contained in:
parent
e114a7fc3c
commit
62b772089c
@ -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();
|
||||||
|
@ -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);
|
||||||
|
@ -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))
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
@ -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));
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user