Commit f283da85 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed deprecation warning

parent 2126b0ee
...@@ -454,18 +454,30 @@ void HoleFillerPlugin::update_menu() { ...@@ -454,18 +454,30 @@ void HoleFillerPlugin::update_menu() {
// Set Number of the edges // Set Number of the edges
QTableWidgetItem* size = new QTableWidgetItem( QString::number( egde_count ) ); QTableWidgetItem* size = new QTableWidgetItem( QString::number( egde_count ) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
size->setFlags( 0 ); size->setFlags( 0 );
#else
size->setFlags( Qt::ItemFlags() );
#endif
size->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); size->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,1,size); tool_->tableWidget->setItem(count,1,size);
// Set boundary Length // Set boundary Length
QTableWidgetItem* boundaryLengthWidget = new QTableWidgetItem( QString::number(boundaryLength) ); QTableWidgetItem* boundaryLengthWidget = new QTableWidgetItem( QString::number(boundaryLength) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
boundaryLengthWidget->setFlags( 0 ); boundaryLengthWidget->setFlags( 0 );
#else
boundaryLengthWidget->setFlags( Qt::ItemFlags() );
#endif
boundaryLengthWidget->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); boundaryLengthWidget->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,2,boundaryLengthWidget); tool_->tableWidget->setItem(count,2,boundaryLengthWidget);
QTableWidgetItem* bbDiagonalWidget = new QTableWidgetItem( QString::number(bbDiagonal) ); QTableWidgetItem* bbDiagonalWidget = new QTableWidgetItem( QString::number(bbDiagonal) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
bbDiagonalWidget->setFlags( 0 ); bbDiagonalWidget->setFlags( 0 );
#else
bbDiagonalWidget->setFlags( Qt::ItemFlags() );
#endif
bbDiagonalWidget->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); bbDiagonalWidget->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,3,bbDiagonalWidget); tool_->tableWidget->setItem(count,3,bbDiagonalWidget);
...@@ -490,7 +502,11 @@ void HoleFillerPlugin::update_menu() { ...@@ -490,7 +502,11 @@ void HoleFillerPlugin::update_menu() {
for (uint i = 0 ; i < holeInfo->holes()->size() ; ++i ) { for (uint i = 0 ; i < holeInfo->holes()->size() ; ++i ) {
// Set Name of the object // Set Name of the object
QTableWidgetItem* name = new QTableWidgetItem( o_it->name() ); QTableWidgetItem* name = new QTableWidgetItem( o_it->name() );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
name->setFlags( 0 ); name->setFlags( 0 );
#else
name->setFlags( Qt::ItemFlags() );
#endif
name->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); name->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,0,name); tool_->tableWidget->setItem(count,0,name);
...@@ -502,19 +518,31 @@ void HoleFillerPlugin::update_menu() { ...@@ -502,19 +518,31 @@ void HoleFillerPlugin::update_menu() {
// Set Number of the edges // Set Number of the edges
QTableWidgetItem* size = new QTableWidgetItem( QString::number( egde_count ) ); QTableWidgetItem* size = new QTableWidgetItem( QString::number( egde_count ) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
size->setFlags( 0 ); size->setFlags( 0 );
#else
size->setFlags( Qt::ItemFlags() );
#endif
size->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); size->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,1,size); tool_->tableWidget->setItem(count,1,size);
// Set Bounding box diagonal // Set Bounding box diagonal
QTableWidgetItem* radius = new QTableWidgetItem( QString::number(boundaryLength) ); QTableWidgetItem* radius = new QTableWidgetItem( QString::number(boundaryLength) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
radius->setFlags( 0 ); radius->setFlags( 0 );
#else
radius->setFlags( Qt::ItemFlags() );
#endif
radius->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); radius->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,2,radius); tool_->tableWidget->setItem(count,2,radius);
// Set Bounding box diagonal // Set Bounding box diagonal
QTableWidgetItem* bbDiagonalWidget = new QTableWidgetItem( QString::number(bbDiagonal) ); QTableWidgetItem* bbDiagonalWidget = new QTableWidgetItem( QString::number(bbDiagonal) );
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
bbDiagonalWidget->setFlags( 0 ); bbDiagonalWidget->setFlags( 0 );
#else
bbDiagonalWidget->setFlags( Qt::ItemFlags() );
#endif
bbDiagonalWidget->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled); bbDiagonalWidget->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled);
tool_->tableWidget->setItem(count,3,bbDiagonalWidget); tool_->tableWidget->setItem(count,3,bbDiagonalWidget);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment