From 8b966019e619fe71dbe556f88c9e7570a222afe2 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 19 Nov 2021 13:23:51 +0200 Subject: [PATCH] Code style. --- src/app/valentina/dialogs/dialogfinalmeasurements.cpp | 5 +---- src/app/valentina/dialogs/dialogfinalmeasurements.h | 6 +++--- src/libs/vmisc/vtablesearch.cpp | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/app/valentina/dialogs/dialogfinalmeasurements.cpp b/src/app/valentina/dialogs/dialogfinalmeasurements.cpp index 490796738..66fd5f3c8 100644 --- a/src/app/valentina/dialogs/dialogfinalmeasurements.cpp +++ b/src/app/valentina/dialogs/dialogfinalmeasurements.cpp @@ -46,10 +46,7 @@ DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent) ui(new Ui::DialogFinalMeasurements), m_doc(doc), m_data(doc->GetCompleteData()), - m_measurements(doc->GetFinalMeasurements()), - m_search(), - formulaBaseHeight(0), - m_isInitialized(false) + m_measurements(doc->GetFinalMeasurements()) { ui->setupUi(this); diff --git a/src/app/valentina/dialogs/dialogfinalmeasurements.h b/src/app/valentina/dialogs/dialogfinalmeasurements.h index f143d0256..0563f69e3 100644 --- a/src/app/valentina/dialogs/dialogfinalmeasurements.h +++ b/src/app/valentina/dialogs/dialogfinalmeasurements.h @@ -75,9 +75,9 @@ private: VPattern *m_doc; VContainer m_data; QVector m_measurements; - QSharedPointer m_search; - int formulaBaseHeight; - bool m_isInitialized; + QSharedPointer m_search{}; + int formulaBaseHeight{0}; + bool m_isInitialized{false}; void FillFinalMeasurements(bool freshCall = false); diff --git a/src/libs/vmisc/vtablesearch.cpp b/src/libs/vmisc/vtablesearch.cpp index 767506638..ca01817c9 100644 --- a/src/libs/vmisc/vtablesearch.cpp +++ b/src/libs/vmisc/vtablesearch.cpp @@ -98,7 +98,7 @@ QList VTableSearch::FindTableItems(const QString& term) { if (term.isEmpty()) { - return QList(); + return {}; } if (term.startsWith(QChar('/'))) @@ -122,7 +122,7 @@ QList VTableSearch::FindTableItems(const QString& term) #endif } - return QList(); + return {}; } return table->findItems(term, Qt::MatchContains); @@ -139,7 +139,7 @@ void VTableSearch::Find(const QString &term) if (not searchList.isEmpty()) { - for (auto item : qAsConst(searchList)) + for (auto *item : qAsConst(searchList)) { item->setBackground(Qt::yellow); }