Remove Qt version checking for old Qt version

This commit is contained in:
Magne Sjaastad 2024-01-07 13:38:46 +01:00
parent b5616561c2
commit f6be434b85
4 changed files with 0 additions and 22 deletions

View File

@ -163,11 +163,9 @@ void CmdFeature::applyShortcutWithHintToAction( QAction* action, const QKeySeque
{
action->setShortcut( keySequence );
#if ( QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 ) )
// Qt made keyboard shortcuts in context menus platform dependent in Qt 5.10
// With no global way of removing it.
action->setShortcutVisibleInContextMenu( true );
#endif
}
//--------------------------------------------------------------------------------------------------

View File

@ -254,22 +254,7 @@ void PdmUiLineEditor::configureAndUpdateUi( const QString& uiConfigName )
QString displayString;
if ( displayStringAttrib.m_displayString.isEmpty() )
{
#if ( QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) && QT_VERSION < QT_VERSION_CHECK( 5, 9, 0 ) )
bool valueOk = false;
double value = uiField()->uiValue().toDouble( &valueOk );
if ( valueOk )
{
// Workaround for issue seen on Qt 5.6.1 on Linux
int precision = 8;
displayString = QString::number( value, 'g', precision );
}
else
{
displayString = uiField()->uiValue().toString();
}
#else
displayString = uiField()->uiValue().toString();
#endif
}
else
{

View File

@ -80,10 +80,8 @@ PdmUiTreeView::PdmUiTreeView( QWidget* parent, Qt::WindowFlags f )
connect( m_clearAction, &QAction::triggered, this, &PdmUiTreeView::slotOnClearSearchBox );
m_clearAction->setVisible( false );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
m_layout->addLayout( searchLayout );
connect( m_searchBox, SIGNAL( textChanged( QString ) ), SLOT( slotOnSearchTextChanged() ) );
#endif
m_treeViewEditor = new PdmUiTreeViewEditor();
QWidget* treewidget = m_treeViewEditor->getOrCreateWidget( this );

View File

@ -194,10 +194,7 @@ QWidget* PdmUiTreeViewEditor::createWidget( QWidget* parent )
m_filterModel = new QSortFilterProxyModel( this );
m_filterModel->setFilterKeyColumn( 0 );
m_filterModel->setFilterCaseSensitivity( Qt::CaseInsensitive );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
m_filterModel->setRecursiveFilteringEnabled( true );
#endif
m_filterModel->setSourceModel( m_treeViewModel );
m_treeView = new PdmUiTreeViewWidget( m_mainWidget );