diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
commit | d7633c195a464e4d344ada9eea61afd10110598a (patch) | |
tree | 1f2da0b135f3ed84955e340cae823f00c4ce7284 /src/svnqt/cache/test/sqlite.cpp | |
parent | 3fa7eb804f67b2789f128075cc2522f398640250 (diff) | |
download | tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.tar.gz tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.zip |
Port kdesvn to TQt4
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/svnqt/cache/test/sqlite.cpp')
-rw-r--r-- | src/svnqt/cache/test/sqlite.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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); |