Qt5: 'void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)' is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]
This commit is contained in:
@@ -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& )
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user