Skip to content

Commit

Permalink
Qt5: 'void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)…
Browse files Browse the repository at this point in the history
…' is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]
  • Loading branch information
wwmayer committed Jun 12, 2020
1 parent c814eb1 commit 45017ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Gui/DlgParameterImp.cpp
Expand Up @@ -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++) {
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -618,7 +618,7 @@ void ParameterGroup::onImportFromFile()
new ParameterGroupItem(para,*it);
}

setItemExpanded(para, para->childCount());
para->setExpanded(para->childCount());
}
catch( const Base::Exception& )
{
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/DlgToolbarsImp.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 45017ec

Please sign in to comment.