From d9d8f8de8aecbee193f0153925ea2f412f137e07 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Sat, 14 Dec 2024 11:32:09 -0500 Subject: [PATCH] Fix preemptive initialization because of clang-tidy changes --- scwx-qt/source/scwx/qt/ui/edit_marker_dialog.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scwx-qt/source/scwx/qt/ui/edit_marker_dialog.cpp b/scwx-qt/source/scwx/qt/ui/edit_marker_dialog.cpp index 47bfb07f..ef7966d1 100644 --- a/scwx-qt/source/scwx/qt/ui/edit_marker_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/edit_marker_dialog.cpp @@ -30,12 +30,7 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_); class EditMarkerDialog::Impl { public: - explicit Impl(EditMarkerDialog* self) : - self_ {self}, - deleteButton_ {self_->ui->buttonBox->addButton( - "Delete", QDialogButtonBox::DestructiveRole)} - { - } + explicit Impl(EditMarkerDialog* self) : self_ {self} {} void show_color_dialog(); void show_icon_file_dialog(); @@ -48,7 +43,7 @@ public: void handle_rejected(); EditMarkerDialog* self_; - QPushButton* deleteButton_; + QPushButton* deleteButton_ {nullptr}; QIcon get_colored_icon(const types::MarkerIconInfo& marker, const std::string& color); @@ -80,6 +75,8 @@ EditMarkerDialog::EditMarkerDialog(QWidget* parent) : QString(""), QString::fromStdString(markerIcon.second.name)); } + p->deleteButton_ = + ui->buttonBox->addButton("Delete", QDialogButtonBox::DestructiveRole); p->connect_signals(); }