mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Some debug and safety meassures.
This commit is contained in:
@@ -26,6 +26,21 @@ DatabaseCommand_loadOps::exec( DatabaseImpl* dbi )
|
|||||||
{
|
{
|
||||||
QList< dbop_ptr > ops;
|
QList< dbop_ptr > ops;
|
||||||
|
|
||||||
|
{
|
||||||
|
TomahawkSqlQuery query = dbi->newquery();
|
||||||
|
query.prepare( QString( "SELECT id FROM oplog WHERE guid = ?" ) );
|
||||||
|
query.addBindValue( m_since );
|
||||||
|
query.exec();
|
||||||
|
|
||||||
|
if ( !query.next() )
|
||||||
|
{
|
||||||
|
tLog() << "Unknown oplog guid, requested, not replying:" << m_since;
|
||||||
|
Q_ASSERT( false );
|
||||||
|
emit done( m_since, m_since, ops );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TomahawkSqlQuery query = dbi->newquery();
|
TomahawkSqlQuery query = dbi->newquery();
|
||||||
query.prepare( QString(
|
query.prepare( QString(
|
||||||
"SELECT guid, command, json, compressed, singleton "
|
"SELECT guid, command, json, compressed, singleton "
|
||||||
|
@@ -110,6 +110,7 @@ DatabaseWorker::doWork()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
tDebug() << "Executing cmd:" << cmd->guid();
|
||||||
cmd->_exec( m_dbimpl ); // runs actual SQL stuff
|
cmd->_exec( m_dbimpl ); // runs actual SQL stuff
|
||||||
|
|
||||||
if ( cmd->loggable() )
|
if ( cmd->loggable() )
|
||||||
|
@@ -82,8 +82,8 @@ void AvatarManager::onNewPresence(const Jreen::Presence& presence)
|
|||||||
// qDebug() << presence.from().full() << "vcard: photo already cached no request necessary " << update->photoHash();
|
// qDebug() << presence.from().full() << "vcard: photo already cached no request necessary " << update->photoHash();
|
||||||
m_JidsAvatarHashes.insert( update->photoHash(), presence.from().bare() );
|
m_JidsAvatarHashes.insert( update->photoHash(), presence.from().bare() );
|
||||||
|
|
||||||
Q_ASSERT(!this->avatar(presence.from().bare()).isNull());
|
if ( !this->avatar( presence.from().bare() ).isNull() )
|
||||||
emit newAvatar(presence.from().bare());
|
emit newAvatar(presence.from().bare());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user