Convert accidental instances of STQL to the proper SQL

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1247182 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent c6b2971732
commit 2176199f9c

@ -9,15 +9,15 @@
#include "svnqt/path.hpp"
#include "svnqt/cache/DatabaseException.hpp"
#ifndef NO_STQLITE3
#ifndef NO_SQLITE3
#include "sqlite3/qsql_sqlite3.h"
#define SQLTYPE "QSQLITE3"
#else
#define SQLTYPE "QSQLITE"
#endif
#define STQLMAIN "logmain-logcache"
#define STQLMAINTABLE "logdb"
#define SQLMAIN "logmain-logcache"
#define SQLMAINTABLE "logdb"
namespace svn {
namespace cache {
@ -93,7 +93,7 @@ public:
TQDataBase _mdb = getMainDB();
TQSqlQuery query1(TQString(),_mdb);
TQString q("insert into "+TQString(STQLMAINTABLE)+" (reposroot) VALUES('"+reposroot+"')");
TQString q("insert into "+TQString(SQLMAINTABLE)+" (reposroot) VALUES('"+reposroot+"')");
_mdb->transaction();
query1.exec(q);
@ -178,9 +178,9 @@ public:
{
if (!m_mainDB.hasLocalData()) {
unsigned i=0;
TQString _key = STQLMAIN;
TQString _key = SQLMAIN;
while (TQSqlDatabase::contains(_key)) {
_key.sprintf("%s-%i",STQLMAIN,i++);
_key.sprintf("%s-%i",SQLMAIN,i++);
}
qDebug("The key is now: %s",_key.TOUTF8().data());
@ -209,7 +209,7 @@ public:
TQString LogCache::s_CACHE_FOLDER="logcache";
const TQString LogCacheData::s_reposSelect=TQString("SELECT id from ")+TQString(STQLMAINTABLE)+TQString(" where reposroot=? ORDER by id DESC");
const TQString LogCacheData::s_reposSelect=TQString("SELECT id from ")+TQString(SQLMAINTABLE)+TQString(" where reposroot=? ORDER by id DESC");
/*!
\fn svn::cache::LogCache::LogCache()
@ -273,7 +273,7 @@ void LogCache::setupMainDb()
} else {
TQSqlQuery q(TQString(), mainDB);
mainDB->transaction();
if (!q.exec("CREATE TABLE IF NOT EXISTS \""+TQString(STQLMAINTABLE)+"\" (\"reposroot\" TEXT,\"id\" INTEGER PRIMARY KEY NOT NULL);")) {
if (!q.exec("CREATE TABLE IF NOT EXISTS \""+TQString(SQLMAINTABLE)+"\" (\"reposroot\" TEXT,\"id\" INTEGER PRIMARY KEY NOT NULL);")) {
qWarning("Failed create main database: " + mainDB->lastError().text());
}
mainDB->commit();
@ -311,7 +311,7 @@ TQDataBase svn::cache::LogCache::reposDb(const TQString&aRepository)
*/
TQStringList svn::cache::LogCache::cachedRepositories()const
{
static TQString s_q(TQString("select \"reposroot\" from ")+TQString(STQLMAINTABLE)+TQString("order by reposroot"));
static TQString s_q(TQString("select \"reposroot\" from ")+TQString(SQLMAINTABLE)+TQString("order by reposroot"));
TQDataBase mainDB = m_CacheData->getMainDB();
TQStringList _res;
if (!mainDB || !mainDB->open()) {

@ -1,6 +1,6 @@
/****************************************************************************
**
** Implementation of STQLite driver classes.
** Implementation of SQLite driver classes.
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
@ -285,7 +285,7 @@ bool TQSQLite3Driver::hasFeature(DriverFeature f) const
}
/*
STQLite dbs have no user name, passwords, hosts or ports.
SQLite dbs have no user name, passwords, hosts or ports.
just file names.
*/
bool TQSQLite3Driver::open(const TQString & db, const TQString &, const TQString &, const TQString &, int, const TQString &)

@ -1,6 +1,6 @@
/****************************************************************************
**
** Definition of STQLite driver classes.
** Definition of SQLite driver classes.
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
@ -12,8 +12,8 @@
**
****************************************************************************/
#ifndef TQSQL_STQLITE3_H
#define TQSQL_STQLITE3_H
#ifndef TQSQL_SQLITE3_H
#define TQSQL_SQLITE3_H
#include <tqsqldriver.h>
#include <tqsqlresult.h>

Loading…
Cancel
Save