mirror of
https://github.com/YACReader/yacreader
synced 2025-05-27 19:00:29 -04:00
New slot syntax: Manually convert leftover QButtons
There is a bunch of QButton and similar widget connnections which cannot be converted to new slot syntax automatically. Fix them by hand and bundle them for testing.
This commit is contained in:
parent
485ce1c9d8
commit
a3a1e32198
@ -28,7 +28,7 @@ void AddLibraryDialog::setupUI()
|
||||
connect(accept, &QAbstractButton::clicked, this, &AddLibraryDialog::add);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QPushButton::close, this, &AddLibraryDialog::close);
|
||||
|
||||
find = new QPushButton(QIcon(":/images/find_folder.png"), "");
|
||||
connect(find, &QAbstractButton::clicked, this, &AddLibraryDialog::findPath);
|
||||
|
@ -26,11 +26,11 @@ void CreateLibraryDialog::setupUI()
|
||||
|
||||
accept = new QPushButton(tr("Create"));
|
||||
accept->setDisabled(true);
|
||||
connect(accept, SIGNAL(clicked()), this, SLOT(create()));
|
||||
connect(accept, &QAbstractButton::clicked, this, &CreateLibraryDialog::create);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &CreateLibraryDialog::cancelCreate);
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &CreateLibraryDialog::close);
|
||||
|
||||
find = new QPushButton(QIcon(":/images/find_folder.png"), "");
|
||||
connect(find, &QAbstractButton::clicked, this, &CreateLibraryDialog::findPath);
|
||||
@ -161,7 +161,7 @@ UpdateLibraryDialog::UpdateLibraryDialog(QWidget *parent)
|
||||
bottom->addWidget(cancel = new QPushButton(tr("Cancel")));
|
||||
|
||||
connect(cancel, &QAbstractButton::clicked, this, &UpdateLibraryDialog::cancelUpdate);
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &UpdateLibraryDialog::close);
|
||||
|
||||
mainLayout->addStretch();
|
||||
|
||||
|
@ -20,7 +20,7 @@ ExportComicsInfoDialog::ExportComicsInfoDialog(QWidget *parent)
|
||||
connect(accept, &QAbstractButton::clicked, this, &ExportComicsInfoDialog::exportComicsInfo);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &ExportComicsInfoDialog::close);
|
||||
connect(cancel, &QAbstractButton::clicked, this, &QDialog::rejected);
|
||||
|
||||
find = new QPushButton(QIcon(":/images/find_folder.png"), "");
|
||||
|
@ -17,7 +17,7 @@ ExportLibraryDialog::ExportLibraryDialog(QWidget *parent)
|
||||
connect(accept, &QAbstractButton::clicked, this, &ExportLibraryDialog::exportLibrary);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &ExportLibraryDialog::close);
|
||||
connect(cancel, &QAbstractButton::clicked, this, &QDialog::rejected);
|
||||
|
||||
find = new QPushButton(QIcon(":/images/find_folder.png"), "");
|
||||
|
@ -22,7 +22,7 @@ ImportComicsInfoDialog::ImportComicsInfoDialog(QWidget *parent)
|
||||
connect(accept, &QAbstractButton::clicked, this, &ImportComicsInfoDialog::import);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &ImportComicsInfoDialog::close);
|
||||
//connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected()));
|
||||
|
||||
find = new QPushButton(QIcon(":/images/find_folder.png"), "");
|
||||
@ -85,7 +85,7 @@ void ImportComicsInfoDialog::import()
|
||||
auto importer = new Importer();
|
||||
importer->source = path->text();
|
||||
importer->dest = dest;
|
||||
connect(importer, SIGNAL(finished()), this, SLOT(close()));
|
||||
connect(importer, &QThread::finished, this, &ImportComicsInfoDialog::close);
|
||||
connect(importer, &QThread::finished, this, &QWidget::hide);
|
||||
importer->start();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ void ImportLibraryDialog::setupUI()
|
||||
connect(accept, &QAbstractButton::clicked, this, &ImportLibraryDialog::add);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &ImportLibraryDialog::close);
|
||||
//connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected()));
|
||||
|
||||
find = new QPushButton(QIcon(":/images/find_folder.png"), "");
|
||||
|
@ -22,10 +22,9 @@ void RenameLibraryDialog::setupUI()
|
||||
connect(accept, &QAbstractButton::clicked, this, &RenameLibraryDialog::rename);
|
||||
|
||||
cancel = new QPushButton(tr("Cancel"));
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &RenameLibraryDialog::close);
|
||||
|
||||
auto nameLayout = new QHBoxLayout;
|
||||
|
||||
nameLayout->addWidget(newNameLabel);
|
||||
nameLayout->addWidget(newNameEdit);
|
||||
|
||||
@ -71,4 +70,4 @@ void RenameLibraryDialog::close()
|
||||
newNameEdit->clear();
|
||||
//accept->setEnabled(false);
|
||||
QDialog::close();
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ YACReaderOptionsDialog::YACReaderOptionsDialog(QWidget *parent)
|
||||
connect(shortcutsButton, &QAbstractButton::clicked, this, &YACReaderOptionsDialog::editShortcuts);
|
||||
|
||||
connect(accept, &QAbstractButton::clicked, this, &YACReaderOptionsDialog::saveOptions);
|
||||
connect(cancel, SIGNAL(clicked()), this, SLOT(restoreOptions())); //TODO fix this
|
||||
connect(cancel, &QAbstractButton::clicked, this, QOverload<>::of(&YACReaderOptionsDialog::restoreOptions));
|
||||
connect(cancel, &QAbstractButton::clicked, this, &QWidget::close);
|
||||
#ifndef NO_OPENGL
|
||||
useGL = new QCheckBox(tr("Use hardware acceleration (restart needed)"));
|
||||
|
Loading…
Reference in New Issue
Block a user