mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Fixed compiling on OSX.
This commit is contained in:
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
#include <QSqlError>
|
#include <QSqlError>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
#define QUERY_THRESHOLD 60
|
#define QUERY_THRESHOLD 60
|
||||||
#define QUERY_ANALYZE 1
|
|
||||||
|
|
||||||
|
|
||||||
TomahawkSqlQuery::TomahawkSqlQuery()
|
TomahawkSqlQuery::TomahawkSqlQuery()
|
||||||
@@ -59,7 +59,7 @@ TomahawkSqlQuery::exec()
|
|||||||
|
|
||||||
int e = t.elapsed();
|
int e = t.elapsed();
|
||||||
bool log = ( e >= QUERY_THRESHOLD );
|
bool log = ( e >= QUERY_THRESHOLD );
|
||||||
#ifdef QUERY_ANALYZE
|
#ifdef TOMAHAWK_QUERY_ANALYZE
|
||||||
log = true;
|
log = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ TomahawkSqlQuery::showError()
|
|||||||
tLog() << "\n" << "*** DATABASE ERROR ***" << "\n"
|
tLog() << "\n" << "*** DATABASE ERROR ***" << "\n"
|
||||||
<< this->lastQuery() << "\n"
|
<< this->lastQuery() << "\n"
|
||||||
<< "boundValues:" << this->boundValues() << "\n"
|
<< "boundValues:" << this->boundValues() << "\n"
|
||||||
<< this->lastError().text() << "\n"
|
<< this->lastError().text() << "\n";
|
||||||
;
|
|
||||||
Q_ASSERT( false );
|
Q_ASSERT( false );
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include <QSqlQuery>
|
#include <QSqlQuery>
|
||||||
|
|
||||||
|
#define TOMAHAWK_QUERY_ANALYZE 1
|
||||||
|
|
||||||
class TomahawkSqlQuery : public QSqlQuery
|
class TomahawkSqlQuery : public QSqlQuery
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user