1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 13:01:53 +02:00

* Properly escaped mtimes sql query and removed further debug.

This commit is contained in:
Christian Muehlhaeuser 2011-04-04 09:27:16 +02:00
parent 89c3f266a7
commit 9e20674b84
2 changed files with 3 additions and 4 deletions

View File

@ -44,7 +44,8 @@ DatabaseCommand_DirMtimes::execSelect( DatabaseImpl* dbi )
{
query.prepare( QString( "SELECT name, mtime "
"FROM dirs_scanned "
"WHERE name LIKE '%1%'" ).arg( m_prefix.replace( '\'',"''" ) ) );
"WHERE name LIKE :prefix" ) );
query.bindValue( ":prefix", m_prefix );
query.exec();
}
while( query.next() )

View File

@ -303,7 +303,7 @@ TrackModel::removeIndex( const QModelIndex& index, bool moreToCome )
{
if ( QThread::currentThread() != thread() )
{
qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
// qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
QMetaObject::invokeMethod( this, "removeIndex",
Qt::QueuedConnection,
Q_ARG(const QModelIndex, index),
@ -312,8 +312,6 @@ TrackModel::removeIndex( const QModelIndex& index, bool moreToCome )
return;
}
qDebug() << Q_FUNC_INFO;
if ( index.column() > 0 )
return;