summaryrefslogtreecommitdiffstats
path: root/src/svnqt
diff options
context:
space:
mode:
Diffstat (limited to 'src/svnqt')
-rw-r--r--src/svnqt/CMakeLists.txt34
-rw-r--r--src/svnqt/annotate_line.hpp62
-rw-r--r--src/svnqt/cache/DatabaseException.cpp6
-rw-r--r--src/svnqt/cache/DatabaseException.hpp6
-rw-r--r--src/svnqt/cache/LogCache.cpp266
-rw-r--r--src/svnqt/cache/LogCache.hpp16
-rw-r--r--src/svnqt/cache/ReposLog.cpp200
-rw-r--r--src/svnqt/cache/ReposLog.hpp16
-rw-r--r--src/svnqt/cache/sqlite3/qsql_sqlite3.cpp243
-rw-r--r--src/svnqt/cache/sqlite3/qsql_sqlite3.h92
-rw-r--r--src/svnqt/cache/sqlite3/qsqlcachedresult.cpp76
-rw-r--r--src/svnqt/cache/sqlite3/qsqlcachedresult.h38
-rw-r--r--src/svnqt/cache/test/sqlite.cpp36
-rw-r--r--src/svnqt/client.cpp8
-rw-r--r--src/svnqt/client.hpp102
-rw-r--r--src/svnqt/client_cat.cpp4
-rw-r--r--src/svnqt/client_diff.cpp16
-rw-r--r--src/svnqt/client_impl.cpp14
-rw-r--r--src/svnqt/client_impl.hpp82
-rw-r--r--src/svnqt/client_lock.cpp2
-rw-r--r--src/svnqt/client_ls.cpp6
-rw-r--r--src/svnqt/client_modify.cpp34
-rw-r--r--src/svnqt/client_property.cpp54
-rw-r--r--src/svnqt/client_status.cpp58
-rw-r--r--src/svnqt/commititem.cpp26
-rw-r--r--src/svnqt/commititem.hpp16
-rw-r--r--src/svnqt/conflictdescription.cpp30
-rw-r--r--src/svnqt/conflictdescription.hpp32
-rw-r--r--src/svnqt/conflictresult.cpp8
-rw-r--r--src/svnqt/conflictresult.hpp10
-rw-r--r--src/svnqt/context.cpp12
-rw-r--r--src/svnqt/context.hpp16
-rw-r--r--src/svnqt/context_listener.hpp46
-rw-r--r--src/svnqt/contextdata.cpp54
-rw-r--r--src/svnqt/contextdata.hpp28
-rw-r--r--src/svnqt/datetime.cpp14
-rw-r--r--src/svnqt/datetime.hpp22
-rw-r--r--src/svnqt/diff_data.cpp17
-rw-r--r--src/svnqt/diff_data.hpp12
-rw-r--r--src/svnqt/diffoptions.cpp2
-rw-r--r--src/svnqt/diffoptions.hpp6
-rw-r--r--src/svnqt/dirent.cpp26
-rw-r--r--src/svnqt/dirent.hpp16
-rw-r--r--src/svnqt/entry.cpp64
-rw-r--r--src/svnqt/entry.hpp32
-rw-r--r--src/svnqt/exception.cpp52
-rw-r--r--src/svnqt/exception.hpp20
-rw-r--r--src/svnqt/info_entry.cpp84
-rw-r--r--src/svnqt/info_entry.hpp70
-rw-r--r--src/svnqt/lock_entry.cpp30
-rw-r--r--src/svnqt/lock_entry.hpp16
-rw-r--r--src/svnqt/log_entry.cpp34
-rw-r--r--src/svnqt/log_entry.hpp68
-rw-r--r--src/svnqt/path.cpp76
-rw-r--r--src/svnqt/path.hpp32
-rw-r--r--src/svnqt/pool.cpp10
-rw-r--r--src/svnqt/pool.hpp8
-rw-r--r--src/svnqt/repository.cpp18
-rw-r--r--src/svnqt/repository.hpp16
-rw-r--r--src/svnqt/repositorydata.cpp32
-rw-r--r--src/svnqt/repositorydata.hpp16
-rw-r--r--src/svnqt/repositorylistener.hpp8
-rw-r--r--src/svnqt/revision.cpp22
-rw-r--r--src/svnqt/revision.hpp32
-rw-r--r--src/svnqt/shared_pointer.hpp4
-rw-r--r--src/svnqt/smart_pointer.hpp18
-rw-r--r--src/svnqt/status.cpp84
-rw-r--r--src/svnqt/status.hpp32
-rw-r--r--src/svnqt/stringarray.cpp12
-rw-r--r--src/svnqt/stringarray.hpp19
-rw-r--r--src/svnqt/svnfilestream.cpp30
-rw-r--r--src/svnqt/svnfilestream.hpp8
-rw-r--r--src/svnqt/svnqt_defines.hpp.in18
-rw-r--r--src/svnqt/svnqttypes.hpp48
-rw-r--r--src/svnqt/svnstream.cpp47
-rw-r--r--src/svnqt/svnstream.hpp23
-rw-r--r--src/svnqt/targets.cpp10
-rw-r--r--src/svnqt/targets.hpp16
-rw-r--r--src/svnqt/testmain.cpp12
-rw-r--r--src/svnqt/tests/ckpath.cpp4
-rw-r--r--src/svnqt/tests/crepo.cpp14
-rw-r--r--src/svnqt/tests/lsdir.cpp16
-rw-r--r--src/svnqt/tests/testlistener.h18
-rw-r--r--src/svnqt/url.cpp98
-rw-r--r--src/svnqt/url.hpp30
-rw-r--r--src/svnqt/version_check.cpp14
-rw-r--r--src/svnqt/version_check.hpp8
-rw-r--r--src/svnqt/wc.cpp20
-rw-r--r--src/svnqt/wc.hpp16
89 files changed, 1417 insertions, 1806 deletions
diff --git a/src/svnqt/CMakeLists.txt b/src/svnqt/CMakeLists.txt
index bf50a6f..a6212fd 100644
--- a/src/svnqt/CMakeLists.txt
+++ b/src/svnqt/CMakeLists.txt
@@ -108,29 +108,29 @@ SET(INST_HEADERS
FILE(GLOB svnhdr RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.hpp")
SET(svnhdr ${svnhdr} ${CACHE_INST_HEADERS})
-IF(QT4_FOUND)
- MESSAGE(STATUS "Qt: ${QT_LIBRARY_DIR}")
- MESSAGE(STATUS "Qt: ${QT_QTCORE_LIBRARY}")
- SET(TOUTF8 "toUtf8")
- SET(FROMUTF8 "fromUtf8")
- SET(QLIST "QList")
- SET(TOASCII "toAscii")
- SET(HOMEDIR "homePath")
- SET(svnqt-name svnqt-qt4)
- SET(QDATABASE "QSqlDatabase")
- SET(QLONG "qlonglong")
-ELSE(QT4_FOUND)
- IF(QT_FOUND)
+#IF(QT4_FOUND)
+# MESSAGE(STATUS "Qt: ${QT_LIBRARY_DIR}")
+# MESSAGE(STATUS "Qt: ${QT_QTCORE_LIBRARY}")
+# SET(TOUTF8 "toUtf8")
+# SET(FROMUTF8 "fromUtf8")
+# SET(QLIST "QList")
+# SET(TOASCII "toAscii")
+# SET(HOMEDIR "homePath")
+# SET(svnqt-name svnqt-qt4)
+# SET(QDATABASE "QSqlDatabase")
+# SET(QLONG "qlonglong")
+#ELSE(QT4_FOUND)
+# IF(QT_FOUND)
SET(TOUTF8 "utf8")
SET(FROMUTF8 "fromUtf8")
- SET(QLIST "QValueList")
+ SET(QLIST "TQValueList")
SET(TOASCII "latin1")
SET(HOMEDIR "homeDirPath")
- SET(QDATABASE "QSqlDatabase*")
+ SET(QDATABASE "TQSqlDatabase*")
SET(QLONG "Q_LLONG")
- ENDIF(QT_FOUND)
+# ENDIF(QT_FOUND)
SET(svnqt-name svnqt)
-ENDIF(QT4_FOUND)
+#ENDIF(QT4_FOUND)
IF (HAVE_GCC_VISIBILITY)
SET(_SVNQT_EXPORT "__attribute__ ((visibility(\"default\")))")
diff --git a/src/svnqt/annotate_line.hpp b/src/svnqt/annotate_line.hpp
index c8a0a6f..2a263ce 100644
--- a/src/svnqt/annotate_line.hpp
+++ b/src/svnqt/annotate_line.hpp
@@ -32,8 +32,8 @@
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace svn
{
@@ -43,36 +43,36 @@ namespace svn
class AnnotateLine
{
public:
- AnnotateLine (QLONG line_no,
- QLONG revision,
+ AnnotateLine (TQLONG line_no,
+ TQLONG revision,
const char *author,
const char *date,
const char *line)
: m_line_no (line_no), m_revision (revision),
- m_date( (date&&strlen(date))?QDateTime::fromString(QString::FROMUTF8(date),Qt::ISODate):QDateTime()),
+ m_date( (date&&strlen(date))?TQDateTime::fromString(TQString::FROMUTF8(date),Qt::ISODate):TQDateTime()),
m_line(line?line:""),m_author(author?author:""),
m_merge_revision(-1),
- m_merge_date(QDateTime()),
+ m_merge_date(TQDateTime()),
m_merge_author(""),m_merge_path("")
{
}
- AnnotateLine (QLONG line_no,
- QLONG revision,
+ AnnotateLine (TQLONG line_no,
+ TQLONG revision,
const char *author,
const char *date,
const char *line,
- QLONG merge_revision,
+ TQLONG merge_revision,
const char *merge_author,
const char *merge_date,
const char *merge_path
)
: m_line_no (line_no), m_revision (revision),
- m_date( (date&&strlen(date))?QDateTime::fromString(QString::FROMUTF8(date),Qt::ISODate):QDateTime()),
+ m_date( (date&&strlen(date))?TQDateTime::fromString(TQString::FROMUTF8(date),Qt::ISODate):TQDateTime()),
m_line(line?line:""),m_author(author?author:""),
m_merge_revision(merge_revision),
- m_merge_date( (merge_date&&strlen(merge_date))?QDateTime::fromString(QString::FROMUTF8(merge_date),Qt::ISODate):QDateTime()),
+ m_merge_date( (merge_date&&strlen(merge_date))?TQDateTime::fromString(TQString::FROMUTF8(merge_date),Qt::ISODate):TQDateTime()),
m_merge_author(merge_author?merge_author:""),m_merge_path(merge_path?merge_path:"")
{
}
@@ -95,59 +95,49 @@ namespace svn
{
}
- QLONG
+ TQLONG
lineNumber () const
{
return m_line_no;
}
- QLONG
+ TQLONG
revision () const
{
return m_revision;
}
- const QByteArray &
+ const TQByteArray &
author () const
{
return m_author;
}
- const QDateTime &
+ const TQDateTime &
date () const
{
return m_date;
}
- const QByteArray &
+ const TQByteArray &
line () const
{
return m_line;
}
protected:
- QLONG m_line_no;
- QLONG m_revision;
- QDateTime m_date;
-#if QT_VERSION < 0x040000
- QCString m_line;
- QCString m_author;
-#else
- QByteArray m_line;
- QByteArray m_author;
-#endif
-
- QLONG m_merge_revision;
- QDateTime m_merge_date;
-#if QT_VERSION < 0x040000
- QCString m_merge_author;
- QCString m_merge_path;
-#else
- QByteArray m_merge_author;
- QByteArray m_merge_path;
-#endif
+ TQLONG m_line_no;
+ TQLONG m_revision;
+ TQDateTime m_date;
+ TQCString m_line;
+ TQCString m_author;
+
+ TQLONG m_merge_revision;
+ TQDateTime m_merge_date;
+ TQCString m_merge_author;
+ TQCString m_merge_path;
};
}
diff --git a/src/svnqt/cache/DatabaseException.cpp b/src/svnqt/cache/DatabaseException.cpp
index 85812ab..880c041 100644
--- a/src/svnqt/cache/DatabaseException.cpp
+++ b/src/svnqt/cache/DatabaseException.cpp
@@ -1,12 +1,12 @@
#include "DatabaseException.hpp"
/*!
- \fn svn::cache::DatabaseException::DatabaseException(const QString&msg,int aNumber)throw()
+ \fn svn::cache::DatabaseException::DatabaseException(const TQString&msg,int aNumber)throw()
*/
-svn::cache::DatabaseException::DatabaseException(const QString&msg,int aNumber)throw()
+svn::cache::DatabaseException::DatabaseException(const TQString&msg,int aNumber)throw()
: Exception(msg),m_number(aNumber)
{
if (aNumber>-1) {
- setMessage(QString("(Code %1) %2").arg(aNumber).arg(msg));
+ setMessage(TQString("(Code %1) %2").tqarg(aNumber).tqarg(msg));
}
}
diff --git a/src/svnqt/cache/DatabaseException.hpp b/src/svnqt/cache/DatabaseException.hpp
index 85e5ce4..9e67cb9 100644
--- a/src/svnqt/cache/DatabaseException.hpp
+++ b/src/svnqt/cache/DatabaseException.hpp
@@ -8,21 +8,21 @@ namespace svn
namespace cache
{
-class SVNQT_EXPORT DatabaseException:public svn::Exception
+class SVNTQT_EXPORT DatabaseException:public svn::Exception
{
private:
DatabaseException()throw();
int m_number;
public:
- DatabaseException(const QString&msg)throw()
+ DatabaseException(const TQString&msg)throw()
: Exception(msg),m_number(-1)
{}
DatabaseException(const DatabaseException&src)throw()
: Exception(src.msg()),m_number(src.number())
{}
- DatabaseException(const QString&msg,int aNumber)throw();
+ DatabaseException(const TQString&msg,int aNumber)throw();
virtual ~DatabaseException()throw(){}
int number() const
{
diff --git a/src/svnqt/cache/LogCache.cpp b/src/svnqt/cache/LogCache.cpp
index 6356c6f..15fe04e 100644
--- a/src/svnqt/cache/LogCache.cpp
+++ b/src/svnqt/cache/LogCache.cpp
@@ -1,31 +1,23 @@
#include "LogCache.hpp"
-#include <qdir.h>
-#include <qsql.h>
-#include <qsqldatabase.h>
-#if QT_VERSION < 0x040000
-#include <qthreadstorage.h>
-#else
-#include <QMutex>
-#include <QThreadStorage>
-#include <QSqlError>
-#include <QSqlQuery>
-#include <QVariant>
-#endif
-#include <qmap.h>
+#include <tqdir.h>
+#include <tqsql.h>
+#include <tqsqldatabase.h>
+#include <tqthreadstorage.h>
+#include <tqmap.h>
#include "svnqt/path.hpp"
#include "svnqt/cache/DatabaseException.hpp"
-#ifndef NO_SQLITE3
+#ifndef NO_STQLITE3
#include "sqlite3/qsql_sqlite3.h"
#define SQLTYPE "QSQLITE3"
#else
#define SQLTYPE "QSQLITE"
#endif
-#define SQLMAIN "logmain-logcache"
-#define SQLMAINTABLE "logdb"
+#define STQLMAIN "logmain-logcache"
+#define STQLMAINTABLE "logdb"
namespace svn {
namespace cache {
@@ -36,39 +28,27 @@ class ThreadDBStore
{
public:
ThreadDBStore(){
-#if QT_VERSION < 0x040000
m_DB=0;
-#else
- m_DB=QSqlDatabase();
-#endif
}
~ThreadDBStore(){
-#if QT_VERSION < 0x040000
m_DB=0;
-#else
- m_DB=QSqlDatabase();
-#endif
- QSqlDatabase::removeDatabase(key);
- QMap<QString,QString>::Iterator it;
+ TQSqlDatabase::removeDatabase(key);
+ TQMap<TQString,TQString>::Iterator it;
for (it=reposCacheNames.begin();it!=reposCacheNames.end();++it) {
-#if QT_VERSION < 0x040000
- QSqlDatabase::removeDatabase(it.data());
-#else
- QSqlDatabase::removeDatabase(it.value());
-#endif
+ TQSqlDatabase::removeDatabase(it.data());
}
}
- QDataBase m_DB;
- QString key;
- QMap<QString,QString> reposCacheNames;
+ TQDataBase m_DB;
+ TQString key;
+ TQMap<TQString,TQString> reposCacheNames;
};
class LogCacheData
{
protected:
- QMutex m_singleDbMutex;
+ TQMutex m_singleDbMutex;
public:
LogCacheData(){}
@@ -78,97 +58,52 @@ public:
}
}
- bool checkReposDb(QDataBase aDb)
+ bool checkReposDb(TQDataBase aDb)
{
-#if QT_VERSION < 0x040000
if (!aDb) {
return false;
}
if (!aDb->open()) {
return false;
}
-#else
- if (!aDb.open()) {
- return false;
- }
-#endif
- QSqlQuery _q(QString::null, aDb);
-#if QT_VERSION < 0x040000
- QStringList list = aDb->tables();
-#else
- QStringList list = aDb.tables();
-#endif
+ TQSqlQuery _q(TQString(), aDb);
+ TQStringList list = aDb->tables();
-#if QT_VERSION < 0x040000
- if (list.find("logentries")==list.end()) {
+ if (list.tqfind("logentries")==list.end()) {
aDb->transaction();
-#else
- if (list.indexOf("logentries")==-1) {
- aDb.transaction();
-#endif
- _q.exec("CREATE TABLE \"logentries\" (\"revision\" INTEGER UNIQUE,\"date\" INTEGER,\"author\" TEXT, \"message\" TEXT)");
-#if QT_VERSION < 0x040000
+ _q.exec("CREATE TABLE \"logentries\" (\"revision\" INTEGER UNITQUE,\"date\" INTEGER,\"author\" TEXT, \"message\" TEXT)");
aDb->commit();
-#else
- aDb.commit();
-#endif
}
-#if QT_VERSION < 0x040000
- if (list.find("changeditems")==list.end()) {
+ if (list.tqfind("changeditems")==list.end()) {
aDb->transaction();
-#else
- if (list.indexOf("changeditems")==-1) {
- aDb.transaction();
-#endif
_q.exec("CREATE TABLE \"changeditems\" (\"revision\" INTEGER,\"changeditem\" TEXT,\"action\" TEXT,\"copyfrom\" TEXT,\"copyfromrev\" INTEGER, PRIMARY KEY(revision,changeditem,action))");
-#if QT_VERSION < 0x040000
aDb->commit();
-#else
- aDb.commit();
-#endif
}
-#if QT_VERSION < 0x040000
list = aDb->tables();
- if (list.find("logentries")==list.end() || list.find("changeditems")==list.end()) {
-#else
- list = aDb.tables();
- if (list.indexOf("logentries")==-1 || list.indexOf("changeditems")==-1) {
-#endif
+ if (list.tqfind("logentries")==list.end() || list.tqfind("changeditems")==list.end()) {
return false;
}
return true;
}
- QString createReposDB(const svn::Path&reposroot) {
- QMutexLocker locker( &m_singleDbMutex );
+ TQString createReposDB(const svn::Path&reposroot) {
+ TQMutexLocker locker( &m_singleDbMutex );
- QDataBase _mdb = getMainDB();
+ TQDataBase _mdb = getMainDB();
- QSqlQuery query1(QString::null,_mdb);
- QString q("insert into "+QString(SQLMAINTABLE)+" (reposroot) VALUES('"+reposroot+"')");
-#if QT_VERSION < 0x040000
+ TQSqlQuery query1(TQString(),_mdb);
+ TQString q("insert into "+TQString(STQLMAINTABLE)+" (reposroot) VALUES('"+reposroot+"')");
_mdb->transaction();
-#else
- _mdb.transaction();
-#endif
query1.exec(q);
-#if QT_VERSION < 0x040000
_mdb->commit();
-#else
- _mdb.commit();
-#endif
- QSqlQuery query(QString::null,_mdb);
+ TQSqlQuery query(TQString(),_mdb);
query.prepare(s_reposSelect);
query.bindValue(0,reposroot.native());
query.exec();
- QString db;
-#if QT_VERSION < 0x040000
- if (query.lastError().type()==QSqlError::None && query.next()) {
-#else
- if (query.lastError().type()==QSqlError::NoError && query.next()) {
-#endif
+ TQString db;
+ if (query.lastError().type()==TQSqlError::None && query.next()) {
db = query.value(0).toString();
}
else {
@@ -176,89 +111,62 @@ public:
query.lastQuery().TOUTF8().data());
}
if (!db.isEmpty()) {
- QString fulldb = m_BasePath+"/"+db+".db";
- QDataBase _db = QSqlDatabase::addDatabase(SQLTYPE,"tmpdb");
-#if QT_VERSION < 0x040000
+ TQString fulldb = m_BasePath+"/"+db+".db";
+ TQDataBase _db = TQSqlDatabase::addDatabase(SQLTYPE,"tmpdb");
_db->setDatabaseName(fulldb);
-#else
- _db.setDatabaseName(fulldb);
-#endif
if (!checkReposDb(_db)) {
}
- QSqlDatabase::removeDatabase("tmpdb");
+ TQSqlDatabase::removeDatabase("tmpdb");
}
return db;
}
- QDataBase getReposDB(const svn::Path&reposroot) {
-#if QT_VERSION < 0x040000
+ TQDataBase getReposDB(const svn::Path&reposroot) {
if (!getMainDB()) {
return 0;
-#else
- if (!getMainDB().isValid()) {
- return QDataBase();
-#endif
}
bool checkDone = false;
// make sure path is correct eg. without traling slashes.
- QString dbFile;
- QSqlQuery c(QString::null,getMainDB());
+ TQString dbFile;
+ TQSqlQuery c(TQString(),getMainDB());
c.prepare(s_reposSelect);
c.bindValue(0,reposroot.native());
c.exec();
-#if QT_VERSION < 0x040000
//qDebug("Check for path: "+reposroot.native());
-#endif
// only the first one
if ( c.next() ) {
-#if QT_VERSION < 0x040000
/* qDebug( c.value(0).toString() + ": " +
c.value(0).toString() );*/
-#endif
dbFile = c.value(0).toString();
}
if (dbFile.isEmpty()) {
dbFile = createReposDB(reposroot);
if (dbFile.isEmpty()) {
-#if QT_VERSION < 0x040000
return 0;
-#else
- return QSqlDatabase();
-#endif
}
checkDone=true;
}
- if (m_mainDB.localData()->reposCacheNames.find(dbFile)!=m_mainDB.localData()->reposCacheNames.end()) {
- return QSqlDatabase::database(m_mainDB.localData()->reposCacheNames[dbFile]);
+ if (m_mainDB.localData()->reposCacheNames.tqfind(dbFile)!=m_mainDB.localData()->reposCacheNames.end()) {
+ return TQSqlDatabase::database(m_mainDB.localData()->reposCacheNames[dbFile]);
}
int i = 0;
- QString _key = dbFile;
- while (QSqlDatabase::contains(_key)) {
- _key = QString("%1-%2").arg(dbFile).arg(i++);
+ TQString _key = dbFile;
+ while (TQSqlDatabase::tqcontains(_key)) {
+ _key = TQString("%1-%2").tqarg(dbFile).tqarg(i++);
}
// qDebug("The repository key is now: %s",_key.TOUTF8().data());
- QDataBase _db = QSqlDatabase::addDatabase(SQLTYPE,_key);
-#if QT_VERSION < 0x040000
+ TQDataBase _db = TQSqlDatabase::addDatabase(SQLTYPE,_key);
if (!_db) {
return 0;
}
-#endif
- QString fulldb = m_BasePath+"/"+dbFile+".db";
-#if QT_VERSION < 0x040000
+ TQString fulldb = m_BasePath+"/"+dbFile+".db";
_db->setDatabaseName(fulldb);
-#else
- _db.setDatabaseName(fulldb);
-#endif
// qDebug("try database open %s",fulldb.TOUTF8().data());
if (!checkReposDb(_db)) {
qDebug("no DB opened");
-#if QT_VERSION < 0x040000
_db = 0;
-#else
- _db = QSqlDatabase();
-#endif
} else {
qDebug("Insert into map");
m_mainDB.localData()->reposCacheNames[dbFile]=_key;
@@ -266,27 +174,20 @@ public:
return _db;
}
- QDataBase getMainDB()const
+ TQDataBase getMainDB()const
{
if (!m_mainDB.hasLocalData()) {
unsigned i=0;
- QString _key = SQLMAIN;
- while (QSqlDatabase::contains(_key)) {
- _key.sprintf("%s-%i",SQLMAIN,i++);
+ TQString _key = STQLMAIN;
+ while (TQSqlDatabase::tqcontains(_key)) {
+ _key.sprintf("%s-%i",STQLMAIN,i++);
}
qDebug("The key is now: %s",_key.TOUTF8().data());
- QDataBase db = QSqlDatabase::addDatabase(SQLTYPE,_key);
-#if QT_VERSION < 0x040000
+ TQDataBase db = TQSqlDatabase::addDatabase(SQLTYPE,_key);
db->setDatabaseName(m_BasePath+"/maindb.db");
if (!db->open()) {
-#else
- db.setDatabaseName(m_BasePath+"/maindb.db");
- if (!db.open()) {
-#endif
-#if QT_VERSION < 0x040000
qWarning("Failed to open main database: " + db->lastError().text());
-#endif
} else {
m_mainDB.setLocalData(new ThreadDBStore);
m_mainDB.localData()->key = _key;
@@ -296,41 +197,37 @@ public:
if (m_mainDB.hasLocalData()) {
return m_mainDB.localData()->m_DB;
} else {
-#if QT_VERSION < 0x040000
return 0;
-#else
- return QSqlDatabase();
-#endif
}
}
- QString m_BasePath;
+ TQString m_BasePath;
- mutable QThreadStorage<ThreadDBStore*> m_mainDB;
+ mutable TQThreadStorage<ThreadDBStore*> m_mainDB;
- static const QString s_reposSelect;
+ static const TQString s_reposSelect;
};
-QString LogCache::s_CACHE_FOLDER="logcache";
-const QString LogCacheData::s_reposSelect=QString("SELECT id from ")+QString(SQLMAINTABLE)+QString(" where reposroot=? ORDER by id DESC");
+TQString LogCache::s_CACHE_FOLDER="logcache";
+const TQString LogCacheData::s_reposSelect=TQString("SELECT id from ")+TQString(STQLMAINTABLE)+TQString(" where reposroot=? ORDER by id DESC");
/*!
\fn svn::cache::LogCache::LogCache()
*/
LogCache::LogCache()
{
- m_BasePath = QDir::HOMEDIR()+"/.svnqt";
+ m_BasePath = TQDir::HOMEDIR()+"/.svnqt";
setupCachePath();
}
-LogCache::LogCache(const QString&aBasePath)
+LogCache::LogCache(const TQString&aBasePath)
{
if (mSelf) {
delete mSelf;
}
mSelf=this;
if (aBasePath.isEmpty()) {
- m_BasePath=QDir::HOMEDIR()+"/.svnqt";
+ m_BasePath=TQDir::HOMEDIR()+"/.svnqt";
} else {
m_BasePath=aBasePath;
}
@@ -349,7 +246,7 @@ void LogCache::setupCachePath()
{
m_CacheData = new LogCacheData;
m_CacheData->m_BasePath=m_BasePath;
- QDir d;
+ TQDir d;
if (!d.exists(m_BasePath)) {
d.mkdir(m_BasePath);
}
@@ -366,35 +263,20 @@ void LogCache::setupCachePath()
void LogCache::setupMainDb()
{
#ifndef NO_SQLITE3
- if (!QSqlDatabase::isDriverAvailable(SQLTYPE)) {
- QSqlDatabase::registerSqlDriver(SQLTYPE,new QSqlDriverCreator<QSQLite3Driver>);
+ if (!TQSqlDatabase::isDriverAvailable(SQLTYPE)) {
+ TQSqlDatabase::registerSqlDriver(SQLTYPE,new TQSqlDriverCreator<TQSQLite3Driver>);
}
#endif
- QDataBase mainDB = m_CacheData->getMainDB();
-#if QT_VERSION < 0x040000
+ TQDataBase mainDB = m_CacheData->getMainDB();
if (!mainDB || !mainDB->open()) {
qWarning("Failed to open main database: " + (mainDB?mainDB->lastError().text():"No database object."));
-#else
- if (!mainDB.isValid()) {
- qWarning("Failed to open main database.");
-#endif
} else {
- QSqlQuery q(QString::null, mainDB);
-#if QT_VERSION < 0x040000
+ TQSqlQuery q(TQString(), mainDB);
mainDB->transaction();
-#else
- mainDB.transaction();
-#endif
- if (!q.exec("CREATE TABLE IF NOT EXISTS \""+QString(SQLMAINTABLE)+"\" (\"reposroot\" TEXT,\"id\" INTEGER PRIMARY KEY NOT NULL);")) {
-#if QT_VERSION < 0x040000
+ if (!q.exec("CREATE TABLE IF NOT EXISTS \""+TQString(STQLMAINTABLE)+"\" (\"reposroot\" TEXT,\"id\" INTEGER PRIMARY KEY NOT NULL);")) {
qWarning("Failed create main database: " + mainDB->lastError().text());
-#endif
}
-#if QT_VERSION < 0x040000
mainDB->commit();
-#else
- mainDB.commit();
-#endif
}
}
@@ -417,7 +299,7 @@ svn::cache::LogCache* svn::cache::LogCache::self()
/*!
\fn svn::cache::LogCache::reposDb()
*/
-QDataBase svn::cache::LogCache::reposDb(const QString&aRepository)
+TQDataBase svn::cache::LogCache::reposDb(const TQString&aRepository)
{
// qDebug("reposDB");
return m_CacheData->getReposDB(aRepository);
@@ -427,24 +309,20 @@ QDataBase svn::cache::LogCache::reposDb(const QString&aRepository)
/*!
\fn svn::cache::LogCache::cachedRepositories()const
*/
-QStringList svn::cache::LogCache::cachedRepositories()const
+TQStringList svn::cache::LogCache::cachedRepositories()const
{
- static QString s_q(QString("select \"reposroot\" from ")+QString(SQLMAINTABLE)+QString("order by reposroot"));
- QDataBase mainDB = m_CacheData->getMainDB();
- QStringList _res;
-#if QT_VERSION < 0x040000
+ static TQString s_q(TQString("select \"reposroot\" from ")+TQString(STQLMAINTABLE)+TQString("order by reposroot"));
+ TQDataBase mainDB = m_CacheData->getMainDB();
+ TQStringList _res;
if (!mainDB || !mainDB->open()) {
-#else
- if (!mainDB.isValid()) {
-#endif
qWarning("Failed to open main database.");
return _res;
}
- QSqlQuery cur(QString::null,mainDB);
+ TQSqlQuery cur(TQString(),mainDB);
cur.prepare(s_q);
if (!cur.exec()) {
qDebug(cur.lastError().text().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not retrieve values: ")+cur.lastError().text());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text());
return _res;
}
while (cur.next()) {
@@ -456,12 +334,8 @@ QStringList svn::cache::LogCache::cachedRepositories()const
bool svn::cache::LogCache::valid()const
{
- QDataBase mainDB = m_CacheData->getMainDB();
-#if QT_VERSION < 0x040000
+ TQDataBase mainDB = m_CacheData->getMainDB();
if (!mainDB || !mainDB->open()) {
-#else
- if (!mainDB.isValid()) {
-#endif
return false;
}
return true;
diff --git a/src/svnqt/cache/LogCache.hpp b/src/svnqt/cache/LogCache.hpp
index 9e76697..e0a7f02 100644
--- a/src/svnqt/cache/LogCache.hpp
+++ b/src/svnqt/cache/LogCache.hpp
@@ -1,8 +1,8 @@
#ifndef _LOG_CACHE_HPP
#define _LOG_CACHE_HPP
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/shared_pointer.hpp"
@@ -12,7 +12,7 @@ namespace svn {
class LogCacheData;
- class SVNQT_EXPORT LogCache
+ class SVNTQT_EXPORT LogCache
{
private:
svn::SharedPointer<LogCacheData> m_CacheData;
@@ -20,18 +20,18 @@ namespace svn {
protected:
LogCache();
static LogCache* mSelf;
- QString m_BasePath;
- static QString s_CACHE_FOLDER;
+ TQString m_BasePath;
+ static TQString s_CACHE_FOLDER;
void setupCachePath();
void setupMainDb();
public:
///! should used for testing only!
- LogCache(const QString&aBasePath);
+ LogCache(const TQString&aBasePath);
virtual ~LogCache();
static LogCache* self();
- QDataBase reposDb(const QString&aRepository);
- QStringList cachedRepositories()const;
+ TQDataBase reposDb(const TQString&aRepository);
+ TQStringList cachedRepositories()const;
bool valid()const;
};
diff --git a/src/svnqt/cache/ReposLog.cpp b/src/svnqt/cache/ReposLog.cpp
index 89be2d0..54c4622 100644
--- a/src/svnqt/cache/ReposLog.cpp
+++ b/src/svnqt/cache/ReposLog.cpp
@@ -7,26 +7,14 @@
#include "svnqt/context_listener.hpp"
#include "svnqt/cache/DatabaseException.hpp"
-#include <qsqldatabase.h>
-
-#if QT_VERSION < 0x040000
-#else
-#include <QSqlError>
-#include <QSqlQuery>
-#include <QVariant>
-#define Q_LLONG qlonglong
-#endif
+#include <tqsqldatabase.h>
/*!
- \fn svn::cache::ReposLog::ReposLog(svn::Client*aClient,const QString&)
+ \fn svn::cache::ReposLog::ReposLog(svn::Client*aClient,const TQString&)
*/
-svn::cache::ReposLog::ReposLog(svn::Client*aClient,const QString&aRepository)
+svn::cache::ReposLog::ReposLog(svn::Client*aClient,const TQString&aRepository)
:m_Client(),
-#if QT_VERSION < 0x040000
m_Database(0),
-#else
- m_Database(),
-#endif
m_ReposRoot(aRepository),m_latestHead(svn::Revision::UNDEFINED)
{
m_Client=aClient;
@@ -45,17 +33,9 @@ svn::Revision svn::cache::ReposLog::latestHeadRev()
if (!m_Client||m_ReposRoot.isEmpty()) {
return svn::Revision::UNDEFINED;
}
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
m_Database = LogCache::self()->reposDb(m_ReposRoot);
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
return svn::Revision::UNDEFINED;
}
}
@@ -78,22 +58,15 @@ svn::Revision svn::cache::ReposLog::latestCachedRev()
if (m_ReposRoot.isEmpty()) {
return svn::Revision::UNDEFINED;
}
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
+
m_Database = LogCache::self()->reposDb(m_ReposRoot);
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
return svn::Revision::UNDEFINED;
}
}
- QString q("select revision from 'logentries' order by revision DESC limit 1");
- QSqlQuery _q(QString::null, m_Database);
+ 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());
return svn::Revision::UNDEFINED;
@@ -111,17 +84,9 @@ svn::Revision svn::cache::ReposLog::latestCachedRev()
bool svn::cache::ReposLog::checkFill(svn::Revision&start,svn::Revision&end,bool checkHead)
{
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
m_Database = LogCache::self()->reposDb(m_ReposRoot);
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
return false;
}
}
@@ -173,7 +138,7 @@ bool svn::cache::ReposLog::checkFill(svn::Revision&start,svn::Revision&end,bool
if (cp && cp->getListener()) {
//cp->getListener()->contextProgress(++icount,_internal.size());
if (cp->getListener()->contextCancel()) {
- throw DatabaseException(QString("Could not retrieve values: User cancel."));
+ throw DatabaseException(TQString("Could not retrieve values: User cancel."));
}
}
}
@@ -216,24 +181,24 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
if (start==svn::Revision::HEAD) {
start=latestCachedRev();
}
- static QString sCount("select count(*) from logentries where revision<=? and revision>=?");
- static QString sEntry("select revision,author,date,message from logentries where revision<=? and revision>=?");
- static QString sItems("select changeditem,action,copyfrom,copyfromrev from changeditems where revision=?");
+ static TQString sCount("select count(*) from logentries where revision<=? and revision>=?");
+ static TQString sEntry("select revision,author,date,message from logentries where revision<=? and revision>=?");
+ static TQString sItems("select changeditem,action,copyfrom,copyfromrev from changeditems where revision=?");
- QSqlQuery bcount(QString::null,m_Database);
+ TQSqlQuery bcount(TQString(),m_Database);
bcount.prepare(sCount);
- QSqlQuery bcur(QString::null,m_Database);
+ TQSqlQuery bcur(TQString(),m_Database);
bcur.prepare(sEntry);
- QSqlQuery cur(QString::null,m_Database);
+ TQSqlQuery cur(TQString(),m_Database);
cur.prepare(sItems);
- bcount.bindValue(0,Q_LLONG(end.revnum()));
- bcount.bindValue(1,Q_LLONG(start.revnum()));
+ bcount.bindValue(0,TQ_LLONG(end.revnum()));
+ bcount.bindValue(1,TQ_LLONG(start.revnum()));
if (!bcount.exec()) {
qDebug(bcount.lastError().text().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not retrieve count: ")+bcount.lastError().text());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve count: ")+bcount.lastError().text());
return false;
}
bcount.next();
@@ -242,21 +207,21 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
return false;
}
- bcur.bindValue(0,Q_LLONG(end.revnum()));
- bcur.bindValue(1,Q_LLONG(start.revnum()));
+ bcur.bindValue(0,TQ_LLONG(end.revnum()));
+ bcur.bindValue(1,TQ_LLONG(start.revnum()));
if (!bcur.exec()) {
qDebug(bcur.lastError().text().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not retrieve values: ")+bcur.lastError().text());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+bcur.lastError().text());
return false;
}
- Q_LLONG revision;
+ TQ_LLONG revision;
while(bcur.next()) {
revision = bcur.value(0).toLongLong();
cur.bindValue(0,revision);
if (!cur.exec()) {
qDebug(cur.lastError().text().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not retrieve values: ")+cur.lastError().text()
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text()
,cur.lastError().number());
return false;
}
@@ -266,12 +231,8 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
target[revision].message=bcur.value(3).toString();
while(cur.next()) {
LogChangePathEntry lcp;
- QString ac = cur.value(1).toString();
-#if QT_VERSION < 0x040000
+ TQString ac = cur.value(1).toString();
lcp.action=ac[0].latin1();
-#else
- lcp.action=ac[0].toLatin1();
-#endif
lcp.copyFromPath=cur.value(2).toString();
lcp.path= cur.value(0).toString();
lcp.copyFromRevision=cur.value(3).toLongLong();
@@ -279,7 +240,7 @@ bool svn::cache::ReposLog::simpleLog(LogEntriesMap&target,const svn::Revision&_s
}
if (cp && cp->getListener()) {
if (cp->getListener()->contextCancel()) {
- throw svn::cache::DatabaseException(QString("Could not retrieve values: User cancel."));
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: User cancel."));
return false;
}
}
@@ -296,21 +257,13 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
if (aRev!=svn::Revision::DATE) {
return aRev;
}
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
return svn::Revision::UNDEFINED;
}
- static QString _q("select revision from logentries where date<? order by revision desc");
- QSqlQuery query("select revision,date from logentries order by revision desc limit 1",m_Database);
+ static TQString _q("select revision from logentries where date<? order by revision desc");
+ TQSqlQuery query("select revision,date from logentries order by revision desc limit 1",m_Database);
-#if QT_VERSION < 0x040000
- if (query.lastError().type()!=QSqlError::None) {
-#else
- if (query.lastError().type()!=QSqlError::NoError) {
-#endif
+ if (query.lastError().type()!=TQSqlError::None) {
qDebug(query.lastError().text().TOUTF8().data());
}
bool must_remote=!noNetwork;
@@ -327,13 +280,9 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
return e[0].revision();
}
query.prepare(_q);
- query.bindValue(0,Q_LLONG(aRev.date()));
+ query.bindValue(0,TQ_LLONG(aRev.date()));
query.exec();
-#if QT_VERSION < 0x040000
- if (query.lastError().type()!=QSqlError::None) {
-#else
- if (query.lastError().type()!=QSqlError::NoError) {
-#endif
+ if (query.lastError().type()!=TQSqlError::None) {
qDebug(query.lastError().text().TOUTF8().data());
}
if (query.next()) {
@@ -356,57 +305,40 @@ svn::Revision svn::cache::ReposLog::date2numberRev(const svn::Revision&aRev,bool
*/
bool svn::cache::ReposLog::_insertLogEntry(const svn::LogEntry&aEntry)
{
- QSqlRecord *buffer;
+ TQSqlRecord *buffer;
-#if QT_VERSION < 0x040000
m_Database->transaction();
- Q_LLONG j = aEntry.revision;
-#else
- m_Database.transaction();
- qlonglong j = aEntry.revision;
-#endif
- static QString qEntry("insert into logentries (revision,date,author,message) values (?,?,?,?)");
- static QString qPathes("insert into changeditems (revision,changeditem,action,copyfrom,copyfromrev) values (?,?,?,?,?)");
- QSqlQuery _q(QString::null,m_Database);
+ TQ_LLONG j = aEntry.revision;
+ static TQString qEntry("insert into logentries (revision,date,author,message) values (?,?,?,?)");
+ static TQString qPathes("insert into changeditems (revision,changeditem,action,copyfrom,copyfromrev) values (?,?,?,?,?)");
+ TQSqlQuery _q(TQString(),m_Database);
_q.prepare(qEntry);
_q.bindValue(0,j);
_q.bindValue(1,aEntry.date);
_q.bindValue(2,aEntry.author);
_q.bindValue(3,aEntry.message);
if (!_q.exec()) {
-#if QT_VERSION < 0x040000
m_Database->rollback();
-#else
- m_Database.rollback();
-#endif
qDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
qDebug(_q.lastQuery().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
+ throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
}
_q.prepare(qPathes);
svn::LogChangePathEntries::ConstIterator cpit = aEntry.changedPaths.begin();
for (;cpit!=aEntry.changedPaths.end();++cpit){
_q.bindValue(0,j);
_q.bindValue(1,(*cpit).path);
- _q.bindValue(2,QString(QChar((*cpit).action)));
+ _q.bindValue(2,TQString(TQChar((*cpit).action)));
_q.bindValue(3,(*cpit).copyFromPath);
- _q.bindValue(4,Q_LLONG((*cpit).copyFromRevision));
+ _q.bindValue(4,TQ_LLONG((*cpit).copyFromRevision));
if (!_q.exec()) {
-#if QT_VERSION < 0x040000
m_Database->rollback();
-#else
- m_Database.rollback();
-#endif
qDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
qDebug(_q.lastQuery().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
+ throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
}
}
-#if QT_VERSION < 0x040000
m_Database->commit();
-#else
- m_Database.commit();
-#endif
return true;
}
@@ -421,44 +353,43 @@ bool svn::cache::ReposLog::insertLogEntry(const svn::LogEntry&aEntry)
*/
bool svn::cache::ReposLog::log(const svn::Path&what,const svn::Revision&_start, const svn::Revision&_end,const svn::Revision&_peg,svn::LogEntriesMap&target, bool strictNodeHistory,int limit)
{
- static QString s_q("select logentries.revision,logentries.author,logentries.date,logentries.message from logentries where logentries.revision in (select changeditems.revision from changeditems where (changeditems.changeditem='%1' or changeditems.changeditem GLOB '%2/*') %3 GROUP BY changeditems.revision) ORDER BY logentries.revision DESC");
+ static TQString s_q("select logentries.revision,logentries.author,logentries.date,logentries.message from logentries where logentries.revision in (select changeditems.revision from changeditems where (changeditems.changeditem='%1' or changeditems.changeditem GLOB '%2/*') %3 GROUP BY changeditems.revision) ORDER BY logentries.revision DESC");
- static QString s_e("select changeditem,action,copyfrom,copyfromrev from changeditems where changeditems.revision='%1'");
+ static TQString s_e("select changeditem,action,copyfrom,copyfromrev from changeditems where changeditems.revision='%1'");
svn::Revision peg = date2numberRev(_peg,true);
svn::Revision end = date2numberRev(_end,true);
svn::Revision start = date2numberRev(_start,true);
- QString query_string = QString(s_q).arg(what.native()).arg(what.native()).arg((peg==svn::Revision::UNDEFINED?"":QString(" AND revision<=%1").arg(peg.revnum())));
+ TQString query_string = TQString(s_q).tqarg(what.native()).tqarg(what.native()).tqarg((peg==svn::Revision::UNDEFINED?"":TQString(" AND revision<=%1").tqarg(peg.revnum())));
if (peg==svn::Revision::UNDEFINED) {
peg = latestCachedRev();
}
if (!itemExists(peg,what)) {
- throw svn::cache::DatabaseException(QString("Entry '%1' does not exists at revision %2").arg(what.native()).arg(peg.toString()));
+ throw svn::cache::DatabaseException(TQString("Entry '%1' does not exists at revision %2").tqarg(what.native()).tqarg(peg.toString()));
}
if (limit>0) {
- query_string+=QString(" LIMIT %1").arg(limit);
+ query_string+=TQString(" LIMIT %1").tqarg(limit);
}
- QSqlQuery _q(QString::null,m_Database);
- QSqlQuery _q2(QString::null,m_Database);
+ TQSqlQuery _q(TQString(),m_Database);
+ 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());
- throw svn::cache::DatabaseException(QString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
+ throw svn::cache::DatabaseException(TQString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
}
while(_q.next()) {
- Q_LLONG revision = _q.value(0).toLongLong();
+ TQ_LLONG revision = _q.value(0).toLongLong();
target[revision].revision=revision;
target[revision].author=_q.value(1).toString();
target[revision].date=_q.value(2).toLongLong();
target[revision].message=_q.value(3).toString();
- query_string=s_e.arg(revision);
+ query_string=s_e.tqarg(revision);
_q2.prepare(query_string);
if (!_q2.exec()) {
qDebug("Could not select values: %s",_q2.lastError().text().TOUTF8().data());
} else {
while (_q2.next()) {
-#if QT_VERSION < 0x040000
target[revision].changedPaths.push_back (
LogChangePathEntry (_q2.value(0).toString(),
_q2.value(1).toString()[0],
@@ -466,15 +397,6 @@ bool svn::cache::ReposLog::log(const svn::Path&what,const svn::Revision&_start,
_q2.value(3).toLongLong()
)
);
-#else
- target[revision].changedPaths.push_back (
- LogChangePathEntry (_q2.value(0).toString(),
- _q2.value(1).toChar().toLatin1(),
- _q2.value(2).toString(),
- _q2.value(3).toLongLong()
- )
- );
-#endif
}
}
@@ -484,50 +406,42 @@ bool svn::cache::ReposLog::log(const svn::Path&what,const svn::Revision&_start,
/*!
- \fn svn::cache::ReposLog::itemExists(const svn::Revision&,const QString&)
+ \fn svn::cache::ReposLog::itemExists(const svn::Revision&,const TQString&)
*/
bool svn::cache::ReposLog::itemExists(const svn::Revision&peg,const svn::Path&path)
{
- /// @todo this moment I have no idea how to check real with all moves and deletes of parent folders without a hell of sql statements so we make it quite simple: it exists if we found it.
+ /// @todo this moment I have no idea how to check real with all moves and deletes of tqparent folders without a hell of sql statements so we make it quite simple: it exists if we found it.
#if 0
- static QString _s1("select revision from changeditems where changeditem='%1' and action='A' and revision<=%2 order by revision desc limit 1");
- QSqlQuery _q(QString::null,m_Database);
- QString query_string=QString(_s1).arg(path.native()).arg(peg.revnum());
+ static TQString _s1("select revision from changeditems where changeditem='%1' and action='A' and revision<=%2 order by revision desc limit 1");
+ TQSqlQuery _q(TQString(),m_Database);
+ TQString query_string=TQString(_s1).tqarg(path.native()).tqarg(peg.revnum());
if (!_q.exec(query_string)) {
qDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
qDebug(_q.lastQuery().TOUTF8().data());
- throw svn::cache::DatabaseException(QString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
+ throw svn::cache::DatabaseException(TQString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
}
qDebug(_q.lastQuery().TOUTF8().data());
svn::Path _p = path;
- static QString _s2("select revision from changeditem where changeditem in (%1) and action='D' and revision>%2 and revision<=%3 order by revision desc limit 1");
- QStringList p_list;
+ static TQString _s2("select revision from changeditem where changeditem in (%1) and action='D' and revision>%2 and revision<=%3 order by revision desc limit 1");
+ TQStringList p_list;
while (_p.length()>0) {
- p_list.append(QString("'%1'").arg(_p.native()));
+ p_list.append(TQString("'%1'").tqarg(_p.native()));
_p.removeLast();
}
- query_string=QString(_s2).arg(p_list.join(",")).arg();
+ query_string=TQString(_s2).tqarg(p_list.join(",")).tqarg();
#endif
return true;
}
bool svn::cache::ReposLog::isValid()const
{
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
m_Database = LogCache::self()->reposDb(m_ReposRoot);
-#if QT_VERSION < 0x040000
if (!m_Database) {
-#else
- if (!m_Database.isValid()) {
-#endif
return false;
}
}
diff --git a/src/svnqt/cache/ReposLog.hpp b/src/svnqt/cache/ReposLog.hpp
index e81a5c9..1d28037 100644
--- a/src/svnqt/cache/ReposLog.hpp
+++ b/src/svnqt/cache/ReposLog.hpp
@@ -5,8 +5,8 @@
#include "svnqt/svnqttypes.hpp"
#include "svnqt/revision.hpp"
-#include <qsqldatabase.h>
-#include <qstring.h>
+#include <tqsqldatabase.h>
+#include <tqstring.h>
namespace svn
{
@@ -16,26 +16,26 @@ class Client;
namespace cache
{
-class SVNQT_EXPORT ReposLog
+class SVNTQT_EXPORT ReposLog
{
protected:
svn::Client*m_Client;
- mutable QDataBase m_Database;
- QString m_ReposRoot;
+ mutable TQDataBase m_Database;
+ TQString m_ReposRoot;
svn::Revision m_latestHead;
//! internal insert.
bool _insertLogEntry(const svn::LogEntry&);
bool checkFill(svn::Revision&_start,svn::Revision&_end,bool checkHead);
public:
- ReposLog(svn::Client*aClient,const QString&aRepository=QString::null);
+ ReposLog(svn::Client*aClient,const TQString&aRepository=TQString());
- QString ReposRoot() const
+ TQString ReposRoot() const
{
return m_ReposRoot;
}
- QDataBase Database() const
+ TQDataBase Database() const
{
return m_Database;
}
diff --git a/src/svnqt/cache/sqlite3/qsql_sqlite3.cpp b/src/svnqt/cache/sqlite3/qsql_sqlite3.cpp
index 93010c1..a5faff5 100644
--- a/src/svnqt/cache/sqlite3/qsql_sqlite3.cpp
+++ b/src/svnqt/cache/sqlite3/qsql_sqlite3.cpp
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Implementation of SQLite driver classes.
+** Implementation of STQLite driver classes.
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
-** This file is part of the sql module of the Qt GUI Toolkit.
+** This file is part of the sql module of the TQt GUI Toolkit.
** EDITIONS: FREE, ENTERPRISE
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -14,105 +14,98 @@
#include "qsql_sqlite3.h"
-#include <qdatetime.h>
-#include <qvaluevector.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqvaluevector.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <sqlite3.h>
-#if (QT_VERSION-0 < 0x030200)
-# include <qvector.h>
-# if !defined Q_WS_WIN32
+# include <tqptrvector.h>
+# if !defined TQ_WS_WIN32
# include <unistd.h>
# endif
-#else
-# include <qptrvector.h>
-# if !defined Q_WS_WIN32
-# include <unistd.h>
-# endif
-#endif
typedef struct sqlite3_stmt sqlite3_stmt;
-#define QSQLITE3_DRIVER_NAME "QSQLITE3"
+#define TQSQLITE3_DRIVER_NAME "TQSQLITE3"
-static QVariant::Type qSqliteType(int tp)
+static TQVariant::Type qSqliteType(int tp)
{
switch (tp) {
case SQLITE_INTEGER:
- return QVariant::Int;
+ return TQVariant::Int;
case SQLITE_FLOAT:
- return QVariant::Double;
+ return TQVariant::Double;
case SQLITE_BLOB:
- return QVariant::ByteArray;
+ return TQVariant::ByteArray;
case SQLITE_TEXT:
default:
- return QVariant::String;
+ return TQVariant::String;
}
}
-static QSqlError qMakeError(sqlite3 *access, const QString &descr, QSqlError::Type type,
+static TQSqlError qMakeError(sqlite3 *access, const TQString &descr, TQSqlError::Type type,
int errorCode = -1)
{
- return QSqlError(descr,
- QString::fromUtf8(sqlite3_errmsg(access)),
+ return TQSqlError(descr,
+ TQString::fromUtf8(sqlite3_errmsg(access)),
type, errorCode);
}
-class QSQLite3DriverPrivate
+class TQSQLite3DriverPrivate
{
public:
- QSQLite3DriverPrivate();
+ TQSQLite3DriverPrivate();
sqlite3 *access;
bool utf8;
};
-QSQLite3DriverPrivate::QSQLite3DriverPrivate() : access(0)
+TQSQLite3DriverPrivate::TQSQLite3DriverPrivate() : access(0)
{
utf8 = true;
}
-class QSQLite3ResultPrivate
+class TQSQLite3ResultPrivate
{
public:
- QSQLite3ResultPrivate(QSQLite3Result *res);
+ TQSQLite3ResultPrivate(TQSQLite3Result *res);
void cleanup();
- bool fetchNext(QSqlCachedResult::ValueCache &values, int idx, bool initialFetch);
+ bool fetchNext(TQSqlCachedResult::ValueCache &values, int idx, bool initialFetch);
bool isSelect();
// initializes the recordInfo and the cache
void initColumns();
void finalize();
- QSQLite3Result* q;
+ TQSQLite3Result* q;
sqlite3 *access;
sqlite3_stmt *stmt;
- uint skippedStatus: 1; // the status of the fetchNext() that's skipped
+ uint skippedtqStatus: 1; // the status of the fetchNext() that's skipped
uint skipRow: 1; // skip the next fetchNext()?
uint utf8: 1;
- QSqlRecord rInf;
+ TQSqlRecord rInf;
};
static const uint initial_cache_size = 128;
-QSQLite3ResultPrivate::QSQLite3ResultPrivate(QSQLite3Result* res) : q(res), access(0),
- stmt(0), skippedStatus(false), skipRow(false), utf8(false)
+TQSQLite3ResultPrivate::TQSQLite3ResultPrivate(TQSQLite3Result* res) : q(res), access(0),
+ stmt(0), skippedtqStatus(false), skipRow(false), utf8(false)
{
}
-void QSQLite3ResultPrivate::cleanup()
+void TQSQLite3ResultPrivate::cleanup()
{
finalize();
rInf.clear();
- skippedStatus = false;
+ skippedtqStatus = false;
skipRow = false;
- q->setAt(QSql::BeforeFirst);
+ q->setAt(TQSql::BeforeFirst);
q->setActive(false);
q->cleanup();
}
-void QSQLite3ResultPrivate::finalize()
+void TQSQLite3ResultPrivate::finalize()
{
if (!stmt)
return;
@@ -122,7 +115,7 @@ void QSQLite3ResultPrivate::finalize()
}
// called on first fetch
-void QSQLite3ResultPrivate::initColumns()
+void TQSQLite3ResultPrivate::initColumns()
{
rInf.clear();
@@ -133,15 +126,15 @@ void QSQLite3ResultPrivate::initColumns()
q->init(nCols);
for (int i = 0; i < nCols; ++i) {
- QString colName = QString::fromUtf8(sqlite3_column_name(stmt, i));
+ TQString colName = TQString::fromUtf8(sqlite3_column_name(stmt, i));
- int dotIdx = colName.findRev('.');
- rInf.append(QSqlField(colName.mid(dotIdx == -1 ? 0 : dotIdx + 1),
+ int dotIdx = colName.tqfindRev('.');
+ rInf.append(TQSqlField(colName.mid(dotIdx == -1 ? 0 : dotIdx + 1),
qSqliteType(sqlite3_column_type(stmt, i))));
}
}
-bool QSQLite3ResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int idx, bool initialFetch)
+bool TQSQLite3ResultPrivate::fetchNext(TQSqlCachedResult::ValueCache &values, int idx, bool initialFetch)
{
int res;
unsigned int i;
@@ -150,7 +143,7 @@ bool QSQLite3ResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int
// already fetched
Q_ASSERT(!initialFetch);
skipRow = false;
- return skippedStatus;
+ return skippedtqStatus;
}
skipRow = initialFetch;
@@ -160,7 +153,7 @@ bool QSQLite3ResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int
// keep trying while busy, wish I could implement this better.
while ((res = sqlite3_step(stmt)) == SQLITE_BUSY) {
// sleep instead requesting result again immidiately.
-#if defined Q_OS_WIN
+#if defined TQ_OS_WIN
Sleep(1000);
#else
sleep(1);
@@ -177,35 +170,35 @@ bool QSQLite3ResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int
return true;
for (i = 0; i < rInf.count(); ++i)
// todo - handle other types
- values[i + idx] = QString::fromUtf8((char *)(sqlite3_column_text(stmt, i)));
- // values[i + idx] = utf8 ? QString::fromUtf8(fvals[i]) : QString::fromAscii(fvals[i]);
+ values[i + idx] = TQString::fromUtf8((char *)(sqlite3_column_text(stmt, i)));
+ // values[i + idx] = utf8 ? TQString::fromUtf8(fvals[i]) : TQString::fromAscii(fvals[i]);
return true;
case SQLITE_DONE:
if (rInf.isEmpty())
// must be first call.
initColumns();
- q->setAt(QSql::AfterLast);
+ q->setAt(TQSql::AfterLast);
return false;
case SQLITE_ERROR:
case SQLITE_MISUSE:
default:
// something wrong, don't get col info, but still return false
- q->setLastError(qMakeError(access, "Unable to fetch row", QSqlError::Connection, res));
+ q->setLastError(qMakeError(access, "Unable to fetch row", TQSqlError::Connection, res));
finalize();
- q->setAt(QSql::AfterLast);
+ q->setAt(TQSql::AfterLast);
return false;
}
return false;
}
-QSQLite3Result::QSQLite3Result(const QSQLite3Driver* db)
- : QSqlCachedResult(db)
+TQSQLite3Result::TQSQLite3Result(const TQSQLite3Driver* db)
+ : TQSqlCachedResult(db)
{
- d = new QSQLite3ResultPrivate(this);
+ d = new TQSQLite3ResultPrivate(this);
d->access = db->d->access;
}
-QSQLite3Result::~QSQLite3Result()
+TQSQLite3Result::~TQSQLite3Result()
{
d->cleanup();
delete d;
@@ -214,7 +207,7 @@ QSQLite3Result::~QSQLite3Result()
/*
Execute \a query.
*/
-bool QSQLite3Result::reset (const QString &query)
+bool TQSQLite3Result::reset (const TQString &query)
{
// this is where we build a query.
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
@@ -224,61 +217,61 @@ bool QSQLite3Result::reset (const QString &query)
setSelect(false);
- int res = sqlite3_prepare(d->access, query.utf8().data(), (query.length() + 1) * sizeof(QChar),
+ int res = sqlite3_prepare(d->access, query.utf8().data(), (query.length() + 1) * sizeof(TQChar),
&d->stmt, 0);
if (res != SQLITE_OK) {
- setLastError(qMakeError(d->access, "Unable to execute statement", QSqlError::Statement, res));
+ setLastError(qMakeError(d->access, "Unable to execute statement", TQSqlError::Statement, res));
d->finalize();
return false;
}
- d->skippedStatus = d->fetchNext(cache(), 0, true);
+ d->skippedtqStatus = d->fetchNext(cache(), 0, true);
setSelect(!d->rInf.isEmpty());
setActive(true);
return true;
}
-bool QSQLite3Result::gotoNext(QSqlCachedResult::ValueCache& row, int idx)
+bool TQSQLite3Result::gotoNext(TQSqlCachedResult::ValueCache& row, int idx)
{
return d->fetchNext(row, idx, false);
}
-int QSQLite3Result::size()
+int TQSQLite3Result::size()
{
return -1;
}
-int QSQLite3Result::numRowsAffected()
+int TQSQLite3Result::numRowsAffected()
{
return sqlite3_changes(d->access);
}
/////////////////////////////////////////////////////////
-QSQLite3Driver::QSQLite3Driver(QObject * parent, const char *name)
- : QSqlDriver(parent, name)
+TQSQLite3Driver::TQSQLite3Driver(TQObject * tqparent, const char *name)
+ : TQSqlDriver(tqparent, name)
{
- d = new QSQLite3DriverPrivate();
+ d = new TQSQLite3DriverPrivate();
}
-QSQLite3Driver::QSQLite3Driver(sqlite3 *connection, QObject *parent, const char *name)
- : QSqlDriver(parent, name)
+TQSQLite3Driver::TQSQLite3Driver(sqlite3 *connection, TQObject *tqparent, const char *name)
+ : TQSqlDriver(tqparent, name)
{
- d = new QSQLite3DriverPrivate();
+ d = new TQSQLite3DriverPrivate();
d->access = connection;
setOpen(true);
setOpenError(false);
}
-QSQLite3Driver::~QSQLite3Driver()
+TQSQLite3Driver::~TQSQLite3Driver()
{
delete d;
}
-bool QSQLite3Driver::hasFeature(DriverFeature f) const
+bool TQSQLite3Driver::hasFeature(DriverFeature f) const
{
switch (f) {
case Transactions:
@@ -292,10 +285,10 @@ bool QSQLite3Driver::hasFeature(DriverFeature f) const
}
/*
- SQLite dbs have no user name, passwords, hosts or ports.
+ STQLite dbs have no user name, passwords, hosts or ports.
just file names.
*/
-bool QSQLite3Driver::open(const QString & db, const QString &, const QString &, const QString &, int, const QString &)
+bool TQSQLite3Driver::open(const TQString & db, const TQString &, const TQString &, const TQString &, int, const TQString &)
{
if (isOpen())
close();
@@ -303,99 +296,95 @@ bool QSQLite3Driver::open(const QString & db, const QString &, const QString &,
if (db.isEmpty())
return false;
- if (sqlite3_open(QFile::encodeName(db), &d->access) == SQLITE_OK) {
+ if (sqlite3_open(TQFile::encodeName(db), &d->access) == SQLITE_OK) {
setOpen(true);
setOpenError(false);
return true;
} else {
setLastError(qMakeError(d->access, "Error opening database",
- QSqlError::Connection));
+ TQSqlError::Connection));
setOpenError(true);
return false;
}
}
-void QSQLite3Driver::close()
+void TQSQLite3Driver::close()
{
if (isOpen()) {
if (sqlite3_close(d->access) != SQLITE_OK)
setLastError(qMakeError(d->access, "Error closing database",
- QSqlError::Connection));
+ TQSqlError::Connection));
d->access = 0;
setOpen(false);
setOpenError(false);
}
}
-QSqlQuery QSQLite3Driver::createQuery() const
+TQSqlQuery TQSQLite3Driver::createQuery() const
{
- return QSqlQuery(new QSQLite3Result(this));
+ return TQSqlQuery(new TQSQLite3Result(this));
}
-bool QSQLite3Driver::beginTransaction()
+bool TQSQLite3Driver::beginTransaction()
{
if (!isOpen() || isOpenError())
return false;
- QSqlQuery q(createQuery());
+ TQSqlQuery q(createQuery());
if (!q.exec("BEGIN")) {
- setLastError(QSqlError("Unable to begin transaction",
- q.lastError().databaseText(), QSqlError::Transaction));
+ setLastError(TQSqlError("Unable to begin transaction",
+ q.lastError().databaseText(), TQSqlError::Transaction));
return false;
}
return true;
}
-bool QSQLite3Driver::commitTransaction()
+bool TQSQLite3Driver::commitTransaction()
{
if (!isOpen() || isOpenError())
return false;
- QSqlQuery q(createQuery());
+ TQSqlQuery q(createQuery());
if (!q.exec("COMMIT")) {
- setLastError(QSqlError("Unable to begin transaction",
- q.lastError().databaseText(), QSqlError::Transaction));
+ setLastError(TQSqlError("Unable to begin transaction",
+ q.lastError().databaseText(), TQSqlError::Transaction));
return false;
}
return true;
}
-bool QSQLite3Driver::rollbackTransaction()
+bool TQSQLite3Driver::rollbackTransaction()
{
if (!isOpen() || isOpenError())
return false;
- QSqlQuery q(createQuery());
+ TQSqlQuery q(createQuery());
if (!q.exec("ROLLBACK")) {
- setLastError(QSqlError("Unable to begin transaction",
- q.lastError().databaseText(), QSqlError::Transaction));
+ setLastError(TQSqlError("Unable to begin transaction",
+ q.lastError().databaseText(), TQSqlError::Transaction));
return false;
}
return true;
}
-QStringList QSQLite3Driver::tables(const QString &typeName) const
+TQStringList TQSQLite3Driver::tables(const TQString &typeName) const
{
- QStringList res;
+ TQStringList res;
if (!isOpen())
return res;
int type = typeName.toInt();
- QSqlQuery q = createQuery();
+ TQSqlQuery q = createQuery();
q.setForwardOnly(TRUE);
-#if (QT_VERSION-0 >= 0x030200)
- if ((type & (int)QSql::Tables) && (type & (int)QSql::Views))
+ if ((type & (int)TQSql::Tables) && (type & (int)TQSql::Views))
q.exec("SELECT name FROM sqlite_master WHERE type='table' OR type='view'");
- else if (typeName.isEmpty() || (type & (int)QSql::Tables))
+ else if (typeName.isEmpty() || (type & (int)TQSql::Tables))
q.exec("SELECT name FROM sqlite_master WHERE type='table'");
- else if (type & (int)QSql::Views)
+ else if (type & (int)TQSql::Views)
q.exec("SELECT name FROM sqlite_master WHERE type='view'");
-#else
- q.exec("SELECT name FROM sqlite_master WHERE type='table' OR type='view'");
-#endif
if (q.isActive()) {
@@ -403,28 +392,26 @@ QStringList QSQLite3Driver::tables(const QString &typeName) const
res.append(q.value(0).toString());
}
-#if (QT_VERSION-0 >= 0x030200)
- if (type & (int)QSql::SystemTables) {
+ if (type & (int)TQSql::SystemTables) {
// there are no internal tables beside this one:
res.append("sqlite_master");
}
-#endif
return res;
}
-QSqlIndex QSQLite3Driver::primaryIndex(const QString &tblname) const
+TQSqlIndex TQSQLite3Driver::primaryIndex(const TQString &tblname) const
{
- QSqlRecordInfo rec(recordInfo(tblname)); // expensive :(
+ TQSqlRecordInfo rec(recordInfo(tblname)); // expensive :(
if (!isOpen())
- return QSqlIndex();
+ return TQSqlIndex();
- QSqlQuery q = createQuery();
+ TQSqlQuery q = createQuery();
q.setForwardOnly(TRUE);
- // finrst find a UNIQUE INDEX
+ // finrst find a UNITQUE INDEX
q.exec("PRAGMA index_list('" + tblname + "');");
- QString indexname;
+ TQString indexname;
while(q.next()) {
if (q.value(2).toInt()==1) {
indexname = q.value(1).toString();
@@ -432,54 +419,54 @@ QSqlIndex QSQLite3Driver::primaryIndex(const QString &tblname) const
}
}
if (indexname.isEmpty())
- return QSqlIndex();
+ return TQSqlIndex();
q.exec("PRAGMA index_info('" + indexname + "');");
- QSqlIndex index(indexname);
+ TQSqlIndex index(indexname);
while(q.next()) {
- QString name = q.value(2).toString();
- QSqlVariant::Type type = QSqlVariant::Invalid;
- if (rec.contains(name))
- type = rec.find(name).type();
- index.append(QSqlField(name, type));
+ TQString name = q.value(2).toString();
+ TQSqlVariant::Type type = TQSqlVariant::Invalid;
+ if (rec.tqcontains(name))
+ type = rec.tqfind(name).type();
+ index.append(TQSqlField(name, type));
}
return index;
}
-QSqlRecordInfo QSQLite3Driver::recordInfo(const QString &tbl) const
+TQSqlRecordInfo TQSQLite3Driver::recordInfo(const TQString &tbl) const
{
if (!isOpen())
- return QSqlRecordInfo();
+ return TQSqlRecordInfo();
- QSqlQuery q = createQuery();
+ TQSqlQuery q = createQuery();
q.setForwardOnly(TRUE);
q.exec("SELECT * FROM " + tbl + " LIMIT 1");
return recordInfo(q);
}
-QSqlRecord QSQLite3Driver::record(const QString &tblname) const
+TQSqlRecord TQSQLite3Driver::record(const TQString &tblname) const
{
if (!isOpen())
- return QSqlRecord();
+ return TQSqlRecord();
return recordInfo(tblname).toRecord();
}
-QSqlRecord QSQLite3Driver::record(const QSqlQuery& query) const
+TQSqlRecord TQSQLite3Driver::record(const TQSqlQuery& query) const
{
if (query.isActive() && query.driver() == this) {
- QSQLite3Result* result = (QSQLite3Result*)query.result();
+ TQSQLite3Result* result = (TQSQLite3Result*)query.result();
return result->d->rInf;
}
- return QSqlRecord();
+ return TQSqlRecord();
}
-QSqlRecordInfo QSQLite3Driver::recordInfo(const QSqlQuery& query) const
+TQSqlRecordInfo TQSQLite3Driver::recordInfo(const TQSqlQuery& query) const
{
if (query.isActive() && query.driver() == this) {
- QSQLite3Result* result = (QSQLite3Result*)query.result();
- return QSqlRecordInfo(result->d->rInf);
+ TQSQLite3Result* result = (TQSQLite3Result*)query.result();
+ return TQSqlRecordInfo(result->d->rInf);
}
- return QSqlRecordInfo();
+ return TQSqlRecordInfo();
}
diff --git a/src/svnqt/cache/sqlite3/qsql_sqlite3.h b/src/svnqt/cache/sqlite3/qsql_sqlite3.h
index f89c038..85cc22f 100644
--- a/src/svnqt/cache/sqlite3/qsql_sqlite3.h
+++ b/src/svnqt/cache/sqlite3/qsql_sqlite3.h
@@ -1,10 +1,10 @@
/****************************************************************************
**
-** Definition of SQLite driver classes.
+** Definition of STQLite driver classes.
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
-** This file is part of the sql module of the Qt GUI Toolkit.
+** This file is part of the sql module of the TQt GUI Toolkit.
** EDITIONS: FREE, ENTERPRISE
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -12,79 +12,77 @@
**
****************************************************************************/
-#ifndef QSQL_SQLITE3_H
-#define QSQL_SQLITE3_H
+#ifndef TQSQL_STQLITE3_H
+#define TQSQL_STQLITE3_H
-#include <qsqldriver.h>
-#include <qsqlresult.h>
-#include <qsqlrecord.h>
-#include <qsqlindex.h>
+#include <tqsqldriver.h>
+#include <tqsqlresult.h>
+#include <tqsqlrecord.h>
+#include <tqsqlindex.h>
#include "qsqlcachedresult.h"
-#if (QT_VERSION-0 >= 0x030200)
-typedef QVariant QSqlVariant;
-#endif
+typedef TQVariant TQSqlVariant;
-#if defined (Q_OS_WIN32)
-# include <qt_windows.h>
+#if defined (TQ_OS_WIN32)
+# include <tqt_windows.h>
#endif
-class QSQLite3DriverPrivate;
-class QSQLite3ResultPrivate;
-class QSQLite3Driver;
+class TQSQLite3DriverPrivate;
+class TQSQLite3ResultPrivate;
+class TQSQLite3Driver;
struct sqlite3;
-class QSQLite3Result : public QSqlCachedResult
+class TQSQLite3Result : public TQSqlCachedResult
{
- friend class QSQLite3Driver;
- friend class QSQLite3ResultPrivate;
+ friend class TQSQLite3Driver;
+ friend class TQSQLite3ResultPrivate;
public:
- QSQLite3Result(const QSQLite3Driver* db);
- ~QSQLite3Result();
+ TQSQLite3Result(const TQSQLite3Driver* db);
+ ~TQSQLite3Result();
protected:
- bool gotoNext(QSqlCachedResult::ValueCache& row, int idx);
- bool reset (const QString& query);
+ bool gotoNext(TQSqlCachedResult::ValueCache& row, int idx);
+ bool reset (const TQString& query);
int size();
int numRowsAffected();
private:
- QSQLite3ResultPrivate* d;
+ TQSQLite3ResultPrivate* d;
};
-class QSQLite3Driver : public QSqlDriver
+class TQSQLite3Driver : public TQSqlDriver
{
- friend class QSQLite3Result;
+ friend class TQSQLite3Result;
public:
- QSQLite3Driver(QObject *parent = 0, const char *name = 0);
- QSQLite3Driver(sqlite3 *connection, QObject *parent = 0, const char *name = 0);
- ~QSQLite3Driver();
+ TQSQLite3Driver(TQObject *tqparent = 0, const char *name = 0);
+ TQSQLite3Driver(sqlite3 *connection, TQObject *tqparent = 0, const char *name = 0);
+ ~TQSQLite3Driver();
bool hasFeature(DriverFeature f) const;
- bool open(const QString & db,
- const QString & user,
- const QString & password,
- const QString & host,
+ bool open(const TQString & db,
+ const TQString & user,
+ const TQString & password,
+ const TQString & host,
int port,
- const QString & connOpts);
- bool open( const QString & db,
- const QString & user,
- const QString & password,
- const QString & host,
- int port ) { return open (db, user, password, host, port, QString()); }
+ const TQString & connOpts);
+ bool open( const TQString & db,
+ const TQString & user,
+ const TQString & password,
+ const TQString & host,
+ int port ) { return open (db, user, password, host, port, TQString()); }
void close();
- QSqlQuery createQuery() const;
+ TQSqlQuery createQuery() const;
bool beginTransaction();
bool commitTransaction();
bool rollbackTransaction();
- QStringList tables(const QString &user) const;
+ TQStringList tables(const TQString &user) const;
- QSqlRecord record(const QString& tablename) const;
- QSqlRecordInfo recordInfo(const QString& tablename) const;
- QSqlIndex primaryIndex(const QString &table) const;
- QSqlRecord record(const QSqlQuery& query) const;
- QSqlRecordInfo recordInfo(const QSqlQuery& query) const;
+ TQSqlRecord record(const TQString& tablename) const;
+ TQSqlRecordInfo recordInfo(const TQString& tablename) const;
+ TQSqlIndex primaryIndex(const TQString &table) const;
+ TQSqlRecord record(const TQSqlQuery& query) const;
+ TQSqlRecordInfo recordInfo(const TQSqlQuery& query) const;
private:
- QSQLite3DriverPrivate* d;
+ TQSQLite3DriverPrivate* d;
};
#endif
diff --git a/src/svnqt/cache/sqlite3/qsqlcachedresult.cpp b/src/svnqt/cache/sqlite3/qsqlcachedresult.cpp
index 8a23183..708434a 100644
--- a/src/svnqt/cache/sqlite3/qsqlcachedresult.cpp
+++ b/src/svnqt/cache/sqlite3/qsqlcachedresult.cpp
@@ -2,11 +2,11 @@
**
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
**
-** This file is part of the sql module of the Qt Toolkit.
+** This file is part of the sql module of the TQt Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -14,8 +14,8 @@
** packaging of this file.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
@@ -28,16 +28,16 @@
#include "qsqlcachedresult.h"
-#include <qvariant.h>
-#include <qdatetime.h>
-#include <qvaluevector.h>
+#include <tqvariant.h>
+#include <tqdatetime.h>
+#include <tqvaluevector.h>
static const uint initial_cache_size = 128;
-class QSqlCachedResultPrivate
+class TQSqlCachedResultPrivate
{
public:
- QSqlCachedResultPrivate();
+ TQSqlCachedResultPrivate();
bool canSeek(int i) const;
inline int cacheCount() const;
void init(int count, bool fo);
@@ -45,18 +45,18 @@ public:
int nextIndex();
void revertLast();
- QSqlCachedResult::ValueCache cache;
+ TQSqlCachedResult::ValueCache cache;
int rowCacheEnd;
int colCount;
bool forwardOnly;
};
-QSqlCachedResultPrivate::QSqlCachedResultPrivate():
+TQSqlCachedResultPrivate::TQSqlCachedResultPrivate():
rowCacheEnd(0), colCount(0), forwardOnly(false)
{
}
-void QSqlCachedResultPrivate::cleanup()
+void TQSqlCachedResultPrivate::cleanup()
{
cache.clear();
forwardOnly = false;
@@ -64,7 +64,7 @@ void QSqlCachedResultPrivate::cleanup()
rowCacheEnd = 0;
}
-void QSqlCachedResultPrivate::init(int count, bool fo)
+void TQSqlCachedResultPrivate::init(int count, bool fo)
{
Q_ASSERT(count);
cleanup();
@@ -78,7 +78,7 @@ void QSqlCachedResultPrivate::init(int count, bool fo)
}
}
-int QSqlCachedResultPrivate::nextIndex()
+int TQSqlCachedResultPrivate::nextIndex()
{
if (forwardOnly)
return 0;
@@ -96,21 +96,21 @@ int QSqlCachedResultPrivate::nextIndex()
return newIdx;
}
-bool QSqlCachedResultPrivate::canSeek(int i) const
+bool TQSqlCachedResultPrivate::canSeek(int i) const
{
if (forwardOnly || i < 0)
return false;
return rowCacheEnd >= (i + 1) * colCount;
}
-void QSqlCachedResultPrivate::revertLast()
+void TQSqlCachedResultPrivate::revertLast()
{
if (forwardOnly)
return;
rowCacheEnd -= colCount;
}
-inline int QSqlCachedResultPrivate::cacheCount() const
+inline int TQSqlCachedResultPrivate::cacheCount() const
{
Q_ASSERT(!forwardOnly);
Q_ASSERT(colCount);
@@ -119,22 +119,22 @@ inline int QSqlCachedResultPrivate::cacheCount() const
//////////////
-QSqlCachedResult::QSqlCachedResult(const QSqlDriver * db): QSqlResult (db)
+TQSqlCachedResult::TQSqlCachedResult(const TQSqlDriver * db): TQSqlResult (db)
{
- d = new QSqlCachedResultPrivate();
+ d = new TQSqlCachedResultPrivate();
}
-QSqlCachedResult::~QSqlCachedResult()
+TQSqlCachedResult::~TQSqlCachedResult()
{
delete d;
}
-void QSqlCachedResult::init(int colCount)
+void TQSqlCachedResult::init(int colCount)
{
d->init(colCount, isForwardOnly());
}
-bool QSqlCachedResult::fetch(int i)
+bool TQSqlCachedResult::fetch(int i)
{
if ((!isActive()) || (i < 0))
return false;
@@ -142,7 +142,7 @@ bool QSqlCachedResult::fetch(int i)
return true;
if (d->forwardOnly) {
// speed hack - do not copy values if not needed
- if (at() > i || at() == QSql::AfterLast)
+ if (at() > i || at() == TQSql::AfterLast)
return false;
while(at() < i - 1) {
if (!gotoNext(d->cache, -1))
@@ -167,7 +167,7 @@ bool QSqlCachedResult::fetch(int i)
return true;
}
-bool QSqlCachedResult::fetchNext()
+bool TQSqlCachedResult::fetchNext()
{
if (d->canSeek(at() + 1)) {
setAt(at() + 1);
@@ -176,14 +176,14 @@ bool QSqlCachedResult::fetchNext()
return cacheNext();
}
-bool QSqlCachedResult::fetchPrevious()
+bool TQSqlCachedResult::fetchPrevious()
{
return fetch(at() - 1);
}
-bool QSqlCachedResult::fetchFirst()
+bool TQSqlCachedResult::fetchFirst()
{
- if (d->forwardOnly && at() != QSql::BeforeFirst) {
+ if (d->forwardOnly && at() != TQSql::BeforeFirst) {
return false;
}
if (d->canSeek(0)) {
@@ -193,9 +193,9 @@ bool QSqlCachedResult::fetchFirst()
return cacheNext();
}
-bool QSqlCachedResult::fetchLast()
+bool TQSqlCachedResult::fetchLast()
{
- if (at() == QSql::AfterLast) {
+ if (at() == TQSql::AfterLast) {
if (d->forwardOnly)
return false;
else
@@ -205,7 +205,7 @@ bool QSqlCachedResult::fetchLast()
int i = at();
while (fetchNext())
++i; /* brute force */
- if (d->forwardOnly && at() == QSql::AfterLast) {
+ if (d->forwardOnly && at() == TQSql::AfterLast) {
setAt(i);
return true;
} else {
@@ -213,16 +213,16 @@ bool QSqlCachedResult::fetchLast()
}
}
-QVariant QSqlCachedResult::data(int i)
+TQVariant TQSqlCachedResult::data(int i)
{
int idx = d->forwardOnly ? i : at() * d->colCount + i;
if (i >= d->colCount || i < 0 || at() < 0 || idx >= d->rowCacheEnd)
- return QVariant();
+ return TQVariant();
return d->cache.at(idx);
}
-bool QSqlCachedResult::isNull(int i)
+bool TQSqlCachedResult::isNull(int i)
{
int idx = d->forwardOnly ? i : at() * d->colCount + i;
if (i > d->colCount || i < 0 || at() < 0 || idx >= d->rowCacheEnd)
@@ -231,14 +231,14 @@ bool QSqlCachedResult::isNull(int i)
return d->cache.at(idx).isNull();
}
-void QSqlCachedResult::cleanup()
+void TQSqlCachedResult::cleanup()
{
- setAt(QSql::BeforeFirst);
+ setAt(TQSql::BeforeFirst);
setActive(false);
d->cleanup();
}
-bool QSqlCachedResult::cacheNext()
+bool TQSqlCachedResult::cacheNext()
{
if (!gotoNext(d->cache, d->nextIndex())) {
d->revertLast();
@@ -248,12 +248,12 @@ bool QSqlCachedResult::cacheNext()
return true;
}
-int QSqlCachedResult::colCount() const
+int TQSqlCachedResult::colCount() const
{
return d->colCount;
}
-QSqlCachedResult::ValueCache &QSqlCachedResult::cache()
+TQSqlCachedResult::ValueCache &TQSqlCachedResult::cache()
{
return d->cache;
}
diff --git a/src/svnqt/cache/sqlite3/qsqlcachedresult.h b/src/svnqt/cache/sqlite3/qsqlcachedresult.h
index fa8924f..8615428 100644
--- a/src/svnqt/cache/sqlite3/qsqlcachedresult.h
+++ b/src/svnqt/cache/sqlite3/qsqlcachedresult.h
@@ -2,11 +2,11 @@
**
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
**
-** This file is part of the sql module of the Qt Toolkit.
+** This file is part of the sql module of the TQt Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -14,8 +14,8 @@
** packaging of this file.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
@@ -26,43 +26,43 @@
**
****************************************************************************/
-#ifndef QSQLCACHEDRESULT_P_H
-#define QSQLCACHEDRESULT_P_H
+#ifndef TQSQLCACHEDRESULT_P_H
+#define TQSQLCACHEDRESULT_P_H
//
// W A R N I N G
// -------------
//
-// This file is not part of the Qt API. It exists for the convenience
-// of other Qt classes. This header file may change from version to
+// This file is not part of the TQt API. It exists for the convenience
+// of other TQt classes. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
-#include <qsqlresult.h>
+#include <tqsqlresult.h>
-class QVariant;
-template <typename T> class QValueVector;
+class TQVariant;
+template <typename T> class TQValueVector;
-class QSqlCachedResultPrivate;
+class TQSqlCachedResultPrivate;
-class QM_EXPORT_SQL QSqlCachedResult: public QSqlResult
+class TQM_EXPORT_SQL TQSqlCachedResult: public TQSqlResult
{
public:
- virtual ~QSqlCachedResult();
+ virtual ~TQSqlCachedResult();
- typedef QValueVector<QVariant> ValueCache;
+ typedef TQValueVector<TQVariant> ValueCache;
protected:
- QSqlCachedResult(const QSqlDriver * db);
+ TQSqlCachedResult(const TQSqlDriver * db);
void init(int colCount);
void cleanup();
virtual bool gotoNext(ValueCache &values, int index) = 0;
- QVariant data(int i);
+ TQVariant data(int i);
bool isNull(int i);
bool fetch(int i);
bool fetchNext();
@@ -75,7 +75,7 @@ protected:
private:
bool cacheNext();
- QSqlCachedResultPrivate *d;
+ TQSqlCachedResultPrivate *d;
};
-#endif // QSQLCACHEDRESULT_P_H
+#endif // TQSQLCACHEDRESULT_P_H
diff --git a/src/svnqt/cache/test/sqlite.cpp b/src/svnqt/cache/test/sqlite.cpp
index 4f14b2d..979ca59 100644
--- a/src/svnqt/cache/test/sqlite.cpp
+++ b/src/svnqt/cache/test/sqlite.cpp
@@ -1,9 +1,9 @@
-#include <qsql.h>
-#include <qsqldatabase.h>
-#include <qstringlist.h>
+#include <tqsql.h>
+#include <tqsqldatabase.h>
+#include <tqstringlist.h>
#include <iostream>
-#include <qapplication.h>
-#include <qtextstream.h>
+#include <tqapplication.h>
+#include <tqtextstream.h>
#include "svnqt/client.hpp"
#include "svnqt/svnqttypes.hpp"
@@ -14,15 +14,15 @@
#include "svnqt/cache/test/testconfig.h"
#include "svnqt/cache/DatabaseException.hpp"
-#if QT_VERSION < 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
#else
-#include <QSqlQuery>
-#include <QSqlError>
+#include <TQSqlQuery>
+#include <TQSqlError>
#endif
int main(int argc,char**argv)
{
- QApplication app(argc,argv);
+ TQApplication app(argc,argv);
svn::ContextP m_CurrentContext;
svn::Client* m_Svnclient;
@@ -31,19 +31,19 @@ int main(int argc,char**argv)
m_Svnclient->setContext(m_CurrentContext);
- QStringList list;
- QStringList::Iterator it;
+ TQStringList list;
+ TQStringList::Iterator it;
// goes into "self" of logcache
new svn::cache::LogCache(TESTDBPATH);
- list = QSqlDatabase::drivers();
+ list = TQSqlDatabase::drivers();
it = list.begin();
while( it != list.end() ) {
std::cout << (*it).TOUTF8().data() << std::endl;
++it;
}
svn::cache::ReposLog rl(m_Svnclient,"http://www.alwins-world.de/repos/kdesvn");
- QDataBase db = rl.Database();
-#if QT_VERSION < 0x040000
+ TQDataBase db = rl.Database();
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
if (!db) {
#else
if (!db.isValid()) {
@@ -51,7 +51,7 @@ int main(int argc,char**argv)
std::cerr << "No database object."<<std::endl;
exit(-1);
}
-#if QT_VERSION < 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
list = db->tables();
#else
list = db.tables();
@@ -87,13 +87,13 @@ int main(int argc,char**argv)
{
std::cerr << cl.msg().TOUTF8().data() << std::endl;
}
- QSqlQuery q("insert into logentries(revision,date,author,message) values ('100','1122591406','alwin','copy and moving works now in basic form')",db);
+ TQSqlQuery q("insert into logentries(revision,date,author,message) values ('100','1122591406','alwin','copy and moving works now in basic form')",db);
q.exec();
std::cerr << "\n" << q.lastError().text().TOUTF8().data()<<std::endl;
-#if QT_VERSION < 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
#else
- db=QSqlDatabase();
+ db=TQSqlDatabase();
#endif
try {
rl.log("/trunk/src/svnqt",1,1000,svn::Revision::UNDEFINED,lm,false,-1);
diff --git a/src/svnqt/client.cpp b/src/svnqt/client.cpp
index d78c416..8d37cff 100644
--- a/src/svnqt/client.cpp
+++ b/src/svnqt/client.cpp
@@ -40,8 +40,8 @@
#include <svn_cmdline.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
namespace svn
{
@@ -62,8 +62,8 @@ namespace svn
SvnInit::SvnInit() {
svn_cmdline_init("svnqt",0);
qDebug("svn_cmdline_init done");
- QString BasePath=QDir::HOMEDIR();
- QDir d;
+ TQString BasePath=TQDir::HOMEDIR();
+ TQDir d;
if (!d.exists(BasePath)) {
d.mkdir(BasePath);
}
diff --git a/src/svnqt/client.hpp b/src/svnqt/client.hpp
index 622c0be..93dcff6 100644
--- a/src/svnqt/client.hpp
+++ b/src/svnqt/client.hpp
@@ -46,16 +46,12 @@
#include "svnqt/svnstream.hpp"
// qt
-#include <qglobal.h>
-
-#if QT_VERSION < 0x040000
- #include <qstring.h>
- #include <qpair.h>
- #include <qvaluelist.h>
- #include <qmap.h>
-#else
- #include <QtCore>
-#endif
+#include <tqglobal.h>
+
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
// svnqt
#include "svnqt/context.hpp"
@@ -70,7 +66,7 @@
#include "svnqt/diffoptions.hpp"
#include "svnqt/conflictresult.hpp"
-class QStringList;
+class TQStringList;
namespace svn
{
@@ -79,7 +75,7 @@ namespace svn
* Never use an object of this as global static! This will make problems with subversion
* initialize.
*/
- class SVNQT_EXPORT Client
+ class SVNTQT_EXPORT Client
{
public:
@@ -129,7 +125,7 @@ namespace svn
* @param revision list specific revision when browsing remote, on working copies parameter will ignored
* @param detailed_remote if on remote listing detailed item info should get if possible
* that may slow so should configureable in frontends!
- * @return vector with Status entries.
+ * @return vector with tqStatus entries.
*/
virtual StatusEntries
status (const Path& path,
@@ -150,10 +146,10 @@ namespace svn
* @param path File to gather status.
* @param update if check against repository if new updates are there (for WC only)
* @param revision list specific revision when browsing remote, on working copies parameter will ignored
- * @return a Status with Statis.isVersioned = FALSE
+ * @return a tqStatus with Statis.isVersioned = FALSE
*/
virtual StatusPtr
- singleStatus (const Path& path,bool update=false,const Revision revision = svn::Revision::HEAD) throw (ClientException)=0;
+ singletqStatus (const Path& path,bool update=false,const Revision revision = svn::Revision::HEAD) throw (ClientException)=0;
/**
* Executes a revision checkout.
@@ -180,8 +176,8 @@ namespace svn
* @exception ClientException
*/
virtual void
- relocate (const Path & path, const QString &from_url,
- const QString &to_url, bool recurse) throw (ClientException)=0;
+ relocate (const Path & path, const TQString &from_url,
+ const TQString &to_url, bool recurse) throw (ClientException)=0;
/**
* Sets a single file for deletion.
@@ -222,11 +218,11 @@ namespace svn
* @param depth if @a path is a folder add items recursive depending on value if it.
* @param force if true, do not error on already-versioned items.
* @param no_ignore if false don't add files or directories that match ignore patterns. When build against svn 1.2 always false
- * @param add_parents if true, go up to the next versioned folder and add all between path and this folder.
+ * @param add_tqparents if true, go up to the next versioned folder and add all between path and this folder.
* @exception ClientException
*/
virtual void
- add (const Path & path, svn::Depth depth,bool force=false, bool no_ignore=false, bool add_parents = true) throw (ClientException)=0;
+ add (const Path & path, svn::Depth depth,bool force=false, bool no_ignore=false, bool add_tqparents = true) throw (ClientException)=0;
/**
* Updates the file or directory.
@@ -253,7 +249,7 @@ namespace svn
* @param revision revision to retrieve
* @return contents of the file
*/
- virtual QByteArray
+ virtual TQByteArray
cat (const Path & path,
const Revision & revision,
const Revision & peg_revision=svn_opt_revision_unspecified) throw (ClientException)=0;
@@ -284,7 +280,7 @@ namespace svn
*/
virtual void
get (const Path & path,
- const QString & target,
+ const TQString & target,
const Revision & revision,
const Revision & peg_revision=svn_opt_revision_unspecified) throw (ClientException)=0;
@@ -323,7 +319,7 @@ namespace svn
*/
virtual svn::Revision
commit (const Targets & targets,
- const QString& message,
+ const TQString& message,
svn::Depth depth,bool keep_locks=true,
const svn::StringArray&contents=svn::StringArray(),
const PropertiesMap&revProps=PropertiesMap(),
@@ -376,13 +372,13 @@ namespace svn
* must not exist (\sa svn_client_move4)
*
* @param path
- * @param message log message. if it is QString::null asks when working on repository
- * @param makeParent create parent folders if not existant (only when build with svn 1.5 or above)
+ * @param message log message. if it is TQString() asks when working on repository
+ * @param makeParent create tqparent folders if not existant (only when build with svn 1.5 or above)
* @exception ClientException
*/
virtual svn::Revision
mkdir (const Path & path,
- const QString& message,
+ const TQString& message,
bool makeParent=true,
const PropertiesMap&revProps=PropertiesMap()
) throw (ClientException)=0;
@@ -393,13 +389,13 @@ namespace svn
* the callback asks for a logmessage.
*
* @param targets encoded pathes to create
- * @param message log message. if it is QString::null asks when working on repository
- * @param makeParent create parent folders if not existant (only when build with svn 1.5 or above)
+ * @param message log message. if it is TQString() asks when working on repository
+ * @param makeParent create tqparent folders if not existant (only when build with svn 1.5 or above)
* @exception ClientException
*/
virtual svn::Revision
mkdir (const Targets & targets,
- const QString& message,
+ const TQString& message,
bool makeParent=true,
const PropertiesMap&revProps=PropertiesMap()
) throw (ClientException)=0;
@@ -432,7 +428,7 @@ namespace svn
* @param native_eol Either "LF", "CR" or "CRLF" or NULL.
* @param ignore_externals don't process externals definitions as part of this operation.
* @param recurse if true, export recursively.<br>
- Otherwise, export just the directory represented by from and its immediate non-directory children.
+ Otherwise, export just the directory represented by from and its immediate non-directory tqchildren.
*/
virtual svn_revnum_t
doExport (const Path & srcPath,
@@ -440,7 +436,7 @@ namespace svn
const Revision & revision,
const Revision & peg = Revision::UNDEFINED,
bool overwrite=false,
- const QString&native_eol=QString::null,
+ const TQString&native_eol=TQString(),
bool ignore_externals = false,
svn::Depth depth=svn::DepthInfinity
) throw (ClientException)=0;
@@ -452,7 +448,7 @@ namespace svn
*/
virtual svn_revnum_t
doSwitch (
- const Path & path, const QString& url,
+ const Path & path, const TQString& url,
const Revision & revision,
Depth depth,
const Revision & peg=Revision::UNDEFINED,
@@ -473,8 +469,8 @@ namespace svn
* @exception ClientException
*/
virtual svn::Revision
- import (const Path & path, const QString& url,
- const QString& message,
+ import (const Path & path, const TQString& url,
+ const TQString& message,
svn::Depth depth,
bool no_ignore,bool no_unknown_nodetype,
const PropertiesMap&revProps=PropertiesMap()) throw (ClientException)=0;
@@ -615,7 +611,7 @@ namespace svn
* @return delta between the files
* @exception ClientException
*/
- virtual QByteArray
+ virtual TQByteArray
diff_peg(const Path & tmpPath, const Path & path,const Path&relativeTo,
const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
Depth depth, bool ignoreAncestry,
@@ -627,7 +623,7 @@ namespace svn
/**
* Same as other diff but extra options always set to empty list.
*/
- virtual QByteArray
+ virtual TQByteArray
diff_peg (const Path & tmpPath, const Path & path,const Path&relativeTo,
const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
Depth depth, bool ignoreAncestry,
@@ -657,7 +653,7 @@ namespace svn
* @return delta between the files
* @exception ClientException
*/
- virtual QByteArray
+ virtual TQByteArray
diff (const Path & tmpPath, const Path & path1,const Path & path2,const Path&relativeTo,
const Revision & revision1, const Revision & revision2,
Depth depth, bool ignoreAncestry,
@@ -669,7 +665,7 @@ namespace svn
/**
* Same as other diff but extra options and changelists always set to empty list.
*/
- virtual QByteArray
+ virtual TQByteArray
diff (const Path & tmpPath, const Path & path1,const Path & path2,const Path&relativeTo,
const Revision & revision1, const Revision & revision2,
Depth depth, bool ignoreAncestry,
@@ -725,8 +721,8 @@ namespace svn
* @param recurse
* @return PathPropertiesMapList and revision where the properties are taken from (svn 1.5) or undefined revision (prior 1.5)
*/
- virtual QPair<QLONG,PathPropertiesMapList>
- propget(const QString& propName,
+ virtual TQPair<TQLONG,PathPropertiesMapList>
+ propget(const TQString& propName,
const Path &path,
const Revision &revision,
const Revision &peg,
@@ -746,8 +742,8 @@ namespace svn
* @return PropertiesList
*/
virtual void
- propset(const QString& propName,
- const QString& propValue,
+ propset(const TQString& propName,
+ const TQString& propValue,
const Path &path,
Depth depth=DepthEmpty,
bool skip_checks=false,
@@ -766,7 +762,7 @@ namespace svn
* @param recurse
*/
virtual void
- propdel(const QString& propName,
+ propdel(const TQString& propName,
const Path &path,
Depth depth=DepthEmpty,
bool skip_check=false,
@@ -782,7 +778,7 @@ namespace svn
* @param revision
* @return PropertiesList
*/
- virtual QPair<QLONG,PropertiesMap>
+ virtual TQPair<TQLONG,PropertiesMap>
revproplist(const Path &path,
const Revision &revision)=0;
@@ -795,8 +791,8 @@ namespace svn
* @param revision
* @return PropertiesList
*/
- virtual QPair<QLONG,QString>
- revpropget(const QString& propName,
+ virtual TQPair<TQLONG,TQString>
+ revpropget(const TQString& propName,
const Path &path,
const Revision &revision)=0;
@@ -811,9 +807,9 @@ namespace svn
* @param force
* @return Revision
*/
- virtual QLONG
- revpropset(const QString& propName,
- const QString& propValue,
+ virtual TQLONG
+ revpropset(const TQString& propName,
+ const TQString& propValue,
const Path &path,
const Revision &revision,
bool force=false)=0;
@@ -828,8 +824,8 @@ namespace svn
* @param force
* @return Revision
*/
- virtual QLONG
- revpropdel(const QString& propName,
+ virtual TQLONG
+ revpropdel(const TQString& propName,
const Path &path,
const Revision &revision,
bool force=false) = 0;
@@ -843,7 +839,7 @@ namespace svn
*/
virtual void
lock (const Targets & targets,
- const QString& message,
+ const TQString& message,
bool steal_lock) throw (ClientException)=0;
/**
* unlock files in repository or working copy
@@ -855,10 +851,10 @@ namespace svn
bool break_lock) throw (ClientException)=0;
virtual void
- url2Revision(const QString&revstring,
+ url2Revision(const TQString&revstring,
Revision&start,Revision&end)=0;
virtual void
- url2Revision(const QString&revstring,
+ url2Revision(const TQString&revstring,
Revision&start)=0;
private:
diff --git a/src/svnqt/client_cat.cpp b/src/svnqt/client_cat.cpp
index fb03f46..2569e60 100644
--- a/src/svnqt/client_cat.cpp
+++ b/src/svnqt/client_cat.cpp
@@ -46,7 +46,7 @@
namespace svn
{
- QByteArray
+ TQByteArray
Client_impl::cat(const Path & path,
const Revision & revision,
const Revision & peg_revision) throw (ClientException)
@@ -72,7 +72,7 @@ namespace svn
void
Client_impl::get (const Path & path,
- const QString & target,
+ const TQString & target,
const Revision & revision,
const Revision & peg_revision) throw (ClientException)
{
diff --git a/src/svnqt/client_diff.cpp b/src/svnqt/client_diff.cpp
index 4074fa2..c4b8282 100644
--- a/src/svnqt/client_diff.cpp
+++ b/src/svnqt/client_diff.cpp
@@ -44,14 +44,14 @@
#include "svnqt/helper.hpp"
#include "diff_data.hpp"
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <apr_xlate.h>
namespace svn
{
- QByteArray
+ TQByteArray
Client_impl::diff_peg (const Path & tmpPath, const Path & path,const Path&relativeTo,
const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
Depth depth, const bool ignoreAncestry,
@@ -63,7 +63,7 @@ namespace svn
StringArray(),StringArray());
}
- QByteArray
+ TQByteArray
Client_impl::diff_peg (const Path & tmpPath, const Path & path,const Path&relativeTo,
const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
Depth depth, const bool ignoreAncestry,
@@ -84,7 +84,7 @@ namespace svn
options,
path.cstr(),
peg_revision,ddata.r1().revision(),ddata.r2().revision(),
- relativeTo.length()>0?relativeTo.cstr():QByteArray(0),
+ relativeTo.length()>0?relativeTo.cstr():TQByteArray(0),
internal::DepthToSvn(depth),
ignoreAncestry,noDiffDeleted,ignore_contenttype,
APR_LOCALE_CHARSET,
@@ -115,7 +115,7 @@ namespace svn
return ddata.content();
}
- QByteArray
+ TQByteArray
Client_impl::diff (const Path & tmpPath, const Path & path1,const Path&path2,const Path&relativeTo,
const Revision & revision1, const Revision & revision2,
Depth depth, const bool ignoreAncestry,
@@ -127,7 +127,7 @@ namespace svn
StringArray(),StringArray());
}
- QByteArray
+ TQByteArray
Client_impl::diff (const Path & tmpPath, const Path & path1,const Path&path2,const Path&relativeTo,
const Revision & revision1, const Revision & revision2,
Depth depth, const bool ignoreAncestry,
@@ -147,7 +147,7 @@ namespace svn
error = svn_client_diff4(options,
path1.cstr (), ddata.r1().revision (),
path2.cstr (), ddata.r2().revision (),
- relativeTo.length()>0?relativeTo.cstr():QByteArray(0),
+ relativeTo.length()>0?relativeTo.cstr():TQByteArray(0),
internal::DepthToSvn(depth), ignoreAncestry, noDiffDeleted, ignore_contenttype,
APR_LOCALE_CHARSET,
ddata.outFile(),ddata.errFile(),
diff --git a/src/svnqt/client_impl.cpp b/src/svnqt/client_impl.cpp
index 74c2850..031ca6b 100644
--- a/src/svnqt/client_impl.cpp
+++ b/src/svnqt/client_impl.cpp
@@ -36,8 +36,8 @@
#include "svn_opt.h"
#include "svnqt/svnqt_defines.hpp"
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
namespace svn
{
@@ -65,7 +65,7 @@ namespace svn
void
- Client_impl::url2Revision(const QString&revstring,
+ Client_impl::url2Revision(const TQString&revstring,
Revision&start,Revision&end)
{
Pool pool;
@@ -77,7 +77,7 @@ namespace svn
}
}
- void Client_impl::url2Revision(const QString&revstring,Revision&start)
+ void Client_impl::url2Revision(const TQString&revstring,Revision&start)
{
if (revstring=="WORKING") {
start = Revision::WORKING;
@@ -100,13 +100,9 @@ namespace svn
PropertiesMap::ConstIterator it;
const char*propval;
const char*propname;
- QByteArray s,n;
+ TQByteArray s,n;
for (it=aMap.begin();it!=aMap.end();++it) {
-#if QT_VERSION < 0x040000
s=it.data().TOUTF8();
-#else
- s=it.value().TOUTF8();
-#endif
n=it.key().TOUTF8();
propval=apr_pstrndup(pool,s,s.size());
propname=apr_pstrndup(pool,n,n.size());
diff --git a/src/svnqt/client_impl.hpp b/src/svnqt/client_impl.hpp
index 4c3b363..9afc062 100644
--- a/src/svnqt/client_impl.hpp
+++ b/src/svnqt/client_impl.hpp
@@ -44,7 +44,7 @@
#pragma warning (disable: 4290)
#endif
-class QStringList;
+class TQStringList;
namespace svn
{
@@ -55,7 +55,7 @@ namespace svn
/**
* Subversion client API.
*/
- class SVNQT_NOEXPORT Client_impl:public Client
+ class SVNTQT_NOEXPORT Client_impl:public Client
{
public:
/**
@@ -96,7 +96,7 @@ namespace svn
* @param revision list specific revision when browsing remote, on working copies parameter will ignored
* @param detailed_remote if on remote listing detailed item info should get if possible
* that may slow so should configureable in frontends!
- * @return vector with Status entries.
+ * @return vector with tqStatus entries.
*/
virtual StatusEntries
status (const Path& path,
@@ -117,10 +117,10 @@ namespace svn
* @param path File to gather status.
* @param update if check against repository if new updates are there (for WC only)
* @param revision list specific revision when browsing remote, on working copies parameter will ignored
- * @return a Status with Statis.isVersioned = FALSE
+ * @return a tqStatus with Statis.isVersioned = FALSE
*/
virtual StatusPtr
- singleStatus (const Path& path,bool update=false,const Revision revision = svn::Revision::HEAD) throw (ClientException);
+ singletqStatus (const Path& path,bool update=false,const Revision revision = svn::Revision::HEAD) throw (ClientException);
/**
* Executes a revision checkout.
@@ -147,8 +147,8 @@ namespace svn
* @exception ClientException
*/
virtual void
- relocate (const Path & path, const QString &from_url,
- const QString &to_url, bool recurse) throw (ClientException);
+ relocate (const Path & path, const TQString &from_url,
+ const TQString &to_url, bool recurse) throw (ClientException);
/**
* Sets a single file for deletion.
@@ -189,11 +189,11 @@ namespace svn
* @param depth if @a path is a folder add items recursive depending on value if it. Pre-subversion 1.5 DepthInfinity is mapped to recursive, all other to not-recursive.
* @param force if true, do not error on already-versioned items.
* @param no_ignore if false don't add files or directories that match ignore patterns.
- * @param add_parents if true, go up to the next versioned folder and add all between path and this folder. Used only with subversion 1.5 or newer
+ * @param add_tqparents if true, go up to the next versioned folder and add all between path and this folder. Used only with subversion 1.5 or newer
* @exception ClientException
* @sa svn::Depth
*/
- virtual void add (const Path & path, svn::Depth depth,bool force=false, bool no_ignore=false, bool add_parents = true) throw (ClientException);
+ virtual void add (const Path & path, svn::Depth depth,bool force=false, bool no_ignore=false, bool add_tqparents = true) throw (ClientException);
/**
* Updates the file or directory.
@@ -221,7 +221,7 @@ namespace svn
* @param peg_revision Revision to look at
* @return contents of the file
*/
- virtual QByteArray
+ virtual TQByteArray
cat (const Path & path,
const Revision & revision,
const Revision & peg_revision=svn_opt_revision_unspecified) throw (ClientException);
@@ -253,7 +253,7 @@ namespace svn
*/
virtual void
get (const Path & path,
- const QString & target,
+ const TQString & target,
const Revision & revision,
const Revision & peg_revision=svn_opt_revision_unspecified) throw (ClientException);
@@ -292,7 +292,7 @@ namespace svn
*/
virtual svn::Revision
commit (const Targets & targets,
- const QString& message,
+ const TQString& message,
svn::Depth depth,bool keep_locks=true,
const svn::StringArray&changelist=svn::StringArray(),
const PropertiesMap&revProps=PropertiesMap(),
@@ -345,12 +345,12 @@ namespace svn
* the callback asks for a logmessage.
*
* @param path
- * @param message log message. if it is QString::null asks when working on repository
+ * @param message log message. if it is TQString() asks when working on repository
* @exception ClientException
*/
virtual svn::Revision
mkdir (const Path & path,
- const QString& message,
+ const TQString& message,
bool makeParent=true,
const PropertiesMap&revProps=PropertiesMap()
) throw (ClientException);
@@ -361,12 +361,12 @@ namespace svn
* the callback asks for a logmessage.
*
* @param targets encoded pathes to create
- * @param message log message. if it is QString::null asks when working on repository
+ * @param message log message. if it is TQString() asks when working on repository
* @exception ClientException
*/
virtual svn::Revision
mkdir (const Targets & targets,
- const QString& message,
+ const TQString& message,
bool makeParent=true,
const PropertiesMap&revProps=PropertiesMap()
) throw (ClientException);
@@ -398,7 +398,7 @@ namespace svn
* @param overwrite overwrite existing files
* @param native_eol Either "LF", "CR" or "CRLF" or NULL.
* @param ignore_externals don't process externals definitions as part of this operation.
- * @param recurse if true, export recursively. Otherwise, export just the directory represented by from and its immediate non-directory children.
+ * @param recurse if true, export recursively. Otherwise, export just the directory represented by from and its immediate non-directory tqchildren.
*/
virtual svn_revnum_t
doExport (const Path & srcPath,
@@ -406,7 +406,7 @@ namespace svn
const Revision & revision,
const Revision & peg = Revision::UNDEFINED,
bool overwrite=false,
- const QString&native_eol=QString::null,
+ const TQString&native_eol=TQString(),
bool ignore_externals = false,
svn::Depth depth=svn::DepthInfinity
) throw (ClientException);
@@ -418,7 +418,7 @@ namespace svn
*/
virtual svn_revnum_t
doSwitch (
- const Path & path, const QString& url,
+ const Path & path, const TQString& url,
const Revision & revision,
Depth depth,
const Revision & peg=Revision::UNDEFINED,
@@ -439,8 +439,8 @@ namespace svn
* @exception ClientException
*/
virtual svn::Revision
- import (const Path & path, const QString& url,
- const QString& message,
+ import (const Path & path, const TQString& url,
+ const TQString& message,
svn::Depth depth,
bool no_ignore,bool no_unknown_nodetype,
const PropertiesMap&revProps=PropertiesMap()) throw (ClientException);
@@ -583,7 +583,7 @@ namespace svn
* @return delta between the files
* @exception ClientException
*/
- virtual QByteArray
+ virtual TQByteArray
diff_peg (const Path & tmpPath, const Path & path,const Path&relativeTo,
const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
Depth depth, bool ignoreAncestry,
@@ -596,7 +596,7 @@ namespace svn
/**
* Same as other diff but extra options and changelists always set to empty list.
*/
- virtual QByteArray
+ virtual TQByteArray
diff_peg (const Path & tmpPath, const Path & path,const Path&relativeTo,
const Revision & revision1, const Revision & revision2, const Revision& peg_revision,
Depth depth, bool ignoreAncestry,
@@ -627,7 +627,7 @@ namespace svn
* @return delta between the files
* @exception ClientException
*/
- virtual QByteArray
+ virtual TQByteArray
diff (const Path & tmpPath, const Path & path1,const Path & path2,const Path&relativeTo,
const Revision & revision1, const Revision & revision2,
Depth depth, bool ignoreAncestry,
@@ -640,7 +640,7 @@ namespace svn
/**
* Same as other diff but extra options always set to empty list.
*/
- virtual QByteArray
+ virtual TQByteArray
diff (const Path & tmpPath, const Path & path1,const Path & path2,const Path&relativeTo,
const Revision & revision1, const Revision & revision2,
Depth depth, bool ignoreAncestry,
@@ -693,8 +693,8 @@ namespace svn
* @param recurse
* @return PathPropertiesMapList
*/
- virtual QPair<QLONG,PathPropertiesMapList>
- propget(const QString& propName,
+ virtual TQPair<TQLONG,PathPropertiesMapList>
+ propget(const TQString& propName,
const Path &path,
const Revision &revision,
const Revision &peg,
@@ -713,8 +713,8 @@ namespace svn
* @return PropertiesList
*/
virtual void
- propset(const QString& propName,
- const QString& propValue,
+ propset(const TQString& propName,
+ const TQString& propValue,
const Path &path,
Depth depth=DepthEmpty,
bool skip_check=false,
@@ -733,7 +733,7 @@ namespace svn
* @param recurse
*/
virtual void
- propdel(const QString& propName,
+ propdel(const TQString& propName,
const Path &path,
Depth depth=DepthEmpty,
bool skip_check=false,
@@ -749,7 +749,7 @@ namespace svn
* @param revision
* @return PropertiesList
*/
- virtual QPair<QLONG,PropertiesMap>
+ virtual TQPair<TQLONG,PropertiesMap>
revproplist(const Path &path,
const Revision &revision);
@@ -762,8 +762,8 @@ namespace svn
* @param revision
* @return PropertiesList
*/
- QPair<QLONG,QString>
- revpropget(const QString& propName,
+ TQPair<TQLONG,TQString>
+ revpropget(const TQString& propName,
const Path &path,
const Revision &revision);
@@ -778,9 +778,9 @@ namespace svn
* @param force
* @return Revision
*/
- virtual QLONG
- revpropset(const QString& propName,
- const QString& propValue,
+ virtual TQLONG
+ revpropset(const TQString& propName,
+ const TQString& propValue,
const Path &path,
const Revision &revision,
bool force=false);
@@ -795,8 +795,8 @@ namespace svn
* @param force
* @return Revision
*/
- virtual QLONG
- revpropdel(const QString& propName,
+ virtual TQLONG
+ revpropdel(const TQString& propName,
const Path &path,
const Revision &revision,
bool force=false);
@@ -810,7 +810,7 @@ namespace svn
*/
virtual void
lock (const Targets & targets,
- const QString& message,
+ const TQString& message,
bool steal_lock) throw (ClientException);
/**
* unlock files in repository or working copy
@@ -822,10 +822,10 @@ namespace svn
bool break_lock) throw (ClientException);
virtual void
- url2Revision(const QString&revstring,
+ url2Revision(const TQString&revstring,
Revision&start,Revision&end);
virtual void
- url2Revision(const QString&revstring,
+ url2Revision(const TQString&revstring,
Revision&start);
struct sBaton {
diff --git a/src/svnqt/client_lock.cpp b/src/svnqt/client_lock.cpp
index b70223d..830f215 100644
--- a/src/svnqt/client_lock.cpp
+++ b/src/svnqt/client_lock.cpp
@@ -33,7 +33,7 @@ namespace svn
void
Client_impl::lock (const Targets & targets,
- const QString& message,
+ const TQString& message,
bool steal_lock) throw (ClientException)
{
Pool pool;
diff --git a/src/svnqt/client_ls.cpp b/src/svnqt/client_ls.cpp
index 897a4d8..1af5cc2 100644
--- a/src/svnqt/client_ls.cpp
+++ b/src/svnqt/client_ls.cpp
@@ -99,7 +99,7 @@ namespace svn
dirent = static_cast<svn_dirent_t *>
(apr_hash_get (hash, entryname, item->klen));
- entries.push_back (new DirEntry(QString::FROMUTF8(entryname), dirent));
+ entries.push_back (new DirEntry(TQString::FROMUTF8(entryname), dirent));
}
return entries;
@@ -150,7 +150,7 @@ namespace svn
(apr_hash_get (hash, entryname, item->klen));
lockent = static_cast<svn_lock_t *>
(apr_hash_get(lock_hash,entryname,item->klen));
- entries.push_back (new DirEntry(QString::FROMUTF8(entryname), dirent,lockent));
+ entries.push_back (new DirEntry(TQString::FROMUTF8(entryname), dirent,lockent));
}
return entries;
@@ -172,7 +172,7 @@ namespace svn
if (ctx&&ctx->cancel_func) {
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
}
- entries->push_back(new DirEntry(QString::FROMUTF8(path),dirent,lock));
+ entries->push_back(new DirEntry(TQString::FROMUTF8(path),dirent,lock));
return 0;
}
#endif
diff --git a/src/svnqt/client_modify.cpp b/src/svnqt/client_modify.cpp
index 352760b..c3b7c19 100644
--- a/src/svnqt/client_modify.cpp
+++ b/src/svnqt/client_modify.cpp
@@ -169,7 +169,7 @@ namespace svn
void
Client_impl::add (const Path & path,
- svn::Depth depth,bool force, bool no_ignore, bool add_parents) throw (ClientException)
+ svn::Depth depth,bool force, bool no_ignore, bool add_tqparents) throw (ClientException)
{
Pool pool;
#if ((SVN_VER_MAJOR == 1) && (SVN_VER_MINOR >= 5)) || (SVN_VER_MAJOR > 1)
@@ -178,11 +178,11 @@ namespace svn
internal::DepthToSvn(depth),
force,
no_ignore,
- add_parents,
+ add_tqparents,
*m_context,
pool);
#else
- Q_UNUSED(add_parents);
+ Q_UNUSED(add_tqparents);
svn_error_t * error =
svn_client_add3 (path.cstr (),
depth==DepthInfinity,
@@ -237,7 +237,7 @@ namespace svn
}
svn::Revision
- Client_impl::commit (const Targets & targets, const QString& message,
+ Client_impl::commit (const Targets & targets, const TQString& message,
svn::Depth depth,bool keep_locks,
const svn::StringArray&changelist,
const PropertiesMap&revProps,
@@ -334,7 +334,7 @@ namespace svn
}
Path _dest;
- QString base,dir;
+ TQString base,dir;
for (size_t j=0;j<srcPaths.size();++j)
{
_dest=destPath;
@@ -447,7 +447,7 @@ namespace svn
{
throw ClientException("Multiple sources not allowed");
}
- QString base,dir;
+ TQString base,dir;
Path _dest;
for (size_t j=0;j<srcPaths.size();++j)
{
@@ -464,7 +464,7 @@ namespace svn
svn::Revision
Client_impl::mkdir (const Path & path,
- const QString& message,
+ const TQString& message,
bool makeParent,
const PropertiesMap&revProps
) throw (ClientException)
@@ -475,7 +475,7 @@ namespace svn
svn::Revision
Client_impl::mkdir (const Targets & targets,
- const QString&msg,
+ const TQString&msg,
bool makeParent,
const PropertiesMap&revProps
) throw (ClientException)
@@ -504,7 +504,7 @@ namespace svn
#endif
/* important! otherwise next op on repository uses that logmessage again! */
- m_context->setLogMessage(QString::null);
+ m_context->setLogMessage(TQString());
if(error != NULL)
throw ClientException (error);
@@ -554,14 +554,14 @@ namespace svn
const Revision & revision,
const Revision & peg,
bool overwrite,
- const QString&native_eol,
+ const TQString&native_eol,
bool ignore_externals,
svn::Depth depth) throw (ClientException)
{
Pool pool;
svn_revnum_t revnum = 0;
const char*_neol;
- if (native_eol==QString::null) {
+ if (native_eol==TQString()) {
_neol = (const char*)0;
} else {
_neol = native_eol.TOUTF8();
@@ -601,7 +601,7 @@ namespace svn
svn_revnum_t
Client_impl::doSwitch (
- const Path & path, const QString& url,
+ const Path & path, const TQString& url,
const Revision & revision,
Depth depth,
const Revision & peg,
@@ -650,8 +650,8 @@ namespace svn
Revision
Client_impl::import (const Path & path,
- const QString& url,
- const QString& message,
+ const TQString& url,
+ const TQString& message,
svn::Depth depth,
bool no_ignore,bool no_unknown_nodetype,
const PropertiesMap&revProps
@@ -683,7 +683,7 @@ namespace svn
pool);
#endif
/* important! otherwise next op on repository uses that logmessage again! */
- m_context->setLogMessage(QString::null);
+ m_context->setLogMessage(TQString());
if(error != 0) {
throw ClientException (error);
@@ -696,8 +696,8 @@ namespace svn
void
Client_impl::relocate (const Path & path,
- const QString& from_url,
- const QString& to_url,
+ const TQString& from_url,
+ const TQString& to_url,
bool recurse) throw (ClientException)
{
Pool pool;
diff --git a/src/svnqt/client_property.cpp b/src/svnqt/client_property.cpp
index 6438ff6..7aec642 100644
--- a/src/svnqt/client_property.cpp
+++ b/src/svnqt/client_property.cpp
@@ -69,10 +69,10 @@ namespace svn
void *val;
apr_hash_this (hi, &key, NULL, &val);
- prop_map[ QString::FROMUTF8( (const char *)key ) ] =
- QString::FROMUTF8( ((const svn_string_t *)val)->data );
+ prop_map[ TQString::FROMUTF8( (const char *)key ) ] =
+ TQString::FROMUTF8( ((const svn_string_t *)val)->data );
}
- mapList->push_back(PathPropertiesMapEntry(QString::FROMUTF8(path), prop_map ));
+ mapList->push_back(PathPropertiesMapEntry(TQString::FROMUTF8(path), prop_map ));
return 0;
}
@@ -138,18 +138,18 @@ namespace svn
void *val;
apr_hash_this (hi, &key, NULL, &val);
- prop_map[ QString::FROMUTF8( (const char *)key ) ] =
- QString::FROMUTF8( ((const svn_string_t *)val)->data );
+ prop_map[ TQString::FROMUTF8( (const char *)key ) ] =
+ TQString::FROMUTF8( ((const svn_string_t *)val)->data );
}
- path_prop_map_list->push_back( PathPropertiesMapEntry( QString::FROMUTF8(item->node_name->data), prop_map ) );
+ path_prop_map_list->push_back( PathPropertiesMapEntry( TQString::FROMUTF8(item->node_name->data), prop_map ) );
}
#endif
return path_prop_map_list;
}
- QPair<QLONG,PathPropertiesMapList>
- Client_impl::propget(const QString& propName,
+ TQPair<TQLONG,PathPropertiesMapList>
+ Client_impl::propget(const TQString& propName,
const Path &path,
const Revision &revision,
const Revision &peg,
@@ -205,16 +205,16 @@ namespace svn
void *val;
apr_hash_this (hi, &key, NULL, &val);
- prop_map[propName] = QString::FROMUTF8( ((const svn_string_t *)val)->data );
- path_prop_map_list.push_back( PathPropertiesMapEntry(QString::FROMUTF8((const char *)key), prop_map ) );
+ prop_map[propName] = TQString::FROMUTF8( ((const svn_string_t *)val)->data );
+ path_prop_map_list.push_back( PathPropertiesMapEntry(TQString::FROMUTF8((const char *)key), prop_map ) );
}
- return QPair<QLONG,PathPropertiesMapList>(actual,path_prop_map_list);
+ return TQPair<TQLONG,PathPropertiesMapList>(actual,path_prop_map_list);
}
void
- Client_impl::propset(const QString& propName,
- const QString& propValue,
+ Client_impl::propset(const TQString& propName,
+ const TQString& propValue,
const Path &path,
Depth depth,
bool skip_checks,
@@ -261,14 +261,14 @@ namespace svn
}
void
- Client_impl::propdel(const QString& propName,
+ Client_impl::propdel(const TQString& propName,
const Path &path,
Depth depth,
bool skip_checks,
const Revision&base_revision,
const StringArray&changelists)
{
- propset(propName,QString::null,path,depth,skip_checks,base_revision,changelists);
+ propset(propName,TQString(),path,depth,skip_checks,base_revision,changelists);
}
//--------------------------------------------------------------------------------
@@ -285,7 +285,7 @@ namespace svn
* @param recurse
* @return PropertiesList
*/
- QPair<QLONG,PropertiesMap>
+ TQPair<TQLONG,PropertiesMap>
Client_impl::revproplist(const Path &path,
const Revision &revision)
{
@@ -315,10 +315,10 @@ namespace svn
void *val;
apr_hash_this (hi, &key, NULL, &val);
- prop_map[ QString::FROMUTF8( (const char *)key ) ] = QString::FROMUTF8( ((const svn_string_t *)val)->data );
+ prop_map[ TQString::FROMUTF8( (const char *)key ) ] = TQString::FROMUTF8( ((const svn_string_t *)val)->data );
}
- return QPair<QLONG,PropertiesMap>( revnum, prop_map );
+ return TQPair<TQLONG,PropertiesMap>( revnum, prop_map );
}
/**
@@ -331,8 +331,8 @@ namespace svn
* @return PropertiesList
*/
- QPair<QLONG,QString>
- Client_impl::revpropget(const QString& propName,
+ TQPair<TQLONG,TQString>
+ Client_impl::revpropget(const TQString& propName,
const Path &path,
const Revision &revision)
{
@@ -356,9 +356,9 @@ namespace svn
// if the property does not exist NULL is returned
if( propval == NULL )
- return QPair<QLONG,QString>( 0, QString() );
+ return TQPair<TQLONG,TQString>( 0, TQString() );
- return QPair<QLONG,QString>( revnum, QString::FROMUTF8(propval->data) );
+ return TQPair<TQLONG,TQString>( revnum, TQString::FROMUTF8(propval->data) );
}
/**
@@ -373,9 +373,9 @@ namespace svn
* @param revprop
* @return PropertiesList
*/
- QLONG
- Client_impl::revpropset(const QString& propName,
- const QString& propValue,
+ TQLONG
+ Client_impl::revpropset(const TQString& propName,
+ const TQString& propValue,
const Path &path,
const Revision &revision,
bool force)
@@ -416,8 +416,8 @@ namespace svn
* @param revprop
* @return PropertiesList
*/
- QLONG
- Client_impl::revpropdel(const QString& propName,
+ TQLONG
+ Client_impl::revpropdel(const TQString& propName,
const Path &path,
const Revision &revision,
bool force)
diff --git a/src/svnqt/client_status.cpp b/src/svnqt/client_status.cpp
index 17f51e6..c004b0f 100644
--- a/src/svnqt/client_status.cpp
+++ b/src/svnqt/client_status.cpp
@@ -66,8 +66,8 @@ namespace svn
Client_impl::sBaton * l_baton = (Client_impl::sBaton*)baton;
LogEntries * entries =
(LogEntries *) l_baton->m_data;
- QLIST<QLONG>*rstack=
- (QLIST<QLONG>*)l_baton->m_revstack;
+ TQLIST<TQLONG>*rstack=
+ (TQLIST<TQLONG>*)l_baton->m_revstack;
Context*l_context = l_baton->m_context;
svn_client_ctx_t*ctx = l_context->ctx();
if (ctx&&ctx->cancel_func) {
@@ -152,8 +152,8 @@ namespace svn
LogEntriesMap * entries =
(LogEntriesMap *) l_baton->m_data;
Context*l_context = l_baton->m_context;
- QLIST<QLONG>*rstack=
- (QLIST<QLONG>*)l_baton->m_revstack;
+ TQLIST<TQLONG>*rstack=
+ (TQLIST<TQLONG>*)l_baton->m_revstack;
svn_client_ctx_t*ctx = l_context->ctx();
if (ctx&&ctx->cancel_func) {
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
@@ -269,7 +269,7 @@ namespace svn
}
static StatusEntries
- localStatus (const Path& path,
+ localtqStatus (const Path& path,
Depth depth,
const bool get_all,
const bool update,
@@ -342,28 +342,28 @@ namespace svn
status = (svn_wc_status2_t *) item->value;
filePath = (const char *) item->key;
- entries.push_back (StatusPtr(new Status(filePath, status)));
+ entries.push_back (StatusPtr(new tqStatus(filePath, status)));
}
return entries;
}
static StatusPtr
- dirEntryToStatus (const Path& path, DirEntryPtr dirEntry)
+ dirEntryTotqStatus (const Path& path, DirEntryPtr dirEntry)
{
- QString url = path.path();
- url += QString::FROMUTF8("/");
+ TQString url = path.path();
+ url += TQString::FROMUTF8("/");
url += dirEntry->name();
- return StatusPtr(new Status (url, dirEntry));
+ return StatusPtr(new tqStatus (url, dirEntry));
}
static StatusPtr
- infoEntryToStatus(const Path&,const InfoEntry&infoEntry)
+ infoEntryTotqStatus(const Path&,const InfoEntry&infoEntry)
{
- return StatusPtr(new Status(infoEntry.url(),infoEntry));
+ return StatusPtr(new tqStatus(infoEntry.url(),infoEntry));
}
static StatusEntries
- remoteStatus (Client * client,
+ remotetqStatus (Client * client,
const Path& path,
Depth depth,
const bool ,
@@ -377,15 +377,15 @@ namespace svn
DirEntries::const_iterator it;
StatusEntries entries;
- QString url = path.path();
- url+=QString::FROMUTF8("/");
+ TQString url = path.path();
+ url+=TQString::FROMUTF8("/");
for (it = dirEntries.begin (); it != dirEntries.end (); it++)
{
DirEntryPtr dirEntry = *it;
if (dirEntry->name().isEmpty())
continue;
- entries.push_back(dirEntryToStatus (path, dirEntry));
+ entries.push_back(dirEntryTotqStatus (path, dirEntry));
}
return entries;
}
@@ -402,16 +402,16 @@ namespace svn
const StringArray & changelists) throw (ClientException)
{
if (Url::isValid (path.path())) {
- return remoteStatus (this, path, depth, get_all, update,
+ return remotetqStatus (this, path, depth, get_all, update,
no_ignore,revision,m_context,detailed_remote);
} else {
- return localStatus (path, depth, get_all, update,
+ return localtqStatus (path, depth, get_all, update,
no_ignore, hide_externals,changelists, m_context);
}
}
static StatusPtr
- localSingleStatus (const Path& path, Context * context,bool update=false)
+ localSingletqStatus (const Path& path, Context * context,bool update=false)
{
svn_error_t *error;
apr_hash_t *status_hash;
@@ -470,26 +470,26 @@ namespace svn
status = (svn_wc_status2_t *) item->value;
filePath = (const char *) item->key;
- return StatusPtr(new Status (filePath, status));
+ return StatusPtr(new tqStatus (filePath, status));
};
static StatusPtr
- remoteSingleStatus (Client * client, const Path& path,const Revision revision, Context * )
+ remoteSingletqStatus (Client * client, const Path& path,const Revision revision, Context * )
{
InfoEntries infoEntries = client->info(path,DepthEmpty,revision,Revision(Revision::UNDEFINED));
if (infoEntries.size () == 0)
- return StatusPtr(new Status());
+ return StatusPtr(new tqStatus());
else
- return infoEntryToStatus (path, infoEntries [0]);
+ return infoEntryTotqStatus (path, infoEntries [0]);
}
StatusPtr
- Client_impl::singleStatus (const Path& path,bool update,const Revision revision) throw (ClientException)
+ Client_impl::singletqStatus (const Path& path,bool update,const Revision revision) throw (ClientException)
{
if (Url::isValid (path.path()))
- return remoteSingleStatus (this, path,revision, m_context);
+ return remoteSingletqStatus (this, path,revision, m_context);
else
- return localSingleStatus (path, m_context,update);
+ return localSingletqStatus (path, m_context,update);
}
bool
@@ -506,7 +506,7 @@ namespace svn
Targets target(path);
Pool pool;
sBaton l_baton;
- QLIST<QLONG> revstack;
+ TQLIST<TQLONG> revstack;
l_baton.m_context=m_context;
l_baton.m_data = &log_target;
l_baton.m_revstack = &revstack;
@@ -579,7 +579,7 @@ namespace svn
Targets target(path);
Pool pool;
LogEntriesPtr entries = LogEntriesPtr(new LogEntries ());
- QLIST<QLONG> revstack;
+ TQLIST<TQLONG> revstack;
sBaton l_baton;
l_baton.m_context=m_context;
l_baton.m_data = entries;
@@ -664,7 +664,7 @@ namespace svn
svn_opt_revision_t pegr;
const char *truepath = 0;
bool internal_peg = false;
- QByteArray _buf = _p.cstr();
+ TQByteArray _buf = _p.cstr();
error = svn_opt_parse_path(&pegr, &truepath,
_buf,
diff --git a/src/svnqt/commititem.cpp b/src/svnqt/commititem.cpp
index 432e70e..e39a2c4 100644
--- a/src/svnqt/commititem.cpp
+++ b/src/svnqt/commititem.cpp
@@ -28,15 +28,15 @@ CommitItem::CommitItem(const svn_client_commit_item_t*_item)
{
init();
if (_item) {
- m_Path = QString::FROMUTF8(_item->path);
+ m_Path = TQString::FROMUTF8(_item->path);
m_Kind = _item->kind;
- m_Url = QString::FROMUTF8(_item->url);
+ m_Url = TQString::FROMUTF8(_item->url);
if (_item->state_flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY) {
m_CopyFromRevision = _item->revision;
} else {
m_Revision = _item->revision;
}
- m_CopyFromUrl = QString::FROMUTF8(_item->copyfrom_url);
+ m_CopyFromUrl = TQString::FROMUTF8(_item->copyfrom_url);
m_State = _item->state_flags;
convertprop(_item->wcprop_changes);
}
@@ -47,12 +47,12 @@ CommitItem::CommitItem(const svn_client_commit_item2_t*_item)
init();
if (_item) {
- m_Path = QString::FROMUTF8(_item->path);
+ m_Path = TQString::FROMUTF8(_item->path);
m_Kind = _item->kind;
- m_Url = QString::FROMUTF8(_item->url);
+ m_Url = TQString::FROMUTF8(_item->url);
m_Revision = _item->revision;
m_CopyFromRevision = _item->copyfrom_rev;
- m_CopyFromUrl = QString::FROMUTF8(_item->copyfrom_url);
+ m_CopyFromUrl = TQString::FROMUTF8(_item->copyfrom_url);
m_State = _item->state_flags;
convertprop(_item->wcprop_changes);
}
@@ -64,12 +64,12 @@ CommitItem::CommitItem(const svn_client_commit_item3_t*_item)
if (_item) {
#if ((SVN_VER_MAJOR == 1) && (SVN_VER_MINOR >= 5)) || (SVN_VER_MAJOR > 1)
- m_Path = QString::FROMUTF8(_item->path);
+ m_Path = TQString::FROMUTF8(_item->path);
m_Kind = _item->kind;
- m_Url = QString::FROMUTF8(_item->url);
+ m_Url = TQString::FROMUTF8(_item->url);
m_Revision = _item->revision;
m_CopyFromRevision = _item->copyfrom_rev;
- m_CopyFromUrl = QString::FROMUTF8(_item->copyfrom_url);
+ m_CopyFromUrl = TQString::FROMUTF8(_item->copyfrom_url);
m_State = _item->state_flags;
convertprop(_item->incoming_prop_changes);
if (_item->outgoing_prop_changes)
@@ -89,7 +89,7 @@ void CommitItem::convertprop(apr_array_header_t * list)
for (int j = 0; j < list->nelts; ++j) {
svn_prop_t * item = ((svn_prop_t **)list->elts)[j];
if (!item) continue;
- m_CommitProperties[QString::FROMUTF8(item->name)]=QString::FROMUTF8(item->value->data,item->value->len);
+ m_CommitProperties[TQString::FROMUTF8(item->name)]=TQString::FROMUTF8(item->value->data,item->value->len);
}
}
@@ -105,17 +105,17 @@ CommitItem::~CommitItem()
{
}
-const QString& CommitItem::path()const
+const TQString& CommitItem::path()const
{
return m_Path;
}
-const QString& CommitItem::url()const
+const TQString& CommitItem::url()const
{
return m_Url;
}
-const QString& CommitItem::copyfromurl()const
+const TQString& CommitItem::copyfromurl()const
{
return m_CopyFromUrl;
}
diff --git a/src/svnqt/commititem.hpp b/src/svnqt/commititem.hpp
index fc12def..5951e6f 100644
--- a/src/svnqt/commititem.hpp
+++ b/src/svnqt/commititem.hpp
@@ -37,7 +37,7 @@ namespace svn {
/**
@author Rajko Albrecht <ral@alwins-world.de>
*/
-class SVNQT_EXPORT CommitItem{
+class SVNTQT_EXPORT CommitItem{
private:
void init();
@@ -45,7 +45,7 @@ private:
protected:
PropertiesMap m_CommitProperties;
- QString m_Path,m_Url,m_CopyFromUrl;
+ TQString m_Path,m_Url,m_CopyFromUrl;
svn_node_kind_t m_Kind;
svn_revnum_t m_Revision,m_CopyFromRevision;
apr_byte_t m_State;
@@ -68,9 +68,9 @@ public:
*/
~CommitItem();
- const QString& path()const;
- const QString& url()const;
- const QString& copyfromurl()const;
+ const TQString& path()const;
+ const TQString& url()const;
+ const TQString& copyfromurl()const;
const PropertiesMap& properties()const;
svn_revnum_t revision()const;
svn_revnum_t copyfromrevision()const;
@@ -91,11 +91,7 @@ public:
char actionType()const;
};
-#if QT_VERSION < 0x040000
- typedef QValueList<CommitItem> CommitItemList;
-#else
- typedef QList<CommitItem> CommitItemList;
-#endif
+ typedef TQValueList<CommitItem> CommitItemList;
}
#endif
diff --git a/src/svnqt/conflictdescription.cpp b/src/svnqt/conflictdescription.cpp
index bbf059a..732a566 100644
--- a/src/svnqt/conflictdescription.cpp
+++ b/src/svnqt/conflictdescription.cpp
@@ -43,13 +43,13 @@ ConflictDescription::ConflictDescription(const svn_wc_conflict_description_t*con
if (!conflict) {
return;
}
- m_baseFile=QString::FROMUTF8(conflict->base_file);
- m_mergedFile=QString::FROMUTF8(conflict->merged_file);
- m_mimeType=QString::FROMUTF8(conflict->mime_type);
- m_myFile=QString::FROMUTF8(conflict->my_file);
- m_Path=QString::FROMUTF8(conflict->path);
- m_propertyName=QString::FROMUTF8(conflict->property_name);
- m_theirFile=QString::FROMUTF8(conflict->their_file);
+ m_baseFile=TQString::FROMUTF8(conflict->base_file);
+ m_mergedFile=TQString::FROMUTF8(conflict->merged_file);
+ m_mimeType=TQString::FROMUTF8(conflict->mime_type);
+ m_myFile=TQString::FROMUTF8(conflict->my_file);
+ m_Path=TQString::FROMUTF8(conflict->path);
+ m_propertyName=TQString::FROMUTF8(conflict->property_name);
+ m_theirFile=TQString::FROMUTF8(conflict->their_file);
switch(conflict->action) {
case svn_wc_conflict_action_edit:
m_action=ConflictEdit;
@@ -105,7 +105,7 @@ svn::ConflictDescription::ConflictAction svn::ConflictDescription::action() cons
return m_action;
}
-const QString&svn::ConflictDescription::baseFile() const
+const TQString&svn::ConflictDescription::baseFile() const
{
return m_baseFile;
}
@@ -116,7 +116,7 @@ const QString&svn::ConflictDescription::baseFile() const
*/
void svn::ConflictDescription::init()
{
- m_baseFile=m_Path=m_mergedFile=m_propertyName=m_theirFile=m_myFile=m_mimeType=QString::null;
+ m_baseFile=m_Path=m_mergedFile=m_propertyName=m_theirFile=m_myFile=m_mimeType=TQString();
m_action=ConflictEdit;
m_Type=ConflictText;
m_reason=ReasonEdited;
@@ -131,19 +131,19 @@ bool svn::ConflictDescription::binary() const
}
-const QString& svn::ConflictDescription::mergedFile() const
+const TQString& svn::ConflictDescription::mergedFile() const
{
return m_mergedFile;
}
-const QString& svn::ConflictDescription::mimeType() const
+const TQString& svn::ConflictDescription::mimeType() const
{
return m_mimeType;
}
-const QString& svn::ConflictDescription::myFile() const
+const TQString& svn::ConflictDescription::myFile() const
{
return m_myFile;
}
@@ -155,13 +155,13 @@ svn_node_kind_t svn::ConflictDescription::nodeKind() const
}
-const QString& svn::ConflictDescription::Path() const
+const TQString& svn::ConflictDescription::Path() const
{
return m_Path;
}
-const QString& svn::ConflictDescription::propertyName() const
+const TQString& svn::ConflictDescription::propertyName() const
{
return m_propertyName;
}
@@ -173,7 +173,7 @@ svn::ConflictDescription::ConflictReason svn::ConflictDescription::reason() cons
}
-const QString& svn::ConflictDescription::theirFile() const
+const TQString& svn::ConflictDescription::theirFile() const
{
return m_theirFile;
}
diff --git a/src/svnqt/conflictdescription.hpp b/src/svnqt/conflictdescription.hpp
index 3f72562..8452b3a 100644
--- a/src/svnqt/conflictdescription.hpp
+++ b/src/svnqt/conflictdescription.hpp
@@ -26,7 +26,7 @@ struct svn_wc_conflict_description_t;
#include "svnqt/svnqt_defines.hpp"
#include <svn_types.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace svn {
@@ -35,7 +35,7 @@ namespace svn {
* @since subversion 1.5
* @author Rajko Albrecht
*/
-class SVNQT_EXPORT ConflictDescription
+class SVNTQT_EXPORT ConflictDescription
{
public:
enum ConflictType {
@@ -63,13 +63,13 @@ public:
ConflictReason reason() const;
svn_node_kind_t nodeKind() const;
bool binary() const;
- const QString& baseFile() const;
- const QString& theirFile() const;
- const QString& propertyName() const;
- const QString& Path() const;
- const QString& myFile() const;
- const QString& mimeType() const;
- const QString& mergedFile() const;
+ const TQString& baseFile() const;
+ const TQString& theirFile() const;
+ const TQString& propertyName() const;
+ const TQString& Path() const;
+ const TQString& myFile() const;
+ const TQString& mimeType() const;
+ const TQString& mergedFile() const;
protected:
//! don't use it.
@@ -81,13 +81,13 @@ protected:
ConflictAction m_action;
ConflictType m_Type;
ConflictReason m_reason;
- QString m_baseFile;
- QString m_mergedFile;
- QString m_mimeType;
- QString m_myFile;
- QString m_Path;
- QString m_propertyName;
- QString m_theirFile;
+ TQString m_baseFile;
+ TQString m_mergedFile;
+ TQString m_mimeType;
+ TQString m_myFile;
+ TQString m_Path;
+ TQString m_propertyName;
+ TQString m_theirFile;
svn_node_kind_t m_nodeKind;
};
diff --git a/src/svnqt/conflictresult.cpp b/src/svnqt/conflictresult.cpp
index 0465e33..4e8fd94 100644
--- a/src/svnqt/conflictresult.cpp
+++ b/src/svnqt/conflictresult.cpp
@@ -27,7 +27,7 @@
namespace svn
{
ConflictResult::ConflictResult()
- :m_choice(ChooseMerged),m_MergedFile(QString::null)
+ :m_choice(ChooseMerged),m_MergedFile(TQString())
{
}
@@ -62,16 +62,16 @@ namespace svn
break;
}
if (aResult->merged_file) {
- m_MergedFile=QString::FROMUTF8(aResult->merged_file);
+ m_MergedFile=TQString::FROMUTF8(aResult->merged_file);
} else {
- m_MergedFile=QString::null;
+ m_MergedFile=TQString();
}
#else
Q_UNUSED(aResult);
#endif
}
- void ConflictResult::setMergedFile(const QString&aMergedfile) {
+ void ConflictResult::setMergedFile(const TQString&aMergedfile) {
m_MergedFile=aMergedfile;
}
diff --git a/src/svnqt/conflictresult.hpp b/src/svnqt/conflictresult.hpp
index 0dfb426..2b72afb 100644
--- a/src/svnqt/conflictresult.hpp
+++ b/src/svnqt/conflictresult.hpp
@@ -27,11 +27,11 @@ struct svn_wc_conflict_result_t;
#include "svnqt/svnqt_defines.hpp"
#include <svn_types.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace svn {
-class SVNQT_EXPORT ConflictResult
+class SVNTQT_EXPORT ConflictResult
{
public:
enum ConflictChoice {
@@ -50,11 +50,11 @@ class SVNQT_EXPORT ConflictResult
*/
ConflictResult(const svn_wc_conflict_result_t*);
- const QString& mergedFile()const
+ const TQString& mergedFile()const
{
return m_MergedFile;
}
- void setMergedFile(const QString&aMergedfile);
+ void setMergedFile(const TQString&aMergedfile);
ConflictChoice choice()const
{
@@ -70,7 +70,7 @@ class SVNQT_EXPORT ConflictResult
//! Merged file
/*! will only used if m_choice is ChooseMerged
*/
- QString m_MergedFile;
+ TQString m_MergedFile;
};
}
diff --git a/src/svnqt/context.cpp b/src/svnqt/context.cpp
index 56f35c0..cc68fbc 100644
--- a/src/svnqt/context.cpp
+++ b/src/svnqt/context.cpp
@@ -45,7 +45,7 @@
namespace svn
{
- Context::Context (const QString &configDir)
+ Context::Context (const TQString &configDir)
: ref_count()
{
m = new ContextData (configDir);
@@ -70,7 +70,7 @@ namespace svn
}
void
- Context::setLogin (const QString& username, const QString& password)
+ Context::setLogin (const TQString& username, const TQString& password)
{
m->setLogin (username, password);
}
@@ -87,24 +87,24 @@ namespace svn
}
void
- Context::setLogMessage (const QString& msg)
+ Context::setLogMessage (const TQString& msg)
{
m->setLogMessage (msg);
}
- const QString&
+ const TQString&
Context::getUsername () const
{
return m->getUsername ();
}
- const QString&
+ const TQString&
Context::getPassword () const
{
return m->getPassword ();
}
- const QString&
+ const TQString&
Context::getLogMessage () const
{
return m->getLogMessage ();
diff --git a/src/svnqt/context.hpp b/src/svnqt/context.hpp
index b45cb1c..04193d3 100644
--- a/src/svnqt/context.hpp
+++ b/src/svnqt/context.hpp
@@ -34,7 +34,7 @@
#include "svnqt/svnqt_defines.hpp"
// qt
-#include <qstring.h>
+#include <tqstring.h>
// Subversion api
#include "svn_client.h"
@@ -55,7 +55,7 @@ namespace svn
* and replace the old notification and baton
* stuff
*/
- class SVNQT_EXPORT Context:public ref_count
+ class SVNTQT_EXPORT Context:public ref_count
{
public:
/**
@@ -65,7 +65,7 @@ namespace svn
* subversion api stores its
* configuration
*/
- Context (const QString & configDir=QString::null);
+ Context (const TQString & configDir=TQString());
/**
* copy constructor
@@ -89,7 +89,7 @@ namespace svn
/**
* set username/password for authentication
*/
- void setLogin (const QString& username, const QString& password);
+ void setLogin (const TQString& username, const TQString& password);
/**
* operator to get svn_client_ctx object
@@ -112,14 +112,14 @@ namespace svn
*
* @param msg
*/
- void setLogMessage (const QString& msg);
+ void setLogMessage (const TQString& msg);
/**
* get log message
*
* @return log message
*/
- const QString&
+ const TQString&
getLogMessage () const;
/**
@@ -127,7 +127,7 @@ namespace svn
*
* @return username
*/
- const QString&
+ const TQString&
getUsername () const;
/**
@@ -135,7 +135,7 @@ namespace svn
*
* @return password
*/
- const QString&
+ const TQString&
getPassword () const;
/**
diff --git a/src/svnqt/context_listener.hpp b/src/svnqt/context_listener.hpp
index 8383724..1c2ab2e 100644
--- a/src/svnqt/context_listener.hpp
+++ b/src/svnqt/context_listener.hpp
@@ -36,7 +36,7 @@
#include "svnqt/commititem.hpp"
#include "svnqt/svnqt_defines.hpp"
// qt
-#include <qstring.h>
+#include <tqstring.h>
// Subversion api
#include <svn_client.h>
@@ -51,7 +51,7 @@ namespace svn
* To use this you will have to inherit from this
* interface and overwrite the virtual methods.
*/
- class SVNQT_EXPORT ContextListener
+ class SVNTQT_EXPORT ContextListener
{
public:
/**
@@ -71,9 +71,9 @@ namespace svn
* @retval true continue
*/
virtual bool
- contextGetLogin (const QString & realm,
- QString & username,
- QString & password,
+ contextGetLogin (const TQString & realm,
+ TQString & username,
+ TQString & password,
bool & maySave) = 0;
/**
* this method will be called to retrieve
@@ -87,9 +87,9 @@ namespace svn
* @retval true continue
*/
virtual bool
- contextGetSavedLogin(const QString & realm,
- QString & username,
- QString & password) = 0;
+ contextGetSavedLogin(const TQString & realm,
+ TQString & username,
+ TQString & password) = 0;
/**
* this method will be called to retrieve
* authentication information stored not persistent. This
@@ -102,9 +102,9 @@ namespace svn
* @retval true continue
*/
virtual bool
- contextGetCachedLogin(const QString & realm,
- QString & username,
- QString & password) = 0;
+ contextGetCachedLogin(const TQString & realm,
+ TQString & username,
+ TQString & password) = 0;
/**
* this method will be called to notify about
@@ -157,7 +157,7 @@ namespace svn
* @retval true continue
*/
virtual bool
- contextGetLogMessage (QString & msg,const CommitItemList&) = 0;
+ contextGetLogMessage (TQString & msg,const CommitItemList&) = 0;
typedef enum
{
@@ -178,12 +178,12 @@ namespace svn
const apr_uint32_t failures;
/** certificate information */
- QString hostname;
- QString fingerprint;
- QString validFrom;
- QString validUntil;
- QString issuerDName;
- QString realm;
+ TQString hostname;
+ TQString fingerprint;
+ TQString validFrom;
+ TQString validUntil;
+ TQString issuerDName;
+ TQString realm;
bool maySave;
SslServerTrustData (const apr_uint32_t failures_)
@@ -212,7 +212,7 @@ namespace svn
* information
*/
virtual bool
- contextSslClientCertPrompt (QString & certFile) = 0;
+ contextSslClientCertPrompt (TQString & certFile) = 0;
/**
* this method is called to retrieve the password
@@ -223,8 +223,8 @@ namespace svn
* @param maySave
*/
virtual bool
- contextSslClientCertPwPrompt (QString & password,
- const QString & realm,
+ contextSslClientCertPwPrompt (TQString & password,
+ const TQString & realm,
bool & maySave) = 0;
/**
* this method is called to retrieve the password
@@ -234,7 +234,7 @@ namespace svn
* @param realm
*/
virtual bool
- contextLoadSslClientCertPw(QString&password,const QString&realm)=0;
+ contextLoadSslClientCertPw(TQString&password,const TQString&realm)=0;
virtual void
contextProgress(long long int current, long long int max) = 0;
@@ -246,7 +246,7 @@ namespace svn
* @param what text to translate
* @return translated text or origin.
*/
- virtual QString translate(const QString&what){return what;}
+ virtual TQString translate(const TQString&what){return what;}
/** Callback for svn_wc_conflict_resolver_func_t in subversion 1.5
* This method is only useful when build with subverion 1.5 or above. The default implementation sets
diff --git a/src/svnqt/contextdata.cpp b/src/svnqt/contextdata.cpp
index b4c2ea4..4bbfabc 100644
--- a/src/svnqt/contextdata.cpp
+++ b/src/svnqt/contextdata.cpp
@@ -29,7 +29,7 @@
namespace svn {
-ContextData::ContextData(const QString & configDir_)
+ContextData::ContextData(const TQString & configDir_)
: listener (0), logIsSet (false),
m_promptCounter (0), m_ConfigDir(configDir_)
{
@@ -203,7 +203,7 @@ ContextData::ContextData(const QString & configDir_)
m_ctx->conflict_func = onWcConflictResolver;
m_ctx->conflict_baton = this;
- m_ctx->client_name = "SvnQt wrapper client";
+ m_ctx->client_name = "SvnTQt wrapper client";
initMimeTypes();
#endif
}
@@ -214,12 +214,12 @@ ContextData::~ContextData()
}
-const QString&ContextData::getLogMessage () const
+const TQString&ContextData::getLogMessage () const
{
return logMessage;
}
-bool ContextData::retrieveLogMessage (QString & msg,const CommitItemList&_itemlist)
+bool ContextData::retrieveLogMessage (TQString & msg,const CommitItemList&_itemlist)
{
bool ok = false;
if (listener) {
@@ -262,12 +262,12 @@ bool ContextData::cancel()
return false;
}
}
-const QString& ContextData::getUsername () const
+const TQString& ContextData::getUsername () const
{
return username;
}
-const QString& ContextData::getPassword() const
+const TQString& ContextData::getPassword() const
{
return password;
}
@@ -281,8 +281,8 @@ bool ContextData::retrieveLogin (const char * username_,
if (listener == 0)
return false;
- username = QString::FROMUTF8(username_);
- ok = listener->contextGetLogin(QString::FROMUTF8(realm),username, password, may_save);
+ username = TQString::FROMUTF8(username_);
+ ok = listener->contextGetLogin(TQString::FROMUTF8(realm),username, password, may_save);
return ok;
}
@@ -297,8 +297,8 @@ bool ContextData::retrieveSavedLogin (const char * username_,
if (listener == 0)
return false;
- username = QString::FROMUTF8(username_);
- ok = listener->contextGetSavedLogin(QString::FROMUTF8(realm),username, password);
+ username = TQString::FROMUTF8(username_);
+ ok = listener->contextGetSavedLogin(TQString::FROMUTF8(realm),username, password);
return ok;
}
@@ -312,8 +312,8 @@ bool ContextData::retrieveCachedLogin (const char * username_,
if (listener == 0)
return false;
- username = QString::FROMUTF8(username_);
- ok = listener->contextGetCachedLogin(QString::FROMUTF8(realm),username, password);
+ username = TQString::FROMUTF8(username_);
+ ok = listener->contextGetCachedLogin(TQString::FROMUTF8(realm),username, password);
return ok;
}
@@ -322,7 +322,7 @@ svn_client_ctx_t *ContextData::ctx()
return m_ctx;
}
-const QString&ContextData::configDir()const
+const TQString&ContextData::configDir()const
{
return m_ConfigDir;
}
@@ -354,7 +354,7 @@ void ContextData::setAuthCache(bool value)
SVN_AUTH_PARAM_NO_AUTH_CACHE,param);
}
-void ContextData::setLogin(const QString& usr, const QString& pwd)
+void ContextData::setLogin(const TQString& usr, const TQString& pwd)
{
username = usr;
password = pwd;
@@ -363,7 +363,7 @@ void ContextData::setLogin(const QString& usr, const QString& pwd)
svn_auth_set_parameter (ab, SVN_AUTH_PARAM_DEFAULT_PASSWORD, password.TOUTF8());
}
-void ContextData::setLogMessage (const QString& msg)
+void ContextData::setLogMessage (const TQString& msg)
{
logMessage = msg;
if (msg.isNull()) {
@@ -382,7 +382,7 @@ svn_error_t *ContextData::onLogMsg (const char **log_msg,
ContextData * data = 0;
SVN_ERR (getContextData (baton, &data));
- QString msg;
+ TQString msg;
if (data->logIsSet) {
msg = data->getLogMessage ();
} else {
@@ -410,7 +410,7 @@ svn_error_t *ContextData::onLogMsg2 (const char **log_msg,
ContextData * data = 0;
SVN_ERR (getContextData (baton, &data));
- QString msg;
+ TQString msg;
if (data->logIsSet) {
msg = data->getLogMessage ();
} else {
@@ -440,7 +440,7 @@ svn_error_t *ContextData::onLogMsg3 (const char **log_msg,
ContextData * data = 0;
SVN_ERR (getContextData (baton, &data));
- QString msg;
+ TQString msg;
if (data->logIsSet) {
msg = data->getLogMessage ();
} else {
@@ -508,7 +508,7 @@ svn_error_t *ContextData::onCachedPrompt(svn_auth_cred_simple_t **cred,
return SVN_NO_ERROR;
svn_auth_cred_simple_t* lcred = (svn_auth_cred_simple_t*)
apr_palloc (pool, sizeof (svn_auth_cred_simple_t));
- QByteArray l;
+ TQByteArray l;
l = data->getPassword().TOUTF8();
lcred->password = apr_pstrndup (pool,l,l.size());
l = data->getUsername().TOUTF8();
@@ -535,7 +535,7 @@ svn_error_t *ContextData::onSavedPrompt(svn_auth_cred_simple_t **cred,
return SVN_NO_ERROR;
svn_auth_cred_simple_t* lcred = (svn_auth_cred_simple_t*)
apr_palloc (pool, sizeof (svn_auth_cred_simple_t));
- QByteArray l;
+ TQByteArray l;
l = data->getPassword().TOUTF8();
lcred->password = apr_pstrndup (pool,l,l.size());
l = data->getUsername().TOUTF8();
@@ -563,7 +563,7 @@ svn_error_t *ContextData::onSimplePrompt (svn_auth_cred_simple_t **cred,
svn_auth_cred_simple_t* lcred = (svn_auth_cred_simple_t*)
apr_palloc (pool, sizeof (svn_auth_cred_simple_t));
- QByteArray l;
+ TQByteArray l;
l = data->getPassword().TOUTF8();
lcred->password = apr_pstrndup (pool,l,l.size());
l = data->getUsername().TOUTF8();
@@ -630,7 +630,7 @@ svn_error_t * ContextData::onSslClientCertPrompt (svn_auth_cred_ssl_client_cert_
ContextData * data = 0;
SVN_ERR (getContextData (baton, &data));
- QString certFile;
+ TQString certFile;
if (!data->listener->contextSslClientCertPrompt (certFile))
return data->generate_cancel_error();
@@ -654,9 +654,9 @@ svn_error_t *ContextData::onFirstSslClientCertPw (
ContextData * data = 0;
SVN_ERR (getContextData (baton, &data));
- QString password;
+ TQString password;
bool may_save = maySave != 0;
- if (!data->listener->contextLoadSslClientCertPw(password, QString::FROMUTF8(realm)))
+ if (!data->listener->contextLoadSslClientCertPw(password, TQString::FROMUTF8(realm)))
return SVN_NO_ERROR;
svn_auth_cred_ssl_client_cert_pw_t *cred_ =
@@ -680,9 +680,9 @@ svn_error_t * ContextData::onSslClientCertPwPrompt(
ContextData * data = 0;
SVN_ERR (getContextData (baton, &data));
- QString password;
+ TQString password;
bool may_save = maySave != 0;
- if (!data->listener->contextSslClientCertPwPrompt (password, QString::FROMUTF8(realm), may_save))
+ if (!data->listener->contextSslClientCertPwPrompt (password, TQString::FROMUTF8(realm), may_save))
return data->generate_cancel_error();
svn_auth_cred_ssl_client_cert_pw_t *cred_ =
@@ -714,7 +714,7 @@ void ContextData::reset()
svn_error_t * ContextData::generate_cancel_error()
{
- return svn_error_create (SVN_ERR_CANCELLED, 0, listener->translate(QString::FROMUTF8("Cancelled by user.")).TOUTF8());
+ return svn_error_create (SVN_ERR_CANCELLED, 0, listener->translate(TQString::FROMUTF8("Cancelled by user.")).TOUTF8());
}
void ContextData::onProgress(apr_off_t progress, apr_off_t total, void*baton, apr_pool_t*)
diff --git a/src/svnqt/contextdata.hpp b/src/svnqt/contextdata.hpp
index 7c03f0a..e38c6f2 100644
--- a/src/svnqt/contextdata.hpp
+++ b/src/svnqt/contextdata.hpp
@@ -29,7 +29,7 @@
#if (SVN_VER_MAJOR >= 1) && (SVN_VER_MINOR >= 4)
#include <svn_auth.h>
#endif
-#include <qstring.h>
+#include <tqstring.h>
struct svn_wc_conflict_result_t;
struct svn_wc_conflict_description_t;
@@ -41,14 +41,14 @@ namespace svn {
@author Rajko Albrecht <ral@alwins-world.de>
*/
-class SVNQT_NOEXPORT ContextData{
+class SVNTQT_NOEXPORT ContextData{
public:
- ContextData(const QString & configDir_);
+ ContextData(const TQString & configDir_);
~ContextData();
// data methods
svn_client_ctx_t*ctx();
- const QString&configDir()const;
+ const TQString&configDir()const;
void setListener (ContextListener * listener);
ContextListener * getListener () const;
void reset();
@@ -56,10 +56,10 @@ public:
// svn methods
void setAuthCache(bool value);
/** @see Context::setLogin */
- void setLogin (const QString& usr, const QString& pwd);
+ void setLogin (const TQString& usr, const TQString& pwd);
/** @see Context::setLogMessage */
- void setLogMessage (const QString& msg);
- const QString&getLogMessage ()const;
+ void setLogMessage (const TQString& msg);
+ const TQString&getLogMessage ()const;
/**
* if the @a listener is set, use it to retrieve the log
* message using ContextListener::contextGetLogMessage.
@@ -72,7 +72,7 @@ public:
* @param msg log message
* @retval false cancel
*/
- bool retrieveLogMessage (QString & msg,const CommitItemList&);
+ bool retrieveLogMessage (TQString & msg,const CommitItemList&);
/**
* if the @a listener is set call the method
@@ -91,8 +91,8 @@ public:
* @a contextCancel
*/
bool cancel();
- const QString& getUsername () const;
- const QString& getPassword () const;
+ const TQString& getUsername () const;
+ const TQString& getPassword () const;
/**
* if the @a listener is set and no password has been
@@ -326,10 +326,10 @@ protected:
int m_promptCounter;
Pool pool;
svn_client_ctx_t*m_ctx;
- QString username;
- QString password;
- QString logMessage;
- QString m_ConfigDir;
+ TQString username;
+ TQString password;
+ TQString logMessage;
+ TQString m_ConfigDir;
};
diff --git a/src/svnqt/datetime.cpp b/src/svnqt/datetime.cpp
index 496a04b..6c27a2f 100644
--- a/src/svnqt/datetime.cpp
+++ b/src/svnqt/datetime.cpp
@@ -48,7 +48,7 @@ namespace svn
setAprTime(time);
}
- DateTime::DateTime(const QDateTime&dt)
+ DateTime::DateTime(const TQDateTime&dt)
: m_time(dt)
{
}
@@ -128,29 +128,23 @@ namespace svn
return IsValid();
}
- DateTime::operator const QDateTime&()const
+ DateTime::operator const TQDateTime&()const
{
return m_time;
}
- const QDateTime&DateTime::toQDateTime()const
+ const TQDateTime&DateTime::toTQDateTime()const
{
return *this;
}
void DateTime::setAprTime(apr_time_t aTime)
{
-#if QT_VERSION < 0x040000
if (aTime<0)m_time.setTime_t(0,Qt::LocalTime);
else m_time.setTime_t(aTime/(1000*1000),Qt::LocalTime);
-#else
- m_time.setTimeSpec(Qt::LocalTime);
- if (aTime<0)m_time.setTime_t(0);
- else m_time.setTime_t(aTime/(1000*1000));
-#endif
}
- QString DateTime::toString(const QString&format)const
+ TQString DateTime::toString(const TQString&format)const
{
return m_time.toString(format);
}
diff --git a/src/svnqt/datetime.hpp b/src/svnqt/datetime.hpp
index 06fedb4..b1ebec4 100644
--- a/src/svnqt/datetime.hpp
+++ b/src/svnqt/datetime.hpp
@@ -33,7 +33,7 @@
#include "svnqt/svnqt_defines.hpp"
-#include <qdatetime.h>
+#include <tqdatetime.h>
// subversion api
#include "svn_types.h"
@@ -46,10 +46,10 @@ namespace svn
*
* @see apr_time_t
*/
- class SVNQT_EXPORT DateTime
+ class SVNTQT_EXPORT DateTime
{
private:
- QDateTime m_time;
+ TQDateTime m_time;
public:
@@ -68,9 +68,9 @@ namespace svn
/**
* Constructor
*
- * @param dt QDateTime class
+ * @param dt TQDateTime class
*/
- DateTime(const QDateTime&dt);
+ DateTime(const TQDateTime&dt);
/**
* Copy constructor
@@ -123,21 +123,21 @@ namespace svn
GetAPRTimeT () const;
/**
- * @return QDateTime object
+ * @return TQDateTime object
*/
- operator const QDateTime&()const;
+ operator const TQDateTime&()const;
/**
- * @return QDateTime object
+ * @return TQDateTime object
*/
- const QDateTime&toQDateTime()const;
+ const TQDateTime&toTQDateTime()const;
/**
* @param format format string
* @return formatted string
- * @see QDateTime::toString
+ * @see TQDateTime::toString
*/
- QString toString(const QString&format)const;
+ TQString toString(const TQString&format)const;
/**
* Set from date string of the form below, using apr_date_parse_rfc
diff --git a/src/svnqt/diff_data.cpp b/src/svnqt/diff_data.cpp
index a5f66f9..45c9452 100644
--- a/src/svnqt/diff_data.cpp
+++ b/src/svnqt/diff_data.cpp
@@ -21,7 +21,7 @@
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/exception.hpp"
-#include <qfile.h>
+#include <tqfile.h>
#include <svn_version.h>
#include <svn_io.h>
@@ -122,23 +122,18 @@ namespace svn
}
}
- QByteArray DiffData::content()
+ TQByteArray DiffData::content()
{
if (!m_outFileName) {
- return QByteArray();
+ return TQByteArray();
}
close();
- QFile fi(m_outFileName);
-#if QT_VERSION < 0x040000
+ TQFile fi(m_outFileName);
if (!fi.open(IO_ReadOnly|IO_Raw)) {
- throw ClientException(QString("%1 '%2'").arg(fi.errorString()).arg(m_outFileName));
-#else
- if (!fi.open(QIODevice::ReadOnly)) {
- throw ClientException(QString("%1 '%2'").arg(fi.errorString()).arg(m_outFileName).toLatin1().constData());
-#endif
+ throw ClientException(TQString("%1 '%2'").tqarg(fi.errorString()).tqarg(m_outFileName));
}
- QByteArray res = fi.readAll();
+ TQByteArray res = fi.readAll();
fi.close();
return res;
}
diff --git a/src/svnqt/diff_data.hpp b/src/svnqt/diff_data.hpp
index c92c8ac..81e4263 100644
--- a/src/svnqt/diff_data.hpp
+++ b/src/svnqt/diff_data.hpp
@@ -26,13 +26,9 @@
#include "path.hpp"
#include "revision.hpp"
-#include <qglobal.h>
+#include <tqglobal.h>
-#if QT_VERSION < 0x040000
- #include <qstring.h>
-#else
- #include <QtCore>
-#endif
+#include <tqstring.h>
struct apr_file_t;
@@ -40,7 +36,7 @@ namespace svn
{
class Path;
- class SVNQT_NOEXPORT DiffData
+ class SVNTQT_NOEXPORT DiffData
{
protected:
Pool m_Pool;
@@ -68,7 +64,7 @@ namespace svn
const Revision& r1()const{return m_r1;}
const Revision& r2()const{return m_r2;}
- QByteArray content();
+ TQByteArray content();
};
}
diff --git a/src/svnqt/diffoptions.cpp b/src/svnqt/diffoptions.cpp
index 7ada9c8..af1e6f9 100644
--- a/src/svnqt/diffoptions.cpp
+++ b/src/svnqt/diffoptions.cpp
@@ -71,7 +71,7 @@ namespace svn
#endif
}
- DiffOptions::DiffOptions(const QStringList&options)
+ DiffOptions::DiffOptions(const TQStringList&options)
:m_data(new DiffOptionsData())
{
#if ((SVN_VER_MAJOR == 1) && (SVN_VER_MINOR >= 4)) || (SVN_VER_MAJOR > 1)
diff --git a/src/svnqt/diffoptions.hpp b/src/svnqt/diffoptions.hpp
index 5509821..a037c52 100644
--- a/src/svnqt/diffoptions.hpp
+++ b/src/svnqt/diffoptions.hpp
@@ -29,7 +29,7 @@ namespace svn {
}
struct svn_diff_file_options_t;
-class QStringList;
+class TQStringList;
namespace svn
{
@@ -37,7 +37,7 @@ namespace svn
*
* This is needed until svnqt stops support for subversion prior 1.4
*/
- class SVNQT_EXPORT DiffOptions
+ class SVNTQT_EXPORT DiffOptions
{
public:
enum IgnoreSpace {
@@ -59,7 +59,7 @@ namespace svn
* - --unified, -u (for compatibility, does nothing).
* @sa svn_diff_file_options_parse
*/
- DiffOptions(const QStringList&options);
+ DiffOptions(const TQStringList&options);
/** Initialize options with values depending on options.
* Only if build against subversion 1.4 or newer.
diff --git a/src/svnqt/dirent.cpp b/src/svnqt/dirent.cpp
index 480546f..efa6ada 100644
--- a/src/svnqt/dirent.cpp
+++ b/src/svnqt/dirent.cpp
@@ -33,20 +33,20 @@
#include "svnqt/lock_entry.hpp"
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn
{
- class SVNQT_NOEXPORT DirEntry_Data
+ class SVNTQT_NOEXPORT DirEntry_Data
{
public:
- QString name;
+ TQString name;
svn_node_kind_t kind;
- QLONG size;
+ TQLONG size;
bool hasProps;
svn_revnum_t createdRev;
DateTime time;
- QString lastAuthor;
+ TQString lastAuthor;
LockEntry m_Lock;
DirEntry_Data ()
@@ -55,12 +55,12 @@ namespace svn
{
}
- DirEntry_Data (const QString& _name, const svn_dirent_t * dirEntry)
+ DirEntry_Data (const TQString& _name, const svn_dirent_t * dirEntry)
: name (_name), kind (dirEntry->kind), size (dirEntry->size),
hasProps (dirEntry->has_props != 0),
createdRev (dirEntry->created_rev), time (dirEntry->time), m_Lock()
{
- lastAuthor = dirEntry->last_author == 0 ? QString::fromLatin1("") : QString::FROMUTF8(dirEntry->last_author);
+ lastAuthor = dirEntry->last_author == 0 ? TQString::tqfromLatin1("") : TQString::FROMUTF8(dirEntry->last_author);
}
DirEntry_Data (const DirEntry & src)
@@ -87,18 +87,18 @@ namespace svn
{
}
- DirEntry::DirEntry (const QString& name, const svn_dirent_t * dirEntry)
+ DirEntry::DirEntry (const TQString& name, const svn_dirent_t * dirEntry)
: m (new DirEntry_Data (name, dirEntry))
{
}
- DirEntry::DirEntry (const QString& name, const svn_dirent_t * dirEntry,const svn_lock_t*lockEntry)
+ DirEntry::DirEntry (const TQString& name, const svn_dirent_t * dirEntry,const svn_lock_t*lockEntry)
: m (new DirEntry_Data (name, dirEntry))
{
setLock(lockEntry);
}
- DirEntry::DirEntry (const QString& name, const svn_dirent_t * dirEntry,const LockEntry&lockEntry)
+ DirEntry::DirEntry (const TQString& name, const svn_dirent_t * dirEntry,const LockEntry&lockEntry)
: m (new DirEntry_Data (name, dirEntry))
{
m->m_Lock = lockEntry;
@@ -120,7 +120,7 @@ namespace svn
return m->kind;
}
- QLONG
+ TQLONG
DirEntry::size () const
{
return m->size;
@@ -144,13 +144,13 @@ namespace svn
return m->time;
}
- const QString&
+ const TQString&
DirEntry::lastAuthor () const
{
return m->lastAuthor;
}
- const QString&
+ const TQString&
DirEntry::name () const
{
return m->name;
diff --git a/src/svnqt/dirent.hpp b/src/svnqt/dirent.hpp
index 9b7c3e2..c3cfa48 100644
--- a/src/svnqt/dirent.hpp
+++ b/src/svnqt/dirent.hpp
@@ -38,13 +38,13 @@
// subversion api
#include "svn_client.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn
{
class DirEntry_Data;
- class SVNQT_EXPORT DirEntry
+ class SVNTQT_EXPORT DirEntry
{
public:
/**
@@ -55,13 +55,13 @@ namespace svn
/**
* constructor for existing @a svn_dirent_t entries
*/
- DirEntry (const QString& name, const svn_dirent_t * dirEntry);
+ DirEntry (const TQString& name, const svn_dirent_t * dirEntry);
/**
* constructor for existing @a svn_dirent_t entries
*/
- DirEntry (const QString& name, const svn_dirent_t * dirEntry,const svn_lock_t*lockEntry);
+ DirEntry (const TQString& name, const svn_dirent_t * dirEntry,const svn_lock_t*lockEntry);
- DirEntry (const QString& name, const svn_dirent_t * dirEntry,const LockEntry&lockEntry);
+ DirEntry (const TQString& name, const svn_dirent_t * dirEntry,const LockEntry&lockEntry);
/**
* copy constructor
*/
@@ -78,13 +78,13 @@ namespace svn
DirEntry &
operator = (const DirEntry &);
- const QString&
+ const TQString&
name () const;
svn_node_kind_t
kind () const;
- QLONG
+ TQLONG
size () const;
bool
@@ -96,7 +96,7 @@ namespace svn
const DateTime&
time () const;
- const QString&
+ const TQString&
lastAuthor () const;
//! The assigned lock entry
diff --git a/src/svnqt/entry.cpp b/src/svnqt/entry.cpp
index 27c14cf..e6c3b7f 100644
--- a/src/svnqt/entry.cpp
+++ b/src/svnqt/entry.cpp
@@ -33,7 +33,7 @@
namespace svn
{
- class SVNQT_NOEXPORT Entry_private
+ class SVNTQT_NOEXPORT Entry_private
{
protected:
void init_clean();
@@ -45,7 +45,7 @@ namespace svn
bool m_valid;
LockEntry m_Lock;
- QString _name,_url,_repos,_uuid,_copyfrom_url,_conflict_old,_conflict_new,_conflict_wrk,_prejfile,_checksum,_cmt_author;
+ TQString _name,_url,_repos,_uuid,_copyfrom_url,_conflict_old,_conflict_new,_conflict_wrk,_prejfile,_checksum,_cmt_author;
bool _copied,_deleted,_absent,_incomplete;
svn_revnum_t _revision,_copyfrom_rev,_cmt_rev;
svn_node_kind_t _kind;
@@ -60,15 +60,15 @@ namespace svn
void
init(const Entry_private&src);
void
- init(const QString&url,const DirEntryPtr&src);
+ init(const TQString&url,const DirEntryPtr&src);
void
- init(const QString&url,const InfoEntry&src);
+ init(const TQString&url,const InfoEntry&src);
};
void Entry_private::init_clean()
{
_name = _url = _repos = _uuid = _copyfrom_url = _conflict_old = _conflict_new = _conflict_wrk
- = _prejfile = _checksum = _cmt_author = QString::null;
+ = _prejfile = _checksum = _cmt_author = TQString();
_revision = _copyfrom_rev = _cmt_rev = -1;
_kind = svn_node_unknown;
_schedule = svn_wc_schedule_normal;
@@ -98,36 +98,36 @@ namespace svn
{
if (src) {
// copy & convert the contents of src
- _name = QString::FROMUTF8(src->name);
+ _name = TQString::FROMUTF8(src->name);
_revision = src->revision;
- _url = QString::FROMUTF8(src->url);
- _repos = QString::FROMUTF8(src->repos);
- _uuid = QString::FROMUTF8(src->uuid);
+ _url = TQString::FROMUTF8(src->url);
+ _repos = TQString::FROMUTF8(src->repos);
+ _uuid = TQString::FROMUTF8(src->uuid);
_kind = src->kind;
_schedule = src->schedule;
_copied = src->copied!=0;
_deleted = src->deleted!=0;
_absent = src->absent!=0;
_incomplete = src->incomplete!=0;
- _copyfrom_url=QString::FROMUTF8(src->copyfrom_url);
+ _copyfrom_url=TQString::FROMUTF8(src->copyfrom_url);
_copyfrom_rev = src->copyfrom_rev;
- _conflict_old = QString::FROMUTF8(src->conflict_old);
- _conflict_new = QString::FROMUTF8(src->conflict_new);
- _conflict_wrk = QString::FROMUTF8(src->conflict_wrk);
- _prejfile = QString::FROMUTF8(src->prejfile);
+ _conflict_old = TQString::FROMUTF8(src->conflict_old);
+ _conflict_new = TQString::FROMUTF8(src->conflict_new);
+ _conflict_wrk = TQString::FROMUTF8(src->conflict_wrk);
+ _prejfile = TQString::FROMUTF8(src->prejfile);
_text_time = src->text_time;
_prop_time = src->prop_time;
- _checksum = QString::FROMUTF8(src->checksum);
+ _checksum = TQString::FROMUTF8(src->checksum);
_cmt_rev = src->cmt_rev;
_cmt_date = src->cmt_date;
- _cmt_author = QString::FROMUTF8(src->cmt_author);
+ _cmt_author = TQString::FROMUTF8(src->cmt_author);
m_Lock.init(src);
m_valid = true;
} else {
m_valid = false;
m_Lock=LockEntry();
_name=
- _url=_repos=_uuid=_copyfrom_url=_conflict_old=_conflict_new=_conflict_wrk=_prejfile=_checksum=_cmt_author= QString::null;
+ _url=_repos=_uuid=_copyfrom_url=_conflict_old=_conflict_new=_conflict_wrk=_prejfile=_checksum=_cmt_author= TQString();
_copied=_deleted=_absent=_incomplete = false;
_kind = svn_node_unknown;
_schedule=svn_wc_schedule_normal;
@@ -165,7 +165,7 @@ namespace svn
m_valid=src.m_valid;
}
- void Entry_private::init(const QString&url,const DirEntryPtr&dirEntry)
+ void Entry_private::init(const TQString&url,const DirEntryPtr&dirEntry)
{
init(0);
_url = url;
@@ -184,7 +184,7 @@ namespace svn
}
}
- void Entry_private::init(const QString&url,const InfoEntry&src)
+ void Entry_private::init(const TQString&url,const InfoEntry&src)
{
init(0);
_name = src.Name();
@@ -217,13 +217,13 @@ namespace svn
}
}
- Entry::Entry (const QString&url,const DirEntryPtr&src)
+ Entry::Entry (const TQString&url,const DirEntryPtr&src)
: m_Data(new Entry_private())
{
m_Data->init(url,src);
}
- Entry::Entry (const QString&url,const InfoEntry&src)
+ Entry::Entry (const TQString&url,const InfoEntry&src)
: m_Data(new Entry_private())
{
m_Data->init(url,src);
@@ -253,7 +253,7 @@ namespace svn
return m_Data->m_Lock;
}
- const QString&
+ const TQString&
Entry::cmtAuthor () const
{
return m_Data->_cmt_author;
@@ -270,7 +270,7 @@ namespace svn
{
return m_Data->_cmt_rev;
}
- const QString&
+ const TQString&
Entry::checksum () const
{
return m_Data->_checksum;
@@ -287,23 +287,23 @@ namespace svn
{
return m_Data->_text_time;
}
- const QString&
+ const TQString&
Entry::prejfile () const
{
return m_Data->_prejfile;
}
- const QString&
+ const TQString&
Entry::conflictWrk () const
{
return m_Data->_conflict_wrk;
}
- const QString&
+ const TQString&
Entry::conflictNew () const
{
return m_Data->_conflict_new;
}
- const QString&
+ const TQString&
Entry::conflictOld () const
{
return m_Data->_conflict_old;
@@ -313,7 +313,7 @@ namespace svn
{
return m_Data->_copyfrom_rev;
}
- const QString&
+ const TQString&
Entry::copyfromUrl () const
{
return m_Data->_copyfrom_url;
@@ -344,17 +344,17 @@ namespace svn
{
return m_Data->_kind;
}
- const QString&
+ const TQString&
Entry::uuid () const
{
return m_Data->_uuid;
}
- const QString&
+ const TQString&
Entry::repos () const
{
return m_Data->_repos;
}
- const QString&
+ const TQString&
Entry::url () const
{
return m_Data->_url;
@@ -364,7 +364,7 @@ namespace svn
{
return m_Data->_revision;
}
- const QString&
+ const TQString&
Entry::name () const
{
return m_Data->_name;
diff --git a/src/svnqt/entry.hpp b/src/svnqt/entry.hpp
index 0043622..3b11055 100644
--- a/src/svnqt/entry.hpp
+++ b/src/svnqt/entry.hpp
@@ -42,7 +42,7 @@
#include "svn_wc.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn
{
@@ -51,7 +51,7 @@ namespace svn
* C++ API for Subversion.
* This class wraps around @a svn_wc_entry_t.
*/
- class SVNQT_EXPORT Entry
+ class SVNTQT_EXPORT Entry
{
public:
/**
@@ -74,11 +74,11 @@ namespace svn
/**
* converting constructr
*/
- Entry (const QString&url,const DirEntryPtr&src);
+ Entry (const TQString&url,const DirEntryPtr&src);
/**
* converting constructr
*/
- Entry (const QString&url,const InfoEntry&src);
+ Entry (const TQString&url,const InfoEntry&src);
/**
* destructor
@@ -97,7 +97,7 @@ namespace svn
/**
* @return entry's name
*/
- const QString&
+ const TQString&
name () const;
/**
* @return base revision
@@ -107,18 +107,18 @@ namespace svn
/**
* @return url in repository
*/
- const QString&
+ const TQString&
url () const;
/**
* @return canonical repository url
*/
- const QString&
+ const TQString&
repos () const;
/**
* @return repository uuid
*/
- const QString&
+ const TQString&
uuid () const;
/**
* @return node kind (file, dir, ...)
@@ -126,7 +126,7 @@ namespace svn
svn_node_kind_t
kind () const;
/**
- * @return scheduling (add, delete, replace)
+ * @return scheduling (add, delete, tqreplace)
*/
svn_wc_schedule_t
schedule () const;
@@ -148,7 +148,7 @@ namespace svn
/**
* @return copyfrom location
*/
- const QString&
+ const TQString&
copyfromUrl () const;
/**
* @return copyfrom revision
@@ -158,22 +158,22 @@ namespace svn
/**
* @return old version of conflicted file
*/
- const QString&
+ const TQString&
conflictOld () const;
/**
* @return new version of conflicted file
*/
- const QString&
+ const TQString&
conflictNew () const;
/**
* @return working version of conflicted file
*/
- const QString&
+ const TQString&
conflictWrk () const;
/**
* @return property reject file
*/
- const QString&
+ const TQString&
prejfile () const;
/**
* @return last up-to-date time for text contents
@@ -192,7 +192,7 @@ namespace svn
* @return base64 encoded checksum
* @retval NULL for backwards compatibility
*/
- const QString&
+ const TQString&
checksum () const;
/**
@@ -210,7 +210,7 @@ namespace svn
/**
* @return last commit author of this file
*/
- const QString&
+ const TQString&
cmtAuthor () const;
/**
diff --git a/src/svnqt/exception.cpp b/src/svnqt/exception.cpp
index 67bcb60..8cd795c 100644
--- a/src/svnqt/exception.cpp
+++ b/src/svnqt/exception.cpp
@@ -33,12 +33,12 @@
#include "exception.hpp"
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
#ifdef HAS_BACKTRACE_H
#include <execinfo.h>
-#include <qstringlist.h>
-#define SVNQT_BACKTRACE_LENGTH 20
+#include <tqstringlist.h>
+#define SVNTQT_BACKTRACE_LENGTH 20
#endif
namespace svn
@@ -48,15 +48,15 @@ namespace svn
{
private:
public:
- QString message;
+ TQString message;
apr_status_t apr_err;
Data (const char * msg)
- : message(QString::FROMUTF8(msg)),apr_err(0)
+ : message(TQString::FROMUTF8(msg)),apr_err(0)
{
}
- Data (const QString& msg)
+ Data (const TQString& msg)
: message(msg),apr_err(0)
{
}
@@ -73,7 +73,7 @@ namespace svn
m = new Data (message);
}
- Exception::Exception (const QString& message) throw ()
+ Exception::Exception (const TQString& message) throw ()
{
m = new Data (message);
}
@@ -94,39 +94,39 @@ namespace svn
return m->apr_err;
}
- const QString&
+ const TQString&
Exception::msg () const
{
return m->message;
}
- void Exception::setMessage(const QString&aMsg)
+ void Exception::setMessage(const TQString&aMsg)
{
m->message=aMsg;
}
- QString Exception::error2msg(svn_error_t*error)
+ TQString Exception::error2msg(svn_error_t*error)
{
- QString message = "";
+ TQString message = "";
if (error==0) {
return message;
}
svn_error_t * next = error->child;
if (error->message)
- message = QString::FROMUTF8(error->message);
+ message = TQString::FROMUTF8(error->message);
else
{
message = "Unknown error!\n";
if (error->file)
{
- message += QString::FROMUTF8("In file ");
- message += QString::FROMUTF8(error->file);
- message += QString(" Line %1").arg(error->line);
+ message += TQString::FROMUTF8("In file ");
+ message += TQString::FROMUTF8(error->file);
+ message += TQString(" Line %1").tqarg(error->line);
}
}
while (next != NULL && next->message != NULL)
{
- message = message + "\n" + QString::FROMUTF8(next->message);
+ message = message + "\n" + TQString::FROMUTF8(next->message);
next = next->child;
}
@@ -140,7 +140,7 @@ namespace svn
{
}
- ClientException::ClientException (const QString&msg) throw ()
+ ClientException::ClientException (const TQString&msg) throw ()
: Exception (msg)
{
}
@@ -187,30 +187,30 @@ namespace svn
#endif
}
- QString ClientException::getBackTrace()
+ TQString ClientException::getBackTrace()
{
- QString Result;
+ TQString Result;
qDebug("getBackTrace");
#ifdef HAS_BACKTRACE_H
qDebug("Generating backtrace");
- void *array[SVNQT_BACKTRACE_LENGTH];
+ void *array[SVNTQT_BACKTRACE_LENGTH];
size_t size;
size_t i;
- size = backtrace (array, SVNQT_BACKTRACE_LENGTH);
+ size = backtrace (array, SVNTQT_BACKTRACE_LENGTH);
if (!size) {
return Result;
}
char ** strings = backtrace_symbols (array, size);
- QStringList r;
+ TQStringList r;
for (i = 0; i < size; ++i) {
- r.push_back(QString::number(i) +
- QString::FROMUTF8(": ") +
- QString::FROMUTF8(strings[i]));
+ r.push_back(TQString::number(i) +
+ TQString::FROMUTF8(": ") +
+ TQString::FROMUTF8(strings[i]));
}
- Result = QString::FROMUTF8("[\n")+r.join("\n")+QString::FROMUTF8("]\n");
+ Result = TQString::FROMUTF8("[\n")+r.join("\n")+TQString::FROMUTF8("]\n");
free (strings);
#endif
return Result;
diff --git a/src/svnqt/exception.hpp b/src/svnqt/exception.hpp
index b83269f..039f1a4 100644
--- a/src/svnqt/exception.hpp
+++ b/src/svnqt/exception.hpp
@@ -34,7 +34,7 @@
#include "svnqt/svnqt_defines.hpp"
// subversion api
#include "svn_client.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn
{
@@ -42,33 +42,33 @@ namespace svn
/**
* Generic exception class.
*/
- class SVNQT_EXPORT Exception
+ class SVNTQT_EXPORT Exception
{
public:
/**
* Constructor. Assigns the exception reason.
*/
Exception (const char * message) throw ();
- Exception (const QString&message) throw();
+ Exception (const TQString&message) throw();
virtual ~Exception () throw ();
/**
* @return the exception message.
*/
- virtual const QString& msg() const;
+ virtual const TQString& msg() const;
/**
* @return the outermost error code.
*/
apr_status_t apr_err () const;
- static QString error2msg(svn_error_t*error);
+ static TQString error2msg(svn_error_t*error);
protected:
struct Data;
Data * m;
- void setMessage(const QString&);
+ void setMessage(const TQString&);
private:
@@ -83,7 +83,7 @@ namespace svn
/**
* Subversion client exception class.
*/
- class SVNQT_EXPORT ClientException : public Exception
+ class SVNTQT_EXPORT ClientException : public Exception
{
public:
/**
@@ -107,7 +107,7 @@ namespace svn
/**
* Constructor
*/
- ClientException (const QString&message) throw();
+ ClientException (const TQString&message) throw();
/**
* Copy constructor
@@ -120,11 +120,11 @@ namespace svn
ClientException () throw ();
ClientException & operator = (ClientException &);
- static QString getBackTrace();
+ static TQString getBackTrace();
void init();
/// backtrace from constructor;
- QString m_backTraceConstr;
+ TQString m_backTraceConstr;
};
diff --git a/src/svnqt/info_entry.cpp b/src/svnqt/info_entry.cpp
index 72d714a..6f76735 100644
--- a/src/svnqt/info_entry.cpp
+++ b/src/svnqt/info_entry.cpp
@@ -36,7 +36,7 @@ namespace svn
init(info,path);
}
- InfoEntry::InfoEntry(const svn_info_t*info,const QString&path)
+ InfoEntry::InfoEntry(const svn_info_t*info,const TQString&path)
{
init(info,path);
}
@@ -65,47 +65,47 @@ namespace svn
{
return m_Lock;
}
- const QString&InfoEntry::cmtAuthor () const
+ const TQString&InfoEntry::cmtAuthor () const
{
return m_last_author;
}
- const QString&InfoEntry::Name()const
+ const TQString&InfoEntry::Name()const
{
return m_name;
}
- const QString& InfoEntry::checksum()const
+ const TQString& InfoEntry::checksum()const
{
return m_checksum;
}
- const QString& InfoEntry::conflictNew()const
+ const TQString& InfoEntry::conflictNew()const
{
return m_conflict_new;
}
- const QString& InfoEntry::conflictOld()const
+ const TQString& InfoEntry::conflictOld()const
{
return m_conflict_old;
}
- const QString& InfoEntry::conflictWrk()const
+ const TQString& InfoEntry::conflictWrk()const
{
return m_conflict_wrk;
}
- const QString& InfoEntry::copyfromUrl()const
+ const TQString& InfoEntry::copyfromUrl()const
{
return m_copyfrom_url;
}
- const QString& InfoEntry::prejfile()const
+ const TQString& InfoEntry::prejfile()const
{
return m_prejfile;
}
- const QString& InfoEntry::reposRoot()const
+ const TQString& InfoEntry::reposRoot()const
{
return m_repos_root;
}
- const QString& InfoEntry::url()const
+ const TQString& InfoEntry::url()const
{
return m_url;
}
- const QString& InfoEntry::uuid()const
+ const TQString& InfoEntry::uuid()const
{
return m_UUID;
}
@@ -129,7 +129,7 @@ namespace svn
{
return m_schedule;
}
- const QString&InfoEntry::prettyUrl()const
+ const TQString&InfoEntry::prettyUrl()const
{
return m_pUrl;
}
@@ -137,15 +137,15 @@ namespace svn
{
return kind()==svn_node_dir;
}
- const QByteArray&InfoEntry::changeList()const
+ const TQByteArray&InfoEntry::changeList()const
{
return m_changeList;
}
- QLONG InfoEntry::size()const
+ TQLONG InfoEntry::size()const
{
return m_size;
}
- QLONG InfoEntry::working_size()const
+ TQLONG InfoEntry::working_size()const
{
return m_working_size;
}
@@ -183,20 +183,20 @@ void svn::InfoEntry::init()
m_revision = SVN_INVALID_REVNUM;
m_schedule = svn_wc_schedule_normal;
- m_size = m_working_size = SVNQT_SIZE_UNKNOWN;
- m_changeList=QByteArray();
+ m_size = m_working_size = SVNTQT_SIZE_UNKNOWN;
+ m_changeList=TQByteArray();
m_depth = DepthUnknown;
}
void svn::InfoEntry::init(const svn_info_t*item,const char*path)
{
- init(item,QString::FROMUTF8(path));
+ init(item,TQString::FROMUTF8(path));
}
/*!
\fn svn::InfoEntry::init(const svn_info_t*)
*/
-void svn::InfoEntry::init(const svn_info_t*item,const QString&path)
+void svn::InfoEntry::init(const svn_info_t*item,const TQString&path)
{
if (!item) {
init();
@@ -211,17 +211,17 @@ void svn::InfoEntry::init(const svn_info_t*item,const QString&path)
} else {
m_Lock = LockEntry();
}
- m_checksum = QString::FROMUTF8(item->checksum);
- m_conflict_new = QString::FROMUTF8(item->conflict_new);
- m_conflict_old = QString::FROMUTF8(item->conflict_old);
- m_conflict_wrk = QString::FROMUTF8(item->conflict_wrk);
- m_copyfrom_url = QString::FROMUTF8(item->copyfrom_url);
- m_last_author = QString::FROMUTF8(item->last_changed_author);
- m_prejfile = QString::FROMUTF8(item->prejfile);
- m_repos_root = QString::FROMUTF8(item->repos_root_URL);
- m_url = QString::FROMUTF8(item->URL);
+ m_checksum = TQString::FROMUTF8(item->checksum);
+ m_conflict_new = TQString::FROMUTF8(item->conflict_new);
+ m_conflict_old = TQString::FROMUTF8(item->conflict_old);
+ m_conflict_wrk = TQString::FROMUTF8(item->conflict_wrk);
+ m_copyfrom_url = TQString::FROMUTF8(item->copyfrom_url);
+ m_last_author = TQString::FROMUTF8(item->last_changed_author);
+ m_prejfile = TQString::FROMUTF8(item->prejfile);
+ m_repos_root = TQString::FROMUTF8(item->repos_root_URL);
+ m_url = TQString::FROMUTF8(item->URL);
m_pUrl = prettyUrl(item->URL);
- m_UUID = QString::FROMUTF8(item->repos_UUID);
+ m_UUID = TQString::FROMUTF8(item->repos_UUID);
m_kind = item->kind;
m_copy_from_rev = item->copyfrom_rev;
m_last_changed_rev = item->last_changed_rev;
@@ -230,16 +230,12 @@ void svn::InfoEntry::init(const svn_info_t*item,const QString&path)
m_schedule = item->schedule;
#if ((SVN_VER_MAJOR == 1) && (SVN_VER_MINOR >= 5)) || (SVN_VER_MAJOR > 1)
- m_size = item->size!=SVN_INFO_SIZE_UNKNOWN?QLONG(item->size):SVNQT_SIZE_UNKNOWN;
- m_working_size = item->working_size!=SVN_INFO_SIZE_UNKNOWN?QLONG(item->working_size):SVNQT_SIZE_UNKNOWN;
+ m_size = item->size!=SVN_INFO_SIZE_UNKNOWN?TQLONG(item->size):SVNTQT_SIZE_UNKNOWN;
+ m_working_size = item->working_size!=SVN_INFO_SIZE_UNKNOWN?TQLONG(item->working_size):SVNTQT_SIZE_UNKNOWN;
if (item->changelist) {
-#if QT_VERSION < 0x040000
- m_changeList = QByteArray(QCString(item->changelist,strlen(item->changelist)));
-#else
- m_changeList = QByteArray(item->changelist,strlen(item->changelist));
-#endif
+ m_changeList = TQByteArray(TQCString(item->changelist,strlen(item->changelist)));
} else {
- m_changeList=QByteArray();
+ m_changeList=TQByteArray();
}
switch (item->depth) {
@@ -264,21 +260,21 @@ void svn::InfoEntry::init(const svn_info_t*item,const QString&path)
break;
}
#else
- m_size = SVNQT_SIZE_UNKNOWN;
- m_working_size = SVNQT_SIZE_UNKNOWN;
- m_changeList=QByteArray();
+ m_size = SVNTQT_SIZE_UNKNOWN;
+ m_working_size = SVNTQT_SIZE_UNKNOWN;
+ m_changeList=TQByteArray();
m_depth = DepthUnknown;
#endif
}
-QString svn::InfoEntry::prettyUrl(const char*_url)const
+TQString svn::InfoEntry::prettyUrl(const char*_url)const
{
if (_url) {
Pool pool;
_url = svn_path_uri_decode(_url,pool);
- return QString::FROMUTF8(_url);
+ return TQString::FROMUTF8(_url);
}
- return QString::FROMUTF8("");
+ return TQString::FROMUTF8("");
}
svn::InfoEntry::InfoEntry(const InfoEntry&other)
diff --git a/src/svnqt/info_entry.hpp b/src/svnqt/info_entry.hpp
index 91de95c..be86639 100644
--- a/src/svnqt/info_entry.hpp
+++ b/src/svnqt/info_entry.hpp
@@ -25,22 +25,22 @@
#include <svnqt/revision.hpp>
#include <svnqt/svnqttypes.hpp>
-#include <qstring.h>
+#include <tqstring.h>
struct svn_info_t;
namespace svn {
- class SVNQT_EXPORT InfoEntry
+ class SVNTQT_EXPORT InfoEntry
{
public:
InfoEntry();
InfoEntry(const svn_info_t*,const char*path);
- InfoEntry(const svn_info_t*,const QString&path);
+ InfoEntry(const svn_info_t*,const TQString&path);
InfoEntry(const InfoEntry&);
~InfoEntry();
void init(const svn_info_t*,const char*path);
- void init(const svn_info_t*,const QString&path);
+ void init(const svn_info_t*,const TQString&path);
DateTime cmtDate()const;
DateTime textTime()const;
@@ -54,33 +54,33 @@ public:
/**
* @return last commit author of this file
*/
- const QString&cmtAuthor () const;
- const QString&Name()const;
+ const TQString&cmtAuthor () const;
+ const TQString&Name()const;
- const QString& checksum()const;
- const QString& conflictNew()const;
- const QString& conflictOld()const;
- const QString& conflictWrk()const;
- const QString& copyfromUrl()const;
- const QString& prejfile()const;
- const QString& reposRoot()const;
- const QString& url()const;
- const QString& uuid()const;
+ const TQString& checksum()const;
+ const TQString& conflictNew()const;
+ const TQString& conflictOld()const;
+ const TQString& conflictWrk()const;
+ const TQString& copyfromUrl()const;
+ const TQString& prejfile()const;
+ const TQString& reposRoot()const;
+ const TQString& url()const;
+ const TQString& uuid()const;
svn_node_kind_t kind()const;
const Revision& cmtRev()const;
const Revision& copyfromRev()const;
const Revision& revision()const;
svn_wc_schedule_t Schedule()const;
- QLONG size()const;
- QLONG working_size()const;
- const QByteArray&changeList()const;
+ TQLONG size()const;
+ TQLONG working_size()const;
+ const TQByteArray&changeList()const;
svn::Depth depth()const;
- const QString&prettyUrl()const;
+ const TQString&prettyUrl()const;
bool isDir()const;
- QString prettyUrl(const char*)const;
+ TQString prettyUrl(const char*)const;
protected:
DateTime m_last_changed_date;
@@ -88,27 +88,27 @@ protected:
DateTime m_prop_time;
bool m_hasWc;
LockEntry m_Lock;
- QString m_name;
- QString m_checksum;
- QString m_conflict_new;
- QString m_conflict_old;
- QString m_conflict_wrk;
- QString m_copyfrom_url;
- QString m_last_author;
- QString m_prejfile;
- QString m_repos_root;
- QString m_url;
- QString m_pUrl;
- QString m_UUID;
+ TQString m_name;
+ TQString m_checksum;
+ TQString m_conflict_new;
+ TQString m_conflict_old;
+ TQString m_conflict_wrk;
+ TQString m_copyfrom_url;
+ TQString m_last_author;
+ TQString m_prejfile;
+ TQString m_repos_root;
+ TQString m_url;
+ TQString m_pUrl;
+ TQString m_UUID;
svn_node_kind_t m_kind;
Revision m_copy_from_rev;
Revision m_last_changed_rev;
Revision m_revision;
svn_wc_schedule_t m_schedule;
- QLONG m_size;
- QLONG m_working_size;
- QByteArray m_changeList;
+ TQLONG m_size;
+ TQLONG m_working_size;
+ TQByteArray m_changeList;
svn::Depth m_depth;
protected:
diff --git a/src/svnqt/lock_entry.cpp b/src/svnqt/lock_entry.cpp
index cf7ffe1..f1c0fcf 100644
--- a/src/svnqt/lock_entry.cpp
+++ b/src/svnqt/lock_entry.cpp
@@ -51,21 +51,21 @@ namespace svn
const char * lock_comment,
const char * lock_token)
: date(lock_time),exp(expiration_time),
- owner(lock_owner?QString::FROMUTF8(lock_owner):""),
- comment(lock_comment?QString::FROMUTF8(lock_comment):""),
- token(lock_token?QString::FROMUTF8(lock_token):""),
+ owner(lock_owner?TQString::FROMUTF8(lock_owner):""),
+ comment(lock_comment?TQString::FROMUTF8(lock_comment):""),
+ token(lock_token?TQString::FROMUTF8(lock_token):""),
locked(lock_token?true:false)
{
}
- const QString&LockEntry::Comment()const
+ const TQString&LockEntry::Comment()const
{
return comment;
}
- const QString&LockEntry::Owner()const
+ const TQString&LockEntry::Owner()const
{
return owner;
}
- const QString&LockEntry::Token()const
+ const TQString&LockEntry::Token()const
{
return token;
}
@@ -86,9 +86,9 @@ namespace svn
if (src) {
date = src->lock_creation_date;
locked = src->lock_token?true:false;
- token = (src->lock_token?QString::FROMUTF8(src->lock_token):"");
- comment = (src->lock_comment?QString::FROMUTF8(src->lock_comment):"");
- owner = (src->lock_owner?QString::FROMUTF8(src->lock_owner):"");
+ token = (src->lock_token?TQString::FROMUTF8(src->lock_token):"");
+ comment = (src->lock_comment?TQString::FROMUTF8(src->lock_comment):"");
+ owner = (src->lock_owner?TQString::FROMUTF8(src->lock_owner):"");
} else {
date = 0;
owner = "";
@@ -104,9 +104,9 @@ namespace svn
if (src) {
date = src->creation_date;
locked = src->token?true:false;
- token = (src->token?QString::FROMUTF8(src->token):"");
- comment = (src->comment?QString::FROMUTF8(src->comment):"");
- owner = (src->owner?QString::FROMUTF8(src->owner):"");
+ token = (src->token?TQString::FROMUTF8(src->token):"");
+ comment = (src->comment?TQString::FROMUTF8(src->comment):"");
+ owner = (src->owner?TQString::FROMUTF8(src->owner):"");
} else {
date = 0;
exp = 0;
@@ -128,9 +128,9 @@ namespace svn
date = lock_time;
exp = expiration_time;
locked = lock_token?true:false;
- token = lock_token?QString::FROMUTF8(lock_token):"";
- owner = lock_owner?QString::FROMUTF8(lock_owner):"";
- comment = lock_comment?QString::FROMUTF8(lock_comment):"";
+ token = lock_token?TQString::FROMUTF8(lock_token):"";
+ owner = lock_owner?TQString::FROMUTF8(lock_owner):"";
+ comment = lock_comment?TQString::FROMUTF8(lock_comment):"";
}
}
diff --git a/src/svnqt/lock_entry.hpp b/src/svnqt/lock_entry.hpp
index eec3d1f..91f463d 100644
--- a/src/svnqt/lock_entry.hpp
+++ b/src/svnqt/lock_entry.hpp
@@ -34,7 +34,7 @@
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/datetime.hpp"
-#include <qstring.h>
+#include <tqstring.h>
// apr
#include "apr_time.h"
@@ -45,7 +45,7 @@
namespace svn
{
- class SVNQT_EXPORT LockEntry
+ class SVNTQT_EXPORT LockEntry
{
public:
LockEntry ();
@@ -64,9 +64,9 @@ namespace svn
const char * lock_comment,
const char * lock_token);
void init(const svn_lock_t*);
- const QString&Comment()const;
- const QString&Owner()const;
- const QString&Token()const;
+ const TQString&Comment()const;
+ const TQString&Owner()const;
+ const TQString&Token()const;
const DateTime&Date()const;
const DateTime&Expiration()const;
bool Locked()const;
@@ -74,9 +74,9 @@ namespace svn
protected:
DateTime date;
DateTime exp;
- QString owner;
- QString comment;
- QString token;
+ TQString owner;
+ TQString comment;
+ TQString token;
bool locked;
};
}
diff --git a/src/svnqt/log_entry.cpp b/src/svnqt/log_entry.cpp
index fdd28e8..fb9965c 100644
--- a/src/svnqt/log_entry.cpp
+++ b/src/svnqt/log_entry.cpp
@@ -45,36 +45,36 @@ namespace svn
char action_,
const char *copyFromPath_,
const svn_revnum_t copyFromRevision_)
- : path(QString::FROMUTF8(path_)), action(action_),
- copyFromPath (QString::FROMUTF8(copyFromPath_)),
+ : path(TQString::FROMUTF8(path_)), action(action_),
+ copyFromPath (TQString::FROMUTF8(copyFromPath_)),
copyFromRevision (copyFromRevision_)
{
}
- LogChangePathEntry::LogChangePathEntry (const QString &path_,
+ LogChangePathEntry::LogChangePathEntry (const TQString &path_,
char action_,
- const QString &copyFromPath_,
+ const TQString &copyFromPath_,
const svn_revnum_t copyFromRevision_)
: path(path_),
action(action_),
copyFromPath(copyFromPath_),
- copyToPath(QString::null),
+ copyToPath(TQString()),
copyFromRevision(copyFromRevision_),
copyToRevision(-1)
{
}
LogChangePathEntry::LogChangePathEntry()
- : path(QString::null),action(0),copyFromPath(QString::null),copyToPath(QString::null),
+ : path(TQString()),action(0),copyFromPath(TQString()),copyToPath(TQString()),
copyFromRevision(-1),copyToRevision(-1)
{
}
- LogChangePathEntry::LogChangePathEntry (const QString &path_,
+ LogChangePathEntry::LogChangePathEntry (const TQString &path_,
char action_,
- const QString &copyFromPath_,
+ const TQString &copyFromPath_,
const svn_revnum_t copyFromRevision_,
- const QString &copyToPath_,
+ const TQString &copyToPath_,
const svn_revnum_t copyToRevision_)
: path(path_),action(action_),copyFromPath(copyFromPath_),copyToPath(copyToPath_),
copyFromRevision(copyFromRevision_),copyToRevision(copyToRevision_)
@@ -96,8 +96,8 @@ namespace svn
const char *message_;
svn_compat_log_revprops_out(&author_, &date_, &message_, log_entry->revprops);
- author = author_ == 0 ? QString::fromLatin1("") : QString::FROMUTF8(author_);
- message = message_ == 0 ? QString::fromLatin1("") : QString::FROMUTF8(message_);
+ author = author_ == 0 ? TQString::tqfromLatin1("") : TQString::FROMUTF8(author_);
+ message = message_ == 0 ? TQString::tqfromLatin1("") : TQString::FROMUTF8(message_);
setDate(date_);
revision = log_entry->revision;
if (log_entry->changed_paths) {
@@ -125,8 +125,8 @@ namespace svn
setDate(date_);
revision = revision_;
- author = author_ == 0 ? QString::fromLatin1("") : QString::FROMUTF8(author_);
- message = message_ == 0 ? QString::fromLatin1("") : QString::FROMUTF8(message_);
+ author = author_ == 0 ? TQString::tqfromLatin1("") : TQString::FROMUTF8(author_);
+ message = message_ == 0 ? TQString::tqfromLatin1("") : TQString::FROMUTF8(message_);
}
void LogEntry::setDate(const char*date_)
@@ -144,7 +144,7 @@ namespace svn
}
-SVNQT_EXPORT QDataStream& operator<<(QDataStream&s,const svn::LogEntry&r)
+SVNTQT_EXPORT TQDataStream& operator<<(TQDataStream&s,const svn::LogEntry&r)
{
s << r.revision
<< r.author
@@ -154,7 +154,7 @@ SVNQT_EXPORT QDataStream& operator<<(QDataStream&s,const svn::LogEntry&r)
return s;
}
-SVNQT_EXPORT QDataStream& operator<<(QDataStream&s,const svn::LogChangePathEntry&r)
+SVNTQT_EXPORT TQDataStream& operator<<(TQDataStream&s,const svn::LogChangePathEntry&r)
{
short ac = r.action;
s << r.path
@@ -166,7 +166,7 @@ SVNQT_EXPORT QDataStream& operator<<(QDataStream&s,const svn::LogChangePathEntry
return s;
}
-SVNQT_EXPORT QDataStream& operator>>(QDataStream&s,svn::LogEntry&r)
+SVNTQT_EXPORT TQDataStream& operator>>(TQDataStream&s,svn::LogEntry&r)
{
s >> r.revision
>> r.author
@@ -176,7 +176,7 @@ SVNQT_EXPORT QDataStream& operator>>(QDataStream&s,svn::LogEntry&r)
return s;
}
-SVNQT_EXPORT QDataStream& operator>>(QDataStream&s,svn::LogChangePathEntry&r)
+SVNTQT_EXPORT TQDataStream& operator>>(TQDataStream&s,svn::LogChangePathEntry&r)
{
short ac;
s >> r.path
diff --git a/src/svnqt/log_entry.hpp b/src/svnqt/log_entry.hpp
index cc33f60..91f694c 100644
--- a/src/svnqt/log_entry.hpp
+++ b/src/svnqt/log_entry.hpp
@@ -34,21 +34,13 @@
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/datetime.hpp"
-//Qt
-#include <qglobal.h>
+//TQt
+#include <tqglobal.h>
-#if QT_VERSION < 0x040000
-
-#include <qglobal.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-
-#else
-
-#include <QtCore>
-
-#endif
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
// apr
#include "apr_time.h"
@@ -60,7 +52,7 @@
namespace svn
{
- class SVNQT_EXPORT LogChangePathEntry
+ class SVNTQT_EXPORT LogChangePathEntry
{
public:
LogChangePathEntry (const char *path_,
@@ -68,38 +60,34 @@ namespace svn
const char *copyFromPath_,
const svn_revnum_t copyFromRevision_);
- LogChangePathEntry (const QString &path_,
+ LogChangePathEntry (const TQString &path_,
char action_,
- const QString &copyFromPath_,
+ const TQString &copyFromPath_,
const svn_revnum_t copyFromRevision_);
- LogChangePathEntry (const QString &path_,
+ LogChangePathEntry (const TQString &path_,
char action_,
- const QString &copyFromPath_,
+ const TQString &copyFromPath_,
const svn_revnum_t copyFromRevision_,
- const QString &copyToPath_,
+ const TQString &copyToPath_,
const svn_revnum_t copyToRevision_);
LogChangePathEntry();
- QString path;
+ TQString path;
char action;
- QString copyFromPath;
+ TQString copyFromPath;
//! future use or useful in backends
- QString copyToPath;
+ TQString copyToPath;
- QLONG copyFromRevision;
+ TQLONG copyFromRevision;
//! future use or useful in backends
- QLONG copyToRevision;
+ TQLONG copyToRevision;
};
-#if QT_VERSION < 0x040000
- typedef QValueList<LogChangePathEntry> LogChangePathEntries;
-#else
- typedef QList<LogChangePathEntry> LogChangePathEntries;
-#endif
+ typedef TQValueList<LogChangePathEntry> LogChangePathEntries;
- class SVNQT_EXPORT LogEntry
+ class SVNTQT_EXPORT LogEntry
{
public:
LogEntry ();
@@ -114,20 +102,20 @@ namespace svn
void setDate(const char*date);
//! if -1 the entry is a fake entry and not real usable!
- QLONG revision;
- QLONG date;
- QString author;
- QString message;
+ TQLONG revision;
+ TQLONG date;
+ TQString author;
+ TQString message;
LogChangePathEntries changedPaths;
- QLIST<QLONG> m_MergedInRevisions;
+ TQLIST<TQLONG> m_MergedInRevisions;
};
}
-SVNQT_EXPORT QDataStream &operator<<(QDataStream&s,const svn::LogEntry&r);
-SVNQT_EXPORT QDataStream &operator<<(QDataStream&s,const svn::LogChangePathEntry&r);
+SVNTQT_EXPORT TQDataStream &operator<<(TQDataStream&s,const svn::LogEntry&r);
+SVNTQT_EXPORT TQDataStream &operator<<(TQDataStream&s,const svn::LogChangePathEntry&r);
-SVNQT_EXPORT QDataStream &operator>>(QDataStream&s,svn::LogEntry&r);
-SVNQT_EXPORT QDataStream &operator>>(QDataStream&s,svn::LogChangePathEntry&r);
+SVNTQT_EXPORT TQDataStream &operator>>(TQDataStream&s,svn::LogEntry&r);
+SVNTQT_EXPORT TQDataStream &operator>>(TQDataStream&s,svn::LogChangePathEntry&r);
#endif
/* -----------------------------------------------------------------
diff --git a/src/svnqt/path.cpp b/src/svnqt/path.cpp
index 676c151..71b877c 100644
--- a/src/svnqt/path.cpp
+++ b/src/svnqt/path.cpp
@@ -43,16 +43,16 @@
#include "svnqt/revision.hpp"
#include "svnqt/exception.hpp"
-#include <qurl.h>
+#include <tqurl.h>
namespace svn
{
Path::Path (const char * path)
{
- init(QString::FROMUTF8(path));
+ init(TQString::FROMUTF8(path));
}
- Path::Path (const QString & path)
+ Path::Path (const TQString & path)
{
init (path);
}
@@ -63,7 +63,7 @@ namespace svn
}
void
- Path::init (const QString& path)
+ Path::init (const TQString& path)
{
Pool pool;
@@ -76,25 +76,17 @@ namespace svn
int_path = svn_path_uri_encode(int_path,pool);
}
}
- m_path = QString::FROMUTF8(int_path);
-#if QT_VERSION < 0x040000
- if (Url::isValid(path) && m_path.find("@")!=-1 ) {
-#else
- if (Url::isValid(path) && m_path.indexOf("@")!=-1 ) {
-#endif
+ m_path = TQString::FROMUTF8(int_path);
+ if (Url::isValid(path) && m_path.tqfind("@")!=-1 ) {
/// @todo make sure that "@" is never used as revision paramter
- QUrl uri = m_path;
+ TQUrl uri = m_path;
m_path = uri.path();
- m_path.replace("@","%40");
-#if QT_VERSION < 0x040000
+ m_path.tqreplace("@","%40");
m_path = uri.protocol()+"://"+(uri.hasUser()?uri.user()+(uri.hasPassword()?":"+uri.password():"")+"@":"")
+uri.host()+m_path;
-#else
- m_path = uri.scheme()+"://"+uri.authority()+m_path;
-#endif
if (m_path.endsWith("/")) {
int_path = svn_path_internal_style (path.TOUTF8(), pool.pool () );
- m_path = QString::FROMUTF8(int_path);
+ m_path = TQString::FROMUTF8(int_path);
}
}
}
@@ -105,30 +97,30 @@ namespace svn
return Url::isValid(m_path);
}
- const QString &
+ const TQString &
Path::path () const
{
return m_path;
}
- Path::operator const QString&()const
+ Path::operator const TQString&()const
{
return m_path;
}
- QString Path::prettyPath()const
+ TQString Path::prettyPath()const
{
if (!Url::isValid(m_path)) {
return m_path;
}
Pool pool;
const char * int_path = svn_path_uri_decode(m_path.TOUTF8(), pool.pool () );
- QString _p = QString::FROMUTF8(int_path);
- _p.replace("%40","@");
+ TQString _p = TQString::FROMUTF8(int_path);
+ _p.tqreplace("%40","@");
return _p;
}
- const QByteArray
+ const TQByteArray
Path::cstr() const
{
return m_path.TOUTF8();
@@ -150,7 +142,7 @@ namespace svn
}
void
- Path::addComponent (const QString& component)
+ Path::addComponent (const TQString& component)
{
Pool pool;
@@ -158,7 +150,7 @@ namespace svn
{
const char * newPath =
svn_path_url_add_component (m_path.TOUTF8(), component.TOUTF8(), pool);
- m_path = QString::FROMUTF8(newPath);
+ m_path = TQString::FROMUTF8(newPath);
}
else
{
@@ -168,7 +160,7 @@ namespace svn
svn_path_add_component (pathStringbuf,
component.TOUTF8());
- m_path = QString::FROMUTF8(pathStringbuf->data);
+ m_path = TQString::FROMUTF8(pathStringbuf->data);
}
}
@@ -176,7 +168,7 @@ namespace svn
void
Path::addComponent (const char* component)
{
- addComponent (QString::FROMUTF8(component));
+ addComponent (TQString::FROMUTF8(component));
}
@@ -185,16 +177,16 @@ namespace svn
{
Pool pool;
if (m_path.length()<=1) {
- m_path=QString::FROMUTF8("");
+ m_path=TQString::FROMUTF8("");
}
svn_stringbuf_t*pathStringbuf=
svn_stringbuf_create (m_path.TOUTF8(), pool);
svn_path_remove_component(pathStringbuf);
- m_path = QString::FROMUTF8(pathStringbuf->data);
+ m_path = TQString::FROMUTF8(pathStringbuf->data);
}
void
- Path::split (QString & dirpath, QString & basename) const
+ Path::split (TQString & dirpath, TQString & basename) const
{
Pool pool;
@@ -202,30 +194,26 @@ namespace svn
const char * cbasename;
svn_path_split (prettyPath().TOUTF8(), &cdirpath, &cbasename, pool);
- dirpath = QString::FROMUTF8(cdirpath);
- basename = QString::FROMUTF8(cbasename);
+ dirpath = TQString::FROMUTF8(cdirpath);
+ basename = TQString::FROMUTF8(cbasename);
}
void
- Path::split (QString & dir, QString & filename, QString & ext) const
+ Path::split (TQString & dir, TQString & filename, TQString & ext) const
{
- QString basename;
+ TQString basename;
// first split path into dir and filename+ext
split (dir, basename);
// next search for last .
-#if QT_VERSION < 0x040000
- int pos = basename.findRev(QChar('.'));
-#else
- int pos = basename.lastIndexOf(QChar('.'));
-#endif
+ int pos = basename.tqfindRev(TQChar('.'));
if (pos == -1)
{
filename = basename;
- ext = QString::fromLatin1("");
+ ext = TQString::tqfromLatin1("");
}
else
{
@@ -249,12 +237,12 @@ namespace svn
}
void
- Path::parsePeg(const QString&pathorurl,Path&_path,svn::Revision&_peg)
+ Path::parsePeg(const TQString&pathorurl,Path&_path,svn::Revision&_peg)
{
const char *truepath = 0;
svn_opt_revision_t pegr;
svn_error_t *error = 0;
- QByteArray _buf = pathorurl.TOUTF8();
+ TQByteArray _buf = pathorurl.TOUTF8();
Pool pool;
error = svn_opt_parse_path(&pegr, &truepath,_buf,pool);
@@ -273,12 +261,12 @@ namespace svn
}
- QString
+ TQString
Path::native () const
{
Pool pool;
- return QString::FROMUTF8(svn_path_local_style (m_path.TOUTF8(), pool));
+ return TQString::FROMUTF8(svn_path_local_style (m_path.TOUTF8(), pool));
}
}
diff --git a/src/svnqt/path.hpp b/src/svnqt/path.hpp
index 0d92fc2..b9cc73f 100644
--- a/src/svnqt/path.hpp
+++ b/src/svnqt/path.hpp
@@ -31,7 +31,7 @@
#ifndef _SVNCPP_PATH_HPP_
#define _SVNCPP_PATH_HPP_
-#include <qstring.h>
+#include <tqstring.h>
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/svnqttypes.hpp"
@@ -40,17 +40,17 @@ namespace svn
/**
* Encapsulation for Subversion Path handling
*/
- class SVNQT_EXPORT Path
+ class SVNTQT_EXPORT Path
{
private:
- QString m_path;
+ TQString m_path;
/**
* initialize the class
*
* @param path Path string - when url this should NOT hold revision as @ parameter!!!!! (will filtered out)
*/
- void init (const QString& path);
+ void init (const TQString& path);
public:
/**
@@ -60,12 +60,12 @@ namespace svn
*
* @param path Path string - when url this should NOT hold revision as @ parameter!!!!! (will filtered out)
*/
- Path (const QString & path = QString::null);
+ Path (const TQString & path = TQString());
/**
* Constructor
*
- * @see Path::Path (const QString &)
+ * @see Path::Path (const TQString &)
* @param path Path string - when url this should NOT hold revision as @ parameter!!!!! (will filtered out)
*/
Path (const char * path);
@@ -85,23 +85,23 @@ namespace svn
/**
* @return Path string
*/
- const QString &
+ const TQString &
path () const;
/**
* @return Path string
*/
- operator const QString&()const;
+ operator const TQString&()const;
/**
* @return Path as pretty url
*/
- QString prettyPath()const;
+ TQString prettyPath()const;
/**
* @return Path string as c string
*/
- const QByteArray cstr() const;
+ const TQByteArray cstr() const;
/**
* check whether a path is set. Right now
@@ -129,9 +129,9 @@ namespace svn
* @param component new component to add
*/
void
- addComponent (const QString & component);
+ addComponent (const TQString & component);
- /** Reduce path to its parent folder.
+ /** Reduce path to its tqparent folder.
* If the path length is 1 (eg., only "/") it will cleared so
* path length will get zero.
* @sa svn_path_remove_component
@@ -147,7 +147,7 @@ namespace svn
* @param basename filename
*/
void
- split (QString & dirpath, QString & basename) const;
+ split (TQString & dirpath, TQString & basename) const;
/**
@@ -159,7 +159,7 @@ namespace svn
* @param ext extension (including leading dot ".")
*/
void
- split (QString & dir, QString & filename, QString & ext) const;
+ split (TQString & dir, TQString & filename, TQString & ext) const;
/**
@@ -175,7 +175,7 @@ namespace svn
* @throw svn::ClientException on errors
*/
static void
- parsePeg(const QString&pathorurl,Path&_path,svn::Revision&_peg);
+ parsePeg(const TQString&pathorurl,Path&_path,svn::Revision&_peg);
/** return the length of the path-string */
@@ -184,7 +184,7 @@ namespace svn
/** returns the path with native separators */
- QString
+ TQString
native () const;
/** returns if the path is a valid url, eg. points to a remote */
diff --git a/src/svnqt/pool.cpp b/src/svnqt/pool.cpp
index 34ef947..0f624b4 100644
--- a/src/svnqt/pool.cpp
+++ b/src/svnqt/pool.cpp
@@ -37,17 +37,17 @@ namespace svn
bool Pool::s_initialized = false;
apr_pool_t *
- Pool::pool_create (apr_pool_t * parent)
+ Pool::pool_create (apr_pool_t * tqparent)
{
if (!s_initialized) {
apr_pool_initialize();
s_initialized=true;
}
- return svn_pool_create (parent);
+ return svn_pool_create (tqparent);
}
- Pool::Pool (apr_pool_t * parent)
- : m_parent (parent), m_pool (pool_create (parent))
+ Pool::Pool (apr_pool_t * tqparent)
+ : m_tqparent (tqparent), m_pool (pool_create (tqparent))
{
}
@@ -72,7 +72,7 @@ namespace svn
{
svn_pool_destroy (m_pool);
}
- m_pool = pool_create (m_parent);
+ m_pool = pool_create (m_tqparent);
}
//TODO
diff --git a/src/svnqt/pool.hpp b/src/svnqt/pool.hpp
index accdd75..46e0a8e 100644
--- a/src/svnqt/pool.hpp
+++ b/src/svnqt/pool.hpp
@@ -46,9 +46,9 @@ namespace svn
/**
* creates a subpool new pool to an existing pool
*
- * @param parent NULL -> global pool
+ * @param tqparent NULL -> global pool
*/
- Pool (apr_pool_t * parent = (apr_pool_t *)0);
+ Pool (apr_pool_t * tqparent = (apr_pool_t *)0);
virtual ~ Pool ();
@@ -71,7 +71,7 @@ namespace svn
*/
void renew ();
private:
- apr_pool_t * m_parent;
+ apr_pool_t * m_tqparent;
apr_pool_t * m_pool;
Pool& operator=(const Pool&);
@@ -79,7 +79,7 @@ namespace svn
Pool (const Pool &);
static bool s_initialized;
- static apr_pool_t * pool_create (apr_pool_t * parent);
+ static apr_pool_t * pool_create (apr_pool_t * tqparent);
};
}
diff --git a/src/svnqt/repository.cpp b/src/svnqt/repository.cpp
index 2a3dd0e..15530ff 100644
--- a/src/svnqt/repository.cpp
+++ b/src/svnqt/repository.cpp
@@ -37,9 +37,9 @@ Repository::~Repository()
/*!
- \fn svn::Repository::Open(const QString&)
+ \fn svn::Repository::Open(const TQString&)
*/
-void Repository::Open(const QString&name) throw (ClientException)
+void Repository::Open(const TQString&name) throw (ClientException)
{
svn_error_t * error = m_Data->Open(name);
if (error!=0) {
@@ -47,7 +47,7 @@ void Repository::Open(const QString&name) throw (ClientException)
}
}
-void Repository::CreateOpen(const QString&path, const QString&fstype, bool _bdbnosync, bool _bdbautologremove, bool _pre_1_4_compat, bool _pre_1_5_compat) throw (ClientException)
+void Repository::CreateOpen(const TQString&path, const TQString&fstype, bool _bdbnosync, bool _bdbautologremove, bool _pre_1_4_compat, bool _pre_1_5_compat) throw (ClientException)
{
svn_error_t * error = m_Data->CreateOpen(path,fstype,_bdbnosync,_bdbautologremove,_pre_1_4_compat,_pre_1_5_compat);
if (error!=0) {
@@ -57,9 +57,9 @@ void Repository::CreateOpen(const QString&path, const QString&fstype, bool _bdbn
/*!
- \fn svn::Repository::dump(const QString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)throw (ClientException)
+ \fn svn::Repository::dump(const TQString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)throw (ClientException)
*/
-void Repository::dump(const QString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)throw (ClientException)
+void Repository::dump(const TQString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)throw (ClientException)
{
svn_error_t * error = m_Data->dump(output,start,end,incremental,use_deltas);
if (error!=0) {
@@ -67,7 +67,7 @@ void Repository::dump(const QString&output,const svn::Revision&start,const svn::
}
}
-void Repository::loaddump(const QString&dump,LOAD_UUID uuida, const QString&parentFolder, bool usePre, bool usePost)throw (ClientException)
+void Repository::loaddump(const TQString&dump,LOAD_UUID uuida, const TQString&tqparentFolder, bool usePre, bool usePost)throw (ClientException)
{
svn_repos_load_uuid uuid_action;
switch (uuida) {
@@ -82,16 +82,16 @@ void Repository::loaddump(const QString&dump,LOAD_UUID uuida, const QString&pare
uuid_action=svn_repos_load_uuid_default;
break;
}
- svn_error_t * error = m_Data->loaddump(dump,uuid_action,parentFolder,usePre,usePost);
+ svn_error_t * error = m_Data->loaddump(dump,uuid_action,tqparentFolder,usePre,usePost);
if (error!=0) {
throw ClientException (error);
}
}
/*!
- \fn svn::Repository::hotcopy(const QString&src,const QString&dest,bool cleanlogs)
+ \fn svn::Repository::hotcopy(const TQString&src,const TQString&dest,bool cleanlogs)
*/
-void Repository::hotcopy(const QString&src,const QString&dest,bool cleanlogs)throw (ClientException)
+void Repository::hotcopy(const TQString&src,const TQString&dest,bool cleanlogs)throw (ClientException)
{
svn_error_t * error = RepositoryData::hotcopy(src,dest,cleanlogs);
if (error!=0) {
diff --git a/src/svnqt/repository.hpp b/src/svnqt/repository.hpp
index e4ea5eb..ff8e730 100644
--- a/src/svnqt/repository.hpp
+++ b/src/svnqt/repository.hpp
@@ -29,7 +29,7 @@
#include "svnqt/revision.hpp"
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn {
@@ -42,7 +42,7 @@ class RepositoryListener;
/*!
\author Rajko Albrecht <ral@alwins-world.de>
*/
-class SVNQT_EXPORT Repository{
+class SVNTQT_EXPORT Repository{
public:
enum LOAD_UUID {
UUID_DEFAULT_ACTION = 0,
@@ -63,7 +63,7 @@ public:
\param path Path to a local repository, must not be an url
\exception ClientException will be thrown in case of an error
*/
- void Open(const QString&path) throw (ClientException);
+ void Open(const TQString&path) throw (ClientException);
//! Creates and open a new repository
/*!
* Creates a new repository in path with type fstype. If create succeeded open and assigns with the object.
@@ -74,7 +74,7 @@ public:
* \param _bdbautologremove enable automatic log file removal [Berkeley DB]
* \param _pre_1_4_compat Create repository compatibel to version earlier than 1.4 (only used with subversion 1.4)
*/
- void CreateOpen(const QString&path, const QString&fstype, bool _bdbnosync = false,
+ void CreateOpen(const TQString&path, const TQString&fstype, bool _bdbnosync = false,
bool _bdbautologremove = true, bool _pre_1_4_compat=false, bool _pre_1_5_compat=false) throw (ClientException);
//! dump content of repository to a file
/*!
@@ -87,18 +87,18 @@ public:
\param use_deltas use deltas in dump output
\exception ClientException will be thrown in case of an error
*/
- void dump(const QString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)throw (ClientException);
+ void dump(const TQString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)throw (ClientException);
//! load a dump into repository
/*!
The repository must opened before. Progress message go trough the assigned svn::repository::RepositoryListener object.
\param dump Dumpfile to load
\param uuida what to do with UUIDs
- \param parentFolder put content of dumpstream within folder in repository, if empty put into root-folder.
+ \param tqparentFolder put content of dumpstream within folder in repository, if empty put into root-folder.
\param usePre use pre-commit-hook
\param usePost use post-commit-hook
\exception ClientException will be thrown in case of an error
*/
- void loaddump(const QString&dump,LOAD_UUID uuida, const QString&parentFolder, bool usePre, bool usePost)throw (ClientException);
+ void loaddump(const TQString&dump,LOAD_UUID uuida, const TQString&tqparentFolder, bool usePre, bool usePost)throw (ClientException);
//! copy a repository to a new location
/*!
\param src the repository path to copy
@@ -106,7 +106,7 @@ public:
\param cleanlogs remove redundand log files from source
\exception ClientException will be thrown in case of an error
*/
- static void hotcopy(const QString&src,const QString&dest,bool cleanlogs)throw (ClientException);
+ static void hotcopy(const TQString&src,const TQString&dest,bool cleanlogs)throw (ClientException);
private:
RepositoryData*m_Data;
diff --git a/src/svnqt/repositorydata.cpp b/src/svnqt/repositorydata.cpp
index 2ab9c5d..532c80a 100644
--- a/src/svnqt/repositorydata.cpp
+++ b/src/svnqt/repositorydata.cpp
@@ -53,7 +53,7 @@ RepoOutStream::RepoOutStream(RepositoryData*aBack)
long RepoOutStream::write(const char*data,const unsigned long max)
{
if (m_Back) {
- QString msg = QString::FROMUTF8(data,max);
+ TQString msg = TQString::FROMUTF8(data,max);
m_Back->reposFsWarning(msg);
}
return max;
@@ -75,13 +75,13 @@ void RepositoryData::warning_func(void *baton, svn_error_t *err)
RepositoryData*_r = (RepositoryData*)baton;
if (_r) {
- QString msg = svn::Exception::error2msg(err);
+ TQString msg = svn::Exception::error2msg(err);
svn_error_clear(err);
_r->reposFsWarning(msg);
}
}
-void RepositoryData::reposFsWarning(const QString&msg)
+void RepositoryData::reposFsWarning(const TQString&msg)
{
if (m_Listener) {
m_Listener->sendWarning(msg);
@@ -92,7 +92,7 @@ svn_error_t*RepositoryData::cancel_func(void*baton)
{
RepositoryListener*m_L = (RepositoryListener*)baton;
if (m_L && m_L->isCanceld()) {
- return svn_error_create (SVN_ERR_CANCELLED, 0, QString::FROMUTF8("Cancelled by user.").TOUTF8());
+ return svn_error_create (SVN_ERR_CANCELLED, 0, TQString::FROMUTF8("Cancelled by user.").TOUTF8());
}
return SVN_NO_ERROR;
}
@@ -108,9 +108,9 @@ void RepositoryData::Close()
/*!
- \fn svn::RepositoryData::Open(const QString&)
+ \fn svn::RepositoryData::Open(const TQString&)
*/
-svn_error_t * RepositoryData::Open(const QString&path)
+svn_error_t * RepositoryData::Open(const TQString&path)
{
Close();
svn_error_t * error = svn_repos_open(&m_Repository,path.TOUTF8(),m_Pool);
@@ -124,20 +124,16 @@ svn_error_t * RepositoryData::Open(const QString&path)
/*!
- \fn svn::RepositoryData::CreateOpen(const QString&path, const QString&fstype, bool _bdbnosync = false, bool _bdbautologremove = true, bool nosvn1diff=false)
+ \fn svn::RepositoryData::CreateOpen(const TQString&path, const TQString&fstype, bool _bdbnosync = false, bool _bdbautologremove = true, bool nosvn1diff=false)
*/
-svn_error_t * RepositoryData::CreateOpen(const QString&path, const QString&fstype, bool _bdbnosync,
+svn_error_t * RepositoryData::CreateOpen(const TQString&path, const TQString&fstype, bool _bdbnosync,
bool _bdbautologremove,
bool _pre_1_4_compat,
bool _pre_1_5_compat)
{
Close();
const char* _type;
-#if QT_VERSION < 0x040000
if (fstype.lower()=="bdb") {
-#else
- if (fstype.toLower()=="bdb") {
-#endif
_type="bdb";
} else {
_type="fsfs";
@@ -194,9 +190,9 @@ svn_error_t * RepositoryData::CreateOpen(const QString&path, const QString&fstyp
/*!
- \fn svn::RepositoryData::dump(const QString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)
+ \fn svn::RepositoryData::dump(const TQString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)
*/
-svn_error_t* RepositoryData::dump(const QString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)
+svn_error_t* RepositoryData::dump(const TQString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas)
{
if (!m_Repository) {
return svn_error_create(SVN_ERR_CANCELLED,0,"No repository selected.");
@@ -213,7 +209,7 @@ svn_error_t* RepositoryData::dump(const QString&output,const svn::Revision&start
return SVN_NO_ERROR;
}
-svn_error_t* RepositoryData::loaddump(const QString&dump,svn_repos_load_uuid uuida, const QString&parentFolder, bool usePre, bool usePost)
+svn_error_t* RepositoryData::loaddump(const TQString&dump,svn_repos_load_uuid uuida, const TQString&tqparentFolder, bool usePre, bool usePost)
{
if (!m_Repository) {
return svn_error_create(SVN_ERR_CANCELLED,0,"No repository selected.");
@@ -223,10 +219,10 @@ svn_error_t* RepositoryData::loaddump(const QString&dump,svn_repos_load_uuid uui
Pool pool;
const char*src_path = apr_pstrdup (pool,dump.TOUTF8());
const char*dest_path;
- if (parentFolder.isEmpty()) {
+ if (tqparentFolder.isEmpty()) {
dest_path=0;
} else {
- dest_path=apr_pstrdup (pool,parentFolder.TOUTF8());
+ dest_path=apr_pstrdup (pool,tqparentFolder.TOUTF8());
}
src_path = svn_path_internal_style(src_path, pool);
@@ -234,7 +230,7 @@ svn_error_t* RepositoryData::loaddump(const QString&dump,svn_repos_load_uuid uui
return SVN_NO_ERROR;
}
-svn_error_t* RepositoryData::hotcopy(const QString&src,const QString&dest,bool cleanlogs)
+svn_error_t* RepositoryData::hotcopy(const TQString&src,const TQString&dest,bool cleanlogs)
{
Pool pool;
const char*src_path = apr_pstrdup (pool,src.TOUTF8());
diff --git a/src/svnqt/repositorydata.hpp b/src/svnqt/repositorydata.hpp
index 9884b70..8e2e8d1 100644
--- a/src/svnqt/repositorydata.hpp
+++ b/src/svnqt/repositorydata.hpp
@@ -25,7 +25,7 @@
#include "svnqt/apr.hpp"
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
#include <svn_repos.h>
#include <svn_error.h>
@@ -39,7 +39,7 @@ class RepositoryListener;
/**
@author Rajko Albrecht <ral@alwins-world.de>
*/
-class SVNQT_NOEXPORT RepositoryData{
+class SVNTQT_NOEXPORT RepositoryData{
friend class Repository;
public:
@@ -47,14 +47,14 @@ public:
virtual ~RepositoryData();
void Close();
- svn_error_t * Open(const QString&);
- svn_error_t * CreateOpen(const QString&path, const QString&fstype, bool _bdbnosync = false,
+ svn_error_t * Open(const TQString&);
+ svn_error_t * CreateOpen(const TQString&path, const TQString&fstype, bool _bdbnosync = false,
bool _bdbautologremove = true, bool _pre_1_4_compat=false, bool _pre_1_5_compat=false);
- void reposFsWarning(const QString&msg);
- svn_error_t* dump(const QString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas);
- svn_error_t* loaddump(const QString&dump,svn_repos_load_uuid uuida, const QString&parentFolder, bool usePre, bool usePost);
- static svn_error_t* hotcopy(const QString&src,const QString&dest,bool cleanlogs);
+ void reposFsWarning(const TQString&msg);
+ svn_error_t* dump(const TQString&output,const svn::Revision&start,const svn::Revision&end, bool incremental, bool use_deltas);
+ svn_error_t* loaddump(const TQString&dump,svn_repos_load_uuid uuida, const TQString&tqparentFolder, bool usePre, bool usePost);
+ static svn_error_t* hotcopy(const TQString&src,const TQString&dest,bool cleanlogs);
protected:
Pool m_Pool;
diff --git a/src/svnqt/repositorylistener.hpp b/src/svnqt/repositorylistener.hpp
index 15d650d..b5e7d7c 100644
--- a/src/svnqt/repositorylistener.hpp
+++ b/src/svnqt/repositorylistener.hpp
@@ -25,14 +25,14 @@
*/
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn {
namespace repository {
//! class for callbacks on repository operations
-class SVNQT_EXPORT RepositoryListener{
+class SVNTQT_EXPORT RepositoryListener{
public:
//! constructor
@@ -41,9 +41,9 @@ public:
virtual ~RepositoryListener();
//! sends a warning or informative message
- virtual void sendWarning(const QString&)=0;
+ virtual void sendWarning(const TQString&)=0;
//! sends an error message
- virtual void sendError(const QString&)=0;
+ virtual void sendError(const TQString&)=0;
//! check if running operation should cancelled
virtual bool isCanceld() =0;
diff --git a/src/svnqt/revision.cpp b/src/svnqt/revision.cpp
index a89fae1..c34a819 100644
--- a/src/svnqt/revision.cpp
+++ b/src/svnqt/revision.cpp
@@ -34,7 +34,7 @@
#include "pool.hpp"
// qt
-#include "qdatetime.h"
+#include "tqdatetime.h"
namespace svn
{
@@ -71,7 +71,7 @@ namespace svn
m_revision.value.number = 0;
}
- Revision::Revision (const int revnum, const QString&revstring)
+ Revision::Revision (const int revnum, const TQString&revstring)
{
m_revision.kind = svn_opt_revision_unspecified;
@@ -83,13 +83,13 @@ namespace svn
}
}
- Revision::Revision (const QString&revstring)
+ Revision::Revision (const TQString&revstring)
{
assign(revstring);
}
void
- Revision::assign(const QString&revstring)
+ Revision::assign(const TQString&revstring)
{
m_revision.kind = svn_opt_revision_unspecified;
if (revstring.isEmpty()) {
@@ -112,14 +112,14 @@ namespace svn
}
void
- Revision::assign(const QDateTime&dateTime)
+ Revision::assign(const TQDateTime&dateTime)
{
m_revision.kind = svn_opt_revision_date;
DateTime dt(dateTime);
m_revision.value.date = dt.GetAPRTimeT();
}
- Revision& Revision::operator=(const QString&what)
+ Revision& Revision::operator=(const TQString&what)
{
assign(what);
return *this;
@@ -131,7 +131,7 @@ namespace svn
m_revision.value.date = dateTime.GetAPRTimeT();
}
- Revision::Revision (const QDateTime&dateTime)
+ Revision::Revision (const TQDateTime&dateTime)
{
assign(dateTime);
}
@@ -172,15 +172,15 @@ namespace svn
}
}
- Revision::operator QString ()const
+ Revision::operator TQString ()const
{
return toString();
}
- QString Revision::toString()const
+ TQString Revision::toString()const
{
- QString value;
- QDateTime result;
+ TQString value;
+ TQDateTime result;
switch (m_revision.kind) {
case svn_opt_revision_number:
value.sprintf("%li",m_revision.value.number);
diff --git a/src/svnqt/revision.hpp b/src/svnqt/revision.hpp
index 371b1a1..706b68c 100644
--- a/src/svnqt/revision.hpp
+++ b/src/svnqt/revision.hpp
@@ -36,13 +36,9 @@
#include <svnqt/svnqt_defines.hpp>
// qt
-#include <qglobal.h>
-#if QT_VERSION < 0x040000
- #include <qstring.h>
- #include <qtextstream.h>
-#else
- #include <QtCore>
-#endif
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
// subversion api
#include "svn_types.h"
@@ -55,7 +51,7 @@ namespace svn
*
* @see svn_opt_revnum_t
*/
- class SVNQT_EXPORT Revision
+ class SVNTQT_EXPORT Revision
{
private:
svn_opt_revision_t m_revision;
@@ -64,10 +60,10 @@ namespace svn
init (const svn_opt_revision_t * revision);
void
- assign(const QString&);
+ assign(const TQString&);
void
- assign(const QDateTime&);
+ assign(const TQDateTime&);
public:
static const svn_opt_revision_kind START;
@@ -102,7 +98,7 @@ namespace svn
* The revision string MUST uppercase, it may some of "HEAD", "BASE", "WORKING", "COMMITED", "PREV",
* or a date in form {YYYY-MM-DD}.
*/
- Revision (const int revnum, const QString&revstring);
+ Revision (const int revnum, const TQString&revstring);
/**
* Constructor
@@ -111,7 +107,7 @@ namespace svn
* The revision string MUST uppercase, it may some of "HEAD", "BASE", "WORKING", "COMMITED", "PREV",
* or a date in form {YYYY-MM-DD}.
*/
- Revision (const QString&revstring);
+ Revision (const TQString&revstring);
/**
* Constructor
@@ -130,9 +126,9 @@ namespace svn
/**
* Constructor
*
- * @param dateTime QDateTime type
+ * @param dateTime TQDateTime type
*/
- Revision (const QDateTime&dateTime);
+ Revision (const TQDateTime&dateTime);
/**
* Copy constructor
@@ -177,8 +173,8 @@ namespace svn
svn_opt_revision_kind
kind () const;
- operator QString ()const;
- QString toString()const;
+ operator TQString ()const;
+ TQString toString()const;
bool isRemote()const;
@@ -203,12 +199,12 @@ namespace svn
* @param what a simple revision string (not s:e but s)
* @return object itself
*/
- Revision& operator=(const QString&what);
+ Revision& operator=(const TQString&what);
};
}
-inline QTextStream& operator<<(QTextStream&s,svn::Revision&r)
+inline TQTextStream& operator<<(TQTextStream&s,svn::Revision&r)
{
s << r.toString();
return s;
diff --git a/src/svnqt/shared_pointer.hpp b/src/svnqt/shared_pointer.hpp
index cd1587e..4e5ca5b 100644
--- a/src/svnqt/shared_pointer.hpp
+++ b/src/svnqt/shared_pointer.hpp
@@ -18,8 +18,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef SVNQT_SHARED_POINTER_HPP
-#define SVNQT_SHARED_POINTER_HPP
+#ifndef SVNTQT_SHARED_POINTER_HPP
+#define SVNTQT_SHARED_POINTER_HPP
#include "svnqt/smart_pointer.hpp"
diff --git a/src/svnqt/smart_pointer.hpp b/src/svnqt/smart_pointer.hpp
index 2790df5..f579160 100644
--- a/src/svnqt/smart_pointer.hpp
+++ b/src/svnqt/smart_pointer.hpp
@@ -20,8 +20,8 @@
#ifndef _smart_pointer_hpp
#define _smart_pointer_hpp
-#if defined QT_THREAD_SUPPORT
-#include "qmutex.h"
+#if defined TQT_THREAD_SUPPORT
+#include "tqmutex.h"
#endif
#include "svnqt/svnqt_defines.hpp"
@@ -41,28 +41,28 @@ class ref_count {
protected:
//! reference count member
long m_RefCount;
-#ifdef QT_THREAD_SUPPORT
- QMutex m_RefcountMutex;
+#ifdef TQT_THREAD_SUPPORT
+ TQMutex m_RefcountMutex;
#endif
public:
//! first reference must be added after "new" via Pointer()
ref_count() : m_RefCount(0)
-#ifdef QT_THREAD_SUPPORT
+#ifdef TQT_THREAD_SUPPORT
,m_RefcountMutex()
#endif
{}
virtual ~ref_count() {}
//! add a reference
void Incr() {
-#ifdef QT_THREAD_SUPPORT
- QMutexLocker a(&m_RefcountMutex);
+#ifdef TQT_THREAD_SUPPORT
+ TQMutexLocker a(&m_RefcountMutex);
#endif
++m_RefCount;
}
//! delete a reference
bool Decr() {
-#ifdef QT_THREAD_SUPPORT
- QMutexLocker a(&m_RefcountMutex);
+#ifdef TQT_THREAD_SUPPORT
+ TQMutexLocker a(&m_RefcountMutex);
#endif
--m_RefCount;
return Shared();
diff --git a/src/svnqt/status.cpp b/src/svnqt/status.cpp
index 15a4af0..f178229 100644
--- a/src/svnqt/status.cpp
+++ b/src/svnqt/status.cpp
@@ -38,7 +38,7 @@
namespace svn
{
- class SVNQT_NOEXPORT Status_private
+ class SVNTQT_NOEXPORT Status_private
{
public:
Status_private();
@@ -50,17 +50,17 @@ namespace svn
* @param status if NULL isVersioned will be false
*/
void
- init (const QString&path, const svn_wc_status2_t * status);
+ init (const TQString&path, const svn_wc_status2_t * status);
void
- init (const QString&path,const Status_private&src);
+ init (const TQString&path,const Status_private&src);
void
- init(const QString&url,const DirEntryPtr&src);
+ init(const TQString&url,const DirEntryPtr&src);
void
- init(const QString&url,const InfoEntry&src);
+ init(const TQString&url,const InfoEntry&src);
- void setPath(const QString&);
+ void setPath(const TQString&);
- QString m_Path;
+ TQString m_Path;
bool m_isVersioned;
bool m_hasReal;
LockEntry m_Lock;
@@ -79,18 +79,18 @@ namespace svn
{
}
- void Status_private::setPath(const QString&aPath)
+ void Status_private::setPath(const TQString&aPath)
{
Pool pool;
if (!Url::isValid(aPath)) {
m_Path = aPath;
} else {
const char * int_path = svn_path_uri_decode(aPath.TOUTF8(), pool.pool () );
- m_Path = QString::FROMUTF8(int_path);
+ m_Path = TQString::FROMUTF8(int_path);
}
}
- void Status_private::init (const QString&path, const svn_wc_status2_t * status)
+ void Status_private::init (const TQString&path, const svn_wc_status2_t * status)
{
setPath(path);
if (!status)
@@ -131,7 +131,7 @@ namespace svn
}
void
- Status_private::init (const QString&path,const Status_private&src)
+ Status_private::init (const TQString&path,const Status_private&src)
{
setPath(path);
m_Lock=src.m_Lock;
@@ -146,7 +146,7 @@ namespace svn
_switched=src._switched;
}
- void Status_private::init(const QString&url,const DirEntryPtr&src)
+ void Status_private::init(const TQString&url,const DirEntryPtr&src)
{
m_entry=Entry(url,src);
setPath(url);
@@ -162,7 +162,7 @@ namespace svn
_repos_prop_status = svn_wc_status_normal;
}
- void Status_private::init(const QString&url,const InfoEntry&src)
+ void Status_private::init(const TQString&url,const InfoEntry&src)
{
m_entry=Entry(url,src);
setPath(url);
@@ -175,7 +175,7 @@ namespace svn
m_hasReal=true;
}
- Status::Status (const Status & src)
+ tqStatus::tqStatus (const tqStatus & src)
: m_Data(new Status_private())
{
if( &src != this )
@@ -188,37 +188,37 @@ namespace svn
}
}
- Status::Status (const QString&path, svn_wc_status2_t * status)
+ tqStatus::tqStatus (const TQString&path, svn_wc_status2_t * status)
: m_Data(new Status_private())
{
m_Data->init(path, status);
}
- Status::Status (const char*path, svn_wc_status2_t * status)
+ tqStatus::tqStatus (const char*path, svn_wc_status2_t * status)
: m_Data(new Status_private())
{
- m_Data->init(QString::FROMUTF8(path),status);
+ m_Data->init(TQString::FROMUTF8(path),status);
}
- Status::Status(const QString&url,const DirEntryPtr&src)
+ tqStatus::tqStatus(const TQString&url,const DirEntryPtr&src)
: m_Data(new Status_private())
{
m_Data->init(url,src);
}
- Status::Status(const QString&url,const InfoEntry&src)
+ tqStatus::tqStatus(const TQString&url,const InfoEntry&src)
: m_Data(new Status_private())
{
m_Data->init(url,src);
}
- Status::~Status ()
+ tqStatus::~tqStatus ()
{
delete m_Data;
}
- Status &
- Status::operator=(const Status & status)
+ tqStatus &
+ tqStatus::operator=(const tqStatus & status)
{
if (this == &status)
return *this;
@@ -231,89 +231,89 @@ namespace svn
}
const LockEntry&
- Status::lockEntry () const
+ tqStatus::lockEntry () const
{
return m_Data->m_Lock;
}
svn_wc_status_kind
- Status::reposPropStatus () const
+ tqStatus::reposProptqStatus () const
{
return m_Data->_repos_prop_status;
}
svn_wc_status_kind
- Status::reposTextStatus () const
+ tqStatus::reposTexttqStatus () const
{
return m_Data->_repos_text_status;
}
bool
- Status::isSwitched () const
+ tqStatus::isSwitched () const
{
return m_Data->_switched != 0;
}
bool
- Status::isCopied () const
+ tqStatus::isCopied () const
{
return m_Data->_copied;
}
bool
- Status::isLocked () const
+ tqStatus::isLocked () const
{
return m_Data->m_Lock.Locked();
}
bool
- Status::isModified()const
+ tqStatus::isModified()const
{
- return textStatus()==svn_wc_status_modified||propStatus()==svn_wc_status_modified
- ||textStatus ()==svn_wc_status_replaced;
+ return texttqStatus()==svn_wc_status_modified||proptqStatus()==svn_wc_status_modified
+ ||texttqStatus ()==svn_wc_status_replaced;
}
bool
- Status::isRealVersioned()const
+ tqStatus::isRealVersioned()const
{
return m_Data->m_hasReal;
}
bool
- Status::isVersioned () const
+ tqStatus::isVersioned () const
{
return m_Data->m_isVersioned;
}
svn_wc_status_kind
- Status::propStatus () const
+ tqStatus::proptqStatus () const
{
return m_Data->_prop_status;
}
svn_wc_status_kind
- Status::textStatus () const
+ tqStatus::texttqStatus () const
{
return m_Data->_text_status;
}
const Entry&
- Status::entry () const
+ tqStatus::entry () const
{
return m_Data->m_entry;
}
- const QString&
- Status::path () const
+ const TQString&
+ tqStatus::path () const
{
return m_Data->m_Path;
}
bool
- Status::validReposStatus()const
+ tqStatus::validRepostqStatus()const
{
- return reposTextStatus()!=svn_wc_status_none||reposPropStatus()!=svn_wc_status_none;
+ return reposTexttqStatus()!=svn_wc_status_none||reposProptqStatus()!=svn_wc_status_none;
}
bool
- Status::validLocalStatus()const
+ tqStatus::validLocaltqStatus()const
{
- return textStatus()!=svn_wc_status_none||propStatus()!=svn_wc_status_none;
+ return texttqStatus()!=svn_wc_status_none||proptqStatus()!=svn_wc_status_none;
}
}
diff --git a/src/svnqt/status.hpp b/src/svnqt/status.hpp
index ec0f436..382e73d 100644
--- a/src/svnqt/status.hpp
+++ b/src/svnqt/status.hpp
@@ -53,13 +53,13 @@ namespace svn
*/
class Status_private;
- class SVNQT_EXPORT Status
+ class SVNTQT_EXPORT tqStatus
{
public:
/**
* copy constructor
*/
- Status (const Status & src);
+ tqStatus (const tqStatus & src);
/**
* default constructor
@@ -67,32 +67,32 @@ namespace svn
* @param path path for this status entry
* @param status status entry
*/
- Status (const QString&path=QString::null, svn_wc_status2_t * status = NULL);
+ tqStatus (const TQString&path=TQString(), svn_wc_status2_t * status = NULL);
/**
* default constructor
*
* @param path path for this status entry
* @param status status entry
*/
- Status (const char*path, svn_wc_status2_t * status = NULL);
+ tqStatus (const char*path, svn_wc_status2_t * status = NULL);
/**
* converting constructor
*/
- Status(const QString&path,const DirEntryPtr&src);
+ tqStatus(const TQString&path,const DirEntryPtr&src);
/**
* converting constructor
*/
- Status(const QString&path,const InfoEntry&src);
+ tqStatus(const TQString&path,const InfoEntry&src);
/**
* destructor
*/
- virtual ~Status ();
+ virtual ~tqStatus ();
/**
* @return path of status entry
*/
- const QString&
+ const TQString&
path () const;
/**
@@ -105,13 +105,13 @@ namespace svn
* @return file status property enum of the "textual" component.
*/
svn_wc_status_kind
- textStatus () const;
+ texttqStatus () const;
/**
* @return file status property enum of the "property" component.
*/
svn_wc_status_kind
- propStatus () const;
+ proptqStatus () const;
/**
* @retval TRUE if under version control
@@ -152,28 +152,28 @@ namespace svn
* @return the entry's text status in the repository
*/
svn_wc_status_kind
- reposTextStatus () const;
+ reposTexttqStatus () const;
/**
* @return the entry's prop status in the repository
*/
svn_wc_status_kind
- reposPropStatus () const;
+ reposProptqStatus () const;
const LockEntry&
lockEntry () const;
bool
- validReposStatus()const;
+ validRepostqStatus()const;
bool
- validLocalStatus()const;
+ validLocaltqStatus()const;
/**
* assignment operator
*/
- Status &
- operator = (const Status &);
+ tqStatus &
+ operator = (const tqStatus &);
private:
Status_private*m_Data;
};
diff --git a/src/svnqt/stringarray.cpp b/src/svnqt/stringarray.cpp
index bdac55b..7be5039 100644
--- a/src/svnqt/stringarray.cpp
+++ b/src/svnqt/stringarray.cpp
@@ -37,9 +37,9 @@
/*!
- \fn svn::StringArray::StringArray(const QStringList&)
+ \fn svn::StringArray::StringArray(const TQStringList&)
*/
-svn::StringArray::StringArray(const QStringList&aList)
+svn::StringArray::StringArray(const TQStringList&aList)
:m_content(aList)
{
setNull(false);
@@ -57,7 +57,7 @@ svn::StringArray::StringArray(const apr_array_header_t * apr_targets)
const char ** target =
&APR_ARRAY_IDX (apr_targets, i, const char *);
- m_content.push_back (QString::FROMUTF8(*target));
+ m_content.push_back (TQString::FROMUTF8(*target));
}
}
@@ -77,7 +77,7 @@ size_t svn::StringArray::size()const
/*!
\fn svn::StringArray::operator[](size_t which)
*/
-const QString& svn::StringArray::operator[](size_t which)
+const TQString& svn::StringArray::operator[](size_t which)
{
return m_content[which];
}
@@ -91,7 +91,7 @@ apr_array_header_t * svn::StringArray::array (const Pool & pool) const
if (isNull()) {
return 0;
}
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
apr_pool_t *apr_pool = pool.pool ();
apr_array_header_t *apr_targets =
@@ -99,7 +99,7 @@ apr_array_header_t * svn::StringArray::array (const Pool & pool) const
for (it = m_content.begin (); it != m_content.end (); it++)
{
- QByteArray s = (*it).TOUTF8();
+ TQByteArray s = (*it).TOUTF8();
char * t2 = apr_pstrndup (apr_pool,s,s.size());
(*((const char **) apr_array_push (apr_targets))) = t2;
diff --git a/src/svnqt/stringarray.hpp b/src/svnqt/stringarray.hpp
index 285f500..3f2c3d5 100644
--- a/src/svnqt/stringarray.hpp
+++ b/src/svnqt/stringarray.hpp
@@ -24,13 +24,8 @@
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/svnqttypes.hpp"
-#include <qglobal.h>
-#if QT_VERSION < 0x040000
-#include <qstringlist.h>
-#else
-#include <QtCore>
-#include <QStringList>
-#endif
+#include <tqglobal.h>
+#include <tqstringlist.h>
// apr api
#include "apr_tables.h"
@@ -41,18 +36,18 @@ namespace svn
class Pool;
/** Handle array of const char * in a c++ like way */
- class SVNQT_EXPORT StringArray
+ class SVNTQT_EXPORT StringArray
{
protected:
- QStringList m_content;
+ TQStringList m_content;
bool m_isNull;
public:
StringArray();
- StringArray(const QStringList&);
+ StringArray(const TQStringList&);
StringArray(const apr_array_header_t * apr_targets);
size_t size()const;
- const QString& operator[](size_t which);
+ const TQString& operator[](size_t which);
/**
* Returns an apr array containing char*.
*
@@ -62,7 +57,7 @@ namespace svn
/** content of array
* @return const reference to data, may used for searches.
*/
- const QStringList& data() const {return m_content;}
+ const TQStringList& data() const {return m_content;}
/** if array should return 0 instead of empty array */
bool isNull()const;
diff --git a/src/svnqt/svnfilestream.cpp b/src/svnqt/svnfilestream.cpp
index 2803ef4..b160003 100644
--- a/src/svnqt/svnfilestream.cpp
+++ b/src/svnqt/svnfilestream.cpp
@@ -19,33 +19,27 @@
***************************************************************************/
#include "svnfilestream.hpp"
-#include <qfile.h>
+#include <tqfile.h>
namespace svn {
namespace stream {
-#if QT_VERSION < 0x040000
typedef int openmode;
#define READONLY IO_ReadOnly
#define WRITEONLY IO_WriteOnly
-#else
-typedef QIODevice::OpenMode openmode;
-#define READONLY QIODevice::ReadOnly
-#define WRITEONLY QIODevice::WriteOnly
-#endif
-class SVNQT_NOEXPORT SvnFileStream_private
+class SVNTQT_NOEXPORT SvnFileStream_private
{
public:
- SvnFileStream_private(const QString&fn,openmode mode);
+ SvnFileStream_private(const TQString&fn,openmode mode);
virtual ~SvnFileStream_private();
- QString m_FileName;
- QFile m_File;
+ TQString m_FileName;
+ TQFile m_File;
};
-SvnFileStream_private::SvnFileStream_private(const QString&fn,openmode mode)
+SvnFileStream_private::SvnFileStream_private(const TQString&fn,openmode mode)
: m_FileName(fn),m_File(fn)
{
m_File.open(mode);
@@ -55,7 +49,7 @@ SvnFileStream_private::~SvnFileStream_private()
{
}
-SvnFileOStream::SvnFileOStream(const QString&fn,svn_client_ctx_t*ctx)
+SvnFileOStream::SvnFileOStream(const TQString&fn,svn_client_ctx_t*ctx)
:SvnStream(false,true,ctx)
{
m_FileData = new SvnFileStream_private(fn,WRITEONLY);
@@ -81,18 +75,14 @@ long SvnFileOStream::write(const char* data, const unsigned long max)
if (!m_FileData->m_File.isOpen()) {
return -1;
}
-#if QT_VERSION < 0x040000
long res = m_FileData->m_File.writeBlock(data,max);
-#else
- long res = m_FileData->m_File.write(data,max);
-#endif
if (res<0) {
setError(m_FileData->m_File.errorString());
}
return res;
}
-SvnFileIStream::SvnFileIStream(const QString&fn,svn_client_ctx_t*ctx)
+SvnFileIStream::SvnFileIStream(const TQString&fn,svn_client_ctx_t*ctx)
:SvnStream(true,false,ctx)
{
m_FileData = new SvnFileStream_private(fn,READONLY);
@@ -118,11 +108,7 @@ long SvnFileIStream::read(char* data, const unsigned long max)
if (!m_FileData->m_File.isOpen()) {
return -1;
}
-#if QT_VERSION < 0x040000
long res = m_FileData->m_File.readBlock(data,max);
-#else
- long res = m_FileData->m_File.read(data,max);
-#endif
if (res<0) {
setError(m_FileData->m_File.errorString());
}
diff --git a/src/svnqt/svnfilestream.hpp b/src/svnqt/svnfilestream.hpp
index d64e1cc..e3a9201 100644
--- a/src/svnqt/svnfilestream.hpp
+++ b/src/svnqt/svnfilestream.hpp
@@ -32,10 +32,10 @@ class SvnFileStream_private;
@author Rajko Albrecht <ral@alwins-world.de>
@short Writeonly filestream
*/
-class SVNQT_EXPORT SvnFileOStream : public SvnStream
+class SVNTQT_EXPORT SvnFileOStream : public SvnStream
{
public:
- SvnFileOStream(const QString&fn,svn_client_ctx_t*ctx=0);
+ SvnFileOStream(const TQString&fn,svn_client_ctx_t*ctx=0);
virtual ~SvnFileOStream();
@@ -49,10 +49,10 @@ private:
@author Rajko Albrecht <ral@alwins-world.de>
@short Readonly filestream
*/
-class SVNQT_EXPORT SvnFileIStream : public SvnStream
+class SVNTQT_EXPORT SvnFileIStream : public SvnStream
{
public:
- SvnFileIStream(const QString&fn,svn_client_ctx_t*ctx=0);
+ SvnFileIStream(const TQString&fn,svn_client_ctx_t*ctx=0);
virtual ~SvnFileIStream();
virtual bool isOk() const;
diff --git a/src/svnqt/svnqt_defines.hpp.in b/src/svnqt/svnqt_defines.hpp.in
index 6281d42..7d35ad7 100644
--- a/src/svnqt/svnqt_defines.hpp.in
+++ b/src/svnqt/svnqt_defines.hpp.in
@@ -18,26 +18,26 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef _SVNQT_DEFINES_H
-#define _SVNQT_DEFINES_H
+#ifndef _SVNTQT_DEFINES_H
+#define _SVNTQT_DEFINES_H
/* defines if we setup against a compiler with working "-fvisibility=hidden" */
-#define SVNQT_EXPORT @_SVNQT_EXPORT@
-#define SVNQT_NOEXPORT @_SVNQT_NOEXPORT@
+#define SVNTQT_EXPORT @_SVNQT_EXPORT@
+#define SVNTQT_NOEXPORT @_SVNQT_NOEXPORT@
/* cmake trick: so we make sure that the define in installs
is always set as in library used at build time
*/
#define TOUTF8 @TOUTF8@
#define FROMUTF8 @FROMUTF8@
-#define QLIST @QLIST@
+#define TQLIST @QLIST@
#define TOASCII @TOASCII@
#define HOMEDIR @HOMEDIR@
-#define QLONG @QLONG@
+#define TQLONG @QLONG@
-#define SVNQT_SIZE_UNKNOWN QLONG(-1)
+#define SVNTQT_SIZE_UNKNOWN TQLONG(-1)
/* the difference between qt3 and qt4 is too much... :( */
-class QSqlDatabase;
-typedef @QDATABASE@ QDataBase;
+class TQSqlDatabase;
+typedef @QDATABASE@ TQDataBase;
#endif
diff --git a/src/svnqt/svnqttypes.hpp b/src/svnqt/svnqttypes.hpp
index b3c6381..dc7a178 100644
--- a/src/svnqt/svnqttypes.hpp
+++ b/src/svnqt/svnqttypes.hpp
@@ -18,23 +18,19 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef _SVNQT_TYPES_HPP
-#define _SVNQT_TYPES_HPP
+#ifndef _SVNTQT_TYPES_HPP
+#define _SVNTQT_TYPES_HPP
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/shared_pointer.hpp"
// qt
-#include <qglobal.h>
+#include <tqglobal.h>
-#if QT_VERSION < 0x040000
- #include <qstring.h>
- #include <qpair.h>
- #include <qvaluelist.h>
- #include <qmap.h>
-#else
- #include <QtCore>
-#endif
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
namespace svn
{
@@ -45,45 +41,45 @@ namespace svn
class InfoEntry;
class LogEntry;
class Revision;
- class Status;
+ class tqStatus;
class Targets;
class Path;
class StringArray;
- typedef QLIST<AnnotateLine> AnnotatedFile;
+ typedef TQLIST<AnnotateLine> AnnotatedFile;
typedef SharedPointer<DirEntry> DirEntryPtr;
- typedef QLIST<DirEntryPtr> DirEntries;
- typedef QLIST<InfoEntry> InfoEntries;
+ typedef TQLIST<DirEntryPtr> DirEntries;
+ typedef TQLIST<InfoEntry> InfoEntries;
/// simple list of log entries
- typedef QLIST<LogEntry> LogEntries;
+ typedef TQLIST<LogEntry> LogEntries;
/// shared_pointer for LogEntriesMap
typedef SharedPointer<LogEntries> LogEntriesPtr;
/// map of logentries - key is revision
- typedef QMap<long,LogEntry> LogEntriesMap;
+ typedef TQMap<long,LogEntry> LogEntriesMap;
/// shared_pointer for LogEntriesMap
typedef SharedPointer<LogEntriesMap> LogEntriesMapPtr;
- typedef SharedPointer<Status> StatusPtr;
- typedef QLIST<StatusPtr> StatusEntries;
- typedef QLIST<Revision> Revisions;
+ typedef SharedPointer<tqStatus> StatusPtr;
+ typedef TQLIST<StatusPtr> StatusEntries;
+ typedef TQLIST<Revision> Revisions;
/** Range of Revision */
- typedef QPair<Revision,Revision> RevisionRange;
+ typedef TQPair<Revision,Revision> RevisionRange;
/** list of revision ranges */
- typedef QLIST<RevisionRange> RevisionRanges;
+ typedef TQLIST<RevisionRange> RevisionRanges;
/// map of property names to values
- typedef QMap<QString,QString> PropertiesMap;
+ typedef TQMap<TQString,TQString> PropertiesMap;
/// pair of path, PropertiesMap
- typedef QPair<QString, PropertiesMap> PathPropertiesMapEntry;
+ typedef TQPair<TQString, PropertiesMap> PathPropertiesMapEntry;
/// vector of path, Properties pairs
- typedef QLIST<PathPropertiesMapEntry> PathPropertiesMapList;
+ typedef TQLIST<PathPropertiesMapEntry> PathPropertiesMapList;
/// shared pointer for properties
typedef SharedPointer<PathPropertiesMapList> PathPropertiesMapListPtr;
- typedef QLIST<Path> Pathes;
+ typedef TQLIST<Path> Pathes;
//! Mapper enum for svn_depth_t
/*!
diff --git a/src/svnqt/svnstream.cpp b/src/svnqt/svnstream.cpp
index e3b6014..009dbe3 100644
--- a/src/svnqt/svnstream.cpp
+++ b/src/svnqt/svnstream.cpp
@@ -24,16 +24,16 @@
// Subversion api
#include "svn_client.h"
-#include <qbuffer.h>
-#include <qdatetime.h>
-#include <qfile.h>
+#include <tqbuffer.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
#define MAX_TIME 300
namespace svn {
namespace stream {
-class SVNQT_NOEXPORT SvnStream_private
+class SVNTQT_NOEXPORT SvnStream_private
{
public:
SvnStream_private(){m_Stream=0;m_LastError="";_context=0;cancel_timeout.start();}
@@ -44,10 +44,10 @@ public:
Pool m_Pool;
svn_stream_t * m_Stream;
- QString m_LastError;
+ TQString m_LastError;
svn_client_ctx_t* _context;
- QTime cancel_timeout;
+ TQTime cancel_timeout;
};
svn_error_t * SvnStream_private::stream_read(void*baton,char*data,apr_size_t*len)
@@ -143,17 +143,16 @@ long SvnStream::read(char*,const unsigned long )
return -1;
}
-const QString&SvnStream::lastError()const
+const TQString&SvnStream::lastError()const
{
return m_Data->m_LastError;
}
-void SvnStream::setError(const QString&aError)const
+void SvnStream::setError(const TQString&aError)const
{
m_Data->m_LastError = aError;
}
-#if QT_VERSION < 0x040000
void SvnStream::setError(int ioError)const
{
switch (ioError) {
@@ -186,30 +185,21 @@ void SvnStream::setError(int ioError)const
break;
}
}
-#endif
class SvnByteStream_private {
public:
SvnByteStream_private();
virtual ~SvnByteStream_private(){}
- QByteArray m_Content;
- QBuffer mBuf;
+ TQByteArray m_Content;
+ TQBuffer mBuf;
};
-#if QT_VERSION < 0x040000
SvnByteStream_private::SvnByteStream_private()
:mBuf(m_Content)
{
mBuf.open(IO_WriteOnly);
}
-#else
-SvnByteStream_private::SvnByteStream_private()
- :mBuf(&m_Content, 0)
-{
- mBuf.open(QFile::WriteOnly);
-}
-#endif
/* ByteStream implementation start */
SvnByteStream::SvnByteStream(svn_client_ctx_t * ctx)
@@ -217,11 +207,7 @@ SvnByteStream::SvnByteStream(svn_client_ctx_t * ctx)
{
m_ByteData = new SvnByteStream_private;
if (!m_ByteData->mBuf.isOpen()) {
-#if QT_VERSION < 0x040000
- setError(m_ByteData->mBuf.status());
-#else
- setError(m_ByteData->mBuf.errorString());
-#endif
+ setError(TQT_TQIODEVICE_OBJECT(m_ByteData->mBuf).status());
}
}
@@ -232,21 +218,14 @@ SvnByteStream::~SvnByteStream()
long SvnByteStream::write(const char*aData,const unsigned long max)
{
-#if QT_VERSION < 0x040000
long i = m_ByteData->mBuf.writeBlock(aData,max);
if (i<0) {
- setError(m_ByteData->mBuf.status());
- }
-#else
- long i = m_ByteData->mBuf.write(aData,max);
- if (i<0) {
- setError(m_ByteData->mBuf.errorString());
+ setError(TQT_TQIODEVICE_OBJECT(m_ByteData->mBuf).status());
}
-#endif
return i;
}
-QByteArray SvnByteStream::content()const
+TQByteArray SvnByteStream::content()const
{
return m_ByteData->mBuf.buffer();
}
diff --git a/src/svnqt/svnstream.hpp b/src/svnqt/svnstream.hpp
index 89276c8..6a14640 100644
--- a/src/svnqt/svnstream.hpp
+++ b/src/svnqt/svnstream.hpp
@@ -22,7 +22,7 @@
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
#include <svn_io.h>
struct svn_client_ctx_t;
@@ -36,7 +36,7 @@ class SvnStream_private;
@author Rajko Albrecht <ral@alwins-world.de>
@short wrapper class around the svn_stream_t structure
*/
-class SVNQT_EXPORT SvnStream{
+class SVNTQT_EXPORT SvnStream{
friend class SvnStream_private;
public:
//! Constructor
@@ -66,7 +66,7 @@ public:
\param data the data to written
\param max maximum data to write
\return should return the amount of data real written, in case of error must return -1
- \sa setError(int ioError), setError(const QString&error), read(char*data,const unsigned long max)
+ \sa setError(int ioError), setError(const TQString&error), read(char*data,const unsigned long max)
*/
virtual long write(const char*data,const unsigned long max);
//! read operation
@@ -75,7 +75,7 @@ public:
\param data target array where to store the read
\param max maximum byte count to read
\return amount of data read or -1 in case of error
- \sa setError(int ioError), setError(const QString&error), write(const char*data,const unsigned long max)
+ \sa setError(int ioError), setError(const TQString&error), write(const char*data,const unsigned long max)
*/
virtual long read(char*data,const unsigned long max);
@@ -83,7 +83,7 @@ public:
/*!
\return a human readable message about the reason the last operation failed.
*/
- virtual const QString& lastError()const;
+ virtual const TQString& lastError()const;
//! is that stream usable
/*!
Gives information about if the stream object is usable. May if the file is real open or such.
@@ -100,13 +100,12 @@ protected:
write and/or read if them will return -1 (for error)
\param error the errormessage assigned.
*/
- virtual void setError(const QString&error)const;
+ virtual void setError(const TQString&error)const;
//! set the internal error
- /*! \param ioError error code from QIODevide::status
+ /*! \param ioError error code from TQIODevide::status
*/
-#if QT_VERSION < 0x040000
+
virtual void setError(int ioError)const;
-#endif
protected:
int cancelElapsed()const;
@@ -120,8 +119,8 @@ private:
class SvnByteStream_private;
-//! a class let subversion print into a QByteArray
-class SVNQT_EXPORT SvnByteStream:public SvnStream
+//! a class let subversion print into a TQByteArray
+class SVNTQT_EXPORT SvnByteStream:public SvnStream
{
public:
//! constructor
@@ -146,7 +145,7 @@ public:
/*!
\return the internal stored data
*/
- QByteArray content()const;
+ TQByteArray content()const;
//! checks if the buffer is usable.
/*!
* \return true if data may written, false if not, in that case a errormessage will set.
diff --git a/src/svnqt/targets.cpp b/src/svnqt/targets.cpp
index 6e2fced..5e525f8 100644
--- a/src/svnqt/targets.cpp
+++ b/src/svnqt/targets.cpp
@@ -41,7 +41,7 @@
#include "svnqt/pool.hpp"
#include "svnqt/svnqt_defines.hpp"
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace svn
{
@@ -50,7 +50,7 @@ namespace svn
m_targets = targets;
}
- Targets::Targets(const QStringList&targets)
+ Targets::Targets(const TQStringList&targets)
{
m_targets.clear();
for (unsigned int i = 0; i < targets.size();++i) {
@@ -83,7 +83,7 @@ namespace svn
m_targets = targets.targets ();
}
- Targets::Targets (const QString& target)
+ Targets::Targets (const TQString& target)
{
if (!target.isEmpty()) {
m_targets.push_back(target);
@@ -100,7 +100,7 @@ namespace svn
Targets::Targets (const char* target)
{
if (target) {
- m_targets.push_back(QString::FROMUTF8(target));
+ m_targets.push_back(TQString::FROMUTF8(target));
}
}
@@ -121,7 +121,7 @@ namespace svn
for (it = m_targets.begin (); it != m_targets.end (); it++)
{
- QByteArray s = (*it).path().TOUTF8();
+ TQByteArray s = (*it).path().TOUTF8();
char * t2 =
apr_pstrndup (apr_pool,s,s.size());
diff --git a/src/svnqt/targets.hpp b/src/svnqt/targets.hpp
index 06cef77..1462254 100644
--- a/src/svnqt/targets.hpp
+++ b/src/svnqt/targets.hpp
@@ -34,17 +34,13 @@
#include "svnqt/svnqt_defines.hpp"
#include "svnqt/svnqttypes.hpp"
-#include <qglobal.h>
-#if QT_VERSION < 0x040000
-#include <qvaluelist.h>
-#else
-#include <QtCore>
-#endif
+#include <tqglobal.h>
+#include <tqvaluelist.h>
// apr api
#include "apr_tables.h"
-class QStringList;
+class TQStringList;
namespace svn
{
@@ -54,7 +50,7 @@ namespace svn
/**
* Encapsulation for Subversion target arrays handling
*/
- class SVNQT_EXPORT Targets
+ class SVNTQT_EXPORT Targets
{
public:
/**
@@ -84,7 +80,7 @@ namespace svn
*
* @param target
*/
- Targets (const QString& target = QString::null);
+ Targets (const TQString& target = TQString());
/**
* Constructor. Initializes list with just
* one entry
@@ -96,7 +92,7 @@ namespace svn
* Constructor. Convert stringlist into target list.
* @param targets
*/
- Targets(const QStringList&targets);
+ Targets(const TQStringList&targets);
/**
* Copy Constructor
diff --git a/src/svnqt/testmain.cpp b/src/svnqt/testmain.cpp
index 13ae286..91af73b 100644
--- a/src/svnqt/testmain.cpp
+++ b/src/svnqt/testmain.cpp
@@ -22,7 +22,7 @@
#include "context.hpp"
#include "datetime.hpp"
-#include <qdatastream.h>
+#include <tqdatastream.h>
int main(int,char**)
{
@@ -30,9 +30,9 @@ int main(int,char**)
svn::repository::Repository rep(0L);
svn::ContextP myContext = new svn::Context();
- QByteArray tout;
-#if QT_VERSION < 0x040000
- QDataStream out(tout,IO_WriteOnly);
+ TQByteArray tout;
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
+ TQDataStream out(tout,IO_WriteOnly);
#endif
svn::Client*m_Svnclient = svn::Client::getobject(0,0);
svn::ContextP m_CurrentContext = new svn::Context();
@@ -45,11 +45,11 @@ int main(int,char**)
} catch (svn::ClientException ce) {
gotit = false;
}
-#if QT_VERSION < 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
if (gotit) {
out << m_OldHistory;
svn::LogEntriesMap m_NewHistory;
- QDataStream inp(tout,IO_ReadOnly);
+ TQDataStream inp(tout,IO_ReadOnly);
inp >> m_NewHistory;
svn::LogEntriesMap::Iterator it;
diff --git a/src/svnqt/tests/ckpath.cpp b/src/svnqt/tests/ckpath.cpp
index ca4fe3e..64a57ca 100644
--- a/src/svnqt/tests/ckpath.cpp
+++ b/src/svnqt/tests/ckpath.cpp
@@ -4,12 +4,12 @@
int main(int,char**)
{
svn::Path pa("/test/foo/bar/");
- if (pa.path()!=QString("/test/foo/bar")) {
+ if (pa.path()!=TQString("/test/foo/bar")) {
std::cout << "No cleanup of components" << std::endl;
return -1;
}
pa.removeLast();
- if (pa.path()!=QString("/test/foo")) {
+ if (pa.path()!=TQString("/test/foo")) {
std::cout<<"removeLast didn't work." << std::endl;
return -1;
}
diff --git a/src/svnqt/tests/crepo.cpp b/src/svnqt/tests/crepo.cpp
index 604e4e9..fa43d90 100644
--- a/src/svnqt/tests/crepo.cpp
+++ b/src/svnqt/tests/crepo.cpp
@@ -8,18 +8,18 @@
#include <iostream>
#include <unistd.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class Listener:public svn::repository::RepositoryListener
{
public:
Listener(){}
virtual ~Listener(){}
- virtual void sendWarning(const QString&msg)
+ virtual void sendWarning(const TQString&msg)
{
std::cout << msg << std::endl;
}
- virtual void sendError(const QString&msg)
+ virtual void sendError(const TQString&msg)
{
std::cout << msg << std::endl;
}
@@ -28,13 +28,13 @@ class Listener:public svn::repository::RepositoryListener
int main(int,char**)
{
- QString p = TESTREPOPATH;
+ TQString p = TESTREPOPATH;
Listener ls;
svn::repository::Repository rp(&ls);
try {
rp.CreateOpen(p,"fsfs");
} catch (svn::ClientException e) {
- QString ex = e.msg();
+ TQString ex = e.msg();
std::cout << ex.TOUTF8() << std::endl;
return -1;
}
@@ -48,13 +48,13 @@ int main(int,char**)
p = "file://"+p;
m_Svnclient->setContext(m_CurrentContext);
- QStringList s; s.append(p+"/trunk"); s.append(p+"/branches"); s.append(p+"/tags");
+ TQStringList s; s.append(p+"/trunk"); s.append(p+"/branches"); s.append(p+"/tags");
try {
m_Svnclient->mkdir(svn::Targets(s),"Test mkdir");
m_Svnclient->checkout(p,TESTCOPATH,svn::Revision::HEAD,svn::Revision::HEAD,svn::DepthInfinity,false);
} catch (svn::ClientException e) {
- QString ex = e.msg();
+ TQString ex = e.msg();
std::cout << ex.TOUTF8() << std::endl;
return -1;
}
diff --git a/src/svnqt/tests/lsdir.cpp b/src/svnqt/tests/lsdir.cpp
index c458f31..1ac0140 100644
--- a/src/svnqt/tests/lsdir.cpp
+++ b/src/svnqt/tests/lsdir.cpp
@@ -15,19 +15,19 @@ int main(int,char**)
m_Svnclient->setContext(m_CurrentContext);
svn::DirEntries dlist;
- QString p = QString("file://%1").arg(TESTREPOPATH);
- QString l = QString("%1").arg(TESTCOPATH);
+ TQString p = TQString("file://%1").tqarg(TESTREPOPATH);
+ TQString l = TQString("%1").tqarg(TESTCOPATH);
try {
dlist = m_Svnclient->list(svn::Path(p),svn::Revision::HEAD,svn::Revision::HEAD,svn::DepthInfinity,true);
} catch (svn::ClientException e) {
- QString ex = e.msg();
+ TQString ex = e.msg();
std::cout << ex.TOUTF8() << std::endl;
return -1;
}
std::cout << "List 1 "<<dlist.size()<<std::endl;
for (unsigned int i=0; i < dlist.size();++i) {
- QDateTime dt = svn::DateTime(dlist[i]->time());
+ TQDateTime dt = svn::DateTime(dlist[i]->time());
std::cout << dlist[i]->name() << " "
<< dlist[i]->lastAuthor() << " "
<< dlist[i]->size() << " "
@@ -36,14 +36,14 @@ int main(int,char**)
try {
dlist = m_Svnclient->list(svn::Path(p),svn::Revision::HEAD,svn::Revision::HEAD,svn::DepthImmediates,false);
} catch (svn::ClientException e) {
- QString ex = e.msg();
+ TQString ex = e.msg();
std::cout << ex.TOUTF8() << std::endl;
return -1;
}
std::cout << "================"<<std::endl;
std::cout << "List 2 "<<dlist.size()<<std::endl;
for (unsigned int i=0; i < dlist.size();++i) {
- QDateTime dt = svn::DateTime(dlist[i]->time());
+ TQDateTime dt = svn::DateTime(dlist[i]->time());
std::cout << dlist[i]->name() << " "
<< dlist[i]->lastAuthor() << " "
<< dlist[i]->size() << " "
@@ -54,7 +54,7 @@ int main(int,char**)
try {
slist = m_Svnclient->status(svn::Path(p),svn::DepthInfinity,true,true,true,svn::Revision::HEAD,true,false);
} catch (svn::ClientException e) {
- QString ex = e.msg();
+ TQString ex = e.msg();
std::cout << ex.TOUTF8() << std::endl;
return -1;
}
@@ -66,7 +66,7 @@ int main(int,char**)
try {
slist = m_Svnclient->status(svn::Path(l),svn::DepthInfinity,true,true,true,svn::Revision::WORKING,true,false);
} catch (svn::ClientException e) {
- QString ex = e.msg();
+ TQString ex = e.msg();
std::cout << ex.TOUTF8() << std::endl;
return -1;
}
diff --git a/src/svnqt/tests/testlistener.h b/src/svnqt/tests/testlistener.h
index 0c38a43..3efa96d 100644
--- a/src/svnqt/tests/testlistener.h
+++ b/src/svnqt/tests/testlistener.h
@@ -10,13 +10,13 @@ class TestListener:public svn::ContextListener
virtual ~TestListener(){}
virtual void contextProgress(long long int current, long long int max){};
- virtual bool contextSslClientCertPwPrompt (QString &,const QString &, bool &){return false;}
- virtual bool contextLoadSslClientCertPw(QString&,const QString&){return false;}
- virtual bool contextSslClientCertPrompt (QString &){return false;}
+ virtual bool contextSslClientCertPwPrompt (TQString &,const TQString &, bool &){return false;}
+ virtual bool contextLoadSslClientCertPw(TQString&,const TQString&){return false;}
+ virtual bool contextSslClientCertPrompt (TQString &){return false;}
virtual svn::ContextListener::SslServerTrustAnswer
contextSslServerTrustPrompt (const SslServerTrustData &,
apr_uint32_t & ){return svn::ContextListener::SslServerTrustAnswer();}
- virtual bool contextGetLogMessage (QString &,const svn::CommitItemList&){return false;}
+ virtual bool contextGetLogMessage (TQString &,const svn::CommitItemList&){return false;}
virtual bool contextCancel(){return false;}
virtual void contextNotify (const svn_wc_notify_t *){}
virtual void contextNotify (const char *,svn_wc_notify_action_t,
@@ -25,11 +25,11 @@ class TestListener:public svn::ContextListener
svn_wc_notify_state_t,
svn_wc_notify_state_t,
svn_revnum_t){}
- virtual bool contextGetSavedLogin (const QString & realm,QString & username,QString & password){return false;}
- virtual bool contextGetCachedLogin (const QString & realm,QString & username,QString & password){return false;}
- virtual bool contextGetLogin (const QString & realm,
- QString & username,
- QString & password,
+ virtual bool contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password){return false;}
+ virtual bool contextGetCachedLogin (const TQString & realm,TQString & username,TQString & password){return false;}
+ virtual bool contextGetLogin (const TQString & realm,
+ TQString & username,
+ TQString & password,
bool & maySave){maySave=false;return false;}
};
diff --git a/src/svnqt/url.cpp b/src/svnqt/url.cpp
index 185f582..40565f6 100644
--- a/src/svnqt/url.cpp
+++ b/src/svnqt/url.cpp
@@ -36,12 +36,8 @@
#include "pool.hpp"
#include "url.hpp"
-#include <qglobal.h>
-#if QT_VERSION < 0x040000
-#include <qvaluelist.h>
-#else
-#include <QtCore>
-#endif
+#include <tqglobal.h>
+#include <tqvaluelist.h>
// subversion api
#include "svn_ra.h"
@@ -58,42 +54,34 @@ namespace svn
};
static bool mSchemasInitialized = false;
-#if QT_VERSION < 0x040000
- QValueList<QString> mSchemas;
-#else
- QList<QString> mSchemas;
-#endif
+ TQValueList<TQString> mSchemas;
Url::Url () {}
Url::~Url () {}
- bool Url::isLocal(const QString& url)
+ bool Url::isLocal(const TQString& url)
{
-#if QT_VERSION < 0x040000
bool cs = false;
-#else
- Qt::CaseSensitivity cs=Qt::CaseInsensitive;
-#endif
if (
- url.startsWith("file://",cs) ||
- url.startsWith("/") ||
- url.startsWith("svn+file://",cs) ||
- url.startsWith("ksvn+file://",cs) )
+ url.tqstartsWith("file://",cs) ||
+ url.tqstartsWith("/") ||
+ url.tqstartsWith("svn+file://",cs) ||
+ url.tqstartsWith("ksvn+file://",cs) )
{
return true;
}
return false;
}
- bool Url::isValid (const QString& url)
+ bool Url::isValid (const TQString& url)
{
- QString urlTest(url);
+ TQString urlTest(url);
unsigned int index = 0;
while (VALID_SCHEMAS[index]!=0)
{
- QString schema = QString::FROMUTF8(VALID_SCHEMAS[index]);
- QString urlComp = urlTest.mid(0, schema.length());
+ TQString schema = TQString::FROMUTF8(VALID_SCHEMAS[index]);
+ TQString urlComp = urlTest.mid(0, schema.length());
if (schema == urlComp)
{
@@ -105,27 +93,23 @@ namespace svn
return false;
}
- QString
- Url::transformProtokoll(const QString&prot)
+ TQString
+ Url::transformProtokoll(const TQString&prot)
{
-#if QT_VERSION < 0x040000
- QString _prot = prot.lower();
-#else
- QString _prot = prot.toLower();
-#endif
- if (QString::compare(_prot,"svn+http")==0||
- QString::compare(_prot,"ksvn+http")==0) {
- return QString("http");
- } else if (QString::compare(_prot,"svn+https")==0||
- QString::compare(_prot,"ksvn+https")==0) {
- return QString("https");
- }else if (QString::compare(_prot,"svn+file")==0||
- QString::compare(_prot,"ksvn+file")==0) {
- return QString("file");
- } else if (QString::compare(_prot,"ksvn+ssh")==0) {
- return QString("svn+ssh");
- } else if (QString::compare(_prot,"ksvn")==0) {
- return QString("svn");
+ TQString _prot = prot.lower();
+ if (TQString::compare(_prot,"svn+http")==0||
+ TQString::compare(_prot,"ksvn+http")==0) {
+ return TQString("http");
+ } else if (TQString::compare(_prot,"svn+https")==0||
+ TQString::compare(_prot,"ksvn+https")==0) {
+ return TQString("https");
+ }else if (TQString::compare(_prot,"svn+file")==0||
+ TQString::compare(_prot,"ksvn+file")==0) {
+ return TQString("file");
+ } else if (TQString::compare(_prot,"ksvn+ssh")==0) {
+ return TQString("svn+ssh");
+ } else if (TQString::compare(_prot,"ksvn")==0) {
+ return TQString("svn");
}
return _prot;
}
@@ -136,11 +120,7 @@ namespace svn
* url schemas out of the ra layer it rather dirty now since
* we are lacking a higher level of abstraction
*/
-#if QT_VERSION < 0x040000
- QValueList<QString>
-#else
- QList<QString>
-#endif
+ TQValueList<TQString>
Url::supportedSchemas ()
{
if (mSchemasInitialized)
@@ -164,33 +144,25 @@ namespace svn
// schemas are in the following form:
// <schema>:<whitespace><description>\n...
// find the f�st :
- QString descriptions (descr->data);
+ TQString descriptions (descr->data);
int pos=0;
const int not_found = -1;
do
{
- const QString tokenStart ("handles '");
- const QString tokenEnd ("' schem");
-#if QT_VERSION < 0x040000
- pos = descriptions.find (tokenStart, pos);
-#else
- pos = descriptions.indexOf( tokenStart, pos );
-#endif
+ const TQString tokenStart ("handles '");
+ const TQString tokenEnd ("' schem");
+ pos = descriptions.tqfind (tokenStart, pos);
if (pos == not_found)
break;
pos += tokenStart.length ();
-#if QT_VERSION < 0x040000
- int posEnd = descriptions.find (tokenEnd, pos);
-#else
- int posEnd = descriptions.indexOf( tokenEnd, pos );
-#endif
+ int posEnd = descriptions.tqfind (tokenEnd, pos);
if (posEnd == not_found)
break;
// found
- QString schema (descriptions.mid(pos, posEnd-pos) + ":");
+ TQString schema (descriptions.mid(pos, posEnd-pos) + ":");
mSchemas.push_back (schema);
// forward to the next newline
diff --git a/src/svnqt/url.hpp b/src/svnqt/url.hpp
index 795d4c8..44c06a3 100644
--- a/src/svnqt/url.hpp
+++ b/src/svnqt/url.hpp
@@ -34,22 +34,14 @@
#include "svnqt/svnqt_defines.hpp"
// qt
-#include <qglobal.h>
-#if QT_VERSION < 0x040000
-
-#include <qstring.h>
-#include <qvaluelist.h>
-
-#else
-
-#include <QtCore>
-
-#endif
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace svn
{
- class SVNQT_EXPORT Url
+ class SVNTQT_EXPORT Url
{
public:
/** Constructor */
@@ -67,7 +59,7 @@ namespace svn
* /home/foo/bar
*/
static bool
- isValid (const QString& url);
+ isValid (const TQString& url);
/**
* Checks if @a url points to a local filesystem.
@@ -75,10 +67,10 @@ namespace svn
* @return true if url is accessed local without network.
*/
static bool
- isLocal(const QString& url);
+ isLocal(const TQString& url);
- static QString
- transformProtokoll(const QString&);
+ static TQString
+ transformProtokoll(const TQString&);
/**
* returns a vector with url schemas that are
@@ -86,11 +78,7 @@ namespace svn
*
* @return vector with entries like "file:", "http:"
*/
-#if QT_VERSION < 0x040000
- static QValueList<QString>
-#else
- static QList<QString>
-#endif
+ static TQValueList<TQString>
supportedSchemas ();
};
}
diff --git a/src/svnqt/version_check.cpp b/src/svnqt/version_check.cpp
index 02f6b10..44c79d3 100644
--- a/src/svnqt/version_check.cpp
+++ b/src/svnqt/version_check.cpp
@@ -26,7 +26,7 @@
#include <svn_version.h>
#include <svn_client.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace svn {
static const svn_version_t Linkedtag = {
@@ -36,24 +36,24 @@ namespace svn {
SVN_VER_NUMTAG
};
- static QString curr_version_string;
+ static TQString curr_version_string;
bool Version::client_version_compatible()
{
return svn_ver_compatible(svn_client_version(),&Linkedtag);
}
- const QString Version::linked_version()
+ const TQString Version::linked_version()
{
- return QString( SVN_VERSION );
+ return TQString( SVN_VERSION );
}
- const QString Version::running_version()
+ const TQString Version::running_version()
{
if (curr_version_string.length()==0) {
curr_version_string =
- QString("%1.%2.%3.%4").arg(svn_client_version()->major).arg(svn_client_version()->minor)
- .arg(svn_client_version()->patch).arg(svn_client_version()->tag);
+ TQString("%1.%2.%3.%4").tqarg(svn_client_version()->major).tqarg(svn_client_version()->minor)
+ .tqarg(svn_client_version()->patch).tqarg(svn_client_version()->tag);
}
return curr_version_string;
}
diff --git a/src/svnqt/version_check.hpp b/src/svnqt/version_check.hpp
index 2398645..a16f233 100644
--- a/src/svnqt/version_check.hpp
+++ b/src/svnqt/version_check.hpp
@@ -22,18 +22,18 @@
#include "svnqt/svnqt_defines.hpp"
-class QString;
+class TQString;
namespace svn {
- class SVNQT_EXPORT Version {
+ class SVNTQT_EXPORT Version {
public:
Version(){}
~Version(){}
static bool client_version_compatible();
- static const QString linked_version();
- static const QString running_version();
+ static const TQString linked_version();
+ static const TQString running_version();
static int version_major();
static int version_minor();
diff --git a/src/svnqt/wc.cpp b/src/svnqt/wc.cpp
index bcfe139..a58cab2 100644
--- a/src/svnqt/wc.cpp
+++ b/src/svnqt/wc.cpp
@@ -42,7 +42,7 @@ namespace svn
const char * Wc::ADM_DIR_NAME = SVN_WC_ADM_DIR_NAME;
bool
- Wc::checkWc (const QString& dir)
+ Wc::checkWc (const TQString& dir)
{
Pool pool;
Path path (dir);
@@ -61,8 +61,8 @@ namespace svn
}
void
- Wc::ensureAdm (const QString& dir, const QString& uuid,
- const QString& url, const Revision & revision) throw (ClientException)
+ Wc::ensureAdm (const TQString& dir, const TQString& uuid,
+ const TQString& url, const Revision & revision) throw (ClientException)
{
Pool pool;
Path dirPath (dir);
@@ -79,7 +79,7 @@ namespace svn
throw ClientException (error);
}
- const svn_wc_entry_t *Wc::getEntry( const QString &path ) throw ( ClientException )
+ const svn_wc_entry_t *Wc::getEntry( const TQString &path ) throw ( ClientException )
{
Pool pool;
Path itemPath(path);
@@ -101,22 +101,22 @@ namespace svn
return entry;
}
- QString Wc::getUrl(const QString&path) throw (ClientException)
+ TQString Wc::getUrl(const TQString&path) throw (ClientException)
{
- QString result = "";
+ TQString result = "";
const svn_wc_entry_t *entry;
entry = getEntry( path );
- result = entry?QString::FROMUTF8(entry->url):"";
+ result = entry?TQString::FROMUTF8(entry->url):"";
return result;
}
- QString Wc::getRepos(const QString&path) throw (ClientException)
+ TQString Wc::getRepos(const TQString&path) throw (ClientException)
{
- QString result = "";
+ TQString result = "";
const svn_wc_entry_t *entry;
entry = getEntry( path );
- result = entry ? QString::FROMUTF8(entry->repos) : QString::fromLatin1("");
+ result = entry ? TQString::FROMUTF8(entry->repos) : TQString::tqfromLatin1("");
return result;
}
diff --git a/src/svnqt/wc.hpp b/src/svnqt/wc.hpp
index b8769f8..84cb23b 100644
--- a/src/svnqt/wc.hpp
+++ b/src/svnqt/wc.hpp
@@ -41,14 +41,14 @@
#include "svnqt/revision.hpp"
#include "svnqt/svnqt_defines.hpp"
-#include <qstring.h>
+#include <tqstring.h>
namespace svn
{
/**
* Class that deals with a working copy
*/
- class SVNQT_EXPORT Wc
+ class SVNTQT_EXPORT Wc
{
public:
/**
@@ -58,7 +58,7 @@ namespace svn
* @return true=valid working copy
*/
static bool
- checkWc (const QString& dir);
+ checkWc (const TQString& dir);
/**
* ensure that an administrative area exists for @a dir, so that @a dir
@@ -70,20 +70,20 @@ namespace svn
* @param revision expected working copy revision
*/
static void
- ensureAdm (const QString& dir, const QString& uuid,
- const QString& url, const Revision & revision) throw (ClientException);
+ ensureAdm (const TQString& dir, const TQString& uuid,
+ const TQString& url, const Revision & revision) throw (ClientException);
/**
* retrieve the url of a given working copy item
* @param path the working copy item to check
* @return the repository url of @a path
*/
- static QString getUrl(const QString&path) throw (ClientException);
- static QString getRepos(const QString&path) throw (ClientException);
+ static TQString getUrl(const TQString&path) throw (ClientException);
+ static TQString getRepos(const TQString&path) throw (ClientException);
static const char * ADM_DIR_NAME;
private:
- static const svn_wc_entry_t *getEntry( const QString &path ) throw ( ClientException );
+ static const svn_wc_entry_t *getEntry( const TQString &path ) throw ( ClientException );
};
}