Commit 14430425 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15. SkipEmptyParts is part of Qt::. They reverted...

Make it compile against qt5.15. SkipEmptyParts is part of Qt::. They reverted change error() to socketError
parent 1481c7a5
......@@ -103,7 +103,11 @@ namespace KCDDB
uint
CDDB::statusCode( const QString & line )
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList tokenList = line.split(QLatin1Char( ' ' ), QString::SkipEmptyParts );
#else
QStringList tokenList = line.split(QLatin1Char( ' ' ), Qt::SkipEmptyParts );
#endif
uint serverStatus = tokenList[ 0 ].toUInt();
......
......@@ -282,7 +282,11 @@ namespace KCDDB
bool
CDInfo::load(const QString & string)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
return load(string.split(QLatin1Char( '\n' ),QString::SkipEmptyParts));
#else
return load(string.split(QLatin1Char( '\n' ),Qt::SkipEmptyParts));
#endif
}
bool
......
......@@ -93,7 +93,11 @@ namespace KCDDB
void
HTTPLookup::jobFinished()
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList lineList = QString::fromUtf8(data_).split( QLatin1String( "\n" ), QString::SkipEmptyParts );
#else
QStringList lineList = QString::fromUtf8(data_).split( QLatin1String( "\n" ), Qt::SkipEmptyParts );
#endif
QStringList::ConstIterator it = lineList.constBegin();
switch ( state_ )
......
......@@ -42,7 +42,11 @@ namespace KCDDB
if ( 200 == serverStatus )
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList tokenList = line.split( QLatin1Char( ' ' ), QString::SkipEmptyParts );
#else
QStringList tokenList = line.split( QLatin1Char( ' ' ), Qt::SkipEmptyParts );
#endif
matchList_.append( qMakePair( tokenList[ 1 ], tokenList[ 2 ] ) );
return Success;
}
......@@ -61,7 +65,11 @@ namespace KCDDB
void
Lookup::parseExtraMatch( const QString & line )
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList tokenList = line.split( QLatin1Char( ' ' ), QString::SkipEmptyParts );
#else
QStringList tokenList = line.split( QLatin1Char( ' ' ), Qt::SkipEmptyParts );
#endif
matchList_.append( qMakePair( tokenList[ 0 ], tokenList[ 1 ] ) );
}
......
......@@ -53,11 +53,7 @@ namespace KCDDB
{
qCDebug(LIBKCDDB) << "Couldn't connect to " << socket_->peerName() << ":" << socket_->peerPort();
qCDebug(LIBKCDDB) << "Socket error: " << socket_->errorString();
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
const auto socketError = socket_->error();
#else
const auto socketError = socket_->socketError();
#endif
if ( socketError == QAbstractSocket::HostNotFoundError )
return HostNotFound;
else if ( socketError == QAbstractSocket::SocketTimeoutError )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment