Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] fix QT 5.15 currentIndexChanged(QString) obsolete method call. #2259

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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