diff -r 04837bf3a628 -r 21be958eb3ce radioapp/radiouiengine/src/radiohistorydatabase.cpp --- a/radioapp/radiouiengine/src/radiohistorydatabase.cpp Tue Oct 12 11:25:14 2010 +0300 +++ b/radioapp/radiouiengine/src/radiohistorydatabase.cpp Fri Oct 15 16:26:27 2010 +0300 @@ -29,7 +29,7 @@ #include "radiohistorydatabase.h" #include "radiologger.h" -static const QLatin1String DATABASE_NAME ( "c:\\radioplayhistory.db" ); +static const QLatin1String DATABASE_NAME ( "radioplayhistory.db" ); static const QLatin1String DATABASE_DRIVER ( "QSQLITE" ); static const QLatin1String HISTORY_TABLE ( "history" ); static const QLatin1String SQL_CREATE_TABLE ( "CREATE TABLE history (" @@ -56,6 +56,8 @@ //static static const QLatin1String SQL_FIND_ITEM_BY_ID( "SELECT * FROM history WHERE id = ?" ); static const QLatin1String SQL_TOGGLE_TAG ( "UPDATE history SET tagged = ? WHERE id = ?" ); +const int THOUSAND_HERTZ = 1000; + #ifdef LOGGING_ENABLED # define GET_ERR( param ) GETSTRING( param.lastError().text() ) # define GET_ERR_PTR( param ) GETSTRING( param->lastError().text() ) @@ -97,7 +99,7 @@ query.addBindValue( artist ); query.addBindValue( title ); query.addBindValue( stationName ); - query.addBindValue( static_cast( frequency / 1000 ) ); + query.addBindValue( static_cast( frequency / THOUSAND_HERTZ ) ); query.addBindValue( fromRds ); query.addBindValue( QDateTime::currentDateTime().toTime_t() );