diff options
Diffstat (limited to 'src/modules/help/HelpIndex.cpp')
| -rw-r--r-- | src/modules/help/HelpIndex.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/modules/help/HelpIndex.cpp b/src/modules/help/HelpIndex.cpp index 8b7db7720..4e37eca2e 100644 --- a/src/modules/help/HelpIndex.cpp +++ b/src/modules/help/HelpIndex.cpp @@ -45,18 +45,24 @@ #include <QTextStream> #include <QUrl> #include <QTextCodec> -#include <ctype.h> +#include <cctype> #include <QTextDocument> #include <QTimer> #include <algorithm> +#include <utility> QT_BEGIN_NAMESPACE struct Term { Term() = default; - Term(const QString & t, int f, QVector<Document> l) : term(t), frequency(f), documents(l) {} + Term(QString t, int f, QVector<Document> l) + : term(std::move(t)) + , frequency(f) + , documents(std::move(l)) + { + } QString term; int frequency = -1; QVector<Document> documents; @@ -77,8 +83,9 @@ QDataStream & operator<<(QDataStream & s, const Document & l) return s; } -HelpIndex::HelpIndex(const QString & dp, const QString & hp) - : QObject(nullptr), docPath(dp) +HelpIndex::HelpIndex(QString dp, const QString & hp) + : QObject(nullptr) + , docPath(std::move(dp)) { Q_UNUSED(hp); @@ -92,8 +99,9 @@ HelpIndex::HelpIndex(const QString & dp, const QString & hp) connect(m_pTimer, SIGNAL(timeout()), this, SLOT(filterNext())); } -HelpIndex::HelpIndex(const QStringList & dl, const QString & hp) - : QObject(nullptr), docList{dl} +HelpIndex::HelpIndex(QStringList dl, const QString & hp) + : QObject(nullptr) + , docList{ std::move(dl) } { Q_UNUSED(hp); |
