Changeset View
Changeset View
Standalone View
Standalone View
src/utils/variable.cpp
Show All 17 Lines | |||||
18 | */ | 18 | */ | ||
19 | #include "variable.h" | 19 | #include "variable.h" | ||
20 | 20 | | |||
21 | namespace KTextEditor | 21 | namespace KTextEditor | ||
22 | { | 22 | { | ||
23 | Variable::Variable(const QString &name, const QString &description, Variable::ExpandFunction func, bool isPrefixMatch) | 23 | Variable::Variable(const QString &name, const QString &description, Variable::ExpandFunction func, bool isPrefixMatch) | ||
24 | : m_name(name) | 24 | : m_name(name) | ||
25 | , m_description(description) | 25 | , m_description(description) | ||
26 | , m_function(func) | 26 | , m_function(std::move(func)) | ||
27 | , m_isPrefixMatch(isPrefixMatch) | 27 | , m_isPrefixMatch(isPrefixMatch) | ||
28 | { | 28 | { | ||
29 | } | 29 | } | ||
30 | 30 | | |||
31 | bool Variable::isValid() const | 31 | bool Variable::isValid() const | ||
32 | { | 32 | { | ||
33 | return (!m_name.isEmpty()) && (m_function != nullptr); | 33 | return (!m_name.isEmpty()) && (m_function != nullptr); | ||
34 | } | 34 | } | ||
Show All 22 Lines |