Fix preemptive initialization because of clang-tidy changes

This commit is contained in:
AdenKoperczak 2024-12-14 11:32:09 -05:00
parent 7ab12e7b4b
commit d9d8f8de8a

View file

@ -30,12 +30,7 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
class EditMarkerDialog::Impl class EditMarkerDialog::Impl
{ {
public: public:
explicit Impl(EditMarkerDialog* self) : explicit Impl(EditMarkerDialog* self) : self_ {self} {}
self_ {self},
deleteButton_ {self_->ui->buttonBox->addButton(
"Delete", QDialogButtonBox::DestructiveRole)}
{
}
void show_color_dialog(); void show_color_dialog();
void show_icon_file_dialog(); void show_icon_file_dialog();
@ -48,7 +43,7 @@ public:
void handle_rejected(); void handle_rejected();
EditMarkerDialog* self_; EditMarkerDialog* self_;
QPushButton* deleteButton_; QPushButton* deleteButton_ {nullptr};
QIcon get_colored_icon(const types::MarkerIconInfo& marker, QIcon get_colored_icon(const types::MarkerIconInfo& marker,
const std::string& color); const std::string& color);
@ -80,6 +75,8 @@ EditMarkerDialog::EditMarkerDialog(QWidget* parent) :
QString(""), QString(""),
QString::fromStdString(markerIcon.second.name)); QString::fromStdString(markerIcon.second.name));
} }
p->deleteButton_ =
ui->buttonBox->addButton("Delete", QDialogButtonBox::DestructiveRole);
p->connect_signals(); p->connect_signals();
} }