From f6be434b855d21b86d9863ab42c07af4308c7e2c Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sun, 7 Jan 2024 13:38:46 +0100 Subject: [PATCH] Remove Qt version checking for old Qt version --- Fwk/AppFwk/cafCommand/cafCmdFeature.cpp | 2 -- .../cafUserInterface/cafPdmUiLineEditor.cpp | 15 --------------- Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp | 2 -- .../cafUserInterface/cafPdmUiTreeViewEditor.cpp | 3 --- 4 files changed, 22 deletions(-) diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp index 0c23f0f54e..51eb884f16 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp @@ -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 } //-------------------------------------------------------------------------------------------------- diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp index 0534669644..be15ba0e29 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp @@ -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 { diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp index 0b95535da2..0db23db475 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeView.cpp @@ -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 ); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp index d5f7fbfd22..e77c3038cc 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeViewEditor.cpp @@ -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 );