From a0ef6e1baa93c7b74d8e5be9ccc6fbfd97aa8448 Mon Sep 17 00:00:00 2001 From: gxalpha Date: Tue, 4 Apr 2023 01:20:15 +0200 Subject: [PATCH] UI: Replace SIGNAL and SLOT macros in importer --- UI/window-importer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UI/window-importer.cpp b/UI/window-importer.cpp index 18e683248..ff1d0789f 100644 --- a/UI/window-importer.cpp +++ b/UI/window-importer.cpp @@ -93,8 +93,8 @@ QWidget *ImporterEntryPathItemDelegate::createEditor( QSizePolicy::ControlType::LineEdit)); layout->addWidget(text); - QObject::connect(text, SIGNAL(editingFinished()), this, - SLOT(updateText())); + QObject::connect(text, &QLineEdit::editingFinished, this, + &ImporterEntryPathItemDelegate::updateText); QToolButton *browseButton = new QToolButton(); browseButton->setText("..."); @@ -419,8 +419,8 @@ OBSImporter::OBSImporter(QWidget *parent) ui->tableView->horizontalHeader()->setSectionResizeMode( ImporterColumn::Path, QHeaderView::ResizeMode::Stretch); - connect(optionsModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), - this, SLOT(dataChanged())); + connect(optionsModel, &ImporterModel::dataChanged, this, + &OBSImporter::dataChanged); ui->tableView->setEditTriggers( QAbstractItemView::EditTrigger::CurrentChanged); @@ -428,12 +428,12 @@ OBSImporter::OBSImporter(QWidget *parent) ui->buttonBox->button(QDialogButtonBox::Ok)->setText(QTStr("Import")); ui->buttonBox->button(QDialogButtonBox::Open)->setText(QTStr("Add")); - connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), - this, SLOT(importCollections())); + connect(ui->buttonBox->button(QDialogButtonBox::Ok), + &QPushButton::clicked, this, &OBSImporter::importCollections); connect(ui->buttonBox->button(QDialogButtonBox::Open), - SIGNAL(clicked()), this, SLOT(browseImport())); + &QPushButton::clicked, this, &OBSImporter::browseImport); connect(ui->buttonBox->button(QDialogButtonBox::Close), - SIGNAL(clicked()), this, SLOT(close())); + &QPushButton::clicked, this, &OBSImporter::close); ImportersInit();