Skip to content

Commit

Permalink
Use correct qt version check for SkipEmptyParts
Browse files Browse the repository at this point in the history
Qt::SkipEmptyParts was introduced in Qt 5.14 and QString::SkipEmptyParts
was deprecated in Qt 5.15. This will avoid warnings when compiling with
Qt 5.15.
  • Loading branch information
marthinsen committed Feb 12, 2024
1 parent 336dc57 commit 8381cb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ PdmObjectHandle* PdmReferenceHelper::objectFromFieldReference( PdmFieldHandle* f
if ( reference.isEmpty() ) return nullptr;
if ( reference.trimmed().isEmpty() ) return nullptr;

#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
#if ( QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 ) )
auto SkipEmptyParts = QString::SkipEmptyParts;
#else
auto SkipEmptyParts = Qt::SkipEmptyParts;
Expand Down
2 changes: 1 addition & 1 deletion Fwk/AppFwk/cafUserInterface/cafMemoryInspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#ifdef __linux__

#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
#if ( QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 ) )
auto SkipEmptyParts = QString::SkipEmptyParts;
#else
auto SkipEmptyParts = Qt::SkipEmptyParts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ void PdmUiTreeSelectionEditor::slotInvertCheckedStateOfAll()
//--------------------------------------------------------------------------------------------------
void PdmUiTreeSelectionEditor::setCheckedStateForIntegerItemsMatchingFilter()
{
#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
#if ( QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 ) )
auto SkipEmptyParts = QString::SkipEmptyParts;
#else
auto SkipEmptyParts = Qt::SkipEmptyParts;
Expand Down

0 comments on commit 8381cb4

Please sign in to comment.