Commit 596c17c7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

All signal from qbuttongroup::..(int) was deprecated in qt5.15

parent 7bce7dee
......@@ -95,7 +95,7 @@ ArchiveDialog::ArchiveDialog(const Akonadi::ETMCalendar::Ptr &cal, Akonadi::Inci
connect(descLabel, &QLabel::linkActivated, this, &ArchiveDialog::showWhatsThis);
QButtonGroup *radioBG = new QButtonGroup(this);
connect(radioBG, QOverload<int>::of(
connect(radioBG, QOverload<QAbstractButton *>::of(
&QButtonGroup::buttonClicked), this, &ArchiveDialog::slotActionChanged);
QHBoxLayout *dateLayout = new QHBoxLayout();
......
......@@ -233,7 +233,7 @@ CalPrintDialog::CalPrintDialog(int initialPrintType, const PrintPlugin::List &pl
splitterRightLayout->addWidget(mOrientationSelection, 1, 1);
// signals and slots connections
connect(mTypeGroup, QOverload<int>::of(
connect(mTypeGroup, QOverload<QAbstractButton *>::of(
&QButtonGroup::buttonClicked), this, &CalPrintDialog::setPrintType);
orientationLabel->setBuddy(mOrientationSelection);
......@@ -266,7 +266,7 @@ CalPrintDialog::CalPrintDialog(int initialPrintType, const PrintPlugin::List &pl
if ((firstButton || p->sortID() == initialPrintType) && p->enabled()) {
firstButton = false;
radioButton->setChecked(true);
setPrintType(id);
changePrintType(id);
}
mTypeGroup->addButton(radioButton, mapit.key());
typeLayout->addWidget(radioButton);
......@@ -293,7 +293,7 @@ void CalPrintDialog::setPreview(bool preview)
}
}
void CalPrintDialog::setPrintType(int i)
void CalPrintDialog::changePrintType(int i)
{
mConfigArea->setCurrentIndex(i);
mConfigArea->currentWidget()->raise();
......@@ -303,6 +303,16 @@ void CalPrintDialog::setPrintType(int i)
}
}
void CalPrintDialog::setPrintType(QAbstractButton *button)
{
if (button) {
const int i = mTypeGroup->id(button);
mConfigArea->setCurrentIndex(i);
mConfigArea->currentWidget()->raise();
button->setChecked(true);
}
}
void CalPrintDialog::setOrientation(CalPrinter::ePrintOrientation orientation)
{
mOrientation = orientation;
......
......@@ -105,11 +105,12 @@ public:
CalPrinter::ePrintOrientation orientation() const;
public Q_SLOTS:
void setPrintType(int);
void setPrintType(QAbstractButton *button);
void setPreview(bool);
private:
void slotOk();
void changePrintType(int id);
QButtonGroup *mTypeGroup = nullptr;
QStackedWidget *mConfigArea = nullptr;
QMap<int, PrintPlugin *> mPluginIDs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment