mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
Remove Qt version checking for old Qt version
This commit is contained in:
parent
b5616561c2
commit
f6be434b85
@ -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
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user