Add TODO compile var + Fix doxygen issue

You can make your code warn on compile time for the TODO's
In order to do so, uncomment the following line. in pro file
DEFINES += TODO_LIST
This commit is contained in:
Simon De Backer
2020-09-24 17:01:33 +02:00
parent 65ba816859
commit 36dbe65457
40 changed files with 1147 additions and 966 deletions

View File

@@ -83,7 +83,9 @@ int BOMExportDialog::exec()
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove
stream << getBom() << endl;
#else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.15 or later")
#endif
stream << getBom() << &Qt::endl(stream);
#endif
}

View File

@@ -67,23 +67,23 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
//Conductor widget
m_cpw = new ConductorPropertiesWidget(conductors, this);
m_cpw -> setReadOnly(diagram_is_read_only);
QComboBox *autonum_combobox = m_cpw->autonumComboBox();
autonum_combobox->addItems(diagram->project()->conductorAutoNum().keys());
autonum_combobox->setCurrentIndex(autonum_combobox->findText(diagram->conductorsAutonumName()));
connect(m_cpw->editAutonumPushButton(), &QPushButton::clicked, this, &DiagramPropertiesDialog::editAutonum);
// Buttons
QDialogButtonBox boutons(diagram_is_read_only ? QDialogButtonBox::Ok : QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
connect(&boutons, SIGNAL(accepted()), this, SLOT(accept()));
connect(&boutons, SIGNAL(rejected()), this, SLOT(reject()));
QGridLayout *glayout = new QGridLayout;
glayout->addWidget(border_infos,0,0);
glayout->addWidget(titleblock_infos, 1, 0);
glayout->addWidget(m_cpw, 0, 1, 0, 1);
QVBoxLayout vlayout(this);
vlayout.addLayout(glayout);
vlayout.addWidget(&boutons);
@@ -107,6 +107,9 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
// Conducteur have change
if (new_conductors != conductors) {
#if TODO_LIST
#pragma message("@TODO implement an undo command to allow the user to undo/redo this action")
#endif
/// TODO implement an undo command to allow the user to undo/redo this action
diagram -> defaultConductorProperties = new_conductors;
}