summaryrefslogtreecommitdiffstats
path: root/amarok/src/database_refactor
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-14 17:55:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-14 17:55:21 +0000
commit4cb09d377b01f966ab8e790d64f4f8fcc2bb9ecd (patch)
tree0afa7d69b50cb912a4a69a6406e7b6fb7894911c /amarok/src/database_refactor
parenteb88625a55dbaa7e92042d96241e9ddda4604862 (diff)
downloadamarok-4cb09d377b01f966ab8e790d64f4f8fcc2bb9ecd.tar.gz
amarok-4cb09d377b01f966ab8e790d64f4f8fcc2bb9ecd.zip
Fix Amarok FTBFS under Autotools
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1247158 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'amarok/src/database_refactor')
-rw-r--r--amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp36
-rw-r--r--amarok/src/database_refactor/sqlite/sqlite_dbengine.h6
2 files changed, 21 insertions, 21 deletions
diff --git a/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp b/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp
index 5f13f7db..c8dd911f 100644
--- a/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp
+++ b/amarok/src/database_refactor/sqlite/sqlite_dbengine.cpp
@@ -4,7 +4,7 @@
// (c) 2005 Ian Monroe <ian@monroe.nu>
// See COPYING file for licensing information.
-#define DEBUG_PREFIX "STQLite-DBEngine"
+#define DEBUG_PREFIX "SQLite-DBEngine"
#include "app.h"
#include "amarok.h"
@@ -43,11 +43,11 @@ SqliteDbEngine::SqliteDbEngine()
{
TQString format;
file.readLine( format, 50 );
- if ( !format.startsWith( "STQLite format 3" ) )
+ if ( !format.startsWith( "SQLite format 3" ) )
{
warning() << "Database versions incompatible. Removing and rebuilding database.\n";
}
- else if ( sqlite3_open( path, &m_db ) != STQLITE_OK )
+ else if ( sqlite3_open( path, &m_db ) != SQLITE_OK )
{
warning() << "Database file corrupt. Removing and rebuilding database.\n";
sqlite3_close( m_db );
@@ -60,20 +60,20 @@ SqliteDbEngine::SqliteDbEngine()
{
// Remove old db file; create new
TQFile::remove( path );
- if ( sqlite3_open( path, &m_db ) == STQLITE_OK )
+ if ( sqlite3_open( path, &m_db ) == SQLITE_OK )
{
m_initialized = true;
}
}
if ( m_initialized )
{
- if( sqlite3_create_function(m_db, "rand", 0, STQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != STQLITE_OK )
+ if( sqlite3_create_function(m_db, "rand", 0, SQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != SQLITE_OK )
m_initialized = false;
- if( sqlite3_create_function(m_db, "power", 2, STQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != STQLITE_OK )
+ if( sqlite3_create_function(m_db, "power", 2, SQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != SQLITE_OK )
m_initialized = false;
}
- //optimization for speeding up STQLite
+ //optimization for speeding up SQLite
query( "PRAGMA default_synchronous = OFF;" );
}
@@ -94,7 +94,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement )
//compile SQL program to virtual machine
error = sqlite3_prepare( m_db, statement.utf8(), statement.length(), &stmt, &tail );
- if ( error != STQLITE_OK )
+ if ( error != SQLITE_OK )
{
Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl;
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@@ -110,7 +110,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement )
{
error = sqlite3_step( stmt );
- if ( error == STQLITE_BUSY )
+ if ( error == SQLITE_BUSY )
{
if ( busyCnt++ > 20 ) {
Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n";
@@ -119,9 +119,9 @@ TQStringList SqliteDbEngine::query( const TQString& statement )
::usleep( 100000 ); // Sleep 100 msec
debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl;
}
- if ( error == STQLITE_MISUSE )
+ if ( error == SQLITE_MISUSE )
debug() << "sqlite3_step: MISUSE" << endl;
- if ( error == STQLITE_DONE || error == STQLITE_ERROR )
+ if ( error == SQLITE_DONE || error == SQLITE_ERROR )
break;
//iterate over columns
@@ -133,7 +133,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement )
//deallocate vm resources
sqlite3_finalize( stmt );
- if ( error != STQLITE_DONE )
+ if ( error != SQLITE_DONE )
{
Debug::error() << k_funcinfo << "sqlite_step error.\n";
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@@ -155,7 +155,7 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table
//compile SQL program to virtual machine
error = sqlite3_prepare( m_db, statement.utf8(), statement.length(), &stmt, &tail );
- if ( error != STQLITE_OK )
+ if ( error != SQLITE_OK )
{
Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl;
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@@ -169,7 +169,7 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table
{
error = sqlite3_step( stmt );
- if ( error == STQLITE_BUSY )
+ if ( error == SQLITE_BUSY )
{
if ( busyCnt++ > 20 ) {
Debug::error() << "Busy-counter has reached maximum. Aborting this sql statement!\n";
@@ -178,15 +178,15 @@ int SqliteDbEngine::insert( const TQString& statement, const TQString& /* table
::usleep( 100000 ); // Sleep 100 msec
debug() << "sqlite3_step: BUSY counter: " << busyCnt << endl;
}
- if ( error == STQLITE_MISUSE )
+ if ( error == SQLITE_MISUSE )
debug() << "sqlite3_step: MISUSE" << endl;
- if ( error == STQLITE_DONE || error == STQLITE_ERROR )
+ if ( error == SQLITE_DONE || error == SQLITE_ERROR )
break;
}
//deallocate vm resources
sqlite3_finalize( stmt );
- if ( error != STQLITE_DONE )
+ if ( error != SQLITE_DONE )
{
Debug::error() << k_funcinfo << "sqlite_step error.\n";
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@@ -207,7 +207,7 @@ void SqliteDbEngine::sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3
void SqliteDbEngine::sqlite_power(sqlite3_context *context, int argc, sqlite3_value **argv)
{
Q_ASSERT( argc==2 );
- if( sqlite3_value_type(argv[0])==STQLITE_NULL || sqlite3_value_type(argv[1])==STQLITE_NULL ) {
+ if( sqlite3_value_type(argv[0])==SQLITE_NULL || sqlite3_value_type(argv[1])==SQLITE_NULL ) {
sqlite3_result_null(context);
return;
}
diff --git a/amarok/src/database_refactor/sqlite/sqlite_dbengine.h b/amarok/src/database_refactor/sqlite/sqlite_dbengine.h
index 276aa7d6..52fe5cdc 100644
--- a/amarok/src/database_refactor/sqlite/sqlite_dbengine.h
+++ b/amarok/src/database_refactor/sqlite/sqlite_dbengine.h
@@ -3,8 +3,8 @@
// (c) 2004 Sami Nieminen <sami.nieminen@iki.fi>
// See COPYING file for licensing information.
-#ifndef AMAROK_STQLITE_DBENGINE_H
-#define AMAROK_STQLITE_DBENGINE_H
+#ifndef AMAROK_SQLITE_DBENGINE_H
+#define AMAROK_SQLITE_DBENGINE_H
#include "dbenginebase.h"
#include <kurl.h>
@@ -55,4 +55,4 @@ class SqliteDbEngine : public DbConnection
};
-#endif /*STQLITE_DBENGINE_H*/
+#endif /*SQLITE_DBENGINE_H*/