forked from qt-creator/qt-creator
TextEditor: Modernize
modernize-* Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -82,8 +82,7 @@ const QChar Snippet::kEscapeChar(QLatin1Char('\\'));
|
||||
Snippet::Snippet(const QString &groupId, const QString &id) : m_groupId(groupId), m_id(id)
|
||||
{}
|
||||
|
||||
Snippet::~Snippet()
|
||||
{}
|
||||
Snippet::~Snippet() = default;
|
||||
|
||||
const QString &Snippet::id() const
|
||||
{
|
||||
|
||||
@@ -107,8 +107,7 @@ SnippetsCollection::SnippetsCollection() :
|
||||
this, &SnippetsCollection::identifyGroups);
|
||||
}
|
||||
|
||||
SnippetsCollection::~SnippetsCollection()
|
||||
{}
|
||||
SnippetsCollection::~SnippetsCollection() = default;
|
||||
|
||||
void SnippetsCollection::insertSnippet(const Snippet &snippet)
|
||||
{
|
||||
@@ -309,7 +308,7 @@ bool SnippetsCollection::synchronize(QString *errorString)
|
||||
}
|
||||
Utils::FileSaver saver(m_userSnippetsPath + m_userSnippetsFile);
|
||||
if (!saver.hasError()) {
|
||||
typedef QHash<QString, int>::ConstIterator GroupIndexByIdConstIt;
|
||||
using GroupIndexByIdConstIt = QHash<QString, int>::ConstIterator;
|
||||
|
||||
QXmlStreamWriter writer(saver.file());
|
||||
writer.setAutoFormatting(true);
|
||||
|
||||
@@ -54,7 +54,7 @@ class SnippetsTableModel : public QAbstractTableModel
|
||||
Q_OBJECT
|
||||
public:
|
||||
SnippetsTableModel(QObject *parent);
|
||||
~SnippetsTableModel() override {}
|
||||
~SnippetsTableModel() override = default;
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
Reference in New Issue
Block a user