mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
gui: Remove QT_VERSION fallbacks for Qt < 5
There were surprisingly many `#ifdef` fallbacks for Qt 4. Remiving them simplifies maintenance, as well as adding new GUI functionality.
This commit is contained in:
@@ -109,11 +109,7 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidge
|
||||
connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(viewItemChanged(QTreeWidgetItem*, int)));
|
||||
|
||||
// click on header
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->treeWidget->header()->setClickable(true);
|
||||
#else
|
||||
ui->treeWidget->header()->setSectionsClickable(true);
|
||||
#endif
|
||||
connect(ui->treeWidget->header(), SIGNAL(sectionClicked(int)), this, SLOT(headerSectionClicked(int)));
|
||||
|
||||
// ok button
|
||||
@@ -392,13 +388,11 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
|
||||
|
||||
// TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.
|
||||
// Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473
|
||||
#if QT_VERSION >= 0x050000
|
||||
else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
|
||||
{
|
||||
if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked)
|
||||
item->setCheckState(COLUMN_CHECKBOX, Qt::Checked);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// shows count of locked unspent outputs
|
||||
|
||||
Reference in New Issue
Block a user