Skip to content

Commit

Permalink
[GUI] fix QT 5.15 currentIndexChanged(QString) deprecated method call.
Browse files Browse the repository at this point in the history
Github-Pull: bitcoin#2259
Rebased-From: 304c915
  • Loading branch information
furszy committed Jun 18, 2021
1 parent e92cc73 commit 998c7e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qt/pivx/dashboardwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
connect(ui->comboBoxYears, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
this, &DashboardWidget::onChartYearChanged);
#else
// hide charts container if not USE_QTCHARTS
Expand All @@ -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<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), this, &DashboardWidget::onSortChanged);
connect(ui->comboBoxSort, static_cast<void (QComboBox::*)(const QString&)>(&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<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
connect(ui->comboBoxSortType, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
this, &DashboardWidget::onSortTypeChanged);

// Transactions
Expand Down Expand Up @@ -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<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
connect(ui->comboBoxMonths, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
this, &DashboardWidget::onChartMonthChanged);
connect(ui->pushButtonChartArrow, &QPushButton::clicked, [this](){ onChartArrowClicked(true); });
connect(ui->pushButtonChartRight, &QPushButton::clicked, [this](){ onChartArrowClicked(false); });
Expand Down

0 comments on commit 998c7e8

Please sign in to comment.