mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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 );
|
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
|
// Qt made keyboard shortcuts in context menus platform dependent in Qt 5.10
|
||||||
// With no global way of removing it.
|
// With no global way of removing it.
|
||||||
action->setShortcutVisibleInContextMenu( true );
|
action->setShortcutVisibleInContextMenu( true );
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -254,22 +254,7 @@ void PdmUiLineEditor::configureAndUpdateUi( const QString& uiConfigName )
|
|||||||
QString displayString;
|
QString displayString;
|
||||||
if ( displayStringAttrib.m_displayString.isEmpty() )
|
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();
|
displayString = uiField()->uiValue().toString();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -80,10 +80,8 @@ PdmUiTreeView::PdmUiTreeView( QWidget* parent, Qt::WindowFlags f )
|
|||||||
connect( m_clearAction, &QAction::triggered, this, &PdmUiTreeView::slotOnClearSearchBox );
|
connect( m_clearAction, &QAction::triggered, this, &PdmUiTreeView::slotOnClearSearchBox );
|
||||||
m_clearAction->setVisible( false );
|
m_clearAction->setVisible( false );
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
|
|
||||||
m_layout->addLayout( searchLayout );
|
m_layout->addLayout( searchLayout );
|
||||||
connect( m_searchBox, SIGNAL( textChanged( QString ) ), SLOT( slotOnSearchTextChanged() ) );
|
connect( m_searchBox, SIGNAL( textChanged( QString ) ), SLOT( slotOnSearchTextChanged() ) );
|
||||||
#endif
|
|
||||||
|
|
||||||
m_treeViewEditor = new PdmUiTreeViewEditor();
|
m_treeViewEditor = new PdmUiTreeViewEditor();
|
||||||
QWidget* treewidget = m_treeViewEditor->getOrCreateWidget( this );
|
QWidget* treewidget = m_treeViewEditor->getOrCreateWidget( this );
|
||||||
|
@ -194,10 +194,7 @@ QWidget* PdmUiTreeViewEditor::createWidget( QWidget* parent )
|
|||||||
m_filterModel = new QSortFilterProxyModel( this );
|
m_filterModel = new QSortFilterProxyModel( this );
|
||||||
m_filterModel->setFilterKeyColumn( 0 );
|
m_filterModel->setFilterKeyColumn( 0 );
|
||||||
m_filterModel->setFilterCaseSensitivity( Qt::CaseInsensitive );
|
m_filterModel->setFilterCaseSensitivity( Qt::CaseInsensitive );
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
|
|
||||||
m_filterModel->setRecursiveFilteringEnabled( true );
|
m_filterModel->setRecursiveFilteringEnabled( true );
|
||||||
#endif
|
|
||||||
|
|
||||||
m_filterModel->setSourceModel( m_treeViewModel );
|
m_filterModel->setSourceModel( m_treeViewModel );
|
||||||
m_treeView = new PdmUiTreeViewWidget( m_mainWidget );
|
m_treeView = new PdmUiTreeViewWidget( m_mainWidget );
|
||||||
|
Loading…
Reference in New Issue
Block a user