diff options
Diffstat (limited to 'archiveview.cpp')
-rw-r--r-- | archiveview.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/archiveview.cpp b/archiveview.cpp index cf4013a..2773512 100644 --- a/archiveview.cpp +++ b/archiveview.cpp @@ -795,24 +795,27 @@ MetadataEditorWidget::MetadataEditorWidget(QWidget *parent) : QWidget(parent){ srcGB->setLayout(srcGBL); QGroupBox *reasonGB = new QGroupBox(tr("Reencode reason")); - QHBoxLayout *reasonGBL = new QHBoxLayout; + QVBoxLayout *reasonGBL = new QVBoxLayout; mReencReason = new QComboBox; QStringList reasons = SmGlobals::instance()->reencReasons(); mReencReason->addItems(reasons); - connect(mReencReason, SIGNAL(currentIndexChanged(QString)), this, SLOT(addToComment(QString))); + connect(mReencReason, QOverload<const QString &>::of(&QComboBox::activated), this, &MetadataEditorWidget::addToComment); + QPushButton *clearB = new QPushButton(tr("Clear")); reasonGBL->addWidget(mReencReason); + reasonGBL->addWidget(clearB); reasonGB->setLayout(reasonGBL); QHBoxLayout *srcReasonL = new QHBoxLayout; srcReasonL->addWidget(srcGB); - srcReasonL->addWidget(reasonGB); //comment QGroupBox *commentGB = new QGroupBox(tr("Comment")); mComment = new QTextEdit; QHBoxLayout *commentGBL = new QHBoxLayout; commentGBL->addWidget(mComment); + commentGBL->addWidget(reasonGB); commentGB->setLayout(commentGBL); + connect(clearB, &QPushButton::clicked, [this] { mComment->clear(); }); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(captionL); |