TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
Main class used to convert JSON data to QVariant objects. More...
#include <parser.h>
Public Member Functions | |
Parser () | |
QVariant | parse (QIODevice *io, bool *ok=0) |
Read JSON string from the I/O Device and converts it to a QVariant object. More... | |
QVariant | parse (const QByteArray &jsonData, bool *ok=0) |
This is a method provided for convenience. More... | |
QString | errorString () const |
This method returns the error message. More... | |
int | errorLine () const |
This method returns line number where the error occurred. More... | |
void | allowSpecialNumbers (bool allowSpecialNumbers) |
Sets whether special numbers (Infinity, -Infinity, NaN) are allowed as an extension to the standard. More... | |
bool | specialNumbersAllowed () const |
Parser::Parser | ( | ) |
Definition at line 64 of file parser.cpp.
References TTK_INIT_PRIVATE.
void QJson::Parser::allowSpecialNumbers | ( | bool | allowSpecialNumbers | ) |
Sets whether special numbers (Infinity, -Infinity, NaN) are allowed as an extension to the standard.
allowSpecialNumbers | new value of whether special numbers are allowed |
Definition at line 135 of file parser.cpp.
References TTK_D.
int Parser::errorLine | ( | ) | const |
This method returns line number where the error occurred.
Definition at line 129 of file parser.cpp.
References TTK_D.
QString Parser::errorString | ( | ) | const |
This method returns the error message.
Definition at line 123 of file parser.cpp.
References TTK_D.
Referenced by QJson::ParserRunnable::run().
QVariant Parser::parse | ( | QIODevice * | io, |
bool * | ok = 0 |
||
) |
Read JSON string from the I/O Device and converts it to a QVariant object.
io | Input output device |
ok | if a conversion error occurs, *ok is set to false; otherwise *ok is set to true. |
Definition at line 69 of file parser.cpp.
References TTK_D.
Referenced by MusicKGQueryPlaylistRequest::downloadDetailsFinished(), MusicKWQueryPlaylistRequest::downloadDetailsFinished(), MusicWYQueryPlaylistRequest::downloadDetailsFinished(), MusicDJRadioProgramCategoryRequest::downloadDetailsFinished(), MusicMVRadioCategoryRequest::downLoadFinished(), MusicMVRadioProgramRequest::downLoadFinished(), MusicKWDiscoverListRequest::downLoadFinished(), MusicKWDownLoadTextRequest::downLoadFinished(), MusicBarrageRequest::downLoadFinished(), MusicDJRadioCategoryRequest::downLoadFinished(), MusicKGDownloadBackgroundRequest::downLoadFinished(), MusicKGDiscoverListRequest::downLoadFinished(), MusicDownloadBingSkinRequest::downLoadFinished(), MusicResourceRequest::downLoadFinished(), MusicBDTranslationRequest::downLoadFinished(), MusicBPDownloadBackgroundRequest::downLoadFinished(), MusicKWDownloadBackgroundRequest::downLoadFinished(), MusicBingTranslationRequest::downLoadFinished(), MusicWYTranslationRequest::downLoadFinished(), MusicYDTranslationRequest::downLoadFinished(), ToolFM::downLoadFinished(), MusicWYCoverSourceRequest::downLoadFinished(), MusicWYDownLoadTextRequest::downLoadFinished(), MusicKWQueryArtistListRequest::downLoadFinished(), MusicWYDiscoverListRequest::downLoadFinished(), MusicWYQueryArtistListRequest::downLoadFinished(), MusicKGSongCommentsRequest::downLoadFinished(), MusicSongRecommendRequest::downLoadFinished(), MusicKWSongCommentsRequest::downLoadFinished(), MusicKWQueryAlbumRequest::downLoadFinished(), MusicKWQueryArtistRequest::downLoadFinished(), MusicFMRadioSongRequest::downLoadFinished(), MusicKGQueryAlbumRequest::downLoadFinished(), MusicSongSuggestRequest::downLoadFinished(), MusicWYSongCommentsRequest::downLoadFinished(), MusicKGQueryArtistListRequest::downLoadFinished(), MusicWYQueryAlbumRequest::downLoadFinished(), MusicKGQueryArtistRequest::downLoadFinished(), MusicWYQueryArtistRequest::downLoadFinished(), MusicNetworkOperator::downLoadFinished(), MusicWYQueryMovieRequest::downLoadFinished(), MusicWYQueryRequest::downLoadFinished(), MusicWYQueryToplistRequest::downLoadFinished(), MusicKWQueryMovieRequest::downLoadFinished(), MusicKGQueryMovieRequest::downLoadFinished(), MusicKWQueryRequest::downLoadFinished(), MusicKWQueryToplistRequest::downLoadFinished(), MusicKGQueryRequest::downLoadFinished(), MusicKGQueryToplistRequest::downLoadFinished(), MusicDownloadBirdSkinRequest::downLoadFinished(), MusicDJRadioProgramRequest::downLoadFinished(), MusicCiBaRequest::downLoadFinished(), MusicKGQueryPlaylistRequest::downLoadFinished(), MusicWYQueryPlaylistRequest::downLoadFinished(), MusicKWQueryPlaylistRequest::downLoadFinished(), MusicTXDownloadBackgroundRequest::downLoadFinished(), MusicSourceUpdateRequest::downLoadFinished(), MusicDJRadioProgramCategoryRequest::downLoadFinished(), MusicIdentifySongRequest::downLoadFinished(), MusicKWPlaylistCommentsRequest::downLoadFinished(), MusicKGPlaylistCommentsRequest::downLoadFinished(), MusicKWQueryArtistAlbumRequest::downLoadFinished(), MusicKGQueryArtistAlbumRequest::downLoadFinished(), MusicWYPlaylistCommentsRequest::downLoadFinished(), MusicWYQueryArtistAlbumRequest::downLoadFinished(), MusicCloudManagerTableWidget::downLoadFinished(), MusicKWQueryArtistMovieRequest::downLoadFinished(), MusicKGQueryArtistMovieRequest::downLoadFinished(), MusicWYQueryArtistMovieRequest::downLoadFinished(), MusicDownloadBirdSkinRequest::downLoadItemsFinished(), MusicKWQueryPlaylistRequest::downloadMoreDetailsFinished(), MusicIdentifySongRequest::downLoadRawDataFinished(), MusicKWQueryRequest::downLoadSingleFinished(), MusicWYQueryRequest::downLoadSingleFinished(), MusicKGQueryRequest::downLoadSingleFinished(), MusicUnityQueryMovieRequest::downLoadUnityFinished(), parse(), MusicWYQueryArtistMovieRequest::parseFromArtistMoviesCount(), ReqKWInterface::parseFromMovieInfo(), ReqBLInterface::parseFromMovieInfo(), MusicWYQueryMovieRequest::parseFromMovieList(), ReqWYInterface::parseFromMovieProperty(), ReqKGInterface::parseFromMovieProperty(), ReqBLInterface::parseFromMovieProperty(), ReqKGInterface::parseFromSongAlbumInfo(), ReqKGInterface::parseFromSongAlbumLrc(), ReqUnityInterface::parseFromSongProperty(), MusicWYQueryMovieRequest::parseFromVideoList(), parseSongPropertyA(), parseSongPropertyB(), parseSongPropertyV1(), parseSongPropertyV2(), parseSongPropertyV3(), MusicKGQueryArtistRequest::queryArtistIntro(), MusicKWQueryArtistRequest::queryArtistIntro(), MusicWYQueryArtistRequest::queryArtistIntro(), MusicKGQueryToplistRequest::queryToplistInfo(), MusicKWQueryToplistRequest::queryToplistInfo(), MusicJSPFConfigManager::readBuffer(), QJson::ParserRunnable::run(), ToolFM::startToListRequest(), MusicKGQueryPlaylistRequest::startToQueryInfo(), MusicKWQueryPlaylistRequest::startToQueryInfo(), MusicWYQueryPlaylistRequest::startToQueryInfo(), and MusicBingTranslationRequest::startToRequest().
QVariant Parser::parse | ( | const QByteArray & | jsonData, |
bool * | ok = 0 |
||
) |
This is a method provided for convenience.
jsonData | data containing the JSON object representation |
ok | if a conversion error occurs, *ok is set to false; otherwise *ok is set to true. |
Definition at line 114 of file parser.cpp.
References parse().
bool Parser::specialNumbersAllowed | ( | ) | const |
Definition at line 141 of file parser.cpp.
References TTK_D.