Code style.

This commit is contained in:
Roman Telezhynskyi 2021-11-19 13:23:51 +02:00
parent 920e6fc8ab
commit 8b966019e6
3 changed files with 7 additions and 10 deletions

View File

@ -46,10 +46,7 @@ DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent)
ui(new Ui::DialogFinalMeasurements), ui(new Ui::DialogFinalMeasurements),
m_doc(doc), m_doc(doc),
m_data(doc->GetCompleteData()), m_data(doc->GetCompleteData()),
m_measurements(doc->GetFinalMeasurements()), m_measurements(doc->GetFinalMeasurements())
m_search(),
formulaBaseHeight(0),
m_isInitialized(false)
{ {
ui->setupUi(this); ui->setupUi(this);

View File

@ -75,9 +75,9 @@ private:
VPattern *m_doc; VPattern *m_doc;
VContainer m_data; VContainer m_data;
QVector<VFinalMeasurement> m_measurements; QVector<VFinalMeasurement> m_measurements;
QSharedPointer<VTableSearch> m_search; QSharedPointer<VTableSearch> m_search{};
int formulaBaseHeight; int formulaBaseHeight{0};
bool m_isInitialized; bool m_isInitialized{false};
void FillFinalMeasurements(bool freshCall = false); void FillFinalMeasurements(bool freshCall = false);

View File

@ -98,7 +98,7 @@ QList<QTableWidgetItem *> VTableSearch::FindTableItems(const QString& term)
{ {
if (term.isEmpty()) if (term.isEmpty())
{ {
return QList<QTableWidgetItem *>(); return {};
} }
if (term.startsWith(QChar('/'))) if (term.startsWith(QChar('/')))
@ -122,7 +122,7 @@ QList<QTableWidgetItem *> VTableSearch::FindTableItems(const QString& term)
#endif #endif
} }
return QList<QTableWidgetItem *>(); return {};
} }
return table->findItems(term, Qt::MatchContains); return table->findItems(term, Qt::MatchContains);
@ -139,7 +139,7 @@ void VTableSearch::Find(const QString &term)
if (not searchList.isEmpty()) if (not searchList.isEmpty())
{ {
for (auto item : qAsConst(searchList)) for (auto *item : qAsConst(searchList))
{ {
item->setBackground(Qt::yellow); item->setBackground(Qt::yellow);
} }