diff -r 5723da102db1 -r 38bbf2dcd608 qtinternetradio/irdb/src/imgwrapper.cpp --- a/qtinternetradio/irdb/src/imgwrapper.cpp Fri Sep 17 08:27:59 2010 +0300 +++ b/qtinternetradio/irdb/src/imgwrapper.cpp Mon Oct 04 00:07:46 2010 +0300 @@ -35,32 +35,35 @@ QString updSqlStr; QList* pImgList = NULL; bool ret = true; + int logoType; if(!channelId) { return false; } - if( NULL == RowData ) + if( ( NULL == RowData )&&(NULL ==logoData) ) { return false; } - - if(RowData->isEmpty()) + if(RowData) { - return false; - } + if(RowData->isEmpty()) + { + return false; + } - if( true != (RowData->value(channelId)).isEmpty() ) - { - return false; - } + if( true != (RowData->value(channelId)).isEmpty() ) + { + return false; + } + } updSqlStr = "update img set "; if(NULL != logoData) { pImgList = new QList(); - combinePutStr(RowData, colNameView, insSqlStr, updSqlStr, logoData, pImgList); + combinePutStr(RowData, colNameView, insSqlStr, updSqlStr, logoData, pImgList, &logoType); } else @@ -71,7 +74,7 @@ //create insSqlstr and updSqlStr in advance; updSqlStr = updSqlStr + "where channelId = " + QString::number(channelId); - m_pIRDB->updRowImg(channelId, updSqlStr, pImgList)? ret = false:true; + m_pIRDB->updRowImg(channelId, updSqlStr, pImgList, logoType)? ret = false:true; if(pImgList) { delete pImgList; @@ -84,7 +87,7 @@ QList* imgWrapper::getImg(const columnMap* const condAND, const columnMap* const condOR) { - QString sltSqlStr = "select * from IRVIEW_channelinfo "; + QString sltSqlStr = "select * from img "; QList* pDataSet = NULL; if( (NULL != condAND)&&(NULL != condOR) )