Qt5: 'void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)' is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-08 12:30:11 +02:00
committed by wwmayer
parent 7b72dcb062
commit a9ae47a8be
2 changed files with 5 additions and 5 deletions

View File

@@ -408,7 +408,7 @@ void DlgParameterImp::onChangeParameterSet(int index)
}
while (parent && !paths.empty()) {
paramGroup->setItemExpanded(parent, true);
parent->setExpanded(true);
QTreeWidgetItem* item = parent;
parent = 0;
for (int index=0; index < item->childCount(); index++) {
@@ -540,9 +540,9 @@ void ParameterGroup::onToggleSelectedItem()
if (isItemSelected(sel))
{
if ( isItemExpanded(sel) )
setItemExpanded(sel, false);
sel->setExpanded(false);
else if ( sel->childCount() > 0 )
setItemExpanded(sel, true);
sel->setExpanded(true);
}
}
@@ -618,7 +618,7 @@ void ParameterGroup::onImportFromFile()
new ParameterGroupItem(para,*it);
}
setItemExpanded(para, para->childCount());
para->setExpanded(para->childCount());
}
catch( const Base::Exception& )
{

View File

@@ -503,7 +503,7 @@ void DlgCustomToolbars::on_newButton_clicked()
QTreeWidgetItem* item = new QTreeWidgetItem(ui->toolbarTreeWidget);
item->setText(0, text);
item->setCheckState(0, Qt::Checked);
ui->toolbarTreeWidget->setItemExpanded(item, true);
item->setExpanded(true);
QVariant data = ui->workbenchBox->itemData(ui->workbenchBox->currentIndex(), Qt::UserRole);
QString workbench = data.toString();