mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
* Properly escaped mtimes sql query and removed further debug.
This commit is contained in:
@@ -44,7 +44,8 @@ DatabaseCommand_DirMtimes::execSelect( DatabaseImpl* dbi )
|
|||||||
{
|
{
|
||||||
query.prepare( QString( "SELECT name, mtime "
|
query.prepare( QString( "SELECT name, mtime "
|
||||||
"FROM dirs_scanned "
|
"FROM dirs_scanned "
|
||||||
"WHERE name LIKE '%1%'" ).arg( m_prefix.replace( '\'',"''" ) ) );
|
"WHERE name LIKE :prefix" ) );
|
||||||
|
query.bindValue( ":prefix", m_prefix );
|
||||||
query.exec();
|
query.exec();
|
||||||
}
|
}
|
||||||
while( query.next() )
|
while( query.next() )
|
||||||
|
@@ -303,7 +303,7 @@ TrackModel::removeIndex( const QModelIndex& index, bool moreToCome )
|
|||||||
{
|
{
|
||||||
if ( QThread::currentThread() != thread() )
|
if ( QThread::currentThread() != thread() )
|
||||||
{
|
{
|
||||||
qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
// qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||||
QMetaObject::invokeMethod( this, "removeIndex",
|
QMetaObject::invokeMethod( this, "removeIndex",
|
||||||
Qt::QueuedConnection,
|
Qt::QueuedConnection,
|
||||||
Q_ARG(const QModelIndex, index),
|
Q_ARG(const QModelIndex, index),
|
||||||
@@ -312,8 +312,6 @@ TrackModel::removeIndex( const QModelIndex& index, bool moreToCome )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
if ( index.column() > 0 )
|
if ( index.column() > 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user