summaryrefslogtreecommitdiffstats
path: root/src/svnqt/cache
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-01 13:22:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-01 13:22:57 -0600
commit9b9d4ea191b72a4742c67bbcdb12528dbe848dfd (patch)
treef85ada91374abeb209235c716912d15c9751ad06 /src/svnqt/cache
parentc1ece33d3c587246439e1392a25d19e0c7117fee (diff)
downloadtdesvn-9b9d4ea191b72a4742c67bbcdb12528dbe848dfd.tar.gz
tdesvn-9b9d4ea191b72a4742c67bbcdb12528dbe848dfd.zip
Rename additional global TQt functions
Diffstat (limited to 'src/svnqt/cache')
-rw-r--r--src/svnqt/cache/LogCache.cpp28
-rw-r--r--src/svnqt/cache/ReposLog.cpp50
2 files changed, 39 insertions, 39 deletions
diff --git a/src/svnqt/cache/LogCache.cpp b/src/svnqt/cache/LogCache.cpp
index 4dcb27b..d95284e 100644
--- a/src/svnqt/cache/LogCache.cpp
+++ b/src/svnqt/cache/LogCache.cpp
@@ -107,7 +107,7 @@ public:
db = query.value(0).toString();
}
else {
- qDebug("Error select_01: %s (%s)",query.lastError().text().TOUTF8().data(),
+ tqDebug("Error select_01: %s (%s)",query.lastError().text().TOUTF8().data(),
query.lastQuery().TOUTF8().data());
}
if (!db.isEmpty()) {
@@ -133,11 +133,11 @@ public:
c.bindValue(0,reposroot.native());
c.exec();
- //qDebug("Check for path: "+reposroot.native());
+ //tqDebug("Check for path: "+reposroot.native());
// only the first one
if ( c.next() ) {
-/* qDebug( c.value(0).toString() + ": " +
+/* tqDebug( c.value(0).toString() + ": " +
c.value(0).toString() );*/
dbFile = c.value(0).toString();
}
@@ -156,19 +156,19 @@ public:
while (TQSqlDatabase::contains(_key)) {
_key = TQString("%1-%2").arg(dbFile).arg(i++);
}
-// qDebug("The repository key is now: %s",_key.TOUTF8().data());
+// tqDebug("The repository key is now: %s",_key.TOUTF8().data());
TQDataBase _db = TQSqlDatabase::addDatabase(SQLTYPE,_key);
if (!_db) {
return 0;
}
TQString fulldb = m_BasePath+"/"+dbFile+".db";
_db->setDatabaseName(fulldb);
-// qDebug("try database open %s",fulldb.TOUTF8().data());
+// tqDebug("try database open %s",fulldb.TOUTF8().data());
if (!checkReposDb(_db)) {
- qDebug("no DB opened");
+ tqDebug("no DB opened");
_db = 0;
} else {
- qDebug("Insert into map");
+ tqDebug("Insert into map");
m_mainDB.localData()->reposCacheNames[dbFile]=_key;
}
return _db;
@@ -182,12 +182,12 @@ public:
while (TQSqlDatabase::contains(_key)) {
_key.sprintf("%s-%i",SQLMAIN,i++);
}
- qDebug("The key is now: %s",_key.TOUTF8().data());
+ tqDebug("The key is now: %s",_key.TOUTF8().data());
TQDataBase db = TQSqlDatabase::addDatabase(SQLTYPE,_key);
db->setDatabaseName(m_BasePath+"/maindb.db");
if (!db->open()) {
- qWarning(TQString("Failed to open main database: " + db->lastError().text()).ascii());
+ tqWarning(TQString("Failed to open main database: " + db->lastError().text()).ascii());
} else {
m_mainDB.setLocalData(new ThreadDBStore);
m_mainDB.localData()->key = _key;
@@ -269,12 +269,12 @@ void LogCache::setupMainDb()
#endif
TQDataBase mainDB = m_CacheData->getMainDB();
if (!mainDB || !mainDB->open()) {
- qWarning(TQString("Failed to open main database: " + (mainDB?mainDB->lastError().text():"No database object.")).ascii());
+ tqWarning(TQString("Failed to open main database: " + (mainDB?mainDB->lastError().text():"No database object.")).ascii());
} else {
TQSqlQuery q(TQString(), mainDB);
mainDB->transaction();
if (!q.exec("CREATE TABLE IF NOT EXISTS \""+TQString(SQLMAINTABLE)+"\" (\"reposroot\" TEXT,\"id\" INTEGER PRIMARY KEY NOT NULL);")) {
- qWarning(TQString("Failed create main database: " + mainDB->lastError().text()).ascii());
+ tqWarning(TQString("Failed create main database: " + mainDB->lastError().text()).ascii());
}
mainDB->commit();
}
@@ -301,7 +301,7 @@ svn::cache::LogCache* svn::cache::LogCache::self()
*/
TQDataBase svn::cache::LogCache::reposDb(const TQString&aRepository)
{
-// qDebug("reposDB");
+// tqDebug("reposDB");
return m_CacheData->getReposDB(aRepository);
}
@@ -315,13 +315,13 @@ TQStringList svn::cache::LogCache::cachedRepositories()const
TQDataBase mainDB = m_CacheData->getMainDB();
TQStringList _res;
if (!mainDB || !mainDB->open()) {
- qWarning("Failed to open main database.");
+ tqWarning("Failed to open main database.");
return _res;
}
TQSqlQuery cur(TQString(),mainDB);
cur.prepare(s_q);
if (!cur.exec()) {
- qDebug(cur.lastError().text().TOUTF8().data());
+ tqDebug(cur.lastError().text().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text());
return _res;
}
diff --git a/src/svnqt/cache/ReposLog.cpp b/src/svnqt/cache/ReposLog.cpp
index 34aa99f..0d79a15 100644
--- a/src/svnqt/cache/ReposLog.cpp
+++ b/src/svnqt/cache/ReposLog.cpp
@@ -40,12 +40,12 @@ svn::Revision svn::cache::ReposLog::latestHeadRev()
}
}
/// no catch - exception has go trough...
- qDebug("Getting headrev");
+ tqDebug("Getting headrev");
svn::InfoEntries e = m_Client->info(m_ReposRoot,svn::DepthEmpty,svn::Revision::HEAD,svn::Revision::HEAD);
if (e.count()<1||e[0].reposRoot().isEmpty()) {
return svn::Revision::UNDEFINED;
}
- qDebug("Getting headrev done");
+ tqDebug("Getting headrev done");
return e[0].revision();
}
@@ -68,15 +68,15 @@ svn::Revision svn::cache::ReposLog::latestCachedRev()
TQString q("select revision from 'logentries' order by revision DESC limit 1");
TQSqlQuery _q(TQString(), m_Database);
if (!_q.exec(q)) {
- qDebug(_q.lastError().text().TOUTF8().data());
+ tqDebug(_q.lastError().text().TOUTF8().data());
return svn::Revision::UNDEFINED;
}
int _r;
if (_q.isActive() && _q.next()) {
- //qDebug("Sel result: %s",_q.value(0).toString().TOUTF8().data());
+ //tqDebug("Sel result: %s",_q.value(0).toString().TOUTF8().data());
_r = _q.value(0).toInt();
} else {
- qDebug(_q.lastError().text().TOUTF8().data());
+ tqDebug(_q.lastError().text().TOUTF8().data());
return svn::Revision::UNDEFINED;
}
return _r;
@@ -94,8 +94,8 @@ bool svn::cache::ReposLog::checkFill(svn::Revision&start,svn::Revision&end,bool
long long icount=0;
svn::Revision _latest=latestCachedRev();
-// qDebug("Latest cached rev: %i",_latest.revnum());
-// qDebug("End revision is: %s",end.toString().TOUTF8().data());
+// tqDebug("Latest cached rev: %i",_latest.revnum());
+// tqDebug("End revision is: %s",end.toString().TOUTF8().data());
if (checkHead && _latest.revnum()>=latestHeadRev().revnum()) {
return true;
@@ -113,21 +113,21 @@ bool svn::cache::ReposLog::checkFill(svn::Revision&start,svn::Revision&end,bool
svn::Revision _rstart=_latest.revnum()+1;
svn::Revision _rend = end;
if (_rend==svn::Revision::UNDEFINED) {
-// qDebug("Setting end to Head");
+// tqDebug("Setting end to Head");
_rend=svn::Revision::HEAD;
}
// no catch - exception should go outside.
if (_rstart==0){
_rstart = 1;
}
-// qDebug("Getting log %s -> %s",_rstart.toString().TOUTF8().data(),_rend.toString().TOUTF8().data());
+// tqDebug("Getting log %s -> %s",_rstart.toString().TOUTF8().data(),_rend.toString().TOUTF8().data());
if (_rend==svn::Revision::HEAD) {
_rend=latestHeadRev();
}
if (_rend==svn::Revision::HEAD||_rend.revnum()>_latest.revnum()) {
LogEntriesMap _internal;
-// qDebug("Retrieving from network.");
+// tqDebug("Retrieving from network.");
if (!m_Client->log(m_ReposRoot,_rstart,_rend,_internal,svn::Revision::UNDEFINED,true,false)) {
return false;
}
@@ -197,7 +197,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
bcount.bindValue(0,TQ_LLONG(end.revnum()));
bcount.bindValue(1,TQ_LLONG(start.revnum()));
if (!bcount.exec()) {
- qDebug(bcount.lastError().text().TOUTF8().data());
+ tqDebug(bcount.lastError().text().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not retrieve count: ")+bcount.lastError().text());
return false;
}
@@ -211,7 +211,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
bcur.bindValue(1,TQ_LLONG(start.revnum()));
if (!bcur.exec()) {
- qDebug(bcur.lastError().text().TOUTF8().data());
+ tqDebug(bcur.lastError().text().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+bcur.lastError().text());
return false;
}
@@ -220,7 +220,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
revision = bcur.value(0).toLongLong();
cur.bindValue(0,revision);
if (!cur.exec()) {
- qDebug(cur.lastError().text().TOUTF8().data());
+ tqDebug(cur.lastError().text().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text()
,cur.lastError().number());
return false;
@@ -264,7 +264,7 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
TQSqlQuery query("select revision,date from logentries order by revision desc limit 1",m_Database);
if (query.lastError().type()!=TQSqlError::None) {
- qDebug(query.lastError().text().TOUTF8().data());
+ tqDebug(query.lastError().text().TOUTF8().data());
}
bool must_remote=!noNetwork;
if (query.next()) {
@@ -283,7 +283,7 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
query.bindValue(0,TQ_LLONG(aRev.date()));
query.exec();
if (query.lastError().type()!=TQSqlError::None) {
- qDebug(query.lastError().text().TOUTF8().data());
+ tqDebug(query.lastError().text().TOUTF8().data());
}
if (query.next()) {
return query.value(0).toInt();
@@ -319,8 +319,8 @@ bool svn::cache::ReposLog::_insertLogEntry(const svn::LogEntry&aEntry)
_q.bindValue(3,aEntry.message);
if (!_q.exec()) {
m_Database->rollback();
- qDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
- qDebug(_q.lastQuery().TOUTF8().data());
+ tqDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
+ tqDebug(_q.lastQuery().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
}
_q.prepare(qPathes);
@@ -333,8 +333,8 @@ bool svn::cache::ReposLog::_insertLogEntry(const svn::LogEntry&aEntry)
_q.bindValue(4,TQ_LLONG((*cpit).copyFromRevision));
if (!_q.exec()) {
m_Database->rollback();
- qDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
- qDebug(_q.lastQuery().TOUTF8().data());
+ tqDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
+ tqDebug(_q.lastQuery().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
}
}
@@ -374,8 +374,8 @@ bool svn::cache::ReposLog::log(const svn::Path&what,const svn::Revision&_start,
TQSqlQuery _q2(TQString(),m_Database);
_q.prepare(query_string);
if (!_q.exec()) {
- qDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
- qDebug(_q.lastQuery().TOUTF8().data());
+ tqDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
+ tqDebug(_q.lastQuery().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
}
while(_q.next()) {
@@ -387,7 +387,7 @@ bool svn::cache::ReposLog::log(const svn::Path&what,const svn::Revision&_start,
query_string=s_e.arg(revision);
_q2.prepare(query_string);
if (!_q2.exec()) {
- qDebug("Could not select values: %s",_q2.lastError().text().TOUTF8().data());
+ tqDebug("Could not select values: %s",_q2.lastError().text().TOUTF8().data());
} else {
while (_q2.next()) {
target[revision].changedPaths.push_back (
@@ -418,11 +418,11 @@ bool svn::cache::ReposLog::itemExists(const svn::Revision&peg,const svn::Path&pa
TQSqlQuery _q(TQString(),m_Database);
TQString query_string=TQString(_s1).arg(path.native()).arg(peg.revnum());
if (!_q.exec(query_string)) {
- qDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
- qDebug(_q.lastQuery().TOUTF8().data());
+ tqDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
+ tqDebug(_q.lastQuery().TOUTF8().data());
throw svn::cache::DatabaseException(TQString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
}
- qDebug(_q.lastQuery().TOUTF8().data());
+ tqDebug(_q.lastQuery().TOUTF8().data());
svn::Path _p = path;