diff --git a/src/neroonetimedialog.cpp b/src/neroonetimedialog.cpp index 17105ad..f6b4cf6 100644 --- a/src/neroonetimedialog.cpp +++ b/src/neroonetimedialog.cpp @@ -38,6 +38,7 @@ NeroOneTimeDialog::NeroOneTimeDialog(QWidget *parent) for(const QString prefix : prefixes) { prefixesBtns << new QPushButton(prefix); + prefixesBtns.last()->setProperty("slot", prefixesBtns.count()-1); connect(prefixesBtns.last(), &QPushButton::clicked, this, &NeroOneTimeDialog::prefixBtn_clicked); ui->prefixes->addWidget(prefixesBtns.last()); } diff --git a/src/neroonetimedialog.h b/src/neroonetimedialog.h index 03786a6..28d1239 100644 --- a/src/neroonetimedialog.h +++ b/src/neroonetimedialog.h @@ -20,6 +20,8 @@ #ifndef NEROONETIMEDIALOG_H #define NEROONETIMEDIALOG_H +#include "nerofs.h" + #include #include @@ -40,7 +42,7 @@ class NeroOneTimeDialog : public QDialog private slots: void prefixBtn_clicked() { QPushButton *btn = qobject_cast(sender()); - selected = btn->text(); + selected = NeroFS::GetPrefixes().at(btn->property("slot").toInt()); close(); }