From 998c7e8593d96a1efc63b9212d9758069bce807e Mon Sep 17 00:00:00 2001 From: furszy Date: Mon, 22 Mar 2021 20:54:44 -0300 Subject: [PATCH] [GUI] fix QT 5.15 `currentIndexChanged(QString)` deprecated method call. Github-Pull: #2259 Rebased-From: 304c91593114e6a4baeb3640be83b1d6965f3959 --- src/qt/pivx/dashboardwidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/pivx/dashboardwidget.cpp b/src/qt/pivx/dashboardwidget.cpp index 7f29578ccc3c1..4fd2f6420d72c 100644 --- a/src/qt/pivx/dashboardwidget.cpp +++ b/src/qt/pivx/dashboardwidget.cpp @@ -80,7 +80,7 @@ DashboardWidget::DashboardWidget(PIVXGUI* parent) : #ifdef USE_QTCHARTS setCssProperty(ui->right, "container-right"); ui->right->setContentsMargins(20,20,20,0); - connect(ui->comboBoxYears, static_cast(&QComboBox::currentIndexChanged), + connect(ui->comboBoxYears, static_cast(&QComboBox::currentTextChanged), this, &DashboardWidget::onChartYearChanged); #else // hide charts container if not USE_QTCHARTS @@ -91,14 +91,14 @@ DashboardWidget::DashboardWidget(PIVXGUI* parent) : SortEdit* lineEdit = new SortEdit(ui->comboBoxSort); connect(lineEdit, &SortEdit::Mouse_Pressed, [this](){ui->comboBoxSort->showPopup();}); setSortTx(ui->comboBoxSort, lineEdit); - connect(ui->comboBoxSort, static_cast(&QComboBox::currentIndexChanged), this, &DashboardWidget::onSortChanged); + connect(ui->comboBoxSort, static_cast(&QComboBox::currentTextChanged), this, &DashboardWidget::onSortChanged); // Sort type SortEdit* lineEditType = new SortEdit(ui->comboBoxSortType); connect(lineEditType, &SortEdit::Mouse_Pressed, [this](){ui->comboBoxSortType->showPopup();}); setSortTxTypeFilter(ui->comboBoxSortType, lineEditType); ui->comboBoxSortType->setCurrentIndex(0); - connect(ui->comboBoxSortType, static_cast(&QComboBox::currentIndexChanged), + connect(ui->comboBoxSortType, static_cast(&QComboBox::currentTextChanged), this, &DashboardWidget::onSortTypeChanged); // Transactions @@ -397,7 +397,7 @@ void DashboardWidget::loadChart() yearFilter = currentDate.year(); for (int i = 1; i < 13; ++i) ui->comboBoxMonths->addItem(QString(monthsNames[i-1]), QVariant(i)); ui->comboBoxMonths->setCurrentIndex(monthFilter - 1); - connect(ui->comboBoxMonths, static_cast(&QComboBox::currentIndexChanged), + connect(ui->comboBoxMonths, static_cast(&QComboBox::currentTextChanged), this, &DashboardWidget::onChartMonthChanged); connect(ui->pushButtonChartArrow, &QPushButton::clicked, [this](){ onChartArrowClicked(true); }); connect(ui->pushButtonChartRight, &QPushButton::clicked, [this](){ onChartArrowClicked(false); });