summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/statistics/statisticsdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/statistics/statisticsdb.cpp')
-rw-r--r--kopete/plugins/statistics/statisticsdb.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kopete/plugins/statistics/statisticsdb.cpp b/kopete/plugins/statistics/statisticsdb.cpp
index 450c4371..c0a41232 100644
--- a/kopete/plugins/statistics/statisticsdb.cpp
+++ b/kopete/plugins/statistics/statisticsdb.cpp
@@ -14,7 +14,7 @@
*************************************************************************
*/
-#include <qfile.h>
+#include <tqfile.h>
#include "sqlite/sqlite3.h"
@@ -33,15 +33,15 @@
StatisticsDB::StatisticsDB()
{
- QCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1();
+ TQCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1();
kdDebug() << "statistics: DB path:" << path << endl;
// Open database file and check for correctness
bool failOpen = true;
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_ReadOnly ) )
{
- QString format;
+ TQString format;
file.readLine( format, 50 );
if ( !format.startsWith( "SQLite format 3" ) )
{
@@ -59,18 +59,18 @@ StatisticsDB::StatisticsDB()
if ( failOpen )
{
// Remove old db file; create new
- QFile::remove( path );
+ TQFile::remove( path );
sqlite3_open( path, &m_db );
}
kdDebug() << "[Statistics] Contructor"<< endl;
// Creates the tables if they do not exist.
- QStringList result = query("SELECT name FROM sqlite_master WHERE type='table'");
+ TQStringList result = query("SELECT name FROM sqlite_master WHERE type='table'");
if (!result.contains("contacts"))
{
- query(QString("CREATE TABLE contacts "
+ query(TQString("CREATE TABLE contacts "
"(id INTEGER PRIMARY KEY,"
"statisticid TEXT,"
"contactid TEXT"
@@ -80,7 +80,7 @@ StatisticsDB::StatisticsDB()
if (!result.contains("contactstatus"))
{
kdDebug() << "[Statistics] Database empty"<< endl;
- query(QString("CREATE TABLE contactstatus "
+ query(TQString("CREATE TABLE contactstatus "
"(id INTEGER PRIMARY KEY,"
"metacontactid TEXT,"
"status TEXT,"
@@ -92,7 +92,7 @@ StatisticsDB::StatisticsDB()
if (!result.contains("commonstats"))
{
// To store things like the contact answer time etc.
- query(QString("CREATE TABLE commonstats"
+ query(TQString("CREATE TABLE commonstats"
" (id INTEGER PRIMARY KEY,"
"metacontactid TEXT,"
"statname TEXT," // for instance, answertime, lastmessage, messagelength ...
@@ -104,7 +104,7 @@ StatisticsDB::StatisticsDB()
/// @fixme This is not used anywhere
if (!result.contains("statsgroup"))
{
- query(QString("CREATE TABLE statsgroup"
+ query(TQString("CREATE TABLE statsgroup"
"(id INTEGER PRIMARY KEY,"
"datetimebegin INTEGER,"
"datetimeend INTEGER,"
@@ -123,9 +123,9 @@ StatisticsDB::~StatisticsDB()
* @param statement SQL program to execute. Only one SQL statement is allowed.
* @param debug Set to true for verbose debug output.
* @retval names Will contain all column names, set to NULL if not used.
- * @return The queried data, or QStringList() on error.
+ * @return The queried data, or TQStringList() on error.
*/
- QStringList StatisticsDB::query( const QString& statement, QStringList* const names, bool debug )
+ TQStringList StatisticsDB::query( const TQString& statement, TQStringList* const names, bool debug )
{
if ( debug )
@@ -136,11 +136,11 @@ StatisticsDB::~StatisticsDB()
if ( !m_db )
{
kdError() << k_funcinfo << "[CollectionDB] SQLite pointer == NULL.\n";
- return QStringList();
+ return TQStringList();
}
int error;
- QStringList values;
+ TQStringList values;
const char* tail;
sqlite3_stmt* stmt;
@@ -153,7 +153,7 @@ StatisticsDB::~StatisticsDB()
kdError() << sqlite3_errmsg( m_db ) << endl;
kdError() << "on query: " << statement << endl;
- return QStringList();
+ return TQStringList();
}
int busyCnt = 0;
@@ -180,8 +180,8 @@ StatisticsDB::~StatisticsDB()
//iterate over columns
for ( int i = 0; i < number; i++ )
{
- values << QString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) );
- if ( names ) *names << QString( sqlite3_column_name( stmt, i ) );
+ values << TQString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) );
+ if ( names ) *names << TQString( sqlite3_column_name( stmt, i ) );
}
}
//deallocate vm ressources
@@ -193,7 +193,7 @@ StatisticsDB::~StatisticsDB()
kdError() << sqlite3_errmsg( m_db ) << endl;
kdError() << "on query: " << statement << endl;
- return QStringList();
+ return TQStringList();
}
if ( debug )