avoid Qt 5.15 deprecation warnings
This commit is contained in:
parent
062f921313
commit
e108487d4e
|
@ -15,6 +15,17 @@
|
||||||
#include <qpointer.h>
|
#include <qpointer.h>
|
||||||
#include <qset.h>
|
#include <qset.h>
|
||||||
|
|
||||||
|
static inline QStringList qskSplitPath( const QString& s )
|
||||||
|
{
|
||||||
|
const auto separator = QDir::listSeparator();
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK( 5, 15, 0 )
|
||||||
|
return s.split( separator, Qt::SkipEmptyParts );
|
||||||
|
#else
|
||||||
|
return s.split( separator, QString::SkipEmptyParts );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We could use QFactoryLoader, but as it is again a "private" class
|
We could use QFactoryLoader, but as it is again a "private" class
|
||||||
and does a couple of hardcoded things we don't need ( like always resolving
|
and does a couple of hardcoded things we don't need ( like always resolving
|
||||||
|
@ -36,8 +47,7 @@ static QStringList qskPathList( const char* envName )
|
||||||
if ( env.isEmpty() )
|
if ( env.isEmpty() )
|
||||||
return QStringList();
|
return QStringList();
|
||||||
|
|
||||||
return QFile::decodeName( env ).split(
|
return qskSplitPath( QFile::decodeName( env ) );
|
||||||
QDir::listSeparator(), QString::SkipEmptyParts );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString qskResolvedPath( const QString& path )
|
static inline QString qskResolvedPath( const QString& path )
|
||||||
|
|
Loading…
Reference in New Issue