mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
Add method to get encodedQuery independent of Qt version
This commit is contained in:
parent
8c414d7588
commit
f5de7e0a3f
@ -904,4 +904,14 @@ percentEncode( const QUrl& url )
|
||||
return data;
|
||||
}
|
||||
|
||||
QByteArray
|
||||
encodedQuery( const QUrl& url )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
return url.query(QUrl::FullyEncoded).toUtf8();
|
||||
#else
|
||||
return url.encodedQuery();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
@ -213,6 +213,7 @@ namespace TomahawkUtils
|
||||
DLLEXPORT bool urlHasQueryItem( const QUrl& url, const QString& key );
|
||||
DLLEXPORT QList<QPair<QString, QString> > urlQueryItems( const QUrl& url );
|
||||
DLLEXPORT void urlSetQuery( QUrl& url, const QString& query );
|
||||
DLLEXPORT QByteArray encodedQuery( const QUrl& url );
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user