diff options
Diffstat (limited to 'src')
258 files changed, 5357 insertions, 5696 deletions
diff --git a/src/askpass/kdesvn-askpass.cpp b/src/askpass/kdesvn-askpass.cpp index 2f6ed4c..99037eb 100644 --- a/src/askpass/kdesvn-askpass.cpp +++ b/src/askpass/kdesvn-askpass.cpp @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qregexp.h> +#include <tqregexp.h> #include <kaboutdata.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -45,19 +45,19 @@ int main(int argc, char** argv) KApplication app; // no need for session management app.disableSessionManagement(); - QString prompt; + TQString prompt; if( !KCmdLineArgs::parsedArgs()->count() ) { prompt = i18n("Please enter your password below."); } else { prompt = KCmdLineArgs::parsedArgs()->arg(0); } - QCString pw; + TQCString pw; KPasswordDialog::disableCoreDumps(); if (KPasswordDialog::getPassword(pw,prompt,0)==KPasswordDialog::Accepted) { - std::cout << pw << std::endl; + std::cout << pw.data() << std::endl; /* cleanup memory */ - pw.replace(0,pw.length(),"0"); + pw.tqreplace(0,pw.length(),"0"); return 0; } return 1; diff --git a/src/commandline.cpp b/src/commandline.cpp index 4aaabd3..5d24062 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -25,9 +25,9 @@ #include <ktextbrowser.h> #include <kapplication.h> #include <klocale.h> -#include <qstring.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqvbox.h> class CommandLineData { @@ -37,7 +37,7 @@ public: void displayHelp(); - QString cmd; + TQString cmd; }; CommandLine::CommandLine(KCmdLineArgs*_args) @@ -66,12 +66,12 @@ int CommandLine::exec() } KLibFactory *factory = KLibLoader::self()->factory("libkdesvnpart"); if (factory) { - if (QCString(factory->className())!="cFactory") { + if (TQCString(factory->className())!="cFactory") { kdDebug()<<"wrong factory"<<endl; return -1; } cFactory*cfa = static_cast<cFactory*>(factory); - commandline_part * cpart = cfa->createCommandIf((QObject*)0,(const char*)0,m_args); + commandline_part * cpart = cfa->createCommandIf((TQObject*)0,(const char*)0,m_args); int res = cpart->exec(); return res; } diff --git a/src/commandline_part.cpp b/src/commandline_part.cpp index ea06722..46a02b0 100644 --- a/src/commandline_part.cpp +++ b/src/commandline_part.cpp @@ -23,17 +23,17 @@ #include <kstandarddirs.h> -commandline_part::commandline_part(QObject *parent, const char *name,KCmdLineArgs *args) - : QObject(parent, name) +commandline_part::commandline_part(TQObject *tqparent, const char *name,KCmdLineArgs *args) + : TQObject(tqparent, name) { KGlobal::locale()->insertCatalogue("kdesvn"); KInstance * inst = kdesvnPartFactory::instance(); KGlobal::locale()->insertCatalogue(inst->instanceName()); KGlobal::dirs()->addResourceType( inst->instanceName() + "data", - KStandardDirs::kde_default("data")+ QString::fromLatin1( inst->instanceName() ) + '/' ); + KStandardDirs::kde_default("data")+ TQString::tqfromLatin1( inst->instanceName() ) + '/' ); - m_pCPart = new CommandExec(this,name?QString(name)+QString("_exec"):QString::fromLatin1("command_executer"),args); + m_pCPart = new CommandExec(this,name?TQString(name)+TQString("_exec"):TQString::tqfromLatin1("command_executer"),args); } commandline_part::~commandline_part() diff --git a/src/commandline_part.h b/src/commandline_part.h index 03a8366..74aebda 100644 --- a/src/commandline_part.h +++ b/src/commandline_part.h @@ -20,7 +20,7 @@ #ifndef COMMANDLINE_PART_H #define COMMANDLINE_PART_H -#include <qobject.h> +#include <tqobject.h> class CommandExec; class KCmdLineArgs; @@ -28,11 +28,12 @@ class KCmdLineArgs; /** @author Rajko Albrecht */ -class commandline_part : public QObject +class commandline_part : public TQObject { Q_OBJECT + TQ_OBJECT public: - commandline_part(QObject *parent, const char *name, KCmdLineArgs *args); + commandline_part(TQObject *tqparent, const char *name, KCmdLineArgs *args); virtual ~commandline_part(); virtual int exec(); private: diff --git a/src/eventnumbers.h b/src/eventnumbers.h index 50c9038..0f14e68 100644 --- a/src/eventnumbers.h +++ b/src/eventnumbers.h @@ -20,17 +20,17 @@ #ifndef _EVENT_NUMBERS_H #define _EVENT_NUMBERS_H -#include <qevent.h> +#include <tqevent.h> -#define EVENT_THREAD_FINISHED QEvent::User -#define EVENT_THREAD_SSL_TRUST_PROMPT QEvent::User+1 -#define EVENT_THREAD_LOGIN_PROMPT QEvent::User+2 -#define EVENT_THREAD_LOGMSG_PROMPT QEvent::User+3 -#define EVENT_THREAD_CERT_PW_PROMPT QEvent::User+4 -#define EVENT_THREAD_CERT_SELECT_PROMPT QEvent::User+5 -#define EVENT_THREAD_NOTIFY QEvent::User+6 -#define EVENT_LOGCACHE_FINISHED QEvent::User+7 -#define EVENT_LOGCACHE_STATUS QEvent::User+8 -#define EVENT_THREAD_LOGIN_SAVED QEvent::User+9 +#define EVENT_THREAD_FINISHED TQEvent::User +#define EVENT_THREAD_SSL_TRUST_PROMPT TQEvent::User+1 +#define EVENT_THREAD_LOGIN_PROMPT TQEvent::User+2 +#define EVENT_THREAD_LOGMSG_PROMPT TQEvent::User+3 +#define EVENT_THREAD_CERT_PW_PROMPT TQEvent::User+4 +#define EVENT_THREAD_CERT_SELECT_PROMPT TQEvent::User+5 +#define EVENT_THREAD_NOTIFY TQEvent::User+6 +#define EVENT_LOGCACHE_FINISHED TQEvent::User+7 +#define EVENT_LOGCACHE_STATUS TQEvent::User+8 +#define EVENT_THREAD_LOGIN_SAVED TQEvent::User+9 #endif diff --git a/src/helpers/ktranslateurl.cpp b/src/helpers/ktranslateurl.cpp index 8c5e903..41f9af7 100644 --- a/src/helpers/ktranslateurl.cpp +++ b/src/helpers/ktranslateurl.cpp @@ -25,8 +25,8 @@ #include <kfileitem.h> #include <kdesktopfile.h> -#include <qstringlist.h> -#include <qdir.h> +#include <tqstringlist.h> +#include <tqdir.h> namespace helpers { @@ -41,16 +41,16 @@ KTranslateUrl::~KTranslateUrl() KURL KTranslateUrl::translateSystemUrl(const KURL&_url) { - QString proto = _url.protocol(); + TQString proto = _url.protocol(); KURL res; - QString name,path; + TQString name,path; if (proto!="system") { return _url; } KGlobal::dirs()->addResourceType("system_entries", KStandardDirs::kde_default("data") + "systemview"); - QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries"); + TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries"); if (!parseURL(_url,name,path)) { return _url; } @@ -63,10 +63,10 @@ KURL KTranslateUrl::translateSystemUrl(const KURL&_url) return res; } -bool KTranslateUrl::parseURL(const KURL&url,QString&name,QString&path) +bool KTranslateUrl::parseURL(const KURL&url,TQString&name,TQString&path) { - QString url_path = url.path(); - int i = url_path.find('/', 1); + TQString url_path = url.path(); + int i = url_path.tqfind('/', 1); if (i > 0) { name = url_path.mid(1, i-1); @@ -75,31 +75,31 @@ bool KTranslateUrl::parseURL(const KURL&url,QString&name,QString&path) else { name = url_path.mid(1); - path = QString::null; + path = TQString(); } - return name != QString::null; + return name != TQString(); } -KURL KTranslateUrl::findSystemBase(const QString&filename) +KURL KTranslateUrl::findSystemBase(const TQString&filename) { - QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries"); + TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries"); - QStringList::ConstIterator dirpath = dirList.begin(); - QStringList::ConstIterator end = dirList.end(); + TQStringList::ConstIterator dirpath = dirList.begin(); + TQStringList::ConstIterator end = dirList.end(); for(; dirpath!=end; ++dirpath) { - QDir dir = *dirpath; + TQDir dir = *dirpath; if (!dir.exists()) continue; - QStringList filenames - = dir.entryList( QDir::Files | QDir::Readable ); + TQStringList filenames + = dir.entryList( TQDir::Files | TQDir::Readable ); KIO::UDSEntry entry; - QStringList::ConstIterator name = filenames.begin(); - QStringList::ConstIterator endf = filenames.end(); + TQStringList::ConstIterator name = filenames.begin(); + TQStringList::ConstIterator endf = filenames.end(); for(; name!=endf; ++name) { @@ -125,14 +125,14 @@ KURL KTranslateUrl::findSystemBase(const QString&filename) /*! - \fn helpers::KTranslateUrl::makeKdeUrl(const QString&inUrl) + \fn helpers::KTranslateUrl::makeKdeUrl(const TQString&inUrl) */ -QString helpers::KTranslateUrl::makeKdeUrl(const QString&_proto) +TQString helpers::KTranslateUrl::makeKdeUrl(const TQString&_proto) { - QString proto; + TQString proto; if (_proto.startsWith("svn+")){ proto = "k"+_proto; - } else if (_proto== QString("svn")){ + } else if (_proto== TQString("svn")){ proto = "ksvn"; } else { proto = "ksvn+"+_proto; diff --git a/src/helpers/ktranslateurl.h b/src/helpers/ktranslateurl.h index bad6a6a..8e6eec5 100644 --- a/src/helpers/ktranslateurl.h +++ b/src/helpers/ktranslateurl.h @@ -33,9 +33,9 @@ public: ~KTranslateUrl(); static KURL translateSystemUrl(const KURL&); - static bool parseURL(const KURL&,QString&name,QString&path); - static KURL findSystemBase(const QString&name); - static QString makeKdeUrl(const QString&inUrl); + static bool parseURL(const KURL&,TQString&name,TQString&path); + static KURL findSystemBase(const TQString&name); + static TQString makeKdeUrl(const TQString&inUrl); }; } diff --git a/src/helpers/sshagent.cpp b/src/helpers/sshagent.cpp index ccde212..c4fee85 100644 --- a/src/helpers/sshagent.cpp +++ b/src/helpers/sshagent.cpp @@ -21,7 +21,7 @@ #include "sshagent.h" #include "kdesvn-config.h" -#include <qregexp.h> +#include <tqregexp.h> #include <kapplication.h> #include <kdeversion.h> #include <kprocess.h> @@ -34,12 +34,12 @@ bool SshAgent::m_isRunning = false; bool SshAgent::m_isOurAgent = false; bool SshAgent::m_addIdentitiesDone = false; -QString SshAgent::m_authSock = QString::null; -QString SshAgent::m_pid = QString::null; +TQString SshAgent::m_authSock = TQString(); +TQString SshAgent::m_pid = TQString(); -SshAgent::SshAgent(QObject* parent, const char* name) - : QObject(parent, name) +SshAgent::SshAgent(TQObject* tqparent, const char* name) + : TQObject(tqparent, name) { } @@ -58,11 +58,11 @@ bool SshAgent::querySshAgent() char* pid; if( (pid = ::getenv("SSH_AGENT_PID")) != 0 ) { - m_pid = QString::fromLocal8Bit(pid); + m_pid = TQString::fromLocal8Bit(pid); char* sock = ::getenv("SSH_AUTH_SOCK"); if( sock ) - m_authSock = QString::fromLocal8Bit(sock); + m_authSock = TQString::fromLocal8Bit(sock); /* make sure that we have a askpass program. * on some systems something like that isn't installed.*/ #ifdef FORCE_ASKPASS @@ -134,10 +134,10 @@ bool SshAgent::addSshIdentities(bool force) proc << "ssh-add"; - connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); proc.start(KProcess::DontCare, KProcess::AllOutput); @@ -165,15 +165,15 @@ void SshAgent::killSshAgent() void SshAgent::slotProcessExited(KProcess*) { - QRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);"); - QRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);"); + TQRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);"); + TQRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);"); - QRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*"); - QRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*"); - QStringList m_outputLines = QStringList::split("\n",m_Output); + TQRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*"); + TQRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*"); + TQStringList m_outputLines = TQStringList::split("\n",m_Output); - QStringList::Iterator it = m_outputLines.begin(); - QStringList::Iterator end = m_outputLines.end(); + TQStringList::Iterator it = m_outputLines.begin(); + TQStringList::Iterator end = m_outputLines.end(); for( ; it != end; ++it ) { if( m_pid.isEmpty() ) @@ -218,7 +218,7 @@ void SshAgent::slotReceivedStdout(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); + TQString output = TQString::fromLocal8Bit(buffer, buflen); m_Output+=output; } @@ -227,7 +227,7 @@ void SshAgent::slotReceivedStderr(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); + TQString output = TQString::fromLocal8Bit(buffer, buflen); m_Output+=output; } @@ -238,12 +238,12 @@ bool SshAgent::startSshAgent() proc << "ssh-agent"; - connect(&proc, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*))); - connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int)) ); + connect(&proc, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited(KProcess*))); + connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) ); proc.start(KProcess::NotifyOnExit, KProcess::All); diff --git a/src/helpers/sshagent.h b/src/helpers/sshagent.h index f5738fb..ed9ff1a 100644 --- a/src/helpers/sshagent.h +++ b/src/helpers/sshagent.h @@ -21,19 +21,20 @@ #ifndef SSHAGENT_H #define SSHAGENT_H -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> class KProcess; -class SshAgent : public QObject +class SshAgent : public TQObject { Q_OBJECT + TQ_OBJECT public: - SshAgent(QObject* parent = 0, const char* name = 0); + SshAgent(TQObject* tqparent = 0, const char* name = 0); ~SshAgent(); bool querySshAgent(); @@ -41,8 +42,8 @@ public: void killSshAgent(); bool isRunning() const { return m_isRunning; } - QString pid() const { return m_pid; } - QString authSock() const { return m_authSock; } + TQString pid() const { return m_pid; } + TQString authSock() const { return m_authSock; } private slots: void slotProcessExited(KProcess*); @@ -52,13 +53,13 @@ private slots: private: bool startSshAgent(); - QString m_Output; + TQString m_Output; static bool m_isRunning; static bool m_isOurAgent; static bool m_addIdentitiesDone; - static QString m_authSock; - static QString m_pid; + static TQString m_authSock; + static TQString m_pid; }; diff --git a/src/helpers/stringhelper.h b/src/helpers/stringhelper.h index 263f418..80ad576 100644 --- a/src/helpers/stringhelper.h +++ b/src/helpers/stringhelper.h @@ -20,8 +20,8 @@ #ifndef STRINGHELPER_H #define STRINGHELPER_H -#include <qstring.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqtextstream.h> namespace helpers { @@ -33,7 +33,7 @@ protected: public: ByteToString(){}; - QString operator()(long value) + TQString operator()(long value) { char pre = 0; double v = (double)value; @@ -57,7 +57,7 @@ public: } v /= 1024.0; } - return QString("%1 %2Byte").arg(v,0,'f',pre?2:0).arg(pre?QString(QChar(pre)):QString("")); + return TQString("%1 %2Byte").tqarg(v,0,'f',pre?2:0).tqarg(pre?TQString(TQChar(pre)):TQString("")); } }; diff --git a/src/helpers/sub2qt.cpp b/src/helpers/sub2qt.cpp index 1ca0c28..77c7e66 100644 --- a/src/helpers/sub2qt.cpp +++ b/src/helpers/sub2qt.cpp @@ -22,7 +22,7 @@ #include "src/svnqt/datetime.hpp" #include "kglobal.h" #include "klocale.h" -#include <qmap.h> +#include <tqmap.h> namespace helpers { @@ -35,12 +35,12 @@ sub2qt::~sub2qt() { } -QString sub2qt::apr_time2qtString(apr_time_t _time) +TQString sub2qt::apr_time2qtString(apr_time_t _time) { return DateTime2qtString(_time); } -QString sub2qt::DateTime2qtString(const svn::DateTime&_time) +TQString sub2qt::DateTime2qtString(const svn::DateTime&_time) { return KGlobal::locale()->formatDateTime(_time); } diff --git a/src/helpers/sub2qt.h b/src/helpers/sub2qt.h index 23eda5f..c6ddb6d 100644 --- a/src/helpers/sub2qt.h +++ b/src/helpers/sub2qt.h @@ -17,12 +17,12 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef HELPERSSUB2QT_H -#define HELPERSSUB2QT_H +#ifndef HELPERSSUB2TQT_H +#define HELPERSSUB2TQT_H #include "src/svnqt/datetime.hpp" -#include <qdatetime.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqstring.h> #include <svn_time.h> namespace helpers { @@ -35,8 +35,8 @@ public: sub2qt(); ~sub2qt(); - static QString apr_time2qtString(apr_time_t _time); - static QString DateTime2qtString(const svn::DateTime&_time); + static TQString apr_time2qtString(apr_time_t _time); + static TQString DateTime2qtString(const svn::DateTime&_time); }; } diff --git a/src/kdesvn.cpp b/src/kdesvn.cpp index 3f2e269..9921ffb 100644 --- a/src/kdesvn.cpp +++ b/src/kdesvn.cpp @@ -23,11 +23,11 @@ #include "urldlg.h" #include "kdesvn_part.h" -#include <qdragobject.h> +#include <tqdragobject.h> #include <kprinter.h> -#include <qpainter.h> -#include <qpaintdevicemetrics.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqpaintdevicemetrics.h> +#include <tqcursor.h> #include <kglobal.h> #include <klocale.h> @@ -81,11 +81,11 @@ kdesvn::kdesvn() // and a status bar statusBar()->show(); - m_bookmarkFile = locateLocal("appdata",QString::fromLatin1("bookmarks.xml"),true); + m_bookmarkFile = locateLocal("appdata",TQString::tqfromLatin1("bookmarks.xml"),true); m_BookmarkManager = KBookmarkManager::managerForFile(m_bookmarkFile,false); m_BookmarkManager->setShowNSBookmarks(false); - m_BookmarkManager->setEditorOptions(QString::fromLatin1("KDE Svn"),false); + m_BookmarkManager->setEditorOptions(TQString::tqfromLatin1("KDE Svn"),false); m_BookmarksActionmenu = new KActionMenu(i18n("&Bookmarks"),"bookmark",actionCollection(),"bookmarks"); m_BookmarksActionmenu->setDelayed(false); @@ -104,7 +104,7 @@ kdesvn::kdesvn() if (factory) { - if (QCString(factory->className())!="cFactory") { + if (TQCString(factory->className())!="cFactory") { kdDebug()<<"wrong factory"<<endl; KMessageBox::error(this, i18n("Could not find our part")); kapp->quit(); @@ -114,7 +114,7 @@ kdesvn::kdesvn() // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = static_cast<KParts::ReadOnlyPart *>(cfa->createAppPart(this,"kdesvn_part", this, "kdesvn_part", "KParts::ReadOnlyPart",QStringList())); + m_part = static_cast<KParts::ReadOnlyPart *>(cfa->createAppPart(this,"kdesvn_part", TQT_TQOBJECT(this), "kdesvn_part", "KParts::ReadOnlyPart",TQStringList())); if (m_part) { @@ -123,22 +123,22 @@ kdesvn::kdesvn() KAction*tmpAction; tmpAction = new KAction(i18n("Create and open new repository"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotCreateRepo()),actionCollection(),"subversion_create_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotCreateRepo()),actionCollection(),"subversion_create_repo"); tmpAction->setToolTip(i18n("Create and opens a new local subversion repository")); tmpAction = new KAction(i18n("Dump repository to file"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotDumpRepo()),actionCollection(),"subversion_dump_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotDumpRepo()),actionCollection(),"subversion_dump_repo"); tmpAction->setToolTip(i18n("Dump a subversion repository to a file")); tmpAction = new KAction(i18n("Hotcopy a repository"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotHotcopy()),actionCollection(),"subversion_hotcopy_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotHotcopy()),actionCollection(),"subversion_hotcopy_repo"); tmpAction->setToolTip(i18n("Hotcopy a subversion repository to a new folder")); tmpAction = new KAction(i18n("Load dump into repository"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotLoaddump()),actionCollection(),"subversion_load_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotLoaddump()),actionCollection(),"subversion_load_repo"); tmpAction->setToolTip(i18n("Load a dump file into a repository.")); tmpAction = new KAction(i18n("Add ssh identities to ssh-agent"),"password", - KShortcut(),m_part,SLOT(slotSshAdd()),actionCollection(),"kdesvn_ssh_add"); + KShortcut(),TQT_TQOBJECT(m_part),TQT_SLOT(slotSshAdd()),actionCollection(),"kdesvn_ssh_add"); tmpAction->setToolTip(i18n("Force add ssh-identities to ssh-agent for future use.")); tmpAction = new KAction(i18n("Info about kdesvn part"), "kdesvn", - KShortcut(), m_part, SLOT(showAboutApplication()), actionCollection(), "help_about_kdesvnpart"); + KShortcut(), TQT_TQOBJECT(m_part), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kdesvnpart"); tmpAction->setToolTip(i18n("Shows info about the kdesvn plugin not the standalone app.")); /* enable tooltips in statusbar for menu */ @@ -157,7 +157,7 @@ kdesvn::kdesvn() { // if we couldn't find our Part, we exit since the Shell by // itself can't do anything useful - KMessageBox::error(this, i18n("Could not find our part")+QString(":\n")+KLibLoader::self()->lastErrorMessage()); + KMessageBox::error(this, i18n("Could not find our part")+TQString(":\n")+KLibLoader::self()->lastErrorMessage()); kapp->quit(); // we return here, cause kapp->quit() only means "exit the // next time we enter the event loop... @@ -169,10 +169,10 @@ kdesvn::kdesvn() void kdesvn::connectActionCollection( KActionCollection *coll ) { if (!coll)return; - connect( coll, SIGNAL( actionStatusText( const QString & ) ), - this, SLOT( changeStatusbar( const QString & ) ) ); - connect( coll, SIGNAL( clearStatusText() ), - this, SLOT( resetStatusBar() ) ); + connect( coll, TQT_SIGNAL( actionStatusText( const TQString & ) ), + this, TQT_SLOT( changeStatusbar( const TQString & ) ) ); + connect( coll, TQT_SIGNAL( clearStatusText() ), + this, TQT_SLOT( resetStatusBar() ) ); } void kdesvn::disconnectActionCollection( KActionCollection *coll ) @@ -201,7 +201,7 @@ void kdesvn::load(const KURL& url,bool addRescent) } } if (!ret) { - changeStatusbar(i18n("Could not open url %1").arg(url.prettyURL())); + changeStatusbar(i18n("Could not open url %1").tqarg(url.prettyURL())); if (rac) { rac->removeURL(url); } @@ -220,13 +220,13 @@ void kdesvn::load(const KURL& url,bool addRescent) void kdesvn::setupActions() { KAction*ac; - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); - KStdAction::openNew(this,SLOT(fileNew()),actionCollection()); - ac = KStdAction::close(this,SLOT(fileClose()),actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::openNew(TQT_TQOBJECT(this),TQT_SLOT(fileNew()),actionCollection()); + ac = KStdAction::close(TQT_TQOBJECT(this),TQT_SLOT(fileClose()),actionCollection()); ac->setEnabled(getMemberList()->count()>1); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); - KRecentFilesAction*rac = KStdAction::openRecent(this,SLOT(loadRescent(const KURL&)),actionCollection()); + KRecentFilesAction*rac = KStdAction::openRecent(TQT_TQOBJECT(this),TQT_SLOT(loadRescent(const KURL&)),actionCollection()); if (rac) { rac->setMaxItems(8); @@ -234,10 +234,10 @@ void kdesvn::setupActions() rac->setText(i18n("Recent opened URLs")); } - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); KToggleAction *toggletemp; toggletemp = new KToggleAction(i18n("Load last opened URL on start"),KShortcut(), @@ -245,7 +245,7 @@ void kdesvn::setupActions() toggletemp->setToolTip(i18n("Reload last opened url if no one is given on commandline")); KConfigGroup cs(KGlobal::config(),"startup"); toggletemp->setChecked(cs.readBoolEntry("load_last_on_start",false)); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotLoadLast(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotLoadLast(bool))); } void kdesvn::optionsShowStatusbar() @@ -290,7 +290,7 @@ void kdesvn::readProperties(KConfig *config) // the app is being restored. read in here whatever you wrote // in 'saveProperties' - QString url = config->readPathEntry("lastURL"); + TQString url = config->readPathEntry("lastURL"); if (!url.isEmpty() && m_part) m_part->openURL(KURL(url)); @@ -314,7 +314,7 @@ void kdesvn::fileOpen() load(url,true); } -void kdesvn::changeStatusbar(const QString& text) +void kdesvn::changeStatusbar(const TQString& text) { // display the text on the statusbar statusBar()->message(text); @@ -325,13 +325,13 @@ void kdesvn::resetStatusBar() statusBar()->message(i18n("Ready")); } -void kdesvn::openBookmarkURL (const QString &_url) +void kdesvn::openBookmarkURL (const TQString &_url) { if (!_url.isEmpty() && m_part) load(_url,false); } -QString kdesvn::currentURL () const +TQString kdesvn::currentURL () const { if (!m_part) return ""; return m_part->url().prettyURL(); @@ -371,8 +371,8 @@ void kdesvn::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -431,7 +431,7 @@ void kdesvn::checkReload() if (!cs.readBoolEntry("load_last_on_start",false)) return; - QString url = cs.readPathEntry("lastURL"); + TQString url = cs.readPathEntry("lastURL"); if (!url.isEmpty() && m_part) load(KURL(url),false); diff --git a/src/kdesvn.h b/src/kdesvn.h index 203f2d6..dda0142 100644 --- a/src/kdesvn.h +++ b/src/kdesvn.h @@ -26,7 +26,7 @@ #include <kapplication.h> #include <kparts/mainwindow.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kbookmarkmanager.h> class KURL; @@ -46,6 +46,7 @@ class KBookmarkMenu; class kdesvn : public KParts::MainWindow,public KBookmarkOwner { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -57,8 +58,8 @@ public: */ virtual ~kdesvn(); - virtual void openBookmarkURL (const QString &_url); - virtual QString currentURL () const; + virtual void openBookmarkURL (const TQString &_url); + virtual TQString currentURL () const; void checkReload(); protected: @@ -88,7 +89,7 @@ private slots: void fileNew(); void fileClose(); void optionsShowStatusbar(); - void changeStatusbar(const QString&); + void changeStatusbar(const TQString&); void resetStatusBar(); private: @@ -98,7 +99,7 @@ private: void disconnectActionCollection( KActionCollection *coll ); KActionMenu *m_FileMenu; - QString m_bookmarkFile; + TQString m_bookmarkFile; KBookmarkManager * m_BookmarkManager; KActionMenu* m_BookmarksActionmenu; KActionCollection*m_Bookmarkactions; diff --git a/src/kdesvn_events.cpp b/src/kdesvn_events.cpp index 4536d2a..98cf364 100644 --- a/src/kdesvn_events.cpp +++ b/src/kdesvn_events.cpp @@ -1,7 +1,7 @@ #include "kdesvn_events.h" #include "eventnumbers.h" -FillCacheStatusEvent::FillCacheStatusEvent(Q_LLONG current,Q_LLONG max) - :QCustomEvent(EVENT_LOGCACHE_STATUS),m_current(current),m_max(max) +FillCacheStatusEvent::FillCacheStatusEvent(TQ_LLONG current,TQ_LLONG max) + :TQCustomEvent(EVENT_LOGCACHE_STATUS),m_current(current),m_max(max) { } diff --git a/src/kdesvn_events.h b/src/kdesvn_events.h index 509125e..e8de055 100644 --- a/src/kdesvn_events.h +++ b/src/kdesvn_events.h @@ -1,17 +1,17 @@ #ifndef __KDESVN_EVENTS_H #define __KDESVN_EVENTS_H -#include <qevent.h> +#include <tqevent.h> #include "src/svnqt/svnqt_defines.hpp" -class FillCacheStatusEvent:public QCustomEvent +class FillCacheStatusEvent:public TQCustomEvent { public: - FillCacheStatusEvent(Q_LLONG current,Q_LLONG max); - Q_LLONG current()const{return m_current;} - Q_LLONG max()const{return m_max;} + FillCacheStatusEvent(TQ_LLONG current,TQ_LLONG max); + TQ_LLONG current()const{return m_current;} + TQ_LLONG max()const{return m_max;} private: - Q_LLONG m_current,m_max; + TQ_LLONG m_current,m_max; }; #endif diff --git a/src/kdesvn_part.cpp b/src/kdesvn_part.cpp index 83cd0d0..3ee7b36 100644 --- a/src/kdesvn_part.cpp +++ b/src/kdesvn_part.cpp @@ -46,34 +46,34 @@ #include <kaboutdata.h> #include <klocale.h> -#include <qcursor.h> -#include <qpopupmenu.h> +#include <tqcursor.h> +#include <tqpopupmenu.h> //K_EXPORT_COMPONENT_FACTORY( libkdesvnpart, kdesvnPartFactory ) extern "C" { KDESVN_EXPORT void *init_libkdesvnpart() { return new kdesvnPartFactory; } } static const char version[] = VERSION; -QString kdesvnPart::m_Extratext = ""; +TQString kdesvnPart::m_Extratext = ""; static const char description[] = I18N_NOOP("A Subversion Client for KDE (dynamic Part component)"); -kdesvnPart::kdesvnPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name , const QStringList&) - : KParts::ReadOnlyPart(parent, name) +kdesvnPart::kdesvnPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name , const TQStringList&) + : KParts::ReadOnlyPart(tqparent, name) { - init(parentWidget,widgetName,false); + init(tqparentWidget,widgetName,false); } -kdesvnPart::kdesvnPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name,bool ownapp, const QStringList&) - : KParts::ReadOnlyPart(parent, name) +kdesvnPart::kdesvnPart(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name,bool ownapp, const TQStringList&) + : KParts::ReadOnlyPart(tqparent, name) { - init(parentWidget,widgetName,ownapp); + init(tqparentWidget,widgetName,ownapp); } -void kdesvnPart::init( QWidget *parentWidget, const char *widgetName,bool full) +void kdesvnPart::init( TQWidget *tqparentWidget, const char *widgetName,bool full) { m_aboutDlg = 0; KGlobal::locale()->insertCatalogue("kdesvn"); @@ -82,7 +82,7 @@ void kdesvnPart::init( QWidget *parentWidget, const char *widgetName,bool full) m_browserExt = new KdesvnBrowserExtension( this ); // this should be your custom internal widget - m_view = new kdesvnView(actionCollection(),parentWidget,widgetName,full); + m_view = new kdesvnView(actionCollection(),tqparentWidget,widgetName,full); // notify the part that this is our internal widget setWidget(m_view); @@ -96,12 +96,12 @@ void kdesvnPart::init( QWidget *parentWidget, const char *widgetName,bool full) #else setXMLFile("kdesvn_part.rc"); #endif - connect(m_view,SIGNAL(sigShowPopup(const QString&,QWidget**)),this,SLOT(slotDispPopup(const QString&,QWidget**))); - connect(m_view,SIGNAL(sigSwitchUrl(const KURL&)),this,SLOT(openURL(const KURL&))); - connect(this,SIGNAL(refreshTree()),m_view,SLOT(refreshCurrentTree())); - connect(m_view,SIGNAL(setWindowCaption(const QString&)),this,SIGNAL(setWindowCaption(const QString&))); - connect(m_view,SIGNAL(sigUrlChanged( const QString&)),this,SLOT(slotUrlChanged(const QString&))); - connect(this,SIGNAL(settingsChanged()),widget(),SLOT(slotSettingsChanged())); + connect(m_view,TQT_SIGNAL(sigShowPopup(const TQString&,TQWidget**)),this,TQT_SLOT(slotDispPopup(const TQString&,TQWidget**))); + connect(m_view,TQT_SIGNAL(sigSwitchUrl(const KURL&)),this,TQT_SLOT(openURL(const KURL&))); + connect(this,TQT_SIGNAL(refreshTree()),m_view,TQT_SLOT(refreshCurrentTree())); + connect(m_view,TQT_SIGNAL(setWindowCaption(const TQString&)),this,TQT_SIGNAL(setWindowCaption(const TQString&))); + connect(m_view,TQT_SIGNAL(sigUrlChanged( const TQString&)),this,TQT_SLOT(slotUrlChanged(const TQString&))); + connect(this,TQT_SIGNAL(settingsChanged()),widget(),TQT_SLOT(slotSettingsChanged())); m_browserExt->setPropertiesActionEnabled(false); } @@ -111,7 +111,7 @@ kdesvnPart::~kdesvnPart() kdesvnPartFactory::instance()->config()->sync(); } -void kdesvnPart::slotUrlChanged(const QString&url) +void kdesvnPart::slotUrlChanged(const TQString&url) { m_url = url; } @@ -149,15 +149,15 @@ void kdesvnPart::slotFileProperties() { } -void kdesvnPart::slotDispPopup(const QString&name,QWidget**target) +void kdesvnPart::slotDispPopup(const TQString&name,TQWidget**target) { *target = hostContainer(name); } KAboutData* kdesvnPart::createAboutData() { - m_Extratext = QString(I18N_NOOP("Built with Subversion library: %1\n")).arg(svn::Version::linked_version()); - m_Extratext+=QString(I18N_NOOP("Running Subversion library: %1")).arg(svn::Version::running_version()); + m_Extratext = TQString(I18N_NOOP("Built with Subversion library: %1\n")).tqarg(svn::Version::linked_version()); + m_Extratext+=TQString(I18N_NOOP("Running Subversion library: %1")).tqarg(svn::Version::running_version()); KAboutData*about = new KAboutData("kdesvnpart", I18N_NOOP("kdesvn Part"), version, description, KAboutData::License_GPL, "(C) 2005-2007 Rajko Albrecht",0, @@ -182,37 +182,37 @@ void kdesvnPart::setupActions() toggletemp = new KToggleAction(i18n("Logs follow node changes"),KShortcut(), actionCollection(),"toggle_log_follows"); toggletemp->setChecked(Kdesvnsettings::log_follows_nodes()); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotLogFollowNodes(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotLogFollowNodes(bool))); toggletemp = new KToggleAction(i18n("Display ignored files"),KShortcut(), actionCollection(),"toggle_ignored_files"); toggletemp->setChecked(Kdesvnsettings::display_ignored_files()); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotDisplayIgnored(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotDisplayIgnored(bool))); toggletemp = new KToggleAction(i18n("Display unknown files"),KShortcut(), actionCollection(),"toggle_unknown_files"); toggletemp->setChecked(Kdesvnsettings::display_unknown_files()); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotDisplayUnkown(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotDisplayUnkown(bool))); toggletemp = new KToggleAction(i18n("Hide unchanged files"),KShortcut(), actionCollection(),"toggle_hide_unchanged_files"); toggletemp->setChecked(Kdesvnsettings::hide_unchanged_files()); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotHideUnchanged(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotHideUnchanged(bool))); toggletemp = new KToggleAction(i18n("Work online"),KShortcut(), actionCollection(),"toggle_network"); toggletemp->setChecked(Kdesvnsettings::network_on()); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotEnableNetwork(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotEnableNetwork(bool))); - kdDebug()<<"Appname = " << (QString)kapp->instanceName() << endl; + kdDebug()<<"Appname = " << (TQString)kapp->instanceName() << endl; - KAction * t = KStdAction::preferences(this, SLOT(slotShowSettings()), actionCollection(),"kdesvnpart_pref"); - t->setText(i18n("&Configure %1...").arg("Kdesvn")); - if (QString(kapp->instanceName())!=QString("kdesvn")) { - (void)new KAction(i18n("&About kdesvn part"), "kdesvn", 0, this, SLOT(showAboutApplication()), actionCollection(), "help_about_kdesvnpart"); - (void)new KAction(i18n("Kdesvn &Handbook"), "help", 0, this, SLOT(appHelpActivated()), actionCollection(), "help_kdesvn"); - (void)new KAction(i18n("Send Bugreport for kdesvn"), 0, 0, this, SLOT(reportBug()), actionCollection(), "report_bug"); + KAction * t = KStdAction::preferences(this, TQT_SLOT(slotShowSettings()), actionCollection(),"kdesvnpart_pref"); + t->setText(i18n("&Configure %1...").tqarg("Kdesvn")); + if (TQString(kapp->instanceName())!=TQString("kdesvn")) { + (void)new KAction(i18n("&About kdesvn part"), "kdesvn", 0, this, TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kdesvnpart"); + (void)new KAction(i18n("Kdesvn &Handbook"), "help", 0, this, TQT_SLOT(appHelpActivated()), actionCollection(), "help_kdesvn"); + (void)new KAction(i18n("Send Bugreport for kdesvn"), 0, 0, this, TQT_SLOT(reportBug()), actionCollection(), "report_bug"); } actionCollection()->setHighlightingEnabled(true); } @@ -302,7 +302,7 @@ void KdesvnBrowserExtension::setPropertiesActionEnabled(bool enabled) void KdesvnBrowserExtension::properties() { - static_cast<kdesvnPart*>(parent())->slotFileProperties(); + static_cast<kdesvnPart*>(tqparent())->slotFileProperties(); } @@ -320,7 +320,7 @@ void kdesvnPart::reportBug() */ void kdesvnPart::showAboutApplication() { - if (!m_aboutDlg) m_aboutDlg = new KAboutApplication(createAboutData(), (QWidget *)0, (const char *)0, false); + if (!m_aboutDlg) m_aboutDlg = new KAboutApplication(createAboutData(), (TQWidget *)0, (const char *)0, false); if(m_aboutDlg == 0) return; if(!m_aboutDlg->isVisible()) @@ -335,7 +335,7 @@ void kdesvnPart::showAboutApplication() */ void kdesvnPart::appHelpActivated() { - kapp->invokeHelp(QString::null, "kdesvn"); + kapp->invokeHelp(TQString(), "kdesvn"); } @@ -365,7 +365,7 @@ void kdesvnPart::slotShowSettings() dialog->addPage(new CmdExecSettings_impl(0,"cmdexec_items"), "KIO/"+i18n("Commandline"),"terminal",i18n("Settings for commandline and KIO execution"),true); - connect(dialog,SIGNAL(settingsChanged()),this,SLOT(slotSettingsChanged())); + connect(dialog,TQT_SIGNAL(settingsChanged()),this,TQT_SLOT(slotSettingsChanged())); dialog->show(); } @@ -400,22 +400,22 @@ KInstance* cFactory::s_instance = 0L; KAboutData* cFactory::s_about = 0L; commandline_part* cFactory::s_cline = 0L; -KParts::Part* cFactory::createPartObject( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *classname, const QStringList &args ) +KParts::Part* cFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, + const char *classname, const TQStringList &args ) { Q_UNUSED(classname); // Create an instance of our Part - return new kdesvnPart( parentWidget, widgetName, parent, name, args ); + return new kdesvnPart( tqparentWidget, widgetName, tqparent, name, args ); } -KParts::Part* cFactory::createAppPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *classname, const QStringList &args ) +KParts::Part* cFactory::createAppPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, + const char *classname, const TQStringList &args ) { Q_UNUSED(classname); // Create an instance of our Part - kdesvnPart* obj = new kdesvnPart( parentWidget, widgetName, parent, name, false, args); + kdesvnPart* obj = new kdesvnPart( tqparentWidget, widgetName, tqparent, name, false, args); emit objectCreated( obj ); return obj; } @@ -439,11 +439,11 @@ KInstance* cFactory::instance() return s_instance; } -commandline_part*cFactory::createCommandIf(QObject*parent,const char*name, KCmdLineArgs *args) +commandline_part*cFactory::createCommandIf(TQObject*tqparent,const char*name, KCmdLineArgs *args) { if (!s_cline) { // no emit of creation - we will delete this object in destructor - s_cline = new commandline_part(parent,name,args); + s_cline = new commandline_part(tqparent,name,args); } return s_cline; } diff --git a/src/kdesvn_part.h b/src/kdesvn_part.h index 44dce7a..c07c375 100644 --- a/src/kdesvn_part.h +++ b/src/kdesvn_part.h @@ -30,7 +30,7 @@ #include <kparts/browserextension.h> class kdesvnView; -class QPainter; +class TQPainter; class KURL; class KdesvnBrowserExtension; class KAboutApplication; @@ -46,15 +46,16 @@ class KAboutApplication; class KDESVN_EXPORT kdesvnPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - kdesvnPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList&); + kdesvnPart(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList&); - kdesvnPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name,bool ownapp, const QStringList&); + kdesvnPart(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name,bool ownapp, const TQStringList&); /** * Destructor @@ -68,7 +69,7 @@ signals: void settingsChanged(); public slots: - virtual void slotDispPopup(const QString&,QWidget**target); + virtual void slotDispPopup(const TQString&,TQWidget**target); virtual void slotFileProperties(); virtual bool openURL(const KURL&); virtual void slotSshAdd(); @@ -81,13 +82,13 @@ protected: virtual void setupActions(); KAboutApplication* m_aboutDlg; - void init(QWidget *parentWidget, const char *widgetName,bool full); + void init(TQWidget *tqparentWidget, const char *widgetName,bool full); protected slots: virtual void slotLogFollowNodes(bool); virtual void slotDisplayIgnored(bool); virtual void slotDisplayUnkown(bool); - virtual void slotUrlChanged(const QString&); + virtual void slotUrlChanged(const TQString&); void reportBug(); void showAboutApplication(); void appHelpActivated(); @@ -96,7 +97,7 @@ protected slots: private: kdesvnView *m_view; KdesvnBrowserExtension*m_browserExt; - static QString m_Extratext; + static TQString m_Extratext; protected slots: void slotSettingsChanged(); protected slots: @@ -111,16 +112,17 @@ class KCmdLineArgs; class KDESVN_EXPORT cFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: cFactory():KParts::Factory(){} virtual ~cFactory(); - virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *classname, const QStringList &args ); - virtual KParts::Part* createAppPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *classname, const QStringList &args ); - virtual commandline_part*createCommandIf(QObject*parent,const char*name, KCmdLineArgs *args); + virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, + const char *classname, const TQStringList &args ); + virtual KParts::Part* createAppPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, + const char *classname, const TQStringList &args ); + virtual commandline_part*createCommandIf(TQObject*tqparent,const char*name, KCmdLineArgs *args); static KInstance* instance(); private: @@ -134,6 +136,7 @@ typedef cFactory kdesvnPartFactory; class KPARTS_EXPORT KdesvnBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: KdesvnBrowserExtension( kdesvnPart * ); virtual ~KdesvnBrowserExtension(); diff --git a/src/kdesvnd/kdesvnd_dcop.cpp b/src/kdesvnd/kdesvnd_dcop.cpp index 580fa92..09afbec 100644 --- a/src/kdesvnd/kdesvnd_dcop.cpp +++ b/src/kdesvnd/kdesvnd_dcop.cpp @@ -40,10 +40,10 @@ #include <kfiledialog.h> #include <kpassdlg.h> -#include <qdir.h> +#include <tqdir.h> extern "C" { - KDESVN_EXPORT KDEDModule *create_kdesvnd(const QCString &name) + KDESVN_EXPORT KDEDModule *create_kdesvnd(const TQCString &name) { return new kdesvnd_dcop(name); } @@ -58,12 +58,12 @@ public: IListener(kdesvnd_dcop*p); virtual ~IListener(); /* context-listener methods */ - virtual bool contextGetLogin (const QString & realm, - QString & username, - QString & password, + virtual bool contextGetLogin (const TQString & realm, + TQString & username, + TQString & password, bool & maySave); - virtual bool contextGetSavedLogin (const QString & realm,QString & username,QString & password); - virtual bool contextGetCachedLogin (const QString & realm,QString & username,QString & password); + virtual bool contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password); + virtual bool contextGetCachedLogin (const TQString & realm,TQString & username,TQString & password); virtual void contextNotify (const char *path, svn_wc_notify_action_t action, @@ -75,14 +75,14 @@ public: virtual void contextNotify (const svn_wc_notify_t *action); virtual bool contextCancel(); - virtual bool contextGetLogMessage (QString & msg,const svn::CommitItemList&); + virtual bool contextGetLogMessage (TQString & msg,const svn::CommitItemList&); virtual svn::ContextListener::SslServerTrustAnswer contextSslServerTrustPrompt (const SslServerTrustData & data, apr_uint32_t & acceptedFailures); - virtual bool contextSslClientCertPrompt (QString & certFile); - virtual bool contextLoadSslClientCertPw(QString&password,const QString&realm); - virtual bool contextSslClientCertPwPrompt (QString & password, - const QString & realm, bool & maySave); + virtual bool contextSslClientCertPrompt (TQString & certFile); + virtual bool contextLoadSslClientCertPw(TQString&password,const TQString&realm); + virtual bool contextSslClientCertPwPrompt (TQString & password, + const TQString & realm, bool & maySave); virtual void contextProgress(long long int current, long long int max); /* context listener virtuals end */ @@ -106,7 +106,7 @@ IListener::~IListener() { } -kdesvnd_dcop::kdesvnd_dcop(const QCString&name) : KDEDModule(name) +kdesvnd_dcop::kdesvnd_dcop(const TQCString&name) : KDEDModule(name) { KGlobal::locale()->insertCatalogue("kdesvn"); m_Listener=new IListener(this); @@ -117,24 +117,24 @@ kdesvnd_dcop::~kdesvnd_dcop() delete m_Listener; } -QStringList kdesvnd_dcop::getActionMenu (const KURL::List list) +TQStringList kdesvnd_dcop::getActionMenu (const KURL::List list) { - QStringList result; + TQStringList result; Kdesvnsettings::self()->readConfig(); if (Kdesvnsettings::no_konqueror_contextmenu()||list.count()==0) { return result; } - QString base; + TQString base; - bool parentIsWc = false; + bool tqparentIsWc = false; bool itemIsWc = isWorkingCopy(list[0],base); bool itemIsRepository = false; - QString _par = list[0].directory(true,true); - parentIsWc = isWorkingCopy(_par,base); + TQString _par = list[0].directory(true,true); + tqparentIsWc = isWorkingCopy(_par,base); - if (!parentIsWc && !itemIsWc) { + if (!tqparentIsWc && !itemIsWc) { itemIsRepository = isRepository(list[0]); } @@ -151,7 +151,7 @@ QStringList kdesvnd_dcop::getActionMenu (const KURL::List list) << "Commit"; } - if (!parentIsWc && !itemIsWc) { + if (!tqparentIsWc && !itemIsWc) { if (itemIsRepository) { result << "Log" << "Info"; @@ -178,7 +178,7 @@ QStringList kdesvnd_dcop::getActionMenu (const KURL::List list) KURL url = helpers::KTranslateUrl::translateSystemUrl(list[0]); - QFileInfo f(url.path()); + TQFileInfo f(url.path()); if (f.isFile()) { result << "Blame"; } @@ -191,17 +191,17 @@ QStringList kdesvnd_dcop::getActionMenu (const KURL::List list) return result; } -QStringList kdesvnd_dcop::getSingleActionMenu(QCString what) +TQStringList kdesvnd_dcop::getSingleActionMenu(TQCString what) { KURL::List l; l.append(KURL(what)); return getActionMenu(l); } -QStringList kdesvnd_dcop::get_login(QString realm,QString user) +TQStringList kdesvnd_dcop::get_login(TQString realm,TQString user) { AuthDialogImpl auth(realm,user); - QStringList res; - if (auth.exec()==QDialog::Accepted) { + TQStringList res; + if (auth.exec()==TQDialog::Accepted) { res.append(auth.Username()); res.append(auth.Password()); if (auth.maySave()) { @@ -213,7 +213,7 @@ QStringList kdesvnd_dcop::get_login(QString realm,QString user) return res; } -int kdesvnd_dcop::get_sslaccept(QString hostname,QString fingerprint,QString validFrom,QString validUntil,QString issuerDName,QString realm) +int kdesvnd_dcop::get_sslaccept(TQString hostname,TQString fingerprint,TQString validFrom,TQString validUntil,TQString issuerDName,TQString realm) { bool ok,saveit; if (!SslTrustPrompt_impl::sslTrust( @@ -223,7 +223,7 @@ int kdesvnd_dcop::get_sslaccept(QString hostname,QString fingerprint,QString val validUntil, issuerDName, realm, - QStringList(), + TQStringList(), &ok,&saveit)) { return -1; } @@ -233,16 +233,16 @@ int kdesvnd_dcop::get_sslaccept(QString hostname,QString fingerprint,QString val return 1; } -QStringList kdesvnd_dcop::get_sslclientcertpw(QString realm) +TQStringList kdesvnd_dcop::get_sslclientcertpw(TQString realm) { - QStringList resList; - QCString npass; + TQStringList resList; + TQCString npass; int keep = 1; - int res = KPasswordDialog::getPassword(npass,i18n("Enter password for realm %1").arg(realm),&keep); + int res = KPasswordDialog::getPassword(npass,i18n("Enter password for realm %1").tqarg(realm),&keep); if (res!=KPasswordDialog::Accepted) { return resList; } - resList.append(QString(npass)); + resList.append(TQString(npass)); if (keep) { resList.append("true"); } else { @@ -251,20 +251,20 @@ QStringList kdesvnd_dcop::get_sslclientcertpw(QString realm) return resList; } -QString kdesvnd_dcop::get_sslclientcertfile() +TQString kdesvnd_dcop::get_sslclientcertfile() { - QString afile = KFileDialog::getOpenFileName(QString::null, - QString::null, + TQString afile = KFileDialog::getOpenFileName(TQString(), + TQString(), 0, i18n("Open a file with a #PKCS12 certificate")); return afile; } -QStringList kdesvnd_dcop::get_logmsg() +TQStringList kdesvnd_dcop::get_logmsg() { - QStringList res; + TQStringList res; bool ok; - QString logMessage = Logmsg_impl::getLogmessage(&ok,0,0,0,"logmsg_impl"); + TQString logMessage = Logmsg_impl::getLogmessage(&ok,0,0,0,"logmsg_impl"); if (!ok) { return res; } @@ -272,11 +272,11 @@ QStringList kdesvnd_dcop::get_logmsg() return res; } -QStringList kdesvnd_dcop::get_logmsg(QMap<QString,QString> list) +TQStringList kdesvnd_dcop::get_logmsg(TQMap<TQString,TQString> list) { - QStringList res; + TQStringList res; bool ok; - QString logMessage = Logmsg_impl::getLogmessage(list,&ok,0,0,0,"logmsg_impl"); + TQString logMessage = Logmsg_impl::getLogmessage(list,&ok,0,0,0,"logmsg_impl"); if (!ok) { return res; } @@ -284,9 +284,9 @@ QStringList kdesvnd_dcop::get_logmsg(QMap<QString,QString> list) return res; } -QString kdesvnd_dcop::cleanUrl(const KURL&url) +TQString kdesvnd_dcop::cleanUrl(const KURL&url) { - QString cleanpath = url.path(); + TQString cleanpath = url.path(); while (cleanpath.endsWith("/")) { cleanpath.truncate(cleanpath.length()-1); } @@ -297,7 +297,7 @@ QString kdesvnd_dcop::cleanUrl(const KURL&url) bool kdesvnd_dcop::isRepository(const KURL&url) { kdDebug()<<"kdesvnd_dcop::isRepository Url zum repo check: "<<url<<endl; - QString proto = svn::Url::transformProtokoll(url.protocol()); + TQString proto = svn::Url::transformProtokoll(url.protocol()); kdDebug()<<"kdesvnd_dcop::isRepository Protokoll: " << proto << endl; if (proto=="file") { // local access - may a repository @@ -315,7 +315,7 @@ bool kdesvnd_dcop::isRepository(const KURL&url) } } -bool kdesvnd_dcop::isWorkingCopy(const KURL&_url,QString&base) +bool kdesvnd_dcop::isWorkingCopy(const KURL&_url,TQString&base) { base = ""; KURL url = _url; @@ -335,24 +335,24 @@ bool kdesvnd_dcop::isWorkingCopy(const KURL&_url,QString&base) return true; } -bool IListener::contextGetSavedLogin (const QString & realm,QString & username,QString & password) +bool IListener::contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password) { PwStorage::self()->getLogin(realm,username,password); return true; } -bool IListener::contextGetCachedLogin (const QString & realm,QString & username,QString & password) +bool IListener::contextGetCachedLogin (const TQString & realm,TQString & username,TQString & password) { return true; } -bool IListener::contextGetLogin (const QString & realm, - QString & username, - QString & password, +bool IListener::contextGetLogin (const TQString & realm, + TQString & username, + TQString & password, bool & maySave) { maySave=false; - QStringList res = m_back->get_login(realm,username); + TQStringList res = m_back->get_login(realm,username); if (res.count()!=3) { return false; } @@ -385,9 +385,9 @@ bool IListener::contextCancel() return false; } -bool IListener::contextGetLogMessage (QString & msg,const svn::CommitItemList&) +bool IListener::contextGetLogMessage (TQString & msg,const svn::CommitItemList&) { - QStringList res = m_back->get_logmsg(); + TQStringList res = m_back->get_logmsg(); if (res.count()==0) { return false; } @@ -420,7 +420,7 @@ svn::ContextListener::SslServerTrustAnswer IListener::contextSslServerTrustPromp return ACCEPT_TEMPORARILY; } -bool IListener::contextSslClientCertPrompt (QString & certFile) +bool IListener::contextSslClientCertPrompt (TQString & certFile) { certFile = m_back->get_sslclientcertfile(); if (certFile.isEmpty()) { @@ -429,24 +429,24 @@ bool IListener::contextSslClientCertPrompt (QString & certFile) return true; } -bool IListener::contextLoadSslClientCertPw(QString&password,const QString&realm) +bool IListener::contextLoadSslClientCertPw(TQString&password,const TQString&realm) { return PwStorage::self()->getCertPw(realm,password); } -bool IListener::contextSslClientCertPwPrompt (QString & password, - const QString & realm, bool & maySave) +bool IListener::contextSslClientCertPwPrompt (TQString & password, + const TQString & realm, bool & maySave) { maySave=false; if (PwStorage::self()->getCertPw(realm,password)) { return true; } - QStringList res = m_back->get_sslclientcertpw(realm); + TQStringList res = m_back->get_sslclientcertpw(realm); if (res.size()!=2) { return false; } password=res[0]; - maySave=res[1]==QString("true"); + maySave=res[1]==TQString("true"); if (maySave && Kdesvnsettings::passwords_in_wallet() ) { PwStorage::self()->setCertPw(realm,password); diff --git a/src/kdesvnd/kdesvnd_dcop.h b/src/kdesvnd/kdesvnd_dcop.h index 61b8f83..dca96f3 100644 --- a/src/kdesvnd/kdesvnd_dcop.h +++ b/src/kdesvnd/kdesvnd_dcop.h @@ -22,8 +22,8 @@ #ifndef _kdesvnd_dcop_H #define _kdesvnd_dcop_H -#include <qstringlist.h> -#include <qstring.h> +#include <tqstringlist.h> +#include <tqstring.h> #include <kurl.h> #include <dcopobject.h> #include <kdedmodule.h> @@ -33,18 +33,19 @@ class IListener; class kdesvnd_dcop : public KDEDModule { Q_OBJECT +// TQ_OBJECT K_DCOP private: public: - kdesvnd_dcop(const QCString&); + kdesvnd_dcop(const TQCString&); virtual ~kdesvnd_dcop(); protected: - bool isWorkingCopy(const KURL&url,QString&base); + bool isWorkingCopy(const KURL&url,TQString&base); bool isRepository(const KURL&url); - static QString cleanUrl(const KURL&url); + static TQString cleanUrl(const KURL&url); IListener*m_Listener; k_dcop: @@ -54,21 +55,21 @@ k_dcop: * \param user default username * \return a stringlist containing username-password-saveit as "true" or "false" or empty list if cancel hit. */ - QStringList get_login(QString,QString); + TQStringList get_login(TQString,TQString); // return: -1 dont accept 0 accept temporary 1 accept always // hostname, fingerprint, validFrom, validUntil, issuerDName, realm, - int get_sslaccept(QString, QString, QString, QString, QString, QString); + int get_sslaccept(TQString, TQString, TQString, TQString, TQString, TQString); // returns cert file or empty string - QString get_sslclientcertfile(); + TQString get_sslclientcertfile(); // return a logmessage at pos 0, null-size list if cancel hit - QStringList get_logmsg(); + TQStringList get_logmsg(); // return a logmessage at pos 0, null-size list if cancel hit, parameter is path -> action for display - QStringList get_logmsg(QMap<QString,QString>); + TQStringList get_logmsg(TQMap<TQString,TQString>); // return pw at pos 0, maysafe at pos 1, null-size if cancel hit. - QStringList get_sslclientcertpw(QString); - QStringList getActionMenu(KURL::List); - QStringList getSingleActionMenu(QCString); + TQStringList get_sslclientcertpw(TQString); + TQStringList getActionMenu(KURL::List); + TQStringList getSingleActionMenu(TQCString); }; #endif diff --git a/src/kdesvnview.cpp b/src/kdesvnview.cpp index 2312730..4814b9a 100644 --- a/src/kdesvnview.cpp +++ b/src/kdesvnview.cpp @@ -33,15 +33,15 @@ #include "src/svnqt/version_check.hpp" #include "src/svnqt/svnqttypes.hpp" -#include <qpainter.h> -#include <qlayout.h> -#include <qfileinfo.h> -#include <qheader.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qsplitter.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqfileinfo.h> +#include <tqheader.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqsplitter.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kurl.h> #include <ktrader.h> @@ -58,79 +58,79 @@ #include <kdialogbase.h> #include <kprogress.h> -kdesvnView::kdesvnView(KActionCollection*aCollection,QWidget *parent,const char*name,bool full) - : QWidget(parent,name),svn::repository::RepositoryListener(),m_Collection(aCollection), +kdesvnView::kdesvnView(KActionCollection*aCollection,TQWidget *tqparent,const char*name,bool full) + : TQWidget(tqparent,name),svn::repository::RepositoryListener(),m_Collection(aCollection), m_currentURL("") { Q_UNUSED(full); setupActions(); m_CacheProgressBar=0; - m_topLayout = new QVBoxLayout(this); + m_topLayout = new TQVBoxLayout(this); - m_Splitter = new QSplitter( this, "m_Splitter" ); - m_Splitter->setOrientation( QSplitter::Vertical ); + m_Splitter = new TQSplitter( this, "m_Splitter" ); + m_Splitter->setOrientation( Qt::Vertical ); m_flist=new kdesvnfilelist(m_Collection,m_Splitter); - m_infoSplitter = new QSplitter(m_Splitter); - m_infoSplitter->setOrientation( QSplitter::Horizontal ); - m_infoSplitter->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, m_infoSplitter->sizePolicy().hasHeightForWidth() ) ); + m_infoSplitter = new TQSplitter(m_Splitter); + m_infoSplitter->setOrientation( Qt::Horizontal ); + m_infoSplitter->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 1, m_infoSplitter->sizePolicy().hasHeightForWidth() ) ); m_LogWindow=new KTextBrowser(m_infoSplitter); Propertylist*pl = new Propertylist(m_infoSplitter); pl->setCommitchanges(true); - pl->addCallback(m_flist); - connect(m_flist,SIGNAL(sigProplist(const svn::PathPropertiesMapListPtr&,bool,const QString&)), - pl,SLOT(displayList(const svn::PathPropertiesMapListPtr&,bool,const QString&))); + pl->addCallback(TQT_TQOBJECT(m_flist)); + connect(m_flist,TQT_SIGNAL(sigProplist(const svn::PathPropertiesMapListPtr&,bool,const TQString&)), + pl,TQT_SLOT(displayList(const svn::PathPropertiesMapListPtr&,bool,const TQString&))); - m_flist->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, m_flist->sizePolicy().hasHeightForWidth() ) ); + m_flist->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 1, m_flist->sizePolicy().hasHeightForWidth() ) ); m_topLayout->addWidget(m_Splitter); - connect(m_flist,SIGNAL(sigLogMessage(const QString&)),this,SLOT(slotAppendLog(const QString&))); - connect(m_flist,SIGNAL(changeCaption(const QString&)),this,SLOT(slotSetTitle(const QString&))); - connect(m_flist,SIGNAL(sigShowPopup(const QString&,QWidget**)),this,SLOT(slotDispPopup(const QString&,QWidget**))); - connect(m_flist,SIGNAL(sigUrlOpend(bool)),parent,SLOT(slotUrlOpened(bool))); - connect(m_flist,SIGNAL(sigSwitchUrl(const KURL&)),this,SIGNAL(sigSwitchUrl(const KURL&))); - connect(m_flist,SIGNAL(sigUrlChanged( const QString& )),this,SLOT(slotUrlChanged(const QString&))); - connect(m_flist,SIGNAL(sigCacheStatus(Q_LONG,Q_LONG)),this,SLOT(fillCacheStatus(Q_LONG,Q_LONG))); - connect(this,SIGNAL(sigMakeBaseDirs()),m_flist,SLOT(slotMkBaseDirs())); - KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-mainlayout"); - QString t1 = cs.readEntry("split1",QString::null); + connect(m_flist,TQT_SIGNAL(sigLogMessage(const TQString&)),this,TQT_SLOT(slotAppendLog(const TQString&))); + connect(m_flist,TQT_SIGNAL(changeCaption(const TQString&)),this,TQT_SLOT(slotSetTitle(const TQString&))); + connect(m_flist,TQT_SIGNAL(sigShowPopup(const TQString&,TQWidget**)),this,TQT_SLOT(slotDispPopup(const TQString&,TQWidget**))); + connect(m_flist,TQT_SIGNAL(sigUrlOpend(bool)),tqparent,TQT_SLOT(slotUrlOpened(bool))); + connect(m_flist,TQT_SIGNAL(sigSwitchUrl(const KURL&)),this,TQT_SIGNAL(sigSwitchUrl(const KURL&))); + connect(m_flist,TQT_SIGNAL(sigUrlChanged( const TQString& )),this,TQT_SLOT(slotUrlChanged(const TQString&))); + connect(m_flist,TQT_SIGNAL(sigCachetqStatus(TQ_LONG,TQ_LONG)),this,TQT_SLOT(fillCachetqStatus(TQ_LONG,TQ_LONG))); + connect(this,TQT_SIGNAL(sigMakeBaseDirs()),m_flist,TQT_SLOT(slotMkBaseDirs())); + KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-maintqlayout"); + TQString t1 = cs.readEntry("split1",TQString()); if (!t1.isEmpty()) { - QTextStream st1(&t1,IO_ReadOnly); + TQTextStream st1(&t1,IO_ReadOnly); st1 >> *m_Splitter; } if (m_infoSplitter) { - t1 = cs.readEntry("infosplit",QString::null); + t1 = cs.readEntry("infosplit",TQString()); if (!t1.isEmpty()) { - QTextStream st2(&t1,IO_ReadOnly); + TQTextStream st2(&t1,IO_ReadOnly); st2 >> *m_infoSplitter; } } } -void kdesvnView::slotAppendLog(const QString& text) +void kdesvnView::slotAppendLog(const TQString& text) { m_LogWindow->append(text); } kdesvnView::~kdesvnView() { - KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-mainlayout"); - QString t1,t2; - QTextStream st1(&t1,IO_WriteOnly); + KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-maintqlayout"); + TQString t1,t2; + TQTextStream st1(&t1,IO_WriteOnly); st1 << *m_Splitter; cs.writeEntry("split1",t1); if (m_infoSplitter) { t2=""; - QTextStream st2(&t2,IO_WriteOnly); + TQTextStream st2(&t2,IO_WriteOnly); st2 << *m_infoSplitter; cs.writeEntry("infosplit",t2); } } -void kdesvnView::slotUrlChanged(const QString&url) +void kdesvnView::slotUrlChanged(const TQString&url) { m_currentURL=url; slotSetTitle(url); @@ -138,12 +138,12 @@ void kdesvnView::slotUrlChanged(const QString&url) slotOnURL(i18n("Repository opened")); } -QString kdesvnView::currentURL() +TQString kdesvnView::currentURL() { return m_currentURL; } -bool kdesvnView::openURL(QString url) +bool kdesvnView::openURL(TQString url) { return openURL(KURL(url)); } @@ -156,10 +156,10 @@ bool kdesvnView::openURL(const KURL& url) bool open = false; _url = url; if (_url.isLocalFile()) { - QString query = _url.query(); + TQString query = _url.query(); _url.setQuery(""); - QString _f = _url.path(); - QFileInfo f(_f); + TQString _f = _url.path(); + TQFileInfo f(_f); if (!f.isDir()) { m_currentURL=""; return open; @@ -179,7 +179,7 @@ bool kdesvnView::openURL(const KURL& url) m_currentURL=url.url(); open = true; } else { - QString t = m_flist->lastError(); + TQString t = m_flist->lastError(); if (t.isEmpty()) { t = i18n("Could not open repository"); } @@ -188,12 +188,12 @@ bool kdesvnView::openURL(const KURL& url) return open; } -void kdesvnView::slotOnURL(const QString& url) +void kdesvnView::slotOnURL(const TQString& url) { emit signalChangeStatusbar(url); } -void kdesvnView::slotSetTitle(const QString& title) +void kdesvnView::slotSetTitle(const TQString& title) { //emit signalChangeCaption(title); emit setWindowCaption(title); @@ -210,7 +210,7 @@ void kdesvnView::closeMe() slotOnURL(i18n("No repository open")); } -void kdesvnView::slotDispPopup(const QString&item,QWidget**target) +void kdesvnView::slotDispPopup(const TQString&item,TQWidget**target) { emit sigShowPopup(item,target); } @@ -239,13 +239,13 @@ void kdesvnView::slotSettingsChanged() void kdesvnView::slotCreateRepo() { KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "create_repository", true, i18n("Create new repository"), KDialogBase::Ok|KDialogBase::Cancel); if (!dlg) return; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); bool compatneeded = svn::Version::version_major()>1||svn::Version::version_minor()>3; bool compat14 = svn::Version::version_major()>1||svn::Version::version_minor()>4; Createrepo_impl*ptr = new Createrepo_impl(compatneeded,compat14,Dialog1Layout); @@ -253,14 +253,14 @@ void kdesvnView::slotCreateRepo() int i = dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"create_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { delete dlg; return; } svn::repository::Repository*_rep = new svn::repository::Repository(this); bool ok = true; bool createdirs; - QString path = ptr->targetDir(); + TQString path = ptr->targetDir(); closeMe(); kdDebug()<<"Creating "<<path << endl; try { @@ -287,25 +287,25 @@ void kdesvnView::slotCreateRepo() void kdesvnView::slotHotcopy() { KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "hotcopy_repository", true, i18n("Hotcopy a repository"), KDialogBase::Ok|KDialogBase::Cancel); if (!dlg) return; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); HotcopyDlg_impl * ptr = new HotcopyDlg_impl(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"hotcopy_repo_size")); int i = dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"hotcopy_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { delete dlg; return; } bool cleanlogs = ptr->cleanLogs(); - QString src = ptr->srcPath(); - QString dest = ptr->destPath(); + TQString src = ptr->srcPath(); + TQString dest = ptr->destPath(); delete dlg; if (src.isEmpty()||dest.isEmpty()) { return; @@ -322,17 +322,17 @@ void kdesvnView::slotHotcopy() void kdesvnView::slotLoaddump() { KDialogBase dlg( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "hotcopy_repository", true, i18n("Hotcopy a repository"), KDialogBase::Ok|KDialogBase::Cancel); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); LoadDmpDlg_impl * ptr = new LoadDmpDlg_impl(Dialog1Layout); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),"loaddump_repo_size")); int i = dlg.exec(); dlg.saveDialogSize(*(Kdesvnsettings::self()->config()),"loaddump_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { return; } svn::repository::Repository _rep(this); @@ -360,8 +360,8 @@ void kdesvnView::slotLoaddump() break; } try { - StopDlg sdlg(this,this,0,"Load Dump",i18n("Loading a dump into a repository.")); - _rep.loaddump(ptr->dumpFile(),_act,ptr->parentPath(),ptr->usePre(),ptr->usePost()); + StopDlg sdlg(TQT_TQOBJECT(this),this,0,"Load Dump",i18n("Loading a dump into a repository.")); + _rep.loaddump(ptr->dumpFile(),_act,ptr->tqparentPath(),ptr->usePre(),ptr->usePost()); slotAppendLog(i18n("Loading dump finished.")); }catch (const svn::ClientException&e) { slotAppendLog(e.msg()); @@ -372,24 +372,24 @@ void kdesvnView::slotLoaddump() void kdesvnView::slotDumpRepo() { KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "dump_repository", true, i18n("Dump a repository"), KDialogBase::Ok|KDialogBase::Cancel); if (!dlg) return; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); DumpRepo_impl*ptr = new DumpRepo_impl(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"dump_repo_size")); int i = dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"dump_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { delete dlg; return; } svn::repository::Repository*_rep = new svn::repository::Repository(this); - QString re,out; + TQString re,out; bool incr,diffs; re = ptr->reposPath(); out = ptr->targetFile(); @@ -421,7 +421,7 @@ void kdesvnView::slotDumpRepo() } try { - StopDlg sdlg(this,this,0,"Dump",i18n("Dumping a repository")); + StopDlg sdlg(TQT_TQOBJECT(this),this,0,"Dump",i18n("Dumping a repository")); _rep->dump(out,st,en,incr,diffs); slotAppendLog(i18n("Dump finished.")); }catch (const svn::ClientException&e) { @@ -438,12 +438,12 @@ void kdesvnView::setupActions() { } -void kdesvnView::sendWarning(const QString&aMsg) +void kdesvnView::sendWarning(const TQString&aMsg) { slotAppendLog(aMsg); } -void kdesvnView::sendError(const QString&aMsg) +void kdesvnView::sendError(const TQString&aMsg) { slotAppendLog(aMsg); } @@ -462,7 +462,7 @@ void kdesvnView::setCanceled(bool how) m_ReposCancel = how; } -void kdesvnView::fillCacheStatus(Q_LONG current,Q_LONG max) +void kdesvnView::fillCachetqStatus(TQ_LONG current,TQ_LONG max) { if (current>-1 && max>-1) { kdDebug()<<"Fillcache "<<current<<" von "<<max<<endl; diff --git a/src/kdesvnview.h b/src/kdesvnview.h index d8799d0..a0d4089 100644 --- a/src/kdesvnview.h +++ b/src/kdesvnview.h @@ -23,18 +23,18 @@ #define _KDESVNVIEW_H_ #include "src/svnqt/repositorylistener.hpp" -#include <qwidget.h> +#include <tqwidget.h> #include <kparts/part.h> -class QPainter; +class TQPainter; class KURL; class kdesvnfilelist; class KdeSvnDirList; -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; -class QSplitter; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; +class TQSplitter; class KActionCollection; class KTextBrowser; class KProgress; @@ -49,14 +49,15 @@ class KProgress; * @author Rajko Albrecht <ral@alwins-world.de> * @version 0.1 */ -class kdesvnView : public QWidget,public svn::repository::RepositoryListener +class kdesvnView : public TQWidget,public svn::repository::RepositoryListener { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - kdesvnView(KActionCollection*,QWidget *parent,const char*name=0,bool full=false); + kdesvnView(KActionCollection*,TQWidget *tqparent,const char*name=0,bool full=false); /** * Destructor @@ -66,12 +67,12 @@ public: /** * Random 'get' function */ - QString currentURL(); + TQString currentURL(); /** * Random 'set' function accessed by DCOP */ - virtual bool openURL(QString url); + virtual bool openURL(TQString url); /** * Random 'set' function @@ -79,25 +80,25 @@ public: virtual bool openURL(const KURL& url); /* repositorylistener methods */ - virtual void sendWarning(const QString&); - virtual void sendError(const QString&); + virtual void sendWarning(const TQString&); + virtual void sendError(const TQString&); virtual bool isCanceld(); signals: /** * Use this signal to change the content of the statusbar */ - void signalChangeStatusbar(const QString&); + void signalChangeStatusbar(const TQString&); /** * Use this signal to change the content of the caption */ - void signalChangeCaption(const QString&); + void signalChangeCaption(const TQString&); - void sigShowPopup(const QString&,QWidget**); + void sigShowPopup(const TQString&,TQWidget**); void sigSwitchUrl(const KURL&); - void setWindowCaption(const QString&); - void sigUrlChanged(const QString&); + void setWindowCaption(const TQString&); + void sigUrlChanged(const TQString&); void sigMakeBaseDirs(); /* repositorylistener methods */ @@ -106,7 +107,7 @@ signals: public slots: virtual void closeMe(); - virtual void slotDispPopup(const QString&,QWidget**); + virtual void slotDispPopup(const TQString&,TQWidget**); virtual void refreshCurrentTree(); virtual void slotSettingsChanged(); virtual void slotCreateRepo(); @@ -116,22 +117,22 @@ public slots: /* repositorylistener methods */ virtual void setCanceled(bool); - virtual void fillCacheStatus(Q_LONG,Q_LONG); + virtual void fillCachetqStatus(TQ_LONG,TQ_LONG); protected slots: - virtual void slotOnURL(const QString& url); - virtual void slotSetTitle(const QString& title); - virtual void slotAppendLog(const QString& text); - virtual void slotUrlChanged(const QString&); + virtual void slotOnURL(const TQString& url); + virtual void slotSetTitle(const TQString& title); + virtual void slotAppendLog(const TQString& text); + virtual void slotUrlChanged(const TQString&); protected: kdesvnfilelist*m_flist; KActionCollection*m_Collection; - QSplitter *m_Splitter,*m_infoSplitter; - QString m_currentURL; + TQSplitter *m_Splitter,*m_infoSplitter; + TQString m_currentURL; KTextBrowser*m_LogWindow; - QVBoxLayout*m_topLayout; + TQVBoxLayout*m_topLayout; KProgress*m_CacheProgressBar; protected: diff --git a/src/kiosvn/kiobytestream.cpp b/src/kiosvn/kiobytestream.cpp index ff10a6a..81c6fc8 100644 --- a/src/kiosvn/kiobytestream.cpp +++ b/src/kiosvn/kiobytestream.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "kiobytestream.h" -KioByteStream::KioByteStream(StreamWrittenCb*aCb,const QString&filename) +KioByteStream::KioByteStream(StreamWrittenCb*aCb,const TQString&filename) : svn::stream::SvnStream(false,true,0L), m_Cb(aCb),m_Written(0), m_mimeSend(false),m_Filename(filename) diff --git a/src/kiosvn/kiobytestream.h b/src/kiosvn/kiobytestream.h index 8e62155..2fe8e57 100644 --- a/src/kiosvn/kiobytestream.h +++ b/src/kiosvn/kiobytestream.h @@ -25,8 +25,8 @@ #include <kio/global.h> #include <kmimetype.h> #include <kmimemagic.h> -#include <qbuffer.h> -#include <qdatetime.h> +#include <tqbuffer.h> +#include <tqdatetime.h> class StreamWrittenCb { @@ -34,7 +34,7 @@ public: StreamWrittenCb(){} virtual ~StreamWrittenCb(){} virtual void streamWritten(const KIO::filesize_t current) = 0; - virtual void streamPushData(QByteArray)=0; + virtual void streamPushData(TQByteArray)=0; virtual void streamSendMime(KMimeMagicResult*mt)=0; virtual void streamTotalSizeNull()=0; }; @@ -45,7 +45,7 @@ public: class KioByteStream : public svn::stream::SvnStream { public: - KioByteStream(StreamWrittenCb*,const QString&filename); + KioByteStream(StreamWrittenCb*,const TQString&filename); ~KioByteStream(); @@ -58,9 +58,9 @@ protected: StreamWrittenCb*m_Cb; KIO::filesize_t m_Written; bool m_mimeSend; - QString m_Filename; - QByteArray array; - QTime m_MessageTick; + TQString m_Filename; + TQByteArray array; + TQTime m_MessageTick; }; #endif diff --git a/src/kiosvn/kiolistener.cpp b/src/kiosvn/kiolistener.cpp index f3b7b68..28536d7 100644 --- a/src/kiosvn/kiolistener.cpp +++ b/src/kiosvn/kiolistener.cpp @@ -50,27 +50,27 @@ bool KioListener::contextCancel() /*! - \fn KioListener::contextGetLogMessage (QString & msg) + \fn KioListener::contextGetLogMessage (TQString & msg) */ -bool KioListener::contextGetLogMessage (QString & msg,const svn::CommitItemList&_items) +bool KioListener::contextGetLogMessage (TQString & msg,const svn::CommitItemList&_items) { #if 1 - QByteArray reply; - QByteArray params; - QCString replyType; - QDataStream stream(params,IO_WriteOnly); + TQByteArray reply; + TQByteArray params; + TQCString replyType; + TQDataStream stream(params,IO_WriteOnly); if (_items.count()>0) { - QMap<QString,QString> list; + TQMap<TQString,TQString> list; for (unsigned i = 0;i<_items.count();++i) { if (_items[i].path().isEmpty()) { - list[_items[i].url()]=QChar(_items[i].actionType()); + list[_items[i].url()]=TQChar(_items[i].actionType()); } else { - list[_items[i].path()]=QChar(_items[i].actionType()); + list[_items[i].path()]=TQChar(_items[i].actionType()); } } stream << list; - if (!par->dcopClient()->call("kded","kdesvnd","get_logmsg(QMap<QString,QString>)",params,replyType,reply)) { + if (!par->dcopClient()->call("kded","kdesvnd","get_logmsg(TQMap<TQString,TQString>)",params,replyType,reply)) { msg = "Communication with dcop failed"; kdWarning()<<msg<<endl; return false; @@ -83,13 +83,13 @@ bool KioListener::contextGetLogMessage (QString & msg,const svn::CommitItemList& } } - if (replyType!="QStringList") { + if (replyType!=TQSTRINGLIST_OBJECT_NAME_STRING) { msg = "Wrong reply type"; kdWarning()<<msg<<endl; return false; } - QDataStream stream2(reply,IO_ReadOnly); - QStringList lt; + TQDataStream stream2(reply,IO_ReadOnly); + TQStringList lt; stream2>>lt; if (lt.count()!=1) { msg = "Wrong or missing log (may cancel pressed)."; @@ -110,15 +110,15 @@ void KioListener::contextNotify (const char * path,svn_wc_notify_action_t action if (par->wasKilled()) { return; } - QString userstring; + TQString userstring; switch(action) { case svn_wc_notify_add: { if (mime_type && (svn_mime_type_is_binary (mime_type))) - userstring = i18n( "A (bin) %1" ).arg( path ); + userstring = i18n( "A (bin) %1" ).tqarg( path ); else - userstring = i18n( "A %1" ).arg( path ); + userstring = i18n( "A %1" ).tqarg( path ); break; } break; @@ -126,33 +126,33 @@ void KioListener::contextNotify (const char * path,svn_wc_notify_action_t action break; case svn_wc_notify_delete: //delete m_HasChanges = TRUE; - userstring = i18n( "D %1" ).arg( path ); + userstring = i18n( "D %1" ).tqarg( path ); break; case svn_wc_notify_restore : //restore - userstring=i18n( "Restored %1." ).arg( path ); + userstring=i18n( "Restored %1." ).tqarg( path ); break; case svn_wc_notify_revert : //revert - userstring=i18n( "Reverted %1." ).arg( path ); + userstring=i18n( "Reverted %1." ).tqarg( path ); break; case svn_wc_notify_failed_revert: //failed revert - userstring=i18n( "Failed to revert %1.\nTry updating instead." ).arg( path ); + userstring=i18n( "Failed to revert %1.\nTry updating instead." ).tqarg( path ); break; case svn_wc_notify_resolved: //resolved - userstring=i18n( "Resolved conflicted state of %1." ).arg( path ); + userstring=i18n( "Resolved conflicted state of %1." ).tqarg( path ); break; case svn_wc_notify_skip: //skip if ( content_state == svn_wc_notify_state_missing ) - userstring=i18n("Skipped missing target %1.").arg( path ); + userstring=i18n("Skipped missing target %1.").tqarg( path ); else - userstring=i18n("Skipped %1.").arg( path ); + userstring=i18n("Skipped %1.").tqarg( path ); break; case svn_wc_notify_update_delete: //update_delete m_HasChanges = TRUE; - userstring=i18n( "D %1" ).arg( path ); + userstring=i18n( "D %1" ).tqarg( path ); break; case svn_wc_notify_update_add: //update_add m_HasChanges = TRUE; - userstring=i18n( "A %1" ).arg( path ); + userstring=i18n( "A %1" ).tqarg( path ); break; case svn_wc_notify_update_update: //update_update { @@ -187,7 +187,7 @@ void KioListener::contextNotify (const char * path,svn_wc_notify_action_t action || content_state == svn_wc_notify_state_unknown) && (prop_state == svn_wc_notify_state_unchanged || prop_state == svn_wc_notify_state_unknown))) - userstring += QString( " " ) + path; + userstring += TQString( " " ) + path; } break; } @@ -195,13 +195,13 @@ void KioListener::contextNotify (const char * path,svn_wc_notify_action_t action { if (!m_External) { if (SVN_IS_VALID_REVNUM(revision)) { - userstring = i18n("Finished at revision %1.").arg(revision); + userstring = i18n("Finished at revision %1.").tqarg(revision); } else { userstring = i18n("Finished."); } } else { if (SVN_IS_VALID_REVNUM(revision)) { - userstring = i18n("Finished external at revision %1.").arg(revision); + userstring = i18n("Finished external at revision %1.").tqarg(revision); } else { userstring = i18n("Finished external."); } @@ -212,30 +212,30 @@ void KioListener::contextNotify (const char * path,svn_wc_notify_action_t action break; case svn_wc_notify_update_external: //update_external m_External = TRUE; - userstring = i18n("Fetching external item into %1." ).arg( path ); + userstring = i18n("Fetching external item into %1." ).tqarg( path ); break; case svn_wc_notify_status_completed: //status_completed if (SVN_IS_VALID_REVNUM (revision)) - userstring = i18n( "Status against revision: %1.").arg( revision ); + userstring = i18n( "tqStatus against revision: %1.").tqarg( revision ); break; case svn_wc_notify_status_external: //status_external - userstring = i18n("Performing status on external item at %1.").arg( path ); + userstring = i18n("Performing status on external item at %1.").tqarg( path ); break; case svn_wc_notify_commit_modified: //commit_modified - userstring = i18n( "Sending %1.").arg( path ); + userstring = i18n( "Sending %1.").tqarg( path ); break; case svn_wc_notify_commit_added: //commit_added if (mime_type && svn_mime_type_is_binary (mime_type)) { - userstring = i18n( "Adding (bin) %1.").arg( path ); + userstring = i18n( "Adding (bin) %1.").tqarg( path ); } else { - userstring = i18n( "Adding %1.").arg( path ); + userstring = i18n( "Adding %1.").tqarg( path ); } break; case svn_wc_notify_commit_deleted: //commit_deleted - userstring = i18n( "Deleting %1.").arg( path ); + userstring = i18n( "Deleting %1.").tqarg( path ); break; case svn_wc_notify_commit_replaced: //commit_replaced - userstring = i18n( "Replacing %1.").arg( path ); + userstring = i18n( "Replacing %1.").tqarg( path ); break; case svn_wc_notify_commit_postfix_txdelta: //commit_postfix_txdelta if (!m_FirstTxDelta) { @@ -253,14 +253,14 @@ void KioListener::contextNotify (const char * path,svn_wc_notify_action_t action default: break; } - par->setMetaData(QString::number(counter()).rightJustify( 10,'0' )+ "path" , QString::FROMUTF8( path )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "action", QString::number( action )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "kind", QString::number( kind )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "mime_t", QString::FROMUTF8( mime_type )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "content", QString::number( content_state )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "prop", QString::number( prop_state )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "rev", QString::number( revision )); - par->setMetaData(QString::number( counter() ).rightJustify( 10,'0' )+ "string", userstring ); + par->setMetaData(TQString::number(counter()).rightJustify( 10,'0' )+ "path" , TQString::FROMUTF8( path )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "action", TQString::number( action )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "kind", TQString::number( kind )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "mime_t", TQString::FROMUTF8( mime_type )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "content", TQString::number( content_state )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "prop", TQString::number( prop_state )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "rev", TQString::number( revision )); + par->setMetaData(TQString::number( counter() ).rightJustify( 10,'0' )+ "string", userstring ); incCounter(); } @@ -272,16 +272,16 @@ void KioListener::contextNotify (const svn_wc_notify_t *action) action->content_state,action->prop_state,action->revision); // return; // } -// QString aString = NotifyAction(action->action); +// TQString aString = NotifyAction(action->action); } svn::ContextListener::SslServerTrustAnswer KioListener::contextSslServerTrustPrompt (const SslServerTrustData & data, apr_uint32_t & acceptedFailures) { - QByteArray reply; - QByteArray params; - QCString replyType; - QDataStream stream(params,IO_WriteOnly); + TQByteArray reply; + TQByteArray params; + TQCString replyType; + TQDataStream stream(params,IO_WriteOnly); stream << data.hostname << data.fingerprint << data.validFrom @@ -290,7 +290,7 @@ KioListener::contextSslServerTrustPrompt (const SslServerTrustData & data, apr_u << data.realm; if (!par->dcopClient()->call("kded","kdesvnd", - "get_sslaccept(QString,QString,QString,QString,QString,QString)", + "get_sslaccept(TQString,TQString,TQString,TQString,TQString,TQString)", params,replyType,reply)) { kdWarning()<<"Communication with dcop failed"<<endl; return DONT_ACCEPT; @@ -299,7 +299,7 @@ KioListener::contextSslServerTrustPrompt (const SslServerTrustData & data, apr_u kdWarning()<<"Wrong reply type"<<endl; return DONT_ACCEPT; } - QDataStream stream2(reply,IO_ReadOnly); + TQDataStream stream2(reply,IO_ReadOnly); int res; stream2>>res; switch (res) { @@ -318,27 +318,27 @@ KioListener::contextSslServerTrustPrompt (const SslServerTrustData & data, apr_u return ACCEPT_TEMPORARILY; } -bool KioListener::contextLoadSslClientCertPw(QString&password,const QString&realm) +bool KioListener::contextLoadSslClientCertPw(TQString&password,const TQString&realm) { return PwStorage::self()->getCertPw(realm,password); } -bool KioListener::contextSslClientCertPrompt (QString & certFile) +bool KioListener::contextSslClientCertPrompt (TQString & certFile) { - QByteArray reply; - QByteArray params; - QCString replyType; + TQByteArray reply; + TQByteArray params; + TQCString replyType; if (!par->dcopClient()->call("kded","kdesvnd", "get_sslclientcertfile()", params,replyType,reply)) { kdWarning()<<"Communication with dcop failed"<<endl; return false; } - if (replyType!="QString") { + if (replyType!=TQSTRING_OBJECT_NAME_STRING) { kdWarning()<<"Wrong reply type"<<endl; return false; } - QDataStream stream2(reply,IO_ReadOnly); + TQDataStream stream2(reply,IO_ReadOnly); stream2>>certFile; if (certFile.isEmpty()) { return false; @@ -346,43 +346,43 @@ bool KioListener::contextSslClientCertPrompt (QString & certFile) return true; } -bool KioListener::contextSslClientCertPwPrompt (QString & password, - const QString & realm, bool & maySave) +bool KioListener::contextSslClientCertPwPrompt (TQString & password, + const TQString & realm, bool & maySave) { return false; } -bool KioListener::contextGetSavedLogin (const QString & realm,QString & username,QString & password) +bool KioListener::contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password) { PwStorage::self()->getLogin(realm,username,password); return true; } -bool KioListener::contextGetCachedLogin (const QString & realm,QString & username,QString & password) +bool KioListener::contextGetCachedLogin (const TQString & realm,TQString & username,TQString & password) { return true; } -bool KioListener::contextGetLogin (const QString & realm, QString & username, QString & password, bool & maySave) +bool KioListener::contextGetLogin (const TQString & realm, TQString & username, TQString & password, bool & maySave) { - QByteArray reply; - QByteArray params; - QCString replyType; + TQByteArray reply; + TQByteArray params; + TQCString replyType; - QDataStream stream(params,IO_WriteOnly); + TQDataStream stream(params,IO_WriteOnly); stream << realm; stream << username; - if (!par->dcopClient()->call("kded","kdesvnd","get_login(QString,QString)",params,replyType,reply)) { + if (!par->dcopClient()->call("kded","kdesvnd","get_login(TQString,TQString)",params,replyType,reply)) { kdWarning()<<"Communication with dcop failed"<<endl; return false; } - if (replyType!="QStringList") { + if (replyType!=TQSTRINGLIST_OBJECT_NAME_STRING) { kdWarning()<<"Wrong reply type"<<endl; return false; } - QDataStream stream2(reply,IO_ReadOnly); - QStringList lt; + TQDataStream stream2(reply,IO_ReadOnly); + TQStringList lt; stream2>>lt; if (lt.count()!=3) { kdDebug()<<"Wrong or missing auth list (may cancel pressed)." << endl; diff --git a/src/kiosvn/kiolistener.h b/src/kiosvn/kiolistener.h index 96a1629..fea9cc2 100644 --- a/src/kiosvn/kiolistener.h +++ b/src/kiosvn/kiolistener.h @@ -37,12 +37,12 @@ public: virtual ~KioListener(); /* context-listener methods */ - virtual bool contextGetLogin (const QString & realm, - QString & username, - QString & password, + virtual bool contextGetLogin (const TQString & realm, + TQString & username, + TQString & password, bool & maySave); - virtual bool contextGetSavedLogin (const QString & realm,QString & username,QString & password); - virtual bool contextGetCachedLogin (const QString & realm,QString & username,QString & password); + virtual bool contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password); + virtual bool contextGetCachedLogin (const TQString & realm,TQString & username,TQString & password); virtual void contextNotify (const char *path, svn_wc_notify_action_t action, @@ -54,13 +54,13 @@ public: virtual void contextNotify (const svn_wc_notify_t *action); virtual bool contextCancel(); - virtual bool contextGetLogMessage (QString & msg,const svn::CommitItemList&); + virtual bool contextGetLogMessage (TQString & msg,const svn::CommitItemList&); virtual SslServerTrustAnswer contextSslServerTrustPrompt (const SslServerTrustData & data, apr_uint32_t & acceptedFailures); - virtual bool contextSslClientCertPrompt (QString & certFile); - virtual bool contextSslClientCertPwPrompt (QString & password, - const QString & realm, bool & maySave); - virtual bool contextLoadSslClientCertPw(QString&password,const QString&realm); + virtual bool contextSslClientCertPrompt (TQString & certFile); + virtual bool contextSslClientCertPwPrompt (TQString & password, + const TQString & realm, bool & maySave); + virtual bool contextLoadSslClientCertPw(TQString&password,const TQString&realm); /* context listener virtuals end */ unsigned int counter()const{return m_notifyCounter;} void incCounter(){++m_notifyCounter;} diff --git a/src/kiosvn/kiosvn.cpp b/src/kiosvn/kiosvn.cpp index 667d456..b71a1d8 100644 --- a/src/kiosvn/kiosvn.cpp +++ b/src/kiosvn/kiosvn.cpp @@ -50,10 +50,10 @@ #include <ktempdir.h> #include <ksock.h> #include <dcopclient.h> -#include <qcstring.h> +#include <tqcstring.h> #include <kmimetype.h> #include <krun.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include <stdlib.h> #include <math.h> @@ -118,27 +118,27 @@ KioSvnData::~KioSvnData() svn::Revision KioSvnData::urlToRev(const KURL&url) { - QMap<QString,QString> q = url.queryItems(); + TQMap<TQString,TQString> q = url.queryItems(); /* we try to check if it is ssh and try to get a password for it */ - QString proto = url.protocol(); + TQString proto = url.protocol(); - if (proto.find("ssh")!=-1) { + if (proto.tqfind("ssh")!=-1) { SshAgent ag; ag.addSshIdentities(); } svn::Revision rev,tmp; rev = svn::Revision::UNDEFINED; - if (q.find("rev")!=q.end()) { - QString v = q["rev"]; + if (q.tqfind("rev")!=q.end()) { + TQString v = q["rev"]; m_Svnclient->url2Revision(v,rev,tmp); } return rev; } -kio_svnProtocol::kio_svnProtocol(const QCString &pool_socket, const QCString &app_socket) +kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket) : SlaveBase("kio_ksvn", pool_socket, app_socket),StreamWrittenCb() { m_pData=new KioSvnData(this); @@ -163,8 +163,8 @@ int kdemain(int argc, char **argv) kdDebug()<<"kdemain" << endl; KInstance instance( "kio_ksvn" ); // start the kdesvnd DCOP service - QString error; - QCString appId; + TQString error; + TQCString appId; kdDebug(7101) << "*** Starting kio_ksvn " << endl; @@ -197,7 +197,7 @@ void kio_svnProtocol::listDir(const KURL&url) try { dlist = m_pData->m_Svnclient->list(makeSvnUrl(url),rev,rev,svn::DepthImmediates,false); } catch (const svn::ClientException&e) { - QString ex = e.msg(); + TQString ex = e.msg(); kdDebug()<<ex<<endl; error(KIO::ERR_CANNOT_ENTER_DIRECTORY,ex); return; @@ -208,7 +208,7 @@ void kio_svnProtocol::listDir(const KURL&url) if (!dlist[i] || dlist[i]->name().isEmpty()) { continue; } - QDateTime dt = svn::DateTime(dlist[i]->time()); + TQDateTime dt = svn::DateTime(dlist[i]->time()); if (createUDSEntry(dlist[i]->name(), dlist[i]->lastAuthor(), dlist[i]->size(), @@ -236,7 +236,7 @@ void kio_svnProtocol::stat(const KURL& url) try { e = m_pData->m_Svnclient->info(makeSvnUrl(url),svn::DepthEmpty,rev,peg); } catch (const svn::ClientException&e) { - QString ex = e.msg(); + TQString ex = e.msg(); kdDebug()<<ex<<endl; error( KIO::ERR_SLAVE_DEFINED,ex); return; @@ -249,7 +249,7 @@ void kio_svnProtocol::stat(const KURL& url) } KIO::UDSEntry entry; - QDateTime dt; + TQDateTime dt; if (dummy) { createUDSEntry(url.filename(),"",0,true,dt.toTime_t(),entry); } else { @@ -279,14 +279,14 @@ void kio_svnProtocol::get(const KURL& url) try { m_pData->m_Svnclient->cat(dstream,makeSvnUrl(url),rev,rev); } catch (const svn::ClientException&e) { - QString ex = e.msg(); + TQString ex = e.msg(); kdDebug()<<ex<<endl; error( KIO::ERR_SLAVE_DEFINED,"Subversion error "+ex); finished(); return; } totalSize(dstream.written()); - data(QByteArray()); // empty array means we're done sending the data + data(TQByteArray()); // empty array means we're done sending the data finished(); } @@ -310,7 +310,7 @@ void kio_svnProtocol::mkdir(const KURL &url, int) void kio_svnProtocol::mkdir(const KURL::List &urls, int) { svn::Pathes p; - for ( QValueListConstIterator<KURL> it = urls.begin(); it != urls.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = urls.begin(); it != urls.end() ; ++it ) { p.append((*it).path()); } try { @@ -325,7 +325,7 @@ void kio_svnProtocol::mkdir(const KURL::List &urls, int) void kio_svnProtocol::rename(const KURL&src,const KURL&target,bool force) { kdDebug()<<"kio_svn::rename "<< src << " to " << target << endl; - QString msg; + TQString msg; m_pData->m_CurrentContext->setLogMessage(getDefaultLog()); try { m_pData->m_Svnclient->move(makeSvnUrl(src),makeSvnUrl(target),force); @@ -371,7 +371,7 @@ void kio_svnProtocol::del(const KURL&src,bool isfile) svn::Targets target(makeSvnUrl(src)); m_pData->m_Svnclient->remove(target,false); } catch (const svn::ClientException&e) { - QString ex = e.msg(); + TQString ex = e.msg(); kdDebug()<<ex<<endl; error( KIO::ERR_SLAVE_DEFINED,ex); } @@ -379,7 +379,7 @@ void kio_svnProtocol::del(const KURL&src,bool isfile) finished(); } -bool kio_svnProtocol::getLogMsg(QString&t) +bool kio_svnProtocol::getLogMsg(TQString&t) { svn::CommitItemList _items; return m_pData->m_Listener.contextGetLogMessage(t,_items); @@ -403,10 +403,10 @@ bool kio_svnProtocol::checkWc(const KURL&url) return false; } -QString kio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) +TQString kio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) { - QString res; - QString proto = svn::Url::transformProtokoll(url.protocol()); + TQString res; + TQString proto = svn::Url::transformProtokoll(url.protocol()); if (proto=="file" && check_Wc) { if (checkWc(url)) @@ -415,22 +415,22 @@ QString kio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) } } - QStringList s = QStringList::split("://",res); - QString base = url.path(); - QString host = url.host(); - QString user = (url.hasUser()?url.user()+(url.hasPass()?":"+url.pass():""):""); + TQStringList s = TQStringList::split("://",res); + TQString base = url.path(); + TQString host = url.host(); + TQString user = (url.hasUser()?url.user()+(url.hasPass()?":"+url.pass():""):""); if (host.isEmpty()) { res=proto+"://"+base; } else { res = proto+"://"+(user.isEmpty()?"":user+"@")+host+base; } if (base.isEmpty()) { - throw svn::ClientException(QString("'")+res+QString("' is not a valid subversion url")); + throw svn::ClientException(TQString("'")+res+TQString("' is not a valid subversion url")); } return res; } -bool kio_svnProtocol::createUDSEntry( const QString& filename, const QString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry) +bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry) { #if 0 kdDebug() << "MTime : " << ( long )mtime << endl; @@ -467,10 +467,10 @@ bool kio_svnProtocol::createUDSEntry( const QString& filename, const QString& us return true; } -void kio_svnProtocol::special(const QByteArray& data) +void kio_svnProtocol::special(const TQByteArray& data) { kdDebug()<<"kio_svnProtocol::special"<<endl; - QDataStream stream(data,IO_ReadOnly); + TQDataStream stream(data,IO_ReadOnly); int tmp; stream >> tmp; kdDebug() << "kio_svnProtocol::special " << tmp << endl; @@ -479,7 +479,7 @@ void kio_svnProtocol::special(const QByteArray& data) { KURL repository, wc; int revnumber; - QString revkind; + TQString revkind; stream >> repository; stream >> wc; stream >> revnumber; @@ -492,7 +492,7 @@ void kio_svnProtocol::special(const QByteArray& data) { KURL wc; int revnumber; - QString revkind; + TQString revkind; stream >> wc; stream >> revnumber; stream >> revkind; @@ -516,7 +516,7 @@ void kio_svnProtocol::special(const QByteArray& data) { kdDebug(0) << "kio_svnProtocol LOG" << endl; int revstart, revend; - QString revkindstart, revkindend; + TQString revkindstart, revkindend; KURL::List targets; stream >> revstart; stream >> revkindstart; @@ -605,7 +605,7 @@ void kio_svnProtocol::special(const QByteArray& data) KURL wc,url; bool recurse; int revnumber; - QString revkind; + TQString revkind; stream >> wc; stream >> url; stream >> recurse; @@ -620,7 +620,7 @@ void kio_svnProtocol::special(const QByteArray& data) KURL url1,url2; int rev1, rev2; bool recurse; - QString revkind1, revkind2; + TQString revkind1, revkind2; stream >> url1; stream >> url2; stream >> rev1; @@ -637,7 +637,7 @@ void kio_svnProtocol::special(const QByteArray& data) finished(); } -void kio_svnProtocol::update(const KURL&url,int revnumber,const QString&revkind) +void kio_svnProtocol::update(const KURL&url,int revnumber,const TQString&revkind) { svn::Revision where(revnumber,revkind); /* update is always local - so make a path instead URI */ @@ -664,22 +664,22 @@ void kio_svnProtocol::status(const KURL&wc,bool cR,bool rec) error(KIO::ERR_SLAVE_DEFINED,e.msg()); return; } - kdDebug()<<"Status got " << dlist.count() << " entries." << endl; + kdDebug()<<"tqStatus got " << dlist.count() << " entries." << endl; for (unsigned j=0;j<dlist.count();++j) { if (!dlist[j]) { continue; } - //QDataStream stream(params, IO_WriteOnly); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"path",dlist[j]->path()); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"text",QString::number(dlist[j]->textStatus())); - setMetaData(QString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "prop", - QString::number(dlist[j]->propStatus())); - setMetaData(QString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "reptxt", - QString::number(dlist[j]->reposTextStatus())); - setMetaData(QString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "repprop", - QString::number(dlist[j]->reposPropStatus())); - setMetaData(QString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "rev", - QString::number(dlist[j]->entry().cmtRev())); + //TQDataStream stream(params, IO_WriteOnly); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"path",dlist[j]->path()); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"text",TQString::number(dlist[j]->texttqStatus())); + setMetaData(TQString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "prop", + TQString::number(dlist[j]->proptqStatus())); + setMetaData(TQString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "reptxt", + TQString::number(dlist[j]->reposTexttqStatus())); + setMetaData(TQString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "repprop", + TQString::number(dlist[j]->reposProptqStatus())); + setMetaData(TQString::number(m_pData->m_Listener.counter() ).rightJustify( 10,'0' )+ "rev", + TQString::number(dlist[j]->entry().cmtRev())); m_pData->m_Listener.incCounter(); } } @@ -687,23 +687,23 @@ void kio_svnProtocol::status(const KURL&wc,bool cR,bool rec) void kio_svnProtocol::commit(const KURL::List&url) { /// @todo replace with direct call to kdesvn? - QByteArray reply; - QByteArray params; - QCString replyType; - QString msg; + TQByteArray reply; + TQByteArray params; + TQCString replyType; + TQString msg; if (!dcopClient()->call("kded","kdesvnd","get_logmsg()",params,replyType,reply)) { msg = "Communication with dcop failed"; kdWarning()<<msg<<endl; return; } - if (replyType!="QStringList") { + if (replyType!=TQSTRINGLIST_OBJECT_NAME_STRING) { msg = "Wrong reply type"; kdWarning()<<msg<<endl; return; } - QDataStream stream2(reply,IO_ReadOnly); - QStringList lt; + TQDataStream stream2(reply,IO_ReadOnly); + TQStringList lt; stream2>>lt; if (lt.count()!=1) { msg = "Wrong or missing log (may cancel pressed)."; @@ -711,7 +711,7 @@ void kio_svnProtocol::commit(const KURL::List&url) return; } msg = lt[0]; - QValueList<svn::Path> targets; + TQValueList<svn::Path> targets; for (unsigned j=0; j<url.count();++j) { targets.push_back(svn::Path(url[j].path())); } @@ -722,25 +722,25 @@ void kio_svnProtocol::commit(const KURL::List&url) error(KIO::ERR_SLAVE_DEFINED,e.msg()); } for (unsigned j=0;j<url.count();++j) { - QString userstring; + TQString userstring; if (nnum!=svn::Revision::UNDEFINED) { - userstring = i18n( "Committed revision %1." ).arg(nnum.toString()); + userstring = i18n( "Committed revision %1." ).tqarg(nnum.toString()); } else { userstring = i18n ( "Nothing to commit." ); } - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "path", url[j].path() ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "action", "0" ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "kind", "0" ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "mime_t", "" ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "content", "0" ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "prop", "0" ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "rev" , QString::number(nnum) ); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "string", userstring ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "path", url[j].path() ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "action", "0" ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "kind", "0" ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "mime_t", "" ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "content", "0" ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "prop", "0" ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "rev" , TQString::number(nnum) ); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "string", userstring ); m_pData->m_Listener.incCounter(); } } -void kio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, const QString&revstring) +void kio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, const TQString&revstring) { svn::Revision where(rev,revstring); svn::Revision peg = svn::Revision::UNDEFINED; @@ -753,7 +753,7 @@ void kio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, c } } -void kio_svnProtocol::svnlog(int revstart,const QString&revstringstart,int revend, const QString&revstringend, const KURL::List&urls) +void kio_svnProtocol::svnlog(int revstart,const TQString&revstringstart,int revend, const TQString&revstringend, const KURL::List&urls) { svn::Revision start(revstart,revstringstart); svn::Revision end(revend,revstringend); @@ -768,33 +768,33 @@ void kio_svnProtocol::svnlog(int revstart,const QString&revstringstart,int reven break; } if (!logs) { - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify(10,'0')+"path",urls[j].path()); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify(10,'0')+"string", + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify(10,'0')+"path",urls[j].path()); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify(10,'0')+"string", i18n("Empty logs")); m_pData->m_Listener.incCounter(); continue; } for (unsigned int i = 0; i < logs->count();++i) { - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "path",urls[j].path()); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "rev", - QString::number( (*logs)[i].revision)); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"author", + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "path",urls[j].path()); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "rev", + TQString::number( (*logs)[i].revision)); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"author", (*logs)[i].author); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"logmessage", + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+"logmessage", (*logs)[i].message); m_pData->m_Listener.incCounter(); for (unsigned z = 0; z<(*logs)[i].changedPaths.count();++z) { - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "rev", - QString::number( (*logs)[i].revision)); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "path",urls[j].path()); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedpath", + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "rev", + TQString::number( (*logs)[i].revision)); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "path",urls[j].path()); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedpath", (*logs)[i].changedPaths[z].path); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedaction", - QChar((*logs)[i].changedPaths[z].action)); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedcopyfrompath", + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedaction", + TQChar((*logs)[i].changedPaths[z].action)); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedcopyfrompath", (*logs)[i].changedPaths[z].copyFromPath); - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedcopyfromrevision", - QString::number((*logs)[i].changedPaths[z].copyFromRevision)); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "loggedcopyfromrevision", + TQString::number((*logs)[i].changedPaths[z].copyFromRevision)); m_pData->m_Listener.incCounter(); } } @@ -803,7 +803,7 @@ void kio_svnProtocol::svnlog(int revstart,const QString&revstringstart,int reven void kio_svnProtocol::revert(const KURL::List&l) { - QValueList<svn::Path> list; + TQValueList<svn::Path> list; for (unsigned j=0; j<l.count();++j) { list.append(svn::Path(l[j].path())); } @@ -815,7 +815,7 @@ void kio_svnProtocol::revert(const KURL::List&l) } } -void kio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev,const QString&revstring) +void kio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev,const TQString&revstring) { svn::Revision where(rev,revstring); svn::Path wc_path(wc.path()); @@ -826,15 +826,15 @@ void kio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev } } -void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const QString&rstring1,int rnum2, const QString&rstring2,bool rec) +void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const TQString&rstring1,int rnum2, const TQString&rstring2,bool rec) { - QByteArray ex; + TQByteArray ex; /// @todo read settings for diff (ignore contentype) try { svn::Revision r1(rnum1,rstring1); svn::Revision r2(rnum2,rstring2); - QString u1 = makeSvnUrl(uri1,true); - QString u2 = makeSvnUrl(uri2,true); + TQString u1 = makeSvnUrl(uri1,true); + TQString u2 = makeSvnUrl(uri2,true); KTempDir tdir; kdDebug() << "kio_ksvn::diff : " << u1 << " at revision " << r1.toString() << " with " << u2 << " at revision " << r2.toString() @@ -847,10 +847,10 @@ void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const QStri error(KIO::ERR_SLAVE_DEFINED,e.msg()); return; } - QString out = QString::FROMUTF8(ex); - QTextIStream stream(&out); + TQString out = TQString::FROMUTF8(ex); + TQTextIStream stream(&out); while (!stream.atEnd()) { - setMetaData(QString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "diffresult",stream.readLine()); + setMetaData(TQString::number(m_pData->m_Listener.counter()).rightJustify( 10,'0' )+ "diffresult",stream.readLine()); m_pData->m_Listener.incCounter(); } } @@ -858,9 +858,9 @@ void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const QStri void kio_svnProtocol::import(const KURL& repos, const KURL& wc) { try { - QString target = makeSvnUrl(repos); - QString path = wc.path(); - m_pData->m_Svnclient->import(svn::Path(path),target,QString::null,svn::DepthInfinity,false,false); + TQString target = makeSvnUrl(repos); + TQString path = wc.path(); + m_pData->m_Svnclient->import(svn::Path(path),target,TQString(),svn::DepthInfinity,false,false); } catch (const svn::ClientException&e) { error(KIO::ERR_SLAVE_DEFINED,e.msg()); return; @@ -870,7 +870,7 @@ void kio_svnProtocol::import(const KURL& repos, const KURL& wc) void kio_svnProtocol::add(const KURL& wc) { - QString path = wc.path(); + TQString path = wc.path(); try { /* rec */ m_pData->m_Svnclient->add(svn::Path(path),svn::DepthInfinity); @@ -884,7 +884,7 @@ void kio_svnProtocol::add(const KURL& wc) void kio_svnProtocol::wc_delete(const KURL::List&l) { svn::Pathes p; - for ( QValueListConstIterator<KURL> it = l.begin(); it != l.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = l.begin(); it != l.end() ; ++it ) { p.append((*it).path()); } try { @@ -920,7 +920,7 @@ void kio_svnProtocol::streamSendMime(KMimeMagicResult* mt) } } -void kio_svnProtocol::streamPushData(QByteArray array) +void kio_svnProtocol::streamPushData(TQByteArray array) { data(array); } @@ -941,9 +941,9 @@ void kio_svnProtocol::streamTotalSizeNull() /*! \fn kio_svnProtocol::getDefaultLog() */ -QString kio_svnProtocol::getDefaultLog() +TQString kio_svnProtocol::getDefaultLog() { - QString res = QString::null; + TQString res = TQString(); Kdesvnsettings::self()->readConfig(); if (Kdesvnsettings::kio_use_standard_logmsg()) { res = Kdesvnsettings::kio_standard_logmsg(); diff --git a/src/kiosvn/kiosvn.h b/src/kiosvn/kiosvn.h index a3383e1..a77094e 100644 --- a/src/kiosvn/kiosvn.h +++ b/src/kiosvn/kiosvn.h @@ -22,8 +22,8 @@ #include "kiobytestream.h" -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include <kurl.h> #include <kio/global.h> @@ -31,7 +31,7 @@ #include <sys/stat.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace KIO { @@ -44,7 +44,7 @@ class KioSvnData; class kio_svnProtocol : public KIO::SlaveBase,public StreamWrittenCb { public: - kio_svnProtocol(const QCString &pool_socket, const QCString &app_socket); + kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket); virtual ~kio_svnProtocol(); virtual void listDir (const KURL&url); virtual void stat(const KURL& url); @@ -54,26 +54,26 @@ public: virtual void rename(const KURL&src,const KURL&target,bool force); virtual void del(const KURL&url,bool isfile); virtual void copy(const KURL&src,const KURL&dest,int permissions,bool overwrite); - virtual void checkout(const KURL&src,const KURL&target,const int rev, const QString&revstring); - virtual void svnlog(int,const QString&,int, const QString&, const KURL::List&); + virtual void checkout(const KURL&src,const KURL&target,const int rev, const TQString&revstring); + virtual void svnlog(int,const TQString&,int, const TQString&, const KURL::List&); virtual void revert(const KURL::List&); - virtual void wc_switch(const KURL&,const KURL&,bool,int,const QString&); - virtual void diff(const KURL&,const KURL&,int,const QString&,int, const QString&,bool); + virtual void wc_switch(const KURL&,const KURL&,bool,int,const TQString&); + virtual void diff(const KURL&,const KURL&,int,const TQString&,int, const TQString&,bool); virtual void import( const KURL& repos, const KURL& wc); virtual void add(const KURL& wc); virtual void wc_delete(const KURL::List&); - virtual void special(const QByteArray& data); + virtual void special(const TQByteArray& data); virtual void wc_resolve(const KURL&,bool); /* looked on kio::svn from kdesdk */ enum KSVN_METHOD { - /* KURL repository, KURL target, int revnumber, QString revkind */ + /* KURL repository, KURL target, int revnumber, TQString revkind */ SVN_CHECKOUT = 1, - /* KURL wc, int revnumber, QString revkind */ + /* KURL wc, int revnumber, TQString revkind */ /* refkind may empty or HEAD or START, will get parsed if revnumber is -1 */ SVN_UPDATE = 2, /* KURL::List */ SVN_COMMIT = 3, - /* int revstart, QString revstartstring, int revend, QString revendstring, KURL::List */ + /* int revstart, TQString revstartstring, int revend, TQString revendstring, KURL::List */ SVN_LOG=4, SVN_IMPORT=5, /* KURL */ @@ -88,31 +88,31 @@ public: SVN_MKDIR=10, /* KURL, bool */ SVN_RESOLVE=11, - /* KURL working copy, KURL new_repository_url, bool recurse, int rev, QString revstring */ + /* KURL working copy, KURL new_repository_url, bool recurse, int rev, TQString revstring */ SVN_SWITCH=12, - /* KURL uri1, KURL uri2, int r1, QString rstring1, int r2, QString rstring 2, bool recursive */ + /* KURL uri1, KURL uri2, int r1, TQString rstring1, int r2, TQString rstring 2, bool recursive */ SVN_DIFF=13 }; void contextProgress(long long int current, long long int max); virtual void streamWritten(const KIO::filesize_t current); - virtual void streamPushData(QByteArray); + virtual void streamPushData(TQByteArray); virtual void streamSendMime(KMimeMagicResult*mt); virtual void streamTotalSizeNull(); protected: virtual void commit(const KURL::List&); virtual void status(const KURL&,bool,bool); - virtual void update(const KURL&,int,const QString&); + virtual void update(const KURL&,int,const TQString&); private: KioSvnData*m_pData; - bool createUDSEntry( const QString& filename, const QString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry); - QString makeSvnUrl(const KURL&url,bool check_wc=true); + bool createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry); + TQString makeSvnUrl(const KURL&url,bool check_wc=true); bool checkWc(const KURL&url); - bool getLogMsg(QString&); + bool getLogMsg(TQString&); protected: - QString getDefaultLog(); + TQString getDefaultLog(); }; } diff --git a/src/ksvnwidgets/authdialogimpl.cpp b/src/ksvnwidgets/authdialogimpl.cpp index 5cd1fd5..07ed908 100644 --- a/src/ksvnwidgets/authdialogimpl.cpp +++ b/src/ksvnwidgets/authdialogimpl.cpp @@ -23,22 +23,22 @@ #include <kpassdlg.h> #include <klineedit.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> -AuthDialogImpl::AuthDialogImpl(const QString & realm,const QString&user,QWidget *parent, const char *name) - :AuthDialogData(parent, name),curPass("") +AuthDialogImpl::AuthDialogImpl(const TQString & realm,const TQString&user,TQWidget *tqparent, const char *name) + :AuthDialogData(tqparent, name),curPass("") { m_UsernameEdit->setText(user); m_PasswordEdit->setText(""); m_StorePasswordButton->setChecked(Kdesvnsettings::store_passwords()); - QString text = m_StorePasswordButton->text(); + TQString text = m_StorePasswordButton->text(); m_StorePasswordButton->setText( - m_StorePasswordButton->text()+QString(" (%1)") - .arg((Kdesvnsettings::passwords_in_wallet()?i18n("into KDE Wallet"):i18n("into subversions simple storage")))); + m_StorePasswordButton->text()+TQString(" (%1)") + .tqarg((Kdesvnsettings::passwords_in_wallet()?i18n("into KDE Wallet"):i18n("into subversions simple storage")))); if (!realm.isEmpty()) { m_RealmLabel->setText(m_RealmLabel->text()+" "+realm); - resize( QSize(334, 158).expandedTo(minimumSizeHint()) ); + resize( TQSize(334, 158).expandedTo(tqminimumSizeHint()) ); } } @@ -46,16 +46,16 @@ void AuthDialogImpl::slotHelp() { } -const QString AuthDialogImpl::Username()const +const TQString AuthDialogImpl::Username()const { return m_UsernameEdit->text(); } -const QString AuthDialogImpl::Password() +const TQString AuthDialogImpl::Password() { #if 0 /* as described in interface description wie must make a copy of string */ - curPass = QString::fromUtf8(m_PasswordEdit->password()); + curPass = TQString::fromUtf8(m_PasswordEdit->password()); return curPass; #endif return m_PasswordEdit->text(); diff --git a/src/ksvnwidgets/authdialogimpl.h b/src/ksvnwidgets/authdialogimpl.h index 2f572b7..7b8d03e 100644 --- a/src/ksvnwidgets/authdialogimpl.h +++ b/src/ksvnwidgets/authdialogimpl.h @@ -21,20 +21,21 @@ #define AUTHDIALOGIMPL_H #include "src/ksvnwidgets/authdlg.h" -#include <qstring.h> +#include <tqstring.h> class AuthDialogImpl: public AuthDialogData { Q_OBJECT + TQ_OBJECT public: - AuthDialogImpl(const QString & realm = "",const QString&user="", QWidget *parent = 0, const char *name = 0); + AuthDialogImpl(const TQString & realm = "",const TQString&user="", TQWidget *tqparent = 0, const char *name = 0); - const QString Username()const; - const QString Password(); + const TQString Username()const; + const TQString Password(); bool maySave()const; protected slots: virtual void slotHelp(); protected: - QString curPass; + TQString curPass; }; #endif diff --git a/src/ksvnwidgets/authdlg.ui b/src/ksvnwidgets/authdlg.ui index 764fd87..10fba25 100644 --- a/src/ksvnwidgets/authdlg.ui +++ b/src/ksvnwidgets/authdlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AuthDialogData</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>AuthDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_RealmLabel</cstring> </property> @@ -30,15 +30,15 @@ <string>Enter authentification info for</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_PasswordLabel</cstring> </property> @@ -59,7 +59,7 @@ <cstring>m_UsernameEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_UsernameLabel</cstring> </property> @@ -69,7 +69,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_StorePasswordButton</cstring> </property> @@ -80,15 +80,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -105,7 +105,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -129,14 +129,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -184,10 +184,10 @@ <tabstop>buttonCancel</tabstop> <tabstop>buttonHelp</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">slotHelp()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/ksvnwidgets/depthform.ui b/src/ksvnwidgets/depthform.ui index 3a5d126..ed2a9c1 100644 --- a/src/ksvnwidgets/depthform.ui +++ b/src/ksvnwidgets/depthform.ui @@ -2,11 +2,11 @@ <class>DepthSettings</class> <comment>Selector widget for depth enumeration</comment> <author>Rajko Albrecht</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DepthForm</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -21,7 +21,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Empty Depth</string> @@ -57,7 +57,7 @@ <i>empty depth</i><br>Just the named directory, no entries. Updates will not pull in any files or subdirectories not already present. </p> <p> -<i>Files depth</i><br>Folder and its file children, but not subdirs. Updates will pull in any files not already present, but not subdirectories. +<i>Files depth</i><br>Folder and its file tqchildren, but not subdirs. Updates will pull in any files not already present, but not subdirectories. </p> <p> <i>Immediate depth</i><br> @@ -80,7 +80,7 @@ Equivalent to the pre-1.5 default update behavior. <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -89,5 +89,5 @@ Equivalent to the pre-1.5 default update behavior. </spacer> </hbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/ksvnwidgets/depthselector.cpp b/src/ksvnwidgets/depthselector.cpp index 842adcf..a732716 100644 --- a/src/ksvnwidgets/depthselector.cpp +++ b/src/ksvnwidgets/depthselector.cpp @@ -22,14 +22,14 @@ #include <klocale.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qcombobox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqcombobox.h> -DepthSelector::DepthSelector(QWidget *parent, const char *name) - :DepthSettings(parent, name) +DepthSelector::DepthSelector(TQWidget *tqparent, const char *name) + :DepthSettings(tqparent, name) { if (svn::Version::version_major()>1|| svn::Version::version_minor()>4 ) { m_recurse = 0L; @@ -38,29 +38,29 @@ DepthSelector::DepthSelector(QWidget *parent, const char *name) delete m_DepthCombo; m_DepthCombo=0; DepthFormLayout->removeItem(m_leftspacer); - m_recurse = new QCheckBox( this, "m_RecursiveButton" ); + m_recurse = new TQCheckBox( this, "m_RecursiveButton" ); m_recurse->setChecked( TRUE ); m_recurse->setText(i18n( "Recursive" )); DepthFormLayout->addWidget( m_recurse ); - m_recurse->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + m_recurse->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed); DepthFormLayout->addItem(m_leftspacer); } DepthFormLayout->setMargin(0); - setMinimumSize(minimumSizeHint()); + setMinimumSize(tqminimumSizeHint()); adjustSize(); } DepthSelector::~DepthSelector() { } -void DepthSelector::addItemWidget(QWidget*aWidget) +void DepthSelector::addItemWidget(TQWidget*aWidget) { DepthFormLayout->removeItem(m_leftspacer); - aWidget->reparent(this,geometry().topLeft()); + aWidget->reparent(this,tqgeometry().topLeft()); DepthFormLayout->addWidget(aWidget); - aWidget->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); + aWidget->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed); DepthFormLayout->addItem(m_leftspacer); - setMinimumSize(minimumSizeHint()); + setMinimumSize(tqminimumSizeHint()); } /*! @@ -90,7 +90,7 @@ svn::Depth DepthSelector::getDepth()const void DepthSelector::hideDepth(bool hide) { - QWidget*w = m_DepthCombo? (QWidget*)m_DepthCombo:(QWidget*)m_recurse; + TQWidget*w = m_DepthCombo? (TQWidget*)m_DepthCombo:(TQWidget*)m_recurse; if (hide) w->hide(); else w->show(); } diff --git a/src/ksvnwidgets/depthselector.h b/src/ksvnwidgets/depthselector.h index 649537b..f6b9e2b 100644 --- a/src/ksvnwidgets/depthselector.h +++ b/src/ksvnwidgets/depthselector.h @@ -24,19 +24,20 @@ #include "src/svnqt/svnqttypes.hpp" -class QCheckBox; +class TQCheckBox; class DepthSelector: public DepthSettings { Q_OBJECT + TQ_OBJECT public: - DepthSelector(QWidget *parent = 0, const char *name = 0); + DepthSelector(TQWidget *tqparent = 0, const char *name = 0); virtual ~DepthSelector(); svn::Depth getDepth()const; - void addItemWidget(QWidget*); + void addItemWidget(TQWidget*); void hideDepth(bool hide); protected: - QCheckBox*m_recurse; + TQCheckBox*m_recurse; }; #endif diff --git a/src/ksvnwidgets/diffbrowser.cpp b/src/ksvnwidgets/diffbrowser.cpp index d1f7b6f..ddc2d5a 100644 --- a/src/ksvnwidgets/diffbrowser.cpp +++ b/src/ksvnwidgets/diffbrowser.cpp @@ -30,25 +30,25 @@ #include <kapplication.h> #include <klocale.h> -#include <qfont.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qtextcodec.h> +#include <tqfont.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqtextcodec.h> /*! - \fn DiffBrowser::DiffBrowser(QWidget*parent=0,const char*name=0) + \fn DiffBrowser::DiffBrowser(TQWidget*tqparent=0,const char*name=0) */ -DiffBrowser::DiffBrowser(QWidget*parent,const char*name) - : KTextBrowser( parent, name) +DiffBrowser::DiffBrowser(TQWidget*tqparent,const char*name) + : KTextBrowser( tqparent, name) { - setTextFormat(Qt::PlainText); + setTextFormat(TQt::PlainText); setFont(KGlobalSettings::fixedFont()); m_Data = new DiffBrowserData; - setWordWrap(QTextEdit::NoWrap); + setWordWrap(TQTextEdit::NoWrap); m_Data->m_Syntax = new DiffSyntax(this); - QToolTip::add(this,i18n("Ctrl-F for search, F3 or Shift-F3 for search again.")); - QWhatsThis::add(this,i18n("<b>Display differences between files</b><p>You may search inside text with Ctrl-F.</p><p>F3 for search forward again, Shift-F3 for search backward again.</p><p>You may save the (original) output with Ctrl-S.</p>")); + TQToolTip::add(this,i18n("Ctrl-F for search, F3 or Shift-F3 for search again.")); + TQWhatsThis::add(this,i18n("<b>Display differences between files</b><p>You may search inside text with Ctrl-F.</p><p>F3 for search forward again, Shift-F3 for search backward again.</p><p>You may save the (original) output with Ctrl-S.</p>")); setFocus(); } @@ -60,14 +60,14 @@ DiffBrowser::DiffBrowser(QWidget*parent,const char*name) delete m_Data; } -void DiffBrowser::setText(const QString&aText) +void DiffBrowser::setText(const TQString&aText) { m_Data->m_content.setRawData(aText.local8Bit(),aText.local8Bit().size()); KTextBrowser::setText(aText); setCursorPosition(0,0); } -void DiffBrowser::setText(const QByteArray&aText) +void DiffBrowser::setText(const TQByteArray&aText) { m_Data->m_content=aText; printContent(); @@ -76,9 +76,9 @@ void DiffBrowser::setText(const QByteArray&aText) void DiffBrowser::printContent() { - QTextCodec * cc = QTextCodec::codecForName(Kdesvnsettings::locale_for_diff()); + TQTextCodec * cc = TQTextCodec::codecForName(Kdesvnsettings::locale_for_diff()); if (!cc) { - KTextBrowser::setText(QString::fromLocal8Bit(m_Data->m_content,m_Data->m_content.size())); + KTextBrowser::setText(TQString::fromLocal8Bit(m_Data->m_content,m_Data->m_content.size())); } else { KTextBrowser::setText(cc->toUnicode(m_Data->m_content,m_Data->m_content.size())); } @@ -89,24 +89,24 @@ void DiffBrowser::printContent() */ void DiffBrowser::saveDiff() { - QString saveTo = KFileDialog::getSaveFileName(QString::null,"text/x-diff"); + TQString saveTo = KFileDialog::getSaveFileName(TQString(),"text/x-diff"); if (saveTo.isEmpty()) { return; } - QFile tfile(saveTo); + TQFile tfile(saveTo); if (tfile.exists()) { - if (KMessageBox::warningYesNo(KApplication::activeModalWidget(), - i18n("File %1 exists - overwrite?").arg(saveTo)) + if (KMessageBox::warningYesNo(TQT_TQWIDGET(KApplication::activeModalWidget()), + i18n("File %1 exists - overwrite?").tqarg(saveTo)) !=KMessageBox::Yes) { return; } } tfile.open(IO_Truncate|IO_WriteOnly|IO_Raw); - QDataStream stream( &tfile ); + TQDataStream stream( &tfile ); stream.writeRawBytes(m_Data->m_content.data(),m_Data->m_content.size()); } -void DiffBrowser::keyPressEvent(QKeyEvent*ev) +void DiffBrowser::keyPressEvent(TQKeyEvent*ev) { if ( ev->key() == Key_Return) { ev->ignore(); @@ -131,10 +131,10 @@ void DiffBrowser::startSearch() { if( !m_Data->srchdialog ) { m_Data->srchdialog = new KEdFind( this, "searchdialog", false); - connect(m_Data->srchdialog,SIGNAL(search()),this,SLOT(search_slot())); - connect(m_Data->srchdialog,SIGNAL(done()),this,SLOT(searchdone_slot())); + connect(m_Data->srchdialog,TQT_SIGNAL(search()),this,TQT_SLOT(search_slot())); + connect(m_Data->srchdialog,TQT_SIGNAL(done()),this,TQT_SLOT(searchdone_slot())); } - QString _st = m_Data->srchdialog->getText(); + TQString _st = m_Data->srchdialog->getText(); m_Data->srchdialog->setText(_st.isEmpty() ? m_Data->pattern : _st); m_Data->srchdialog->show(); m_Data->srchdialog->result(); @@ -148,11 +148,11 @@ void DiffBrowser::search_slot() if( !m_Data->srchdialog ) { return; } - QString to_find_string = m_Data->srchdialog->getText(); + TQString to_find_string = m_Data->srchdialog->getText(); doSearch(to_find_string,m_Data->srchdialog->case_sensitive(),m_Data->srchdialog->get_direction()); } -void DiffBrowser::doSearch(const QString&to_find_string,bool case_sensitive,bool back) +void DiffBrowser::doSearch(const TQString&to_find_string,bool case_sensitive,bool back) { if( !m_Data->srchdialog ) { return; @@ -163,7 +163,7 @@ void DiffBrowser::doSearch(const QString&to_find_string,bool case_sensitive,bool col = col+1; } while (1) { - bool result = find(to_find_string,case_sensitive,false, + bool result = tqfind(to_find_string,case_sensitive,false, (!back),&line,&col); if (result) { @@ -171,11 +171,11 @@ void DiffBrowser::doSearch(const QString&to_find_string,bool case_sensitive,bool m_Data->pattern=to_find_string; break; } - QWidget * _parent = m_Data->srchdialog->isVisible()?m_Data->srchdialog:parentWidget(); + TQWidget * _tqparent = m_Data->srchdialog->isVisible()?m_Data->srchdialog:tqparentWidget(); if (!m_Data->srchdialog->get_direction()) { // forward int query = KMessageBox::questionYesNo( - _parent, + _tqparent, i18n("End of document reached.\n"\ "Continue from the beginning?"), i18n("Find"),KStdGuiItem::cont(),i18n("Stop")); @@ -188,13 +188,13 @@ void DiffBrowser::doSearch(const QString&to_find_string,bool case_sensitive,bool } } else { int query = KMessageBox::questionYesNo( - _parent, + _tqparent, i18n("Beginning of document reached.\n"\ "Continue from the end?"), i18n("Find"),KStdGuiItem::cont(),i18n("Stop")); if (query == KMessageBox::Yes){ line = lines()-1; - QString string = text(line); + TQString string = text(line); col = string.length(); if (col>0) { --col; @@ -244,7 +244,7 @@ void DiffBrowser::doSearchAgain(bool back) } } -void DiffBrowser::slotTextCodecChanged(const QString&codec) +void DiffBrowser::slotTextCodecChanged(const TQString&codec) { if (Kdesvnsettings::locale_for_diff()!=codec) { Kdesvnsettings::setLocale_for_diff(codec); diff --git a/src/ksvnwidgets/diffbrowser.h b/src/ksvnwidgets/diffbrowser.h index f7aa946..4793afe 100644 --- a/src/ksvnwidgets/diffbrowser.h +++ b/src/ksvnwidgets/diffbrowser.h @@ -30,22 +30,23 @@ class DiffBrowserData; class DiffBrowser : public KTextBrowser { Q_OBJECT + TQ_OBJECT public: - DiffBrowser(QWidget*parent=0,const char*name=0); + DiffBrowser(TQWidget*tqparent=0,const char*name=0); virtual ~DiffBrowser(); public slots: - virtual void setText(const QString&aText); - virtual void setText(const QByteArray&ex); + virtual void setText(const TQString&aText); + virtual void setText(const TQByteArray&ex); virtual void saveDiff(); - virtual void slotTextCodecChanged(const QString&); + virtual void slotTextCodecChanged(const TQString&); protected: - virtual void keyPressEvent(QKeyEvent*); + virtual void keyPressEvent(TQKeyEvent*); virtual void startSearch(); - virtual void doSearch(const QString&to_find_string,bool case_sensitive,bool back); + virtual void doSearch(const TQString&to_find_string,bool case_sensitive,bool back); virtual void doSearchAgain(bool back); protected: diff --git a/src/ksvnwidgets/diffbrowserdata.h b/src/ksvnwidgets/diffbrowserdata.h index 13ab161..55ee779 100644 --- a/src/ksvnwidgets/diffbrowserdata.h +++ b/src/ksvnwidgets/diffbrowserdata.h @@ -22,7 +22,7 @@ #include <keditcl.h> -#include <qstring.h> +#include <tqstring.h> class DiffBrowserData { @@ -33,10 +33,10 @@ public: enum {NONE, FORWARD, BACKWARD}; DiffSyntax*m_Syntax; - QByteArray m_content; + TQByteArray m_content; KEdFind *srchdialog; int last_search,last_finished_search; - QString pattern; + TQString pattern; bool cs; }; diff --git a/src/ksvnwidgets/diffsyntax.cpp b/src/ksvnwidgets/diffsyntax.cpp index a38c749..9f5e573 100644 --- a/src/ksvnwidgets/diffsyntax.cpp +++ b/src/ksvnwidgets/diffsyntax.cpp @@ -23,26 +23,26 @@ #include <kglobal.h> #include <kdebug.h> -#include <qregexp.h> +#include <tqregexp.h> /*! - \fn DiffSyntax::DiffSyntax(QTextEdit*) + \fn DiffSyntax::DiffSyntax(TQTextEdit*) */ - DiffSyntax::DiffSyntax(QTextEdit*aTextEdit) - : QSyntaxHighlighter(aTextEdit) + DiffSyntax::DiffSyntax(TQTextEdit*aTextEdit) + : TQSyntaxHighlighter(aTextEdit) { } /*! - \fn DiffSyntax::highlightParagraph ( const QString & text, int endStateOfLastPara ) + \fn DiffSyntax::highlightParagraph ( const TQString & text, int endStateOfLastPara ) */ -int DiffSyntax::highlightParagraph ( const QString & aText, int endStateOfLastPara) +int DiffSyntax::highlightParagraph ( const TQString & aText, int endStateOfLastPara) { - static QRegExp a("^\\w+:\\s.*$"); - static QRegExp b("^\\W+$"); - QColor c(0,0,0); - QFont f(KGlobalSettings::fixedFont()); + static TQRegExp a("^\\w+:\\s.*$"); + static TQRegExp b("^\\W+$"); + TQColor c(0,0,0); + TQFont f(KGlobalSettings::fixedFont()); int ret = 0; if (endStateOfLastPara == 1) { ret = 2; @@ -53,7 +53,7 @@ int DiffSyntax::highlightParagraph ( const QString & aText, int endStateOfLastPa } if (a.match(aText)>-1) { - c = QColor("#660033"); + c = TQColor("#660033"); if (endStateOfLastPara==1||endStateOfLastPara==2) { f.setBold(true); } else { @@ -61,25 +61,25 @@ int DiffSyntax::highlightParagraph ( const QString & aText, int endStateOfLastPa } } else if (aText.startsWith("_____" )) { ret = 1; - c = QColor("#1D1D8F"); + c = TQColor("#1D1D8F"); } else if (aText.startsWith("+")) { - c = QColor("#008B00"); + c = TQColor("#008B00"); if (aText.startsWith("+++")) { f.setBold(true); } } else if (aText.startsWith("-")) { - c = QColor("#CD3333"); + c = TQColor("#CD3333"); if (aText.startsWith("---")) { f.setBold(true); } } else if (aText.startsWith("@@")) { - c = QColor("#1D1D8F"); + c = TQColor("#1D1D8F"); } if (endStateOfLastPara==2 && ret==2) { if (aText.startsWith(" +")) { - c = QColor("#008B00"); + c = TQColor("#008B00"); } else if (aText.startsWith(" -")) { - c = QColor("#CD3333"); + c = TQColor("#CD3333"); } } setFormat(0,(int)aText.length(),f,c); diff --git a/src/ksvnwidgets/diffsyntax.h b/src/ksvnwidgets/diffsyntax.h index 1c1f779..9d14a51 100644 --- a/src/ksvnwidgets/diffsyntax.h +++ b/src/ksvnwidgets/diffsyntax.h @@ -20,19 +20,19 @@ #ifndef _DIFFSYNTAX_H #define _DIFFSYNTAX_H -#include <qsyntaxhighlighter.h> -#include <qregexp.h> -#include <qfont.h> +#include <tqsyntaxhighlighter.h> +#include <tqregexp.h> +#include <tqfont.h> -class QTextEdit; -class QString; -class QColor; +class TQTextEdit; +class TQString; +class TQColor; -class DiffSyntax : public QSyntaxHighlighter +class DiffSyntax : public TQSyntaxHighlighter { public: - DiffSyntax(QTextEdit*); - virtual int highlightParagraph ( const QString & text, int endStateOfLastPara ); + DiffSyntax(TQTextEdit*); + virtual int highlightParagraph ( const TQString & text, int endStateOfLastPara ); virtual ~DiffSyntax(); }; diff --git a/src/ksvnwidgets/encodingselector.ui b/src/ksvnwidgets/encodingselector.ui index 8ea58fb..77b3cde 100644 --- a/src/ksvnwidgets/encodingselector.ui +++ b/src/ksvnwidgets/encodingselector.ui @@ -1,11 +1,11 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>EncodingSelector</class> <author>Rajko Albrecht</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>EncodingSelector</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -34,7 +34,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_Mainlabel</cstring> </property> @@ -49,11 +49,11 @@ <property name="text"> <string>Select encoding:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Default utf-8</string> @@ -84,8 +84,8 @@ <slot>itemActivated(int)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">itemActivated(int)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/ksvnwidgets/encodingselector_impl.cpp b/src/ksvnwidgets/encodingselector_impl.cpp index d062970..77142f2 100644 --- a/src/ksvnwidgets/encodingselector_impl.cpp +++ b/src/ksvnwidgets/encodingselector_impl.cpp @@ -22,10 +22,10 @@ #include <kcharsets.h> #include <kglobal.h> -#include <qcombobox.h> +#include <tqcombobox.h> -EncodingSelector_impl::EncodingSelector_impl(const QString&cur,QWidget *parent, const char *name) - :EncodingSelector(parent, name) +EncodingSelector_impl::EncodingSelector_impl(const TQString&cur,TQWidget *tqparent, const char *name) + :EncodingSelector(tqparent, name) { m_encodingList->insertStringList( KGlobal::charsets()->availableEncodingNames()); @@ -40,7 +40,7 @@ EncodingSelector_impl::EncodingSelector_impl(const QString&cur,QWidget *parent, void EncodingSelector_impl::itemActivated(int which) { if (which == 0) { - emit TextCodecChanged(QString("")); + emit TextCodecChanged(TQString("")); } else { emit TextCodecChanged(m_encodingList->currentText()); } diff --git a/src/ksvnwidgets/encodingselector_impl.h b/src/ksvnwidgets/encodingselector_impl.h index ff8f8e6..7a6bf3e 100644 --- a/src/ksvnwidgets/encodingselector_impl.h +++ b/src/ksvnwidgets/encodingselector_impl.h @@ -22,19 +22,20 @@ #include "src/ksvnwidgets/encodingselector.h" -class QTextCodec; +class TQTextCodec; class EncodingSelector_impl: public EncodingSelector { Q_OBJECT + TQ_OBJECT public: - EncodingSelector_impl(const QString&cur, QWidget *parent = 0, const char *name = 0); + EncodingSelector_impl(const TQString&cur, TQWidget *tqparent = 0, const char *name = 0); virtual ~EncodingSelector_impl(){} protected slots: virtual void itemActivated(int); signals: - void TextCodecChanged(const QString&); + void TextCodecChanged(const TQString&); }; #endif diff --git a/src/ksvnwidgets/logmessage.ui b/src/ksvnwidgets/logmessage.ui index faa8bd9..5700cea 100644 --- a/src/ksvnwidgets/logmessage.ui +++ b/src/ksvnwidgets/logmessage.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>LogmessageData</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>LogmessageData</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,14 +19,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>m_MainSplitter</cstring> </property> <property name="orientation"> <enum>Vertical</enum> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_ReviewFrame</cstring> </property> @@ -40,18 +40,18 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_Reviewlabel</cstring> </property> <property name="text"> <string>Review affected items</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Entry</string> @@ -90,15 +90,15 @@ <enum>LastColumn</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_HideNewItems</cstring> </property> @@ -109,7 +109,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_MarkUnversioned</cstring> </property> @@ -120,7 +120,7 @@ <string>Mark all new e.g. not versioned items for add and commit.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_UnmarkUnversioned</cstring> </property> @@ -131,7 +131,7 @@ <string>Unmark all unversioned items so they will be ignored.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_DiffItem</cstring> </property> @@ -146,7 +146,7 @@ </widget> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_EditFrame</cstring> </property> @@ -160,14 +160,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_HeadLabel</cstring> </property> <property name="text"> <string>Enter a log message</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -179,9 +179,9 @@ </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -211,7 +211,7 @@ <string>Last used log messages</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_LogLabel</cstring> </property> @@ -219,7 +219,7 @@ <string>Or insert one of the last:</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>m_insert_file_button</cstring> </property> @@ -237,7 +237,7 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_ItemsLayout</cstring> </property> @@ -250,7 +250,7 @@ <cstring>m_DepthSelector</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_keepLocksButton</cstring> </property> @@ -326,7 +326,7 @@ <slot>insertFile()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotHistoryActivated(const QString&)</slot> <slot access="protected">slotHistoryActivated(int)</slot> <slot access="protected">slotMarkUnversioned()</slot> @@ -334,8 +334,8 @@ <slot access="protected">slotUnmarkUnversioned()</slot> <slot access="protected">hideNewItems(bool)</slot> <slot access="protected">insertFile()</slot> -</slots> -<layoutdefaults spacing="2" margin="2"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>ktextedit.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/src/ksvnwidgets/logmsg_impl.cpp b/src/ksvnwidgets/logmsg_impl.cpp index f083d4c..0a10467 100644 --- a/src/ksvnwidgets/logmsg_impl.cpp +++ b/src/ksvnwidgets/logmsg_impl.cpp @@ -36,36 +36,36 @@ #include <kfile.h> #include <kurlrequester.h> -#include <qvbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qpushbutton.h> -#include <qfile.h> +#include <tqvbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqpushbutton.h> +#include <tqfile.h> #define MAX_MESSAGE_HISTORY 10 -QValueList<QString> Logmsg_impl::sLogHistory = QValueList<QString>(); -QString Logmsg_impl::sLastMessage=QString(); -const QString Logmsg_impl::groupName("logmsg_dlg_size"); +TQValueList<TQString> Logmsg_impl::sLogHistory = TQValueList<TQString>(); +TQString Logmsg_impl::sLastMessage=TQString(); +const TQString Logmsg_impl::groupName("logmsg_dlg_size"); unsigned int Logmsg_impl::smax_message_history = 0xFFFF; -class SvnCheckListItem:public QCheckListItem +class SvnCheckListItem:public TQCheckListItem { protected: Logmsg_impl::logActionEntry m_Content; public: - SvnCheckListItem(QListView*,const Logmsg_impl::logActionEntry&); + SvnCheckListItem(TQListView*,const Logmsg_impl::logActionEntry&); const Logmsg_impl::logActionEntry&data(){return m_Content;} virtual int rtti()const{return 1000;} - virtual int compare( QListViewItem* item, int col, bool ascending ) const; + virtual int compare( TQListViewItem* item, int col, bool ascending ) const; }; -Logmsg_impl::Logmsg_impl(QWidget *parent, const char *name) - :LogmessageData(parent, name) +Logmsg_impl::Logmsg_impl(TQWidget *tqparent, const char *name) + :LogmessageData(tqparent, name) { m_LogEdit->setFocus(); m_Reviewlabel->hide(); @@ -81,8 +81,8 @@ Logmsg_impl::Logmsg_impl(QWidget *parent, const char *name) m_DiffItem=0; } -Logmsg_impl::Logmsg_impl(const svn::CommitItemList&_items,QWidget *parent, const char *name) - :LogmessageData(parent, name) +Logmsg_impl::Logmsg_impl(const svn::CommitItemList&_items,TQWidget *tqparent, const char *name) + :LogmessageData(tqparent, name) { m_LogEdit->setFocus(); m_ReviewList->setColumnText(1,i18n("Items to commit")); @@ -91,13 +91,13 @@ Logmsg_impl::Logmsg_impl(const svn::CommitItemList&_items,QWidget *parent, const hideButtons(true); if (_items.count()>0) { for (unsigned i = 0;i<_items.count();++i) { - QListViewItem*item = new QListViewItem(m_ReviewList); + TQListViewItem*item = new TQListViewItem(m_ReviewList); if (_items[i].path().isEmpty()) { item->setText(1,_items[i].url()); } else { item->setText(1,_items[i].path()); } - item->setText(0,QChar(_items[i].actionType())); + item->setText(0,TQChar(_items[i].actionType())); } m_hidden=false; } else { @@ -108,8 +108,8 @@ Logmsg_impl::Logmsg_impl(const svn::CommitItemList&_items,QWidget *parent, const checkSplitterSize(); } -Logmsg_impl::Logmsg_impl(const QMap<QString,QString>&_items,QWidget *parent, const char *name) - :LogmessageData(parent, name) +Logmsg_impl::Logmsg_impl(const TQMap<TQString,TQString>&_items,TQWidget *tqparent, const char *name) + :LogmessageData(tqparent, name) { m_LogEdit->setFocus(); m_ReviewList->setColumnText(1,i18n("Items to commit")); @@ -117,9 +117,9 @@ Logmsg_impl::Logmsg_impl(const QMap<QString,QString>&_items,QWidget *parent, con m_ReviewList->setSortColumn(1); hideButtons(true); if (_items.count()>0) { - QMap<QString,QString>::ConstIterator it = _items.begin(); + TQMap<TQString,TQString>::ConstIterator it = _items.begin(); for (;it!=_items.end();++it) { - QListViewItem*item = new QListViewItem(m_ReviewList); + TQListViewItem*item = new TQListViewItem(m_ReviewList); item->setText(1,it.key()); item->setText(0,it.data()); } @@ -134,18 +134,18 @@ Logmsg_impl::Logmsg_impl(const QMap<QString,QString>&_items,QWidget *parent, con Logmsg_impl::Logmsg_impl(const logActionEntries&_activatedList, const logActionEntries&_notActivatedList, - QWidget *parent, const char *name) - :LogmessageData(parent, name) + TQWidget *tqparent, const char *name) + :LogmessageData(tqparent, name) { m_LogEdit->setFocus(); m_hidden=false; for (unsigned j = 0; j<_activatedList.count();++j) { SvnCheckListItem * item = new SvnCheckListItem(m_ReviewList,_activatedList[j]); - item->setState(QCheckListItem::On); + item->setState(TQCheckListItem::On); } for (unsigned j = 0; j<_notActivatedList.count();++j) { SvnCheckListItem * item = new SvnCheckListItem(m_ReviewList,_notActivatedList[j]); - item->setState(QCheckListItem::Off); + item->setState(TQCheckListItem::Off); } m_HideNewItems->setOn(Kdesvnsettings::commit_hide_new()); checkSplitterSize(); @@ -153,7 +153,7 @@ Logmsg_impl::Logmsg_impl(const logActionEntries&_activatedList, Logmsg_impl::~Logmsg_impl() { - QValueList<int> list = m_MainSplitter->sizes(); + TQValueList<int> list = m_MainSplitter->sizes(); if (!m_hidden && list.count()==2) { Kdesvnsettings::setCommit_splitter_height(list); Kdesvnsettings::writeConfig(); @@ -161,12 +161,12 @@ Logmsg_impl::~Logmsg_impl() for (unsigned int j=0; j<m_Hidden.size();++j) { delete m_Hidden[j]; } - Kdesvnsettings::setCommit_hide_new(m_HideNewItems->state()==QButton::On); + Kdesvnsettings::setCommit_hide_new(m_HideNewItems->state()==TQButton::On); } void Logmsg_impl::checkSplitterSize() { - QValueList<int> list = Kdesvnsettings::commit_splitter_height(); + TQValueList<int> list = Kdesvnsettings::commit_splitter_height(); if (list.count()!=2) { return; } @@ -191,7 +191,7 @@ void Logmsg_impl::slotHistoryActivated(int number) /*! \fn Logmsg_impl::getMessage()const */ -QString Logmsg_impl::getMessage()const +TQString Logmsg_impl::getMessage()const { return m_LogEdit->text(); } @@ -222,22 +222,22 @@ void Logmsg_impl::initHistory() if (smax_message_history==0xFFFF) { smax_message_history = Kdesvnsettings::max_log_messages(); KConfigGroup cs(Kdesvnsettings::self()->config(),"log_messages"); - QString s = QString::null; + TQString s = TQString(); unsigned int current = 0; - QString key = QString("log_%0").arg(current); - s = cs.readEntry(key,QString::null); - while (s!=QString::null) { + TQString key = TQString("log_%0").tqarg(current); + s = cs.readEntry(key,TQString()); + while (s!=TQString()) { if (current<smax_message_history) { sLogHistory.push_back(s); } else { cs.deleteEntry(key); } ++current; - key = QString("log_%0").arg(current); - s = cs.readEntry(key,QString::null); + key = TQString("log_%0").tqarg(current); + s = cs.readEntry(key,TQString()); } } - QValueList<QString>::const_iterator it; + TQValueList<TQString>::const_iterator it; for (it=sLogHistory.begin();it!=sLogHistory.end();++it) { if ((*it).length()<=40) { m_LogHistory->insertItem((*it)); @@ -247,7 +247,7 @@ void Logmsg_impl::initHistory() } if (sLastMessage.length()>0) { m_LogEdit->setText(sLastMessage); - sLastMessage=QString(); + sLastMessage=TQString(); } } @@ -260,8 +260,8 @@ void Logmsg_impl::saveHistory(bool canceld) if (m_LogEdit->text().length()==0||m_LogEdit->text().length()>512) return; /// @todo make static threadsafe if (!canceld) { - QValueList<QString>::iterator it; - if ( (it=sLogHistory.find(m_LogEdit->text()))!=sLogHistory.end()) { + TQValueList<TQString>::iterator it; + if ( (it=sLogHistory.tqfind(m_LogEdit->text()))!=sLogHistory.end()) { sLogHistory.erase(it); } sLogHistory.push_front(m_LogEdit->text()); @@ -270,7 +270,7 @@ void Logmsg_impl::saveHistory(bool canceld) } KConfigGroup cs(Kdesvnsettings::self()->config(),"log_messages"); for (unsigned int i = 0; i < sLogHistory.size();++i) { - cs.writeEntry(QString("log_%0").arg(i),sLogHistory[i]); + cs.writeEntry(TQString("log_%0").tqarg(i),sLogHistory[i]); } cs.sync(); } else { @@ -278,17 +278,17 @@ void Logmsg_impl::saveHistory(bool canceld) } } -QString Logmsg_impl::getLogmessage(bool*ok,svn::Depth*rec,bool*keep_locks,QWidget*parent,const char*name) +TQString Logmsg_impl::getLogmessage(bool*ok,svn::Depth*rec,bool*keep_locks,TQWidget*tqparent,const char*name) { bool _ok,_keep_locks; svn::Depth _depth = svn::DepthUnknown; - QString msg(""); + TQString msg(""); Logmsg_impl*ptr=0; - KDialogBase dlg(parent,name,true,i18n("Commit log"), + KDialogBase dlg(tqparent,name,true,i18n("Commit log"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,true); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); ptr = new Logmsg_impl(Dialog1Layout); if (!rec) { @@ -299,7 +299,7 @@ QString Logmsg_impl::getLogmessage(bool*ok,svn::Depth*rec,bool*keep_locks,QWidge } ptr->initHistory(); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),groupName)); - if (dlg.exec()!=QDialog::Accepted) { + if (dlg.exec()!=TQDialog::Accepted) { _ok = false; /* avoid compiler warnings */ _keep_locks = false; @@ -317,17 +317,17 @@ QString Logmsg_impl::getLogmessage(bool*ok,svn::Depth*rec,bool*keep_locks,QWidge return msg; } -QString Logmsg_impl::getLogmessage(const svn::CommitItemList&items,bool*ok,svn::Depth*rec,bool*keep_locks,QWidget*parent,const char*name) +TQString Logmsg_impl::getLogmessage(const svn::CommitItemList&items,bool*ok,svn::Depth*rec,bool*keep_locks,TQWidget*tqparent,const char*name) { bool _ok,_keep_locks; svn::Depth _depth = svn::DepthUnknown; - QString msg(""); + TQString msg(""); Logmsg_impl*ptr=0; - KDialogBase dlg(parent,name,true,i18n("Commit log"), + KDialogBase dlg(tqparent,name,true,i18n("Commit log"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,true); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); ptr = new Logmsg_impl(items,Dialog1Layout); if (!rec) { @@ -339,7 +339,7 @@ QString Logmsg_impl::getLogmessage(const svn::CommitItemList&items,bool*ok,svn:: ptr->initHistory(); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),groupName)); - if (dlg.exec()!=QDialog::Accepted) { + if (dlg.exec()!=TQDialog::Accepted) { _ok = false; /* avoid compiler warnings */ _keep_locks = false; @@ -358,18 +358,18 @@ QString Logmsg_impl::getLogmessage(const svn::CommitItemList&items,bool*ok,svn:: return msg; } -QString Logmsg_impl::getLogmessage(const QMap<QString,QString>&items, - bool*ok,svn::Depth*rec,bool*keep_locks,QWidget*parent,const char*name) +TQString Logmsg_impl::getLogmessage(const TQMap<TQString,TQString>&items, + bool*ok,svn::Depth*rec,bool*keep_locks,TQWidget*tqparent,const char*name) { bool _ok,_rec,_keep_locks; svn::Depth _depth = svn::DepthUnknown; - QString msg(""); + TQString msg(""); Logmsg_impl*ptr=0; - KDialogBase dlg(parent,name,true,i18n("Commit log"), + KDialogBase dlg(tqparent,name,true,i18n("Commit log"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,true); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); ptr = new Logmsg_impl(items,Dialog1Layout); if (!rec) { @@ -380,7 +380,7 @@ QString Logmsg_impl::getLogmessage(const QMap<QString,QString>&items, } ptr->initHistory(); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),groupName)); - if (dlg.exec()!=QDialog::Accepted) { + if (dlg.exec()!=TQDialog::Accepted) { _ok = false; /* avoid compiler warnings */ _rec = false; @@ -400,20 +400,20 @@ QString Logmsg_impl::getLogmessage(const QMap<QString,QString>&items, return msg; } -QString Logmsg_impl::getLogmessage(const logActionEntries&_on, +TQString Logmsg_impl::getLogmessage(const logActionEntries&_on, const logActionEntries&_off, - QObject*callback, + TQObject*callback, logActionEntries&_result, - bool*ok,bool*keep_locks,QWidget*parent,const char*name) + bool*ok,bool*keep_locks,TQWidget*tqparent,const char*name) { bool _ok,_keep_locks; - QString msg(""); + TQString msg(""); Logmsg_impl*ptr=0; - KDialogBase dlg(parent,name,true,i18n("Commit log"), + KDialogBase dlg(tqparent,name,true,i18n("Commit log"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,true); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); ptr = new Logmsg_impl(_on,_off,Dialog1Layout); ptr->m_DepthSelector->hide(); if (!keep_locks) { @@ -422,11 +422,11 @@ QString Logmsg_impl::getLogmessage(const logActionEntries&_on, ptr->initHistory(); if (callback) { - connect(ptr,SIGNAL(makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)), - callback,SLOT(makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*))); + connect(ptr,TQT_SIGNAL(makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)), + callback,TQT_SLOT(makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*))); } dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),groupName)); - if (dlg.exec()!=QDialog::Accepted) { + if (dlg.exec()!=TQDialog::Accepted) { _ok = false; /* avoid compiler warnings */ _keep_locks=false; @@ -444,23 +444,23 @@ QString Logmsg_impl::getLogmessage(const logActionEntries&_on, } /*! - \fn Logmsg_impl::setRecCheckboxtext(const QString&what) + \fn Logmsg_impl::setRecCheckboxtext(const TQString&what) */ -void Logmsg_impl::addItemWidget(QWidget*aWidget) +void Logmsg_impl::addItemWidget(TQWidget*aWidget) { m_DepthSelector->addItemWidget(aWidget); -/* aWidget->reparent(this,geometry().topLeft()); +/* aWidget->reparent(this,tqgeometry().topLeft()); m_ItemsLayout->addWidget(aWidget); - kdDebug()<<"SizeHint: "<<aWidget->minimumSizeHint()<< endl; - aWidget->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); - setMinimumHeight(minimumSizeHint().height());*/ + kdDebug()<<"SizeHint: "<<aWidget->tqminimumSizeHint()<< endl; + aWidget->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed); + setMinimumHeight(tqminimumSizeHint().height());*/ } Logmsg_impl::logActionEntries Logmsg_impl::selectedEntries() { logActionEntries _result; if (m_ReviewList) { - QListViewItemIterator it( m_ReviewList ); + TQListViewItemIterator it( m_ReviewList ); while ( it.current() ) { if (it.current()->rtti()==1000) { SvnCheckListItem *item = static_cast<SvnCheckListItem*>(it.current()); @@ -474,7 +474,7 @@ Logmsg_impl::logActionEntries Logmsg_impl::selectedEntries() return _result; } -Logmsg_impl::logActionEntry::logActionEntry(const QString&name,const QString&action,ACTION_TYPE kind) +Logmsg_impl::logActionEntry::logActionEntry(const TQString&name,const TQString&action,ACTION_TYPE kind) : _name(name),_actionDesc(action),_kind(kind) { } @@ -484,8 +484,8 @@ Logmsg_impl::logActionEntry::logActionEntry() { } -SvnCheckListItem::SvnCheckListItem(QListView*parent,const Logmsg_impl::logActionEntry&content) - :QCheckListItem(parent,content._name,QCheckListItem::CheckBox),m_Content(content) +SvnCheckListItem::SvnCheckListItem(TQListView*tqparent,const Logmsg_impl::logActionEntry&content) + :TQCheckListItem(tqparent,content._name,TQCheckListItem::CheckBox),m_Content(content) { setTristate(FALSE); setText(1,m_Content._actionDesc); @@ -494,10 +494,10 @@ SvnCheckListItem::SvnCheckListItem(QListView*parent,const Logmsg_impl::logAction } } -int SvnCheckListItem::compare( QListViewItem* item, int col, bool ascending ) const +int SvnCheckListItem::compare( TQListViewItem* item, int col, bool ascending ) const { if (item->rtti()!=1000 || col>0) { - return QCheckListItem::compare(item,col,ascending); + return TQCheckListItem::compare(item,col,ascending); } SvnCheckListItem* k = static_cast<SvnCheckListItem*>( item ); if (Kdesvnsettings::case_sensitive_sort()) { @@ -522,7 +522,7 @@ void Logmsg_impl::slotMarkUnversioned() void Logmsg_impl::slotDiffSelected() { - QListViewItem * it=0; + TQListViewItem * it=0; if (!m_ReviewList || !(it=m_ReviewList->selectedItem())) { return; @@ -530,8 +530,8 @@ void Logmsg_impl::slotDiffSelected() if (it->rtti()==1000) { SvnCheckListItem *item = static_cast<SvnCheckListItem*>(it); - QString what = item->data()._name; - emit makeDiff(what,svn::Revision::BASE,what,svn::Revision::WORKING,parentWidget()); + TQString what = item->data()._name; + emit makeDiff(what,svn::Revision::BASE,what,svn::Revision::WORKING,tqparentWidget()); } } @@ -560,7 +560,7 @@ void Logmsg_impl::hideButtons(bool how) void Logmsg_impl::markUnversioned(bool mark) { if (!m_ReviewList)return; - QListViewItemIterator it( m_ReviewList ); + TQListViewItemIterator it( m_ReviewList ); while ( it.current() ) { if (it.current()->rtti()==1000) { SvnCheckListItem *item = static_cast<SvnCheckListItem*>(it.current()); @@ -577,7 +577,7 @@ void Logmsg_impl::hideNewItems(bool how) if (!m_ReviewList)return; if (how) { - QListViewItemIterator it( m_ReviewList ); + TQListViewItemIterator it( m_ReviewList ); while ( it.current() ) { if (it.current()->rtti()==1000) { SvnCheckListItem *item = static_cast<SvnCheckListItem*>(it.current()); @@ -609,12 +609,12 @@ void Logmsg_impl::hideDepth(bool ahide) // else m_DepthSelector->show(); } -void Logmsg_impl::insertFile(const QString&fname) +void Logmsg_impl::insertFile(const TQString&fname) { - QFile ifs(fname); + TQFile ifs(fname); if (ifs.open(IO_ReadOnly)) { - QTextStream ts(&ifs); - QString _content = ts.read(); + TQTextStream ts(&ifs); + TQString _content = ts.read(); int para,index; m_LogEdit->getCursorPosition(¶,&index); m_LogEdit->insertAt(_content,para,index); @@ -623,14 +623,14 @@ void Logmsg_impl::insertFile(const QString&fname) void Logmsg_impl::insertFile() { - QString head = i18n("Select textfile for insert"); - KURLRequesterDlg dlg(QString::null,this,head); + TQString head = i18n("Select textfile for insert"); + KURLRequesterDlg dlg(TQString(),this,head); dlg.setCaption(head); KFile::Mode mode = static_cast<KFile::Mode>(KFile::File); dlg.urlRequester()->setMode(mode); dlg.urlRequester()->setCaption(head); - if (dlg.exec()!=QDialog::Accepted) { + if (dlg.exec()!=TQDialog::Accepted) { return; } KURL _url = dlg.selectedURL(); @@ -640,7 +640,7 @@ void Logmsg_impl::insertFile() if (_url.isLocalFile()) { insertFile(_url.path()); } else { - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download(_url, tmpFile, this) ) { insertFile( tmpFile ); KIO::NetAccess::removeTempFile( tmpFile ); diff --git a/src/ksvnwidgets/logmsg_impl.h b/src/ksvnwidgets/logmsg_impl.h index 5d41ccf..30d11cd 100644 --- a/src/ksvnwidgets/logmsg_impl.h +++ b/src/ksvnwidgets/logmsg_impl.h @@ -22,15 +22,16 @@ #include "src/ksvnwidgets/logmessage.h" #include "src/svnqt/commititem.hpp" -#include <qvaluelist.h> -#include <qpair.h> +#include <tqvaluelist.h> +#include <tqpair.h> class Logmsg_impl: public LogmessageData { Q_OBJECT + TQ_OBJECT public: struct logActionEntry { - QString _name; - QString _actionDesc; + TQString _name; + TQString _actionDesc; enum ACTION_TYPE{ COMMIT=0, @@ -39,36 +40,36 @@ public: MISSING_DELETE=3 }; ACTION_TYPE _kind; - logActionEntry(const QString&,const QString&,ACTION_TYPE kind = COMMIT); + logActionEntry(const TQString&,const TQString&,ACTION_TYPE kind = COMMIT); logActionEntry(); }; - typedef QValueList<logActionEntry> logActionEntries; + typedef TQValueList<logActionEntry> logActionEntries; - Logmsg_impl(QWidget *parent = 0, const char *name = 0); - Logmsg_impl(const svn::CommitItemList&_items,QWidget *parent=0, const char *name=0); - Logmsg_impl(const QMap<QString,QString>&_items,QWidget *parent=0, const char *name=0); + Logmsg_impl(TQWidget *tqparent = 0, const char *name = 0); + Logmsg_impl(const svn::CommitItemList&_items,TQWidget *tqparent=0, const char *name=0); + Logmsg_impl(const TQMap<TQString,TQString>&_items,TQWidget *tqparent=0, const char *name=0); Logmsg_impl(const logActionEntries&, const logActionEntries&, - QWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); virtual ~Logmsg_impl(); - QString getMessage()const; + TQString getMessage()const; bool isKeeplocks()const; void initHistory(); void saveHistory(bool canceld); - static QString getLogmessage(bool*ok,svn::Depth*rec,bool*keeps_locks,QWidget*parent=0,const char*name=0); - static QString getLogmessage(const svn::CommitItemList&,bool*ok,svn::Depth*rec,bool*keep_locks,QWidget*parent=0,const char*name=0); - static QString getLogmessage(const QMap<QString,QString>&,bool*ok,svn::Depth*rec,bool*keep_locks,QWidget*parent=0,const char*name=0); + static TQString getLogmessage(bool*ok,svn::Depth*rec,bool*keeps_locks,TQWidget*tqparent=0,const char*name=0); + static TQString getLogmessage(const svn::CommitItemList&,bool*ok,svn::Depth*rec,bool*keep_locks,TQWidget*tqparent=0,const char*name=0); + static TQString getLogmessage(const TQMap<TQString,TQString>&,bool*ok,svn::Depth*rec,bool*keep_locks,TQWidget*tqparent=0,const char*name=0); - static QString getLogmessage(const logActionEntries&, + static TQString getLogmessage(const logActionEntries&, const logActionEntries&, - QObject*callback, + TQObject*callback, logActionEntries&, - bool*ok,bool*keep_locks,QWidget*parent=0,const char*name=0); + bool*ok,bool*keep_locks,TQWidget*tqparent=0,const char*name=0); - void addItemWidget(QWidget*); + void addItemWidget(TQWidget*); svn::Depth getDepth()const; @@ -84,19 +85,19 @@ protected slots: virtual void insertFile(); protected: - static QValueList<QString> sLogHistory; - QValueList<QListViewItem*> m_Hidden; - static const QString groupName; - static QString sLastMessage; + static TQValueList<TQString> sLogHistory; + TQValueList<TQListViewItem*> m_Hidden; + static const TQString groupName; + static TQString sLastMessage; static unsigned int smax_message_history; bool m_hidden; void hideButtons(bool); void markUnversioned(bool mark); void checkSplitterSize(); - virtual void insertFile(const QString&); + virtual void insertFile(const TQString&); signals: - void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); + void makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); }; #endif diff --git a/src/ksvnwidgets/pwstorage.cpp b/src/ksvnwidgets/pwstorage.cpp index c239b5a..492e6f6 100644 --- a/src/ksvnwidgets/pwstorage.cpp +++ b/src/ksvnwidgets/pwstorage.cpp @@ -25,9 +25,9 @@ #include <kwin.h> #include <kapp.h> -#include <qthread.h> -#include <qmap.h> -#include <qpair.h> +#include <tqthread.h> +#include <tqmap.h> +#include <tqpair.h> class PwStorageData { @@ -45,21 +45,21 @@ public: KWallet::Wallet*getWallet(); - typedef QPair<QString,QString> userpw_type; - typedef QMap<QString, userpw_type> cache_type; + typedef TQPair<TQString,TQString> userpw_type; + typedef TQMap<TQString, userpw_type> cache_type; cache_type*getLoginCache(); - QMutex*getCacheMutex(); + TQMutex*getCacheMutex(); protected: KWallet::Wallet* m_Wallet; }; -QMutex*PwStorageData::getCacheMutex() +TQMutex*PwStorageData::getCacheMutex() { - static QMutex _mutex; + static TQMutex _mutex; return &_mutex; } @@ -78,8 +78,8 @@ KWallet::Wallet*PwStorageData::getWallet() if (KWallet::Wallet::isEnabled()) { WId window = 0; - if ( qApp->activeWindow() ) { - window = qApp->activeWindow()->winId(); + if ( tqApp->activeWindow() ) { + window = tqApp->activeWindow()->winId(); } delete m_Wallet; m_Wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(),window); @@ -108,7 +108,7 @@ PwStorage*PwStorage::self() \fn PwStorage::PwStorageData() */ PwStorage::PwStorage() - :QObject() + :TQObject() { mData = new PwStorageData; } @@ -131,9 +131,9 @@ bool PwStorage::connectWallet() } /*! - \fn PwStorage::getCertPw(const QString&realm,QString&pw) + \fn PwStorage::getCertPw(const TQString&realm,TQString&pw) */ -bool PwStorage::getCertPw(const QString&realm,QString&pw) +bool PwStorage::getCertPw(const TQString&realm,TQString&pw) { if (!mData->getWallet()) { return false; @@ -143,16 +143,16 @@ bool PwStorage::getCertPw(const QString&realm,QString&pw) /*! - \fn PwStorage::getLogin(const QString&realm,QString&user,QString&pw) + \fn PwStorage::getLogin(const TQString&realm,TQString&user,TQString&pw) */ -bool PwStorage::getLogin(const QString&realm,QString&user,QString&pw) +bool PwStorage::getLogin(const TQString&realm,TQString&user,TQString&pw) { if (!mData->getWallet()) { return false; } - QMap<QString,QString> content; + TQMap<TQString,TQString> content; int j = mData->getWallet()->readMap(realm,content); - if (j!=0||content.find("user")==content.end()) { + if (j!=0||content.tqfind("user")==content.end()) { return true; } user = content["user"]; @@ -160,10 +160,10 @@ bool PwStorage::getLogin(const QString&realm,QString&user,QString&pw) return true; } -bool PwStorage::getCachedLogin(const QString&realm,QString&user,QString&pw) +bool PwStorage::getCachedLogin(const TQString&realm,TQString&user,TQString&pw) { - QMutexLocker lc(mData->getCacheMutex()); - PwStorageData::cache_type::ConstIterator it = mData->getLoginCache()->find(realm); + TQMutexLocker lc(mData->getCacheMutex()); + PwStorageData::cache_type::ConstIterator it = mData->getLoginCache()->tqfind(realm); if (it!=mData->getLoginCache()->end()) { user=(*it).first; pw = (*it).second; @@ -172,9 +172,9 @@ bool PwStorage::getCachedLogin(const QString&realm,QString&user,QString&pw) } /*! - \fn PwStorage::setCertPw(const QString&realm, const QString&pw) + \fn PwStorage::setCertPw(const TQString&realm, const TQString&pw) */ -bool PwStorage::setCertPw(const QString&realm, const QString&pw) +bool PwStorage::setCertPw(const TQString&realm, const TQString&pw) { if (!mData->getWallet()) { return false; @@ -184,22 +184,22 @@ bool PwStorage::setCertPw(const QString&realm, const QString&pw) /*! - \fn PwStorage::setLogin(const QString&realm,const QString&user,const QString&pw) + \fn PwStorage::setLogin(const TQString&realm,const TQString&user,const TQString&pw) */ -bool PwStorage::setLogin(const QString&realm,const QString&user,const QString&pw) +bool PwStorage::setLogin(const TQString&realm,const TQString&user,const TQString&pw) { if (!mData->getWallet()) { return false; } - QMap<QString,QString> content; + TQMap<TQString,TQString> content; content["user"]=user; content["password"]=pw; return (mData->getWallet()->writeMap(realm,content)==0); } -bool PwStorage::setCachedLogin(const QString&realm,const QString&user,const QString&pw) +bool PwStorage::setCachedLogin(const TQString&realm,const TQString&user,const TQString&pw) { - QMutexLocker lc(mData->getCacheMutex()); + TQMutexLocker lc(mData->getCacheMutex()); PwStorageData::cache_type*_Cache = mData->getLoginCache(); (*_Cache)[realm]=PwStorageData::userpw_type(user,pw); return true; diff --git a/src/ksvnwidgets/pwstorage.h b/src/ksvnwidgets/pwstorage.h index 93e9680..821005e 100644 --- a/src/ksvnwidgets/pwstorage.h +++ b/src/ksvnwidgets/pwstorage.h @@ -20,26 +20,27 @@ #ifndef _PWSTORAGE_H #define _PWSTORAGE_H -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> class PwStorageData; /** Access to wallet isn't threadsafe 'cause wallet has not to be called from within threads! */ -class PwStorage:public QObject +class PwStorage:public TQObject { Q_OBJECT + TQ_OBJECT protected: PwStorageData* mData; public: - bool getCertPw(const QString&realm,QString&pw); - bool getLogin(const QString&realm,QString&user,QString&pw); - bool getCachedLogin(const QString&realm,QString&user,QString&pw); - bool setCertPw(const QString&realm, const QString&pw); - bool setLogin(const QString&realm,const QString&user,const QString&pw); - bool setCachedLogin(const QString&realm,const QString&user,const QString&pw); + bool getCertPw(const TQString&realm,TQString&pw); + bool getLogin(const TQString&realm,TQString&user,TQString&pw); + bool getCachedLogin(const TQString&realm,TQString&user,TQString&pw); + bool setCertPw(const TQString&realm, const TQString&pw); + bool setLogin(const TQString&realm,const TQString&user,const TQString&pw); + bool setCachedLogin(const TQString&realm,const TQString&user,const TQString&pw); bool connectWallet(); static PwStorage*self(); diff --git a/src/ksvnwidgets/revertform.ui b/src/ksvnwidgets/revertform.ui index 37ee867..e28dcb4 100644 --- a/src/ksvnwidgets/revertform.ui +++ b/src/ksvnwidgets/revertform.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>RevertForm</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RevertForm</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>20</height> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_headLine</cstring> </property> @@ -41,7 +41,7 @@ <string>Really revert these entries to pristine state?</string> </property> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>m_ItemsList</cstring> </property> @@ -50,7 +50,7 @@ <property name="name"> <cstring>m_DepthSelect</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>20</height> @@ -82,7 +82,7 @@ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>src/ksvnwidgets/depthselector.h</includehint> </includehints> diff --git a/src/ksvnwidgets/revertform_impl.cpp b/src/ksvnwidgets/revertform_impl.cpp index 8dada74..19a8a18 100644 --- a/src/ksvnwidgets/revertform_impl.cpp +++ b/src/ksvnwidgets/revertform_impl.cpp @@ -20,16 +20,16 @@ #include "revertform_impl.h" #include "depthselector.h" -#include <qstringlist.h> -#include <qlistbox.h> +#include <tqstringlist.h> +#include <tqlistbox.h> /*! - \fn RevertFormImpl::RevertFormImpl(QWidget*parent,const char*name) + \fn RevertFormImpl::RevertFormImpl(TQWidget*tqparent,const char*name) */ - RevertFormImpl::RevertFormImpl(QWidget*parent,const char*name) - :RevertForm(parent,name) + RevertFormImpl::RevertFormImpl(TQWidget*tqparent,const char*name) + :RevertForm(tqparent,name) { - setMinimumSize(minimumSizeHint()); + setMinimumSize(tqminimumSizeHint()); } /*! @@ -47,9 +47,9 @@ svn::Depth RevertFormImpl::getDepth()const /*! - \fn RevertFormImpl::setDispList(const QStringList&_list) + \fn RevertFormImpl::setDispList(const TQStringList&_list) */ -void RevertFormImpl::setDispList(const QStringList&_list) +void RevertFormImpl::setDispList(const TQStringList&_list) { m_ItemsList->insertStringList(_list); } diff --git a/src/ksvnwidgets/revertform_impl.h b/src/ksvnwidgets/revertform_impl.h index 1cf7cd6..52de65e 100644 --- a/src/ksvnwidgets/revertform_impl.h +++ b/src/ksvnwidgets/revertform_impl.h @@ -23,16 +23,17 @@ #include "src/ksvnwidgets/revertform.h" #include "src/svnqt/svnqttypes.hpp" -class QStringList; +class TQStringList; class RevertFormImpl:public RevertForm { Q_OBJECT + TQ_OBJECT public: - RevertFormImpl(QWidget*parent=0,const char*name=0); + RevertFormImpl(TQWidget*tqparent=0,const char*name=0); virtual ~RevertFormImpl(); svn::Depth getDepth()const; - void setDispList(const QStringList&_list); + void setDispList(const TQStringList&_list); }; #endif diff --git a/src/ksvnwidgets/ssltrustprompt.ui b/src/ksvnwidgets/ssltrustprompt.ui index 2cfb488..7e363d0 100644 --- a/src/ksvnwidgets/ssltrustprompt.ui +++ b/src/ksvnwidgets/ssltrustprompt.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SslTrustPrompt</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SslTrustPrompt</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_MainLabel</cstring> </property> @@ -33,7 +33,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="2" margin="2"/> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>ktextbrowser.h</includehint> </includehints> diff --git a/src/ksvnwidgets/ssltrustprompt_impl.cpp b/src/ksvnwidgets/ssltrustprompt_impl.cpp index 795fe66..84b0d15 100644 --- a/src/ksvnwidgets/ssltrustprompt_impl.cpp +++ b/src/ksvnwidgets/ssltrustprompt_impl.cpp @@ -21,9 +21,9 @@ #include "src/settings/kdesvnsettings.h" #include <klocale.h> -#include <qlabel.h> -#include <qtable.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqtable.h> +#include <tqvbox.h> #include <kdebug.h> #include <kglobal.h> #include <kapp.h> @@ -32,19 +32,19 @@ #include <kdialogbase.h> #include <ktextbrowser.h> -SslTrustPrompt_impl::SslTrustPrompt_impl(const QString&host,QWidget *parent, const char *name) - :SslTrustPrompt(parent, name) +SslTrustPrompt_impl::SslTrustPrompt_impl(const TQString&host,TQWidget *tqparent, const char *name) + :SslTrustPrompt(tqparent, name) { m_MainLabel->setText("<p align=\"center\"><b>"+ - i18n("Error validating server certificate for '%1'").arg(host)+ - QString("</b></p>")); + i18n("Error validating server certificate for '%1'").tqarg(host)+ + TQString("</b></p>")); } /*! - \fn SslTrustPrompt_impl::sslTrust(const QString&host,const QString&fingerprint,const QString&validFrom,const QString&validUntil,const QString&issuerName,const QString&realm,bool*ok,bool*saveit) + \fn SslTrustPrompt_impl::sslTrust(const TQString&host,const TQString&fingerprint,const TQString&validFrom,const TQString&validUntil,const TQString&issuerName,const TQString&realm,bool*ok,bool*saveit) */ -bool SslTrustPrompt_impl::sslTrust(const QString&host,const QString&fingerprint,const QString&validFrom,const QString&validUntil,const QString&issuerName,const QString&realm,const QStringList&reasons,bool*ok,bool*saveit) +bool SslTrustPrompt_impl::sslTrust(const TQString&host,const TQString&fingerprint,const TQString&validFrom,const TQString&validUntil,const TQString&issuerName,const TQString&realm,const TQStringList&reasons,bool*ok,bool*saveit) { SslTrustPrompt_impl*ptr=0; KDialogBase dlg(i18n("Trust ssl certificate")); @@ -52,10 +52,10 @@ bool SslTrustPrompt_impl::sslTrust(const QString&host,const QString&fingerprint, dlg.setButtonText(KDialogBase::No,i18n("Accept temporarily")); dlg.setButtonCancel(KGuiItem(i18n("Reject"))); - static QString rb = "<tr><td>"; - static QString rs = "</td><td>"; - static QString re = "</td></tr>"; - QString text = "<html><body>"; + static TQString rb = "<tr><td>"; + static TQString rs = "</td><td>"; + static TQString re = "</td></tr>"; + TQString text = "<html><body>"; if (reasons.count()>0) { text+="<p align=\"center\">"; text+="<h2>"+i18n("Failure reasons")+"</h2><hline>"; @@ -74,7 +74,7 @@ bool SslTrustPrompt_impl::sslTrust(const QString&host,const QString&fingerprint, text+=rb+i18n("Fingerprint")+rs+fingerprint+re; text+="</table></p></body></html>"; - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),"trustssldlg")); ptr = new SslTrustPrompt_impl(host,Dialog1Layout); ptr->m_ContentText->setText(text); diff --git a/src/ksvnwidgets/ssltrustprompt_impl.h b/src/ksvnwidgets/ssltrustprompt_impl.h index 5ea5cd3..5d4d492 100644 --- a/src/ksvnwidgets/ssltrustprompt_impl.h +++ b/src/ksvnwidgets/ssltrustprompt_impl.h @@ -24,9 +24,10 @@ class SslTrustPrompt_impl: public SslTrustPrompt { Q_OBJECT + TQ_OBJECT public: - SslTrustPrompt_impl(const QString&,QWidget *parent = 0, const char *name = 0); - static bool sslTrust(const QString&host,const QString&fingerprint,const QString&validFrom,const QString&validUntil,const QString&issuerName,const QString&realm,const QStringList&reasons,bool*ok,bool*saveit); + SslTrustPrompt_impl(const TQString&,TQWidget *tqparent = 0, const char *name = 0); + static bool sslTrust(const TQString&host,const TQString&fingerprint,const TQString&validFrom,const TQString&validUntil,const TQString&issuerName,const TQString&realm,const TQStringList&reasons,bool*ok,bool*saveit); }; #endif diff --git a/src/main.cpp b/src/main.cpp index cee2ef2..2c4535d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,7 +77,7 @@ int main(int argc, char **argv) } else { - if (QString(args->arg(0))==QString("exec")) { + if (TQString(args->arg(0))==TQString("exec")) { kdDebug()<<"Execute a command" << endl; CommandLine cl(args); return cl.exec(); diff --git a/src/settings/cmdexecsettings.ui b/src/settings/cmdexecsettings.ui index e2b4a4e..dbfa62d 100644 --- a/src/settings/cmdexecsettings.ui +++ b/src/settings/cmdexecsettings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CmdExecSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CmdExecSettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_cmdline_show_logwindow</cstring> </property> @@ -27,15 +27,15 @@ <string>Show a small window containing the log after command executed</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -63,7 +63,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_no_konqueror_contextmenu</cstring> </property> @@ -74,7 +74,7 @@ <string>If set, kdesvn will not show a menu inside "Action" menu of konqueror</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_kio_use_standard_logmsg</cstring> </property> @@ -82,9 +82,9 @@ <string>KIO operations use standard logmessage</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -95,14 +95,14 @@ <cstring>kcfg_kio_standard_logmsg</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>stdLogmsgLabel</cstring> </property> <property name="text"> <string>Standard message:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -118,7 +118,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -143,10 +143,10 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">showLogToggled(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/src/settings/cmdexecsettings_impl.cpp b/src/settings/cmdexecsettings_impl.cpp index 94f4f3d..07fe43d 100644 --- a/src/settings/cmdexecsettings_impl.cpp +++ b/src/settings/cmdexecsettings_impl.cpp @@ -23,11 +23,11 @@ #include <klocale.h> #include <knuminput.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klineedit.h> -CmdExecSettings_impl::CmdExecSettings_impl(QWidget* parent, const char* name, WFlags fl) -: CmdExecSettings(parent,name,fl) +CmdExecSettings_impl::CmdExecSettings_impl(TQWidget* tqparent, const char* name, WFlags fl) +: CmdExecSettings(tqparent,name,fl) { kcfg_cmdline_log_minline->setSpecialValueText(i18n("No minimum")); kcfg_cmdline_log_minline->setEnabled(kcfg_cmdline_show_logwindow->isChecked()); diff --git a/src/settings/cmdexecsettings_impl.h b/src/settings/cmdexecsettings_impl.h index ab1749b..23f2098 100644 --- a/src/settings/cmdexecsettings_impl.h +++ b/src/settings/cmdexecsettings_impl.h @@ -26,9 +26,10 @@ class CmdExecSettings_impl : public CmdExecSettings { Q_OBJECT + TQ_OBJECT public: - CmdExecSettings_impl(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CmdExecSettings_impl(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~CmdExecSettings_impl(); /*$PUBLIC_FUNCTIONS$*/ diff --git a/src/settings/diffmergesettings.ui b/src/settings/diffmergesettings.ui index 07638a0..f97ee72 100644 --- a/src/settings/diffmergesettings.ui +++ b/src/settings/diffmergesettings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DiffMergeSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DiffMergeSettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_diff_ignore_content</cstring> </property> @@ -27,7 +27,7 @@ <string>Diff ignores content type</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_tree_diff_rec</cstring> </property> @@ -35,7 +35,7 @@ <string>Diff in revisiontree is recursive</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_diff_ignore_spaces</cstring> </property> @@ -43,7 +43,7 @@ <string>Diff ignores white space changes</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_diff_ignore_all_white_spaces</cstring> </property> @@ -51,7 +51,7 @@ <string>Diff ignores all white spaces</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_use_external_diff</cstring> </property> @@ -62,7 +62,7 @@ <string>If kdesvn should use an external diff display and/or generator. If not checked use internal display.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_extern_merge_default</cstring> </property> @@ -73,52 +73,52 @@ <string>Set if merge with external program is prefered and not subversions merge</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_extern_hint</cstring> </property> <property name="text"> <string>see "Whats this" for details</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>resolveLabel</cstring> </property> <property name="text"> <string>Conflict resolver program:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>External merge program:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -149,14 +149,14 @@ Default: <tt>kdiff3 %o %m %n -o %t</tt> </p></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>mdiff_display_label</cstring> </property> <property name="text"> <string>External diff display:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -220,7 +220,7 @@ When %1 and %2 is given, kdesvn let this display make the diff. For that it it m <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -239,10 +239,10 @@ When %1 and %2 is given, kdesvn let this display make the diff. For that it it m <slot>diffDispChanged(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">diffDispChanged(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/settings/diffmergesettings_impl.cpp b/src/settings/diffmergesettings_impl.cpp index 91ddab3..bec03b6 100644 --- a/src/settings/diffmergesettings_impl.cpp +++ b/src/settings/diffmergesettings_impl.cpp @@ -20,14 +20,14 @@ #include "diffmergesettings_impl.h" #include "src/settings/kdesvnsettings.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include <klineedit.h> #include <kdebug.h> -DiffMergeSettings_impl::DiffMergeSettings_impl(QWidget *parent, const char *name) - :DiffMergeSettings(parent, name) +DiffMergeSettings_impl::DiffMergeSettings_impl(TQWidget *tqparent, const char *name) + :DiffMergeSettings(tqparent, name) { kcfg_external_diff_display->setEnabled(Kdesvnsettings::use_external_diff()); } diff --git a/src/settings/diffmergesettings_impl.h b/src/settings/diffmergesettings_impl.h index 639e38b..815b4f5 100644 --- a/src/settings/diffmergesettings_impl.h +++ b/src/settings/diffmergesettings_impl.h @@ -24,8 +24,9 @@ class DiffMergeSettings_impl: public DiffMergeSettings { Q_OBJECT + TQ_OBJECT public: - DiffMergeSettings_impl(QWidget *parent = 0, const char *name = 0); + DiffMergeSettings_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~DiffMergeSettings_impl(); protected slots: virtual void diffDispChanged(bool); diff --git a/src/settings/dispcolor_settings.ui b/src/settings/dispcolor_settings.ui index c5118ba..3bf12e2 100644 --- a/src/settings/dispcolor_settings.ui +++ b/src/settings/dispcolor_settings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DispColorSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ColorSettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_colored_state</cstring> </property> @@ -30,9 +30,9 @@ <string></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -65,14 +65,14 @@ <string></string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string>Locked items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -84,47 +84,47 @@ <string></string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> <property name="text"> <string>Not versioned items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string>Remote changed items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Added items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Deleted items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -160,47 +160,47 @@ <string></string> </property> </widget> - <widget class="QLabel" row="8" column="0"> + <widget class="TQLabel" row="8" column="0"> <property name="name"> <cstring>Conflicted_items_label</cstring> </property> <property name="text"> <string>Conflicted items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>Missed_items_label</cstring> </property> <property name="text"> <string>Missed items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>Local changed items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>Need_lock_label_2</cstring> </property> <property name="text"> <string>Item needs lock:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -224,7 +224,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -241,10 +241,10 @@ <slot>coloredStateToggled(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">coloredStateToggled(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/src/settings/dispcolorsettings_impl.cpp b/src/settings/dispcolorsettings_impl.cpp index 1b3ad0c..b81854b 100644 --- a/src/settings/dispcolorsettings_impl.cpp +++ b/src/settings/dispcolorsettings_impl.cpp @@ -19,10 +19,10 @@ ***************************************************************************/ #include "dispcolorsettings_impl.h" #include <kcolorbutton.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -DispColorSettings_impl::DispColorSettings_impl(QWidget *parent, const char *name) - :DispColorSettings(parent, name) +DispColorSettings_impl::DispColorSettings_impl(TQWidget *tqparent, const char *name) + :DispColorSettings(tqparent, name) { coloredStateToggled(kcfg_colored_state->isChecked()); } diff --git a/src/settings/dispcolorsettings_impl.h b/src/settings/dispcolorsettings_impl.h index 56e0edd..62dd36f 100644 --- a/src/settings/dispcolorsettings_impl.h +++ b/src/settings/dispcolorsettings_impl.h @@ -24,8 +24,9 @@ class DispColorSettings_impl: public DispColorSettings { Q_OBJECT + TQ_OBJECT public: - DispColorSettings_impl(QWidget *parent = 0, const char *name = 0); + DispColorSettings_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~DispColorSettings_impl(); protected slots: virtual void coloredStateToggled(bool); diff --git a/src/settings/display_settings.ui b/src/settings/display_settings.ui index f3dfe98..681ddf1 100644 --- a/src/settings/display_settings.ui +++ b/src/settings/display_settings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DisplaySettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DisplaySettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,15 +19,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_ListIconsSize_label</cstring> </property> @@ -51,7 +51,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_display_file_tips</cstring> </property> @@ -62,7 +62,7 @@ <string>Here you can control if, when moving the mouse over a file, you want to see a small popup window with additional information about that file</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_display_previews_in_file_tips</cstring> </property> @@ -73,7 +73,7 @@ <string>Here you can control if you want the popup window to contain a larger preview for the file, when moving the mouse over it</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_display_overlays</cstring> </property> @@ -90,7 +90,7 @@ see which items has newer items in repository you may have to set "Check for upd </p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_case_sensitive_sort</cstring> </property> @@ -98,7 +98,7 @@ see which items has newer items in repository you may have to set "Check for upd <string>Items sortorder is case sensitive</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_display_ignored_files</cstring> </property> @@ -109,7 +109,7 @@ see which items has newer items in repository you may have to set "Check for upd <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_start_log_cache_on_open</cstring> </property> @@ -125,15 +125,15 @@ see which items has newer items in repository you may have to set "Check for upd If networking is disabled, then this flag is ignored.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2_2</cstring> + <cstring>tqlayout2_2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_display_label</cstring> </property> @@ -158,15 +158,15 @@ When kde-default is wanted for opening on double click, enter &quot;default& </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_MaxLogLabel</cstring> </property> @@ -187,7 +187,7 @@ When kde-default is wanted for opening on double click, enter &quot;default& </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_colored_blame</cstring> </property> @@ -205,7 +205,7 @@ When kde-default is wanted for opening on double click, enter &quot;default& <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -230,11 +230,11 @@ When kde-default is wanted for opening on double click, enter &quot;default& <slot>diffDispChanged()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">diffDispChanged()</slot> <slot access="protected">dispFileInfotoggled(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/settings/displaysettings_impl.cpp b/src/settings/displaysettings_impl.cpp index 3f4e79c..e50a484 100644 --- a/src/settings/displaysettings_impl.cpp +++ b/src/settings/displaysettings_impl.cpp @@ -20,14 +20,14 @@ #include "displaysettings_impl.h" #include "src/settings/kdesvnsettings.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include <klineedit.h> #include <kdebug.h> -DisplaySettings_impl::DisplaySettings_impl(QWidget *parent, const char *name) - :DisplaySettings(parent, name) +DisplaySettings_impl::DisplaySettings_impl(TQWidget *tqparent, const char *name) + :DisplaySettings(tqparent, name) { kcfg_display_previews_in_file_tips->setEnabled(kcfg_display_file_tips->isChecked()); } diff --git a/src/settings/displaysettings_impl.h b/src/settings/displaysettings_impl.h index 944333e..947c007 100644 --- a/src/settings/displaysettings_impl.h +++ b/src/settings/displaysettings_impl.h @@ -24,8 +24,9 @@ class DisplaySettings_impl: public DisplaySettings { Q_OBJECT + TQ_OBJECT public: - DisplaySettings_impl(QWidget *parent = 0, const char *name = 0); + DisplaySettings_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~DisplaySettings_impl(); protected slots: virtual void dispFileInfotoggled(bool); diff --git a/src/settings/kdesvn_part.kcfg b/src/settings/kdesvn_part.kcfg index 382ddde..59290ac 100644 --- a/src/settings/kdesvn_part.kcfg +++ b/src/settings/kdesvn_part.kcfg @@ -1,7 +1,7 @@ <!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd"> <kcfg> <kcfgfile name="kdesvnpartrc" /> - <include>qstring.h</include> + <include>tqstring.h</include> <group name="general_items" > <entry key="case_sensitive_sort" type="Bool" > <label>Set if items sortorder should be case sensitive or not</label> diff --git a/src/settings/revisiontree_settings.ui b/src/settings/revisiontree_settings.ui index 2d9133e..f95b337 100644 --- a/src/settings/revisiontree_settings.ui +++ b/src/settings/revisiontree_settings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>RevisiontreeSettingsDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RevisionTreeSettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_tree_direction</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_LeftRight</cstring> </property> @@ -38,7 +38,7 @@ <string>Left to right</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_BottomTop</cstring> </property> @@ -46,7 +46,7 @@ <string>Bottom to top</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_RightLeft</cstring> </property> @@ -54,7 +54,7 @@ <string>Right to left</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_Topbottom</cstring> </property> @@ -64,22 +64,22 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_AddColorLabel</cstring> </property> <property name="text"> <string>Color for added items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -93,22 +93,22 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>Color for deleted items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -122,22 +122,22 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string>Color for copied items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -151,22 +151,22 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Color for renamed items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -180,22 +180,22 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string>Color for modified items:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -219,7 +219,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -236,7 +236,7 @@ <tabstop>m_Topbottom</tabstop> <tabstop>m_BottomTop</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/src/settings/revisiontreesettingsdlg_impl.cpp b/src/settings/revisiontreesettingsdlg_impl.cpp index 0cad80f..6b5256f 100644 --- a/src/settings/revisiontreesettingsdlg_impl.cpp +++ b/src/settings/revisiontreesettingsdlg_impl.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "src/settings/revisiontreesettingsdlg_impl.h" -RevisiontreeSettingsDlg_impl::RevisiontreeSettingsDlg_impl(QWidget *parent, const char *name) - :RevisiontreeSettingsDlg(parent, name) +RevisiontreeSettingsDlg_impl::RevisiontreeSettingsDlg_impl(TQWidget *tqparent, const char *name) + :RevisiontreeSettingsDlg(tqparent, name) { } diff --git a/src/settings/revisiontreesettingsdlg_impl.h b/src/settings/revisiontreesettingsdlg_impl.h index cc17b72..63f021b 100644 --- a/src/settings/revisiontreesettingsdlg_impl.h +++ b/src/settings/revisiontreesettingsdlg_impl.h @@ -25,8 +25,9 @@ class RevisiontreeSettingsDlg_impl: public RevisiontreeSettingsDlg { Q_OBJECT + TQ_OBJECT public: - RevisiontreeSettingsDlg_impl(QWidget *parent = 0, const char *name = 0); + RevisiontreeSettingsDlg_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~RevisiontreeSettingsDlg_impl(); }; diff --git a/src/settings/subversion_settings.ui b/src/settings/subversion_settings.ui index 9d86625..466cc3c 100644 --- a/src/settings/subversion_settings.ui +++ b/src/settings/subversion_settings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SubversionSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SubversionSettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_start_updates_check_on_open</cstring> </property> @@ -33,7 +33,7 @@ <string>Select if kdesvn should check for updates when open a working copy</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_log_cache_on_open</cstring> </property> @@ -44,7 +44,7 @@ <string>Start refresh the logcache for repository when networking enabled</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_check_needslock</cstring> </property> @@ -58,7 +58,7 @@ <string>When listing on working copies kdesvn may check for <tt>svn:needs-lock</tt> property.<br>But due this listings/updating on folders containing lot of items may get slow. So you should only switch on if you have repositories containing lot of such entries.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_details_on_remote_listing</cstring> </property> @@ -77,7 +77,7 @@ <p align="left"><i>Be careful: This may let listings REAL slow!</i></p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_info_recursive</cstring> </property> @@ -88,7 +88,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_properties_on_remote_items</cstring> </property> @@ -106,7 +106,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get real slow. So if you have slow network connections or when browsing hangs often you should deactivate it.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_store_passwords</cstring> </property> @@ -123,7 +123,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <string>Storing passwords is often a security problem. Kdesvn itself doesn't store any passwords, but the subversion itself inside the configuration area of subversion. If this area is readable from others you should not set it, but you may select for single non critical accounts inside the authentication dialog.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_passwords_in_wallet</cstring> </property> @@ -142,7 +142,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <p>If you're HOME storage eg. subversions configfolder is on a network drive you should hard think about not storing passwords in a plain text file like subversion does but put it into an encrypted storage like kde wallet or don't save passwords.</p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_use_password_cache</cstring> </property> @@ -153,7 +153,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <string>Use an internal password cache</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_log_follows_nodes</cstring> </property> @@ -164,7 +164,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_log_always_list_changed_files</cstring> </property> @@ -181,7 +181,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <string>Reading lists of changed files may sometimes a little bit slow down things. But if this feature is switched off, kdesvn may fail generating differences between nodechanges from within the logviewer.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_review_commit</cstring> </property> @@ -195,7 +195,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <string>List items next commit will send or not</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_commit_hide_new</cstring> </property> @@ -230,7 +230,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -241,7 +241,7 @@ On networked repositories (eg., not opened via file:// protocol) this may get re </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/src/settings/subversionsettings_impl.cpp b/src/settings/subversionsettings_impl.cpp index aa0e96a..e3536d5 100644 --- a/src/settings/subversionsettings_impl.cpp +++ b/src/settings/subversionsettings_impl.cpp @@ -21,8 +21,8 @@ #include "subversionsettings_impl.h" -SubversionSettings_impl::SubversionSettings_impl(QWidget* parent, const char* name, WFlags fl) -: SubversionSettings(parent,name,fl) +SubversionSettings_impl::SubversionSettings_impl(TQWidget* tqparent, const char* name, WFlags fl) +: SubversionSettings(tqparent,name,fl) { } diff --git a/src/settings/subversionsettings_impl.h b/src/settings/subversionsettings_impl.h index e2c42ec..1a069ea 100644 --- a/src/settings/subversionsettings_impl.h +++ b/src/settings/subversionsettings_impl.h @@ -26,9 +26,10 @@ class SubversionSettings_impl : public SubversionSettings { Q_OBJECT + TQ_OBJECT public: - SubversionSettings_impl(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + SubversionSettings_impl(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~SubversionSettings_impl(); /*$PUBLIC_FUNCTIONS$*/ diff --git a/src/svnfrontend/blamedisplay.ui b/src/svnfrontend/blamedisplay.ui index 3f5a48c..19c3bb2 100644 --- a/src/svnfrontend/blamedisplay.ui +++ b/src/svnfrontend/blamedisplay.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>BlameDisplay</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>BlameDisplay</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -86,22 +86,22 @@ <connections> <connection> <sender>m_BlameList</sender> - <signal>contextMenu(KListView*,QListViewItem*,const QPoint&)</signal> + <signal>contextMenu(KListView*,TQListViewItem*,const QPoint&)</signal> <receiver>BlameDisplay</receiver> - <slot>slotContextMenuRequested(KListView*,QListViewItem*,const QPoint&)</slot> + <slot>slotContextMenuRequested(KListView*,TQListViewItem*,const QPoint&)</slot> </connection> <connection> <sender>m_BlameList</sender> - <signal>doubleClicked(QListViewItem*)</signal> + <signal>doubleClicked(TQListViewItem*)</signal> <receiver>BlameDisplay</receiver> - <slot>slotItemDoubleClicked(QListViewItem*)</slot> + <slot>slotItemDoubleClicked(TQListViewItem*)</slot> </connection> </connections> -<slots> - <slot access="protected">slotContextMenuRequested(KListView*,QListViewItem*, const QPoint&)</slot> - <slot access="protected">slotItemDoubleClicked(QListViewItem*)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +<Q_SLOTS> + <slot access="protected">slotContextMenuRequested(KListView*,TQListViewItem*, const QPoint&)</slot> + <slot access="protected">slotItemDoubleClicked(TQListViewItem*)</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/src/svnfrontend/blamedisplay_impl.cpp b/src/svnfrontend/blamedisplay_impl.cpp index 36381e4..4a79b6e 100644 --- a/src/svnfrontend/blamedisplay_impl.cpp +++ b/src/svnfrontend/blamedisplay_impl.cpp @@ -37,16 +37,16 @@ #include <ktextbrowser.h> #include <klistviewsearchline.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qheader.h> -#include <qmap.h> -#include <qpopupmenu.h> -#include <qvbox.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qlayout.h> -#include <qtextcodec.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqheader.h> +#include <tqmap.h> +#include <tqpopupmenu.h> +#include <tqvbox.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqlayout.h> +#include <tqtextcodec.h> #define COL_LINENR 0 #define COL_REV 1 @@ -66,31 +66,31 @@ public: void localeChanged() { if (!codec_searched) { - cc = QTextCodec::codecForName(Kdesvnsettings::locale_for_blame()); + cc = TQTextCodec::codecForName(Kdesvnsettings::locale_for_blame()); codec_searched = true; } if (cc) { m_tLine=cc->toUnicode(line().data(),line().size()); m_tAuthor=cc->toUnicode(author().data(),author().size()); } else { - m_tLine=QString::FROMUTF8(line().data(),line().size()); - m_tAuthor=QString::FROMUTF8(author().data(),author().size()); + m_tLine=TQString::FROMUTF8(line().data(),line().size()); + m_tAuthor=TQString::FROMUTF8(author().data(),author().size()); } } - const QString& tAuthor()const{return m_tAuthor;} - const QString& tLine()const{return m_tLine;} + const TQString& tAuthor()const{return m_tAuthor;} + const TQString& tLine()const{return m_tLine;} static void reset_codec(){codec_searched = false; cc=0;} protected: - QString m_tAuthor,m_tLine; + TQString m_tAuthor,m_tLine; static bool codec_searched; - static QTextCodec * cc; + static TQTextCodec * cc; }; -QTextCodec* LocalizedAnnotatedLine::cc = 0; +TQTextCodec* LocalizedAnnotatedLine::cc = 0; bool LocalizedAnnotatedLine::codec_searched = false; class BlameDisplayItem:public KListViewItem @@ -99,11 +99,11 @@ public: BlameDisplayItem(KListView*,const svn::AnnotateLine&,bool,BlameDisplay_impl*); BlameDisplayItem(KListView*,BlameDisplayItem*,const svn::AnnotateLine&,bool,BlameDisplay_impl*); virtual ~BlameDisplayItem(){} - virtual int compare(QListViewItem *i, int col, bool ascending)const; - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + virtual int compare(TQListViewItem *i, int col, bool ascending)const; + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); virtual int rtti()const{return 1000;} - virtual int width( const QFontMetrics & fm, const QListView * lv, int c ) const; + virtual int width( const TQFontMetrics & fm, const TQListView * lv, int c ) const; apr_int64_t lineNumber(){return m_Content.lineNumber();} svn_revnum_t rev(){return m_Content.revision();} @@ -114,9 +114,9 @@ public: if (m_disp){ setText(COL_AUT,m_Content.tAuthor()); } - QString _line = m_Content.tLine(); - _line.replace("\t"," "); - setText(COL_LINE,QString("%1").arg(_line)); + TQString _line = m_Content.tLine(); + _line.tqreplace("\t"," "); + setText(COL_LINE,TQString("%1").tqarg(_line)); } protected: @@ -142,10 +142,10 @@ BlameDisplayItem::BlameDisplayItem(KListView*lv,BlameDisplayItem*it,const svn::A #define BORDER 4 -int BlameDisplayItem::width (const QFontMetrics & fm, const QListView * lv, int c ) const +int BlameDisplayItem::width (const TQFontMetrics & fm, const TQListView * lv, int c ) const { if (c == COL_LINE) { - return KListViewItem::width(QFontMetrics(KGlobalSettings::fixedFont()),lv,c)+2*BORDER; + return KListViewItem::width(TQFontMetrics(KGlobalSettings::fixedFont()),lv,c)+2*BORDER; } return KListViewItem::width(fm,lv,c)+2*BORDER; } @@ -153,20 +153,20 @@ int BlameDisplayItem::width (const QFontMetrics & fm, const QListView * lv, int void BlameDisplayItem::display() { if (m_disp){ - setText(COL_REV,QString("%1").arg(m_Content.revision())); + setText(COL_REV,TQString("%1").tqarg(m_Content.revision())); setText(COL_AUT,m_Content.tAuthor()); if (m_Content.date().isValid()) { setText(COL_DATE,KGlobal::locale()->formatDateTime(m_Content.date())); } } - setText(COL_LINENR,QString("%1").arg(m_Content.lineNumber()+1)); - QString _line = m_Content.tLine(); - _line.replace("\t"," "); - setText(COL_LINE,QString("%1").arg(_line)); + setText(COL_LINENR,TQString("%1").tqarg(m_Content.lineNumber()+1)); + TQString _line = m_Content.tLine(); + _line.tqreplace("\t"," "); + setText(COL_LINE,TQString("%1").tqarg(_line)); } -int BlameDisplayItem::compare(QListViewItem *item, int col, bool ascending)const +int BlameDisplayItem::compare(TQListViewItem *item, int col, bool ascending)const { Q_UNUSED(ascending); BlameDisplayItem* k = static_cast<BlameDisplayItem*>(item); @@ -182,19 +182,19 @@ int BlameDisplayItem::compare(QListViewItem *item, int col, bool ascending)const return k->m_Content.lineNumber()-m_Content.lineNumber(); } -void BlameDisplayItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void BlameDisplayItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - if (alignment & (AlignTop || AlignBottom) == 0) - alignment |= AlignVCenter; + if (tqalignment & (AlignTop || AlignBottom) == 0) + tqalignment |= AlignVCenter; /* don't copy string */ - const QString & str = text(column);; + const TQString & str = text(column);; if (column == COL_LINE) { p->setFont(KGlobalSettings::fixedFont()); } - QColorGroup _cg = cg; - QColor _bgColor; + TQColorGroup _cg = cg; + TQColor _bgColor; if (column==COL_LINENR || isSelected()) { _bgColor = KGlobalSettings::highlightColor(); p->setPen(KGlobalSettings::highlightedTextColor()); @@ -202,7 +202,7 @@ void BlameDisplayItem::paintCell(QPainter *p, const QColorGroup &cg, int column, if (Kdesvnsettings::self()->colored_blame()) { _bgColor = cb->rev2color(m_Content.revision()); } else { - _bgColor = listView()->viewport()->colorGroup().base(); + _bgColor = listView()->viewport()->tqcolorGroup().base(); } } @@ -213,7 +213,7 @@ void BlameDisplayItem::paintCell(QPainter *p, const QColorGroup &cg, int column, if (str.isEmpty()) return; - p->drawText(BORDER, 0, width - 2*BORDER, height(), alignment, str); + p->drawText(BORDER, 0, width - 2*BORDER, height(), tqalignment, str); } class BlameDisplayData @@ -230,31 +230,31 @@ class BlameDisplayData } ~BlameDisplayData(){} svn_revnum_t max,min; - QMap<svn_revnum_t,QColor> m_shadingMap; - QMap<svn_revnum_t,svn::LogEntry> m_logCache; + TQMap<svn_revnum_t,TQColor> m_shadingMap; + TQMap<svn_revnum_t,svn::LogEntry> m_logCache; - QColor m_lastCalcColor; + TQColor m_lastCalcColor; unsigned int rev_count; bool up; SimpleLogCb*m_cb; - QString m_File; + TQString m_File; KDialogBase*m_dlg; - QString reposRoot; + TQString reposRoot; }; -BlameDisplay_impl::BlameDisplay_impl(QWidget*parent,const char*name) - : BlameDisplay(parent,name) +BlameDisplay_impl::BlameDisplay_impl(TQWidget*tqparent,const char*name) + : BlameDisplay(tqparent,name) { m_Data = new BlameDisplayData(); - connect(m_BlameList,SIGNAL(selectionChanged()),this,SLOT(slotSelectionChanged())); + connect(m_BlameList,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotSelectionChanged())); } -BlameDisplay_impl::BlameDisplay_impl(const QString&what,const svn::AnnotatedFile&blame,QWidget*parent,const char*name) - : BlameDisplay(parent,name) +BlameDisplay_impl::BlameDisplay_impl(const TQString&what,const svn::AnnotatedFile&blame,TQWidget*tqparent,const char*name) + : BlameDisplay(tqparent,name) { m_Data = new BlameDisplayData(); - connect(m_BlameList,SIGNAL(selectionChanged()),this,SLOT(slotSelectionChanged())); + connect(m_BlameList,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotSelectionChanged())); setContent(what,blame); } @@ -263,21 +263,21 @@ void BlameDisplay_impl::setCb(SimpleLogCb*_cb) m_Data->m_cb = _cb; } -void BlameDisplay_impl::setContent(const QString&what,const svn::AnnotatedFile&blame) +void BlameDisplay_impl::setContent(const TQString&what,const svn::AnnotatedFile&blame) { m_Data->m_File = what; m_SearchWidget = new KListViewSearchLineWidget(m_BlameList,this); EncodingSelector_impl*m_Ls = new EncodingSelector_impl(Kdesvnsettings::locale_for_blame(),this); - connect(m_Ls,SIGNAL(TextCodecChanged(const QString&)), - this,SLOT(slotTextCodecChanged(const QString&))); + connect(m_Ls,TQT_SIGNAL(TextCodecChanged(const TQString&)), + this,TQT_SLOT(slotTextCodecChanged(const TQString&))); BlameDisplayLayout->remove(m_BlameList); BlameDisplayLayout->addWidget(m_Ls); BlameDisplayLayout->addWidget(m_SearchWidget); BlameDisplayLayout->addWidget(m_BlameList); - m_BlameList->setColumnAlignment(COL_REV,Qt::AlignRight); - m_BlameList->setColumnAlignment(COL_LINENR,Qt::AlignRight); + m_BlameList->setColumnAlignment(COL_REV,TQt::AlignRight); + m_BlameList->setColumnAlignment(COL_LINENR,TQt::AlignRight); m_BlameList->clear(); if (m_Data->m_dlg) { @@ -296,18 +296,18 @@ void BlameDisplay_impl::setContent(const QString&what,const svn::AnnotatedFile&b if (disp) { lastRev = (*bit).revision(); } - if (m_Data->m_shadingMap.find((*bit).revision())==m_Data->m_shadingMap.end()) { - m_Data->m_shadingMap[(*bit).revision()]=QColor(); + if (m_Data->m_shadingMap.tqfind((*bit).revision())==m_Data->m_shadingMap.end()) { + m_Data->m_shadingMap[(*bit).revision()]=TQColor(); } } if (Kdesvnsettings::self()->colored_blame()) { - QColor a(160,160,160); + TQColor a(160,160,160); int offset = 10; int r=0; int g=0;int b=0; uint colinc=0; for (svn_revnum_t i = m_Data->min; i<= m_Data->max;++i) { - if (m_Data->m_shadingMap.find(i)==m_Data->m_shadingMap.end()) { + if (m_Data->m_shadingMap.tqfind(i)==m_Data->m_shadingMap.end()) { continue; } a.setRgb(a.red()+offset,a.green()+offset,a.blue()+offset); @@ -338,13 +338,13 @@ void BlameDisplay_impl::setContent(const QString&what,const svn::AnnotatedFile&b } } -const QColor BlameDisplay_impl::rev2color(svn_revnum_t r )const +const TQColor BlameDisplay_impl::rev2color(svn_revnum_t r )const { - if (m_Data->m_shadingMap.find(r)!=m_Data->m_shadingMap.end() && m_Data->m_shadingMap[r].isValid()) + if (m_Data->m_shadingMap.tqfind(r)!=m_Data->m_shadingMap.end() && m_Data->m_shadingMap[r].isValid()) { return m_Data->m_shadingMap[r]; } else { - return m_BlameList->viewport()->colorGroup().base(); + return m_BlameList->viewport()->tqcolorGroup().base(); } } @@ -361,7 +361,7 @@ void BlameDisplay_impl::slotGoLine() if (!ok) { return; } - QListViewItem*item = m_BlameList->firstChild(); + TQListViewItem*item = m_BlameList->firstChild(); --line; while (item) { if (item->rtti()==1000) { @@ -376,11 +376,11 @@ void BlameDisplay_impl::slotGoLine() } } -void BlameDisplay_impl::slotContextMenuRequested(KListView*,QListViewItem*item, const QPoint&pos) +void BlameDisplay_impl::slotContextMenuRequested(KListView*,TQListViewItem*item, const TQPoint&pos) { if (item==0||item->rtti()!=1000) return; BlameDisplayItem*bit = static_cast<BlameDisplayItem*>(item); - QPopupMenu popup; + TQPopupMenu popup; popup.insertItem(i18n("Log message for revision"),101); int r = popup.exec(pos); @@ -398,11 +398,11 @@ void BlameDisplay_impl::showCommit(BlameDisplayItem*bit) { if (!bit) return; WidgetBlockStack a(m_BlameList); - QString text; - if (m_Data->m_logCache.find(bit->rev())!=m_Data->m_logCache.end()) { + TQString text; + if (m_Data->m_logCache.tqfind(bit->rev())!=m_Data->m_logCache.end()) { text = m_Data->m_logCache[bit->rev()].message; } else { - CursorStack a(Qt::BusyCursor); + CursorStack a(TQt::BusyCursor); svn::LogEntry t; if (m_Data->m_cb && m_Data->m_cb->getSingleLog(t,bit->rev(),m_Data->m_File,m_Data->max,m_Data->reposRoot)) { m_Data->m_logCache[bit->rev()] = t; @@ -410,13 +410,13 @@ void BlameDisplay_impl::showCommit(BlameDisplayItem*bit) } } KDialogBase* dlg = new KDialogBase( - KApplication::activeModalWidget(), - "simplelog",true,QString(i18n("Logmessage for revision %1").arg(bit->rev())), + TQT_TQWIDGET(KApplication::activeModalWidget()), + "simplelog",true,TQString(i18n("Logmessage for revision %1").tqarg(bit->rev())), KDialogBase::Close); - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); KTextBrowser*ptr = new KTextBrowser(Dialog1Layout); ptr->setFont(KGlobalSettings::fixedFont()); - ptr->setWordWrap(QTextEdit::NoWrap); + ptr->setWordWrap(TQTextEdit::NoWrap); ptr->setText(text); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"simplelog_display")); dlg->exec(); @@ -425,7 +425,7 @@ void BlameDisplay_impl::showCommit(BlameDisplayItem*bit) void BlameDisplay_impl::slotShowCurrentCommit() { - QListViewItem*item = m_BlameList->selectedItem(); + TQListViewItem*item = m_BlameList->selectedItem(); if (item==0||item->rtti()!=1000) return; BlameDisplayItem*bit = static_cast<BlameDisplayItem*>(item); showCommit(bit); @@ -434,7 +434,7 @@ void BlameDisplay_impl::slotShowCurrentCommit() void BlameDisplay_impl::slotSelectionChanged() { if (!m_Data->m_dlg) return; - QListViewItem*item = m_BlameList->selectedItem(); + TQListViewItem*item = m_BlameList->selectedItem(); if (item==0||item->rtti()!=1000) { m_Data->m_dlg->enableButton(KDialogBase::User2,false); } else { @@ -442,43 +442,43 @@ void BlameDisplay_impl::slotSelectionChanged() } } -void BlameDisplay_impl::displayBlame(SimpleLogCb*_cb,const QString&item,const svn::AnnotatedFile&blame,QWidget*,const char*name) +void BlameDisplay_impl::displayBlame(SimpleLogCb*_cb,const TQString&item,const svn::AnnotatedFile&blame,TQWidget*,const char*name) { int buttons = KDialogBase::Close|KDialogBase::User1|KDialogBase::User2; KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), - name,true,QString(i18n("Blame %1")).arg(item),buttons,KDialogBase::Close,false, + TQT_TQWIDGET(KApplication::activeModalWidget()), + name,true,TQString(i18n("Blame %1")).tqarg(item),buttons,KDialogBase::Close,false, KGuiItem(i18n("Goto line")),KGuiItem(i18n("Log message for revision"),"kdesvnlog")); - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); BlameDisplay_impl*ptr = new BlameDisplay_impl(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"blame_dlg")); ptr->setContent(item,blame); ptr->setCb(_cb); ptr->m_Data->m_dlg = dlg; dlg->enableButton(KDialogBase::User2,false); - connect(dlg,SIGNAL(user1Clicked()),ptr,SLOT(slotGoLine())); - connect(dlg,SIGNAL(user2Clicked()),ptr,SLOT(slotShowCurrentCommit())); + connect(dlg,TQT_SIGNAL(user1Clicked()),ptr,TQT_SLOT(slotGoLine())); + connect(dlg,TQT_SIGNAL(user2Clicked()),ptr,TQT_SLOT(slotShowCurrentCommit())); Dialog1Layout->adjustSize(); dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"blame_dlg",false); } -void BlameDisplay_impl::slotItemDoubleClicked(QListViewItem*item) +void BlameDisplay_impl::slotItemDoubleClicked(TQListViewItem*item) { if (item==0||item->rtti()!=1000) return; BlameDisplayItem*bit = static_cast<BlameDisplayItem*>(item); showCommit(bit); } -void BlameDisplay_impl::slotTextCodecChanged(const QString&what) +void BlameDisplay_impl::slotTextCodecChanged(const TQString&what) { if (Kdesvnsettings::locale_for_blame()!=what) { Kdesvnsettings::setLocale_for_blame(what); Kdesvnsettings::self()->writeConfig(); LocalizedAnnotatedLine::reset_codec(); - QListViewItemIterator it(m_BlameList); + TQListViewItemIterator it(m_BlameList); while ( it.current() ) { BlameDisplayItem*_it = static_cast<BlameDisplayItem*>(it.current()); _it->localeChanged(); diff --git a/src/svnfrontend/blamedisplay_impl.h b/src/svnfrontend/blamedisplay_impl.h index 013e05a..a07f035 100644 --- a/src/svnfrontend/blamedisplay_impl.h +++ b/src/svnfrontend/blamedisplay_impl.h @@ -31,26 +31,27 @@ class KListViewSearchLineWidget; class BlameDisplay_impl:public BlameDisplay { Q_OBJECT + TQ_OBJECT public: - BlameDisplay_impl(const QString&,const svn::AnnotatedFile&,QWidget*parent=0,const char*name=0); - BlameDisplay_impl(QWidget*parent=0,const char*name=0); + BlameDisplay_impl(const TQString&,const svn::AnnotatedFile&,TQWidget*tqparent=0,const char*name=0); + BlameDisplay_impl(TQWidget*tqparent=0,const char*name=0); virtual ~BlameDisplay_impl(); - virtual void setContent(const QString&,const svn::AnnotatedFile&); + virtual void setContent(const TQString&,const svn::AnnotatedFile&); virtual void setCb(SimpleLogCb*); - const QColor rev2color(svn_revnum_t)const; + const TQColor rev2color(svn_revnum_t)const; - static void displayBlame(SimpleLogCb*,const QString&,const svn::AnnotatedFile&,QWidget*parent=0,const char*name=0); + static void displayBlame(SimpleLogCb*,const TQString&,const svn::AnnotatedFile&,TQWidget*tqparent=0,const char*name=0); public slots: virtual void slotGoLine(); virtual void slotShowCurrentCommit(); protected slots: - virtual void slotContextMenuRequested(KListView*,QListViewItem*, const QPoint&); + virtual void slotContextMenuRequested(KListView*,TQListViewItem*, const TQPoint&); virtual void slotSelectionChanged(); - virtual void slotTextCodecChanged(const QString&); + virtual void slotTextCodecChanged(const TQString&); protected: virtual void showCommit(BlameDisplayItem*); @@ -59,7 +60,7 @@ protected: private: BlameDisplayData*m_Data; protected slots: - virtual void slotItemDoubleClicked(QListViewItem*); + virtual void slotItemDoubleClicked(TQListViewItem*); }; #endif diff --git a/src/svnfrontend/cacheentry.h b/src/svnfrontend/cacheentry.h index 2ab422b..db4cd6d 100644 --- a/src/svnfrontend/cacheentry.h +++ b/src/svnfrontend/cacheentry.h @@ -24,11 +24,11 @@ #include "src/svnqt/shared_pointer.hpp" #include "src/svnqt/status.hpp" -// std::map 'cause QMap isn't usable +// std::map 'cause TQMap isn't usable #include <map> #include <algorithm> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace helpers { @@ -40,31 +40,31 @@ namespace helpers { template<class C> class cacheEntry { public: typedef cacheEntry<C> cache_type; - typedef typename std::map<QString,cache_type> cache_map_type; + typedef typename std::map<TQString,cache_type> cache_map_type; typedef typename cache_map_type::const_iterator citer; typedef typename cache_map_type::iterator iter; protected: - QString m_key; + TQString m_key; bool m_isValid; C m_content; cache_map_type m_subMap; public: cacheEntry(); - cacheEntry(const QString&key); + cacheEntry(const TQString&key); cacheEntry(const cacheEntry<C>&other); virtual ~cacheEntry(){}; - virtual bool find(QStringList&,QLIST<C>&)const; + virtual bool find(TQStringList&,TQLIST<C>&)const; //! Checks if cache contains a specific item /*! * the keylist will manipulated - so copy-operations aren't needed. * \param what Stringlist containing the components to search for * \return true if found (may or may not valid!) otherwise false */ - virtual bool find(QStringList&what)const; + virtual bool find(TQStringList&what)const; //! Checks if cache contains a specific valid item /*! * if yes, the content will stored in st @@ -72,19 +72,19 @@ public: * \param st target status to store content if found * \return true if found */ - virtual bool findSingleValid(QStringList&what,C&st)const; + virtual bool findSingleValid(TQStringList&what,C&st)const; //! Checks if cache contains a specific valid item /*! - * in difference to virtual bool find(QStringList&,svn::StatusEntries&)const no copy operations + * in difference to virtual bool find(TQStringList&,svn::StatusEntries&)const no copy operations * are made inside so it works much faster for simple find. * \param what the keylist to search for * \param check_valid_subs if true, return true if a subitem is valid even the item isn't valid * \return true if found */ - virtual bool findSingleValid(QStringList&what,bool check_valid_subs)const; - template<class T> void listsubs_if(QStringList&_what,T&oper)const; + virtual bool findSingleValid(TQStringList&what,bool check_valid_subs)const; + template<class T> void listsubs_if(TQStringList&_what,T&oper)const; - virtual void appendValidSub(QLIST<C>&)const; + virtual void appendValidSub(TQLIST<C>&)const; virtual bool isValid()const { return m_isValid; @@ -93,9 +93,9 @@ public: { return m_content; } - virtual bool deleteKey(QStringList&,bool exact); - virtual void insertKey(QStringList&,const C&); - virtual void setValidContent(const QString&key,const C&st) + virtual bool deleteKey(TQStringList&,bool exact); + virtual void insertKey(TQStringList&,const C&); + virtual void setValidContent(const TQString&key,const C&st) { kdDebug()<<"Insert for "<<key<<endl; m_key = key; @@ -107,7 +107,7 @@ public: m_content=C(); m_isValid=false; } - const QString&key()const { + const TQString&key()const { return m_key; } @@ -115,9 +115,9 @@ public: #if 0 void dump_tree(int level=0)const { - QString pre; + TQString pre; pre.fill('-',level); - std::map<QString,cacheEntry>::const_iterator it; + std::map<TQString,cacheEntry>::const_iterator it; for (it=m_subMap.begin();it!=m_subMap.end();++it) { std::cout<<pre.latin1()<<it->first.latin1() << " (" << it->second.m_key.latin1() << ")"<<std::endl; it->second.dump_tree(level+1); @@ -133,7 +133,7 @@ template<class C> inline cacheEntry<C>::cacheEntry() { } -template<class C> inline cacheEntry<C>::cacheEntry(const QString&key) +template<class C> inline cacheEntry<C>::cacheEntry(const TQString&key) : m_key(key),m_isValid(false),m_content() { } @@ -153,7 +153,7 @@ template<class C> inline cacheEntry<C>& cacheEntry<C>::operator=(const cacheEntr return *this; } -template<class C> inline bool cacheEntry<C>::find(QStringList&what,QLIST<C>&t)const +template<class C> inline bool cacheEntry<C>::find(TQStringList&what,TQLIST<C>&t)const { if (what.count()==0) { return false; @@ -185,7 +185,7 @@ template<class C> inline bool cacheEntry<C>::find(QStringList&what,QLIST<C>&t)c return it->second.find(what,t); } -template<class C> inline bool cacheEntry<C>::find(QStringList&what)const +template<class C> inline bool cacheEntry<C>::find(TQStringList&what)const { if (what.count()==0) { return false; @@ -201,12 +201,12 @@ template<class C> inline bool cacheEntry<C>::find(QStringList&what)const return it->second.find(what); } -template<class C> inline bool cacheEntry<C>::findSingleValid(QStringList&what,C&t)const +template<class C> inline bool cacheEntry<C>::findSingleValid(TQStringList&what,C&t)const { if (what.count()==0) { return false; } - //kdDebug()<<"cacheEntry::findSingleValid(QStringList&what,C&t)"<< what << endl; + //kdDebug()<<"cacheEntry::findSingleValid(TQStringList&what,C&t)"<< what << endl; citer it; it = m_subMap.find(what[0]); if (it==m_subMap.end()) { @@ -223,12 +223,12 @@ template<class C> inline bool cacheEntry<C>::findSingleValid(QStringList&what,C& return it->second.findSingleValid(what,t); } -template<class C> inline bool cacheEntry<C>::findSingleValid(QStringList&what,bool check_valid_subs)const +template<class C> inline bool cacheEntry<C>::findSingleValid(TQStringList&what,bool check_valid_subs)const { if (what.count()==0) { return false; } - // kdDebug()<<"cacheEntry::findSingleValid(QStringList&what,svn::Status&t)"<< what << endl; + // kdDebug()<<"cacheEntry::findSingleValid(TQStringList&what,svn::tqStatus&t)"<< what << endl; citer it = m_subMap.find(what[0]); if (it==m_subMap.end()) { return false; @@ -240,7 +240,7 @@ template<class C> inline bool cacheEntry<C>::findSingleValid(QStringList&what,bo return it->second.findSingleValid(what,check_valid_subs); } -template<class C> inline void cacheEntry<C>::appendValidSub(QLIST<C>&t)const +template<class C> inline void cacheEntry<C>::appendValidSub(TQLIST<C>&t)const { citer it; for (it=m_subMap.begin();it!=m_subMap.end();++it) { @@ -254,7 +254,7 @@ template<class C> inline void cacheEntry<C>::appendValidSub(QLIST<C>&t)const } } -template<class C> inline bool cacheEntry<C>::deleteKey(QStringList&what,bool exact) +template<class C> inline bool cacheEntry<C>::deleteKey(TQStringList&what,bool exact) { if (what.count()==0) { return true; @@ -295,13 +295,13 @@ template<class C> inline bool cacheEntry<C>::hasValidSubs()const return false; } -template<class C> inline void cacheEntry<C>::insertKey(QStringList&what,const C&st) +template<class C> inline void cacheEntry<C>::insertKey(TQStringList&what,const C&st) { if (what.count()==0) { return; } //kdDebug()<<"inserting "<<what<< "into " << m_key << endl; - QString m = what[0]; + TQString m = what[0]; if (m_subMap.find(m)==m_subMap.end()) { m_subMap[m].m_key=m; @@ -317,7 +317,7 @@ template<class C> inline void cacheEntry<C>::insertKey(QStringList&what,const C& m_subMap[m].insertKey(what,st); } -template<class C> template<class T> inline void cacheEntry<C>::listsubs_if(QStringList&what,T&oper)const +template<class C> template<class T> inline void cacheEntry<C>::listsubs_if(TQStringList&what,T&oper)const { if (what.count()==0) { /* we are the one to get the list for*/ @@ -338,7 +338,7 @@ template<class C> class itemCache { public: typedef cacheEntry<C> cache_type; - typedef typename std::map<QString,cache_type> cache_map_type; + typedef typename std::map<TQString,cache_type> cache_map_type; typedef typename cache_map_type::const_iterator citer; typedef typename cache_map_type::iterator iter; @@ -349,7 +349,7 @@ public: itemCache():m_contentMap(){} virtual ~itemCache(){}; - void setContent(const QLIST<C>&dlist); + void setContent(const TQLIST<C>&dlist); void clear(){m_contentMap.clear();} //! Checks if cache contains a specific item /*! @@ -357,25 +357,25 @@ public: * \param what Stringlist containing the components to search for * \return true if found (may or may not valid!) otherwise false */ - virtual bool find(const QString&what)const; - virtual bool find(const QString&,QLIST<C>&)const; + virtual bool find(const TQString&what)const; + virtual bool find(const TQString&,TQLIST<C>&)const; - virtual void deleteKey(const QString&what,bool exact); - virtual void insertKey(const C&,const QString&path); - virtual bool findSingleValid(const QString&what,C&)const; - virtual bool findSingleValid(const QString&what,bool check_valid_subs)const; + virtual void deleteKey(const TQString&what,bool exact); + virtual void insertKey(const C&,const TQString&path); + virtual bool findSingleValid(const TQString&what,C&)const; + virtual bool findSingleValid(const TQString&what,bool check_valid_subs)const; - template<class T>void listsubs_if(const QString&what,T&oper)const; + template<class T>void listsubs_if(const TQString&what,T&oper)const; void dump_tree(); }; -template<class C> inline void itemCache<C>::setContent(const QLIST<C>&dlist) +template<class C> inline void itemCache<C>::setContent(const TQLIST<C>&dlist) { m_contentMap.clear(); citer it; for (it=dlist.begin();it!=dlist.end();++it) { - QStringList _keys = QStringList::split("/",(*it).path()); + TQStringList _keys = TQStringList::split("/",(*it).path()); if (_keys.count()==0) { continue; } @@ -389,10 +389,10 @@ template<class C> inline void itemCache<C>::setContent(const QLIST<C>&dlist) } } -template<class C> inline void itemCache<C>::insertKey(const C&st,const QString&path) +template<class C> inline void itemCache<C>::insertKey(const C&st,const TQString&path) { // kdDebug()<<"Inserting "<<st.path()<<endl; - QStringList _keys = QStringList::split("/",path); + TQStringList _keys = TQStringList::split("/",path); if (_keys.count()==0) { return; } @@ -404,18 +404,18 @@ template<class C> inline void itemCache<C>::insertKey(const C&st,const QString&p if (_keys.count()==1) { m_contentMap[_keys[0]].setValidContent(_keys[0],st); } else { - QString m = _keys[0]; + TQString m = _keys[0]; _keys.erase(_keys.begin()); m_contentMap[m].insertKey(_keys,st); } } -template<class C> inline bool itemCache<C>::find(const QString&what)const +template<class C> inline bool itemCache<C>::find(const TQString&what)const { if (m_contentMap.size()==0) { return false; } - QStringList _keys = QStringList::split("/",what); + TQStringList _keys = TQStringList::split("/",what); if (_keys.count()==0) { return false; } @@ -430,12 +430,12 @@ template<class C> inline bool itemCache<C>::find(const QString&what)const return it->second.find(_keys); } -template<class C> inline bool itemCache<C>::find(const QString&_what,QLIST<C>&dlist)const +template<class C> inline bool itemCache<C>::find(const TQString&_what,TQLIST<C>&dlist)const { if (m_contentMap.size()==0) { return false; } - QStringList what = QStringList::split("/",_what); + TQStringList what = TQStringList::split("/",_what); if (what.count()==0) { return false; } @@ -444,16 +444,16 @@ template<class C> inline bool itemCache<C>::find(const QString&_what,QLIST<C>&dl return false; } what.erase(what.begin()); - // kdDebug()<<"itemCache::find(const QString&_what,svn::StatusEntries&dlist) "<<what<<endl; + // kdDebug()<<"itemCache::find(const TQString&_what,svn::StatusEntries&dlist) "<<what<<endl; return it->second.find(what,dlist); } -template<class C> inline void itemCache<C>::deleteKey(const QString&_what,bool exact) +template<class C> inline void itemCache<C>::deleteKey(const TQString&_what,bool exact) { if (m_contentMap.size()==0) { return; } - QStringList what = QStringList::split("/",_what); + TQStringList what = TQStringList::split("/",_what); if (what.count()==0) { return; } @@ -490,12 +490,12 @@ template<class C> inline void itemCache<C>::dump_tree() } } -template<class C> inline bool itemCache<C>::findSingleValid(const QString&_what,C&st)const +template<class C> inline bool itemCache<C>::findSingleValid(const TQString&_what,C&st)const { if (m_contentMap.size()==0) { return false; } - QStringList what = QStringList::split("/",_what); + TQStringList what = TQStringList::split("/",_what); if (what.count()==0) { return false; } @@ -517,12 +517,12 @@ template<class C> inline bool itemCache<C>::findSingleValid(const QString&_what, return it->second.findSingleValid(what,st); } -template<class C> inline bool itemCache<C>::findSingleValid(const QString&_what,bool check_valid_subs)const +template<class C> inline bool itemCache<C>::findSingleValid(const TQString&_what,bool check_valid_subs)const { if (m_contentMap.size()==0) { return false; } - QStringList what = QStringList::split("/",_what); + TQStringList what = TQStringList::split("/",_what); if (what.count()==0) { return false; } @@ -537,12 +537,12 @@ template<class C> inline bool itemCache<C>::findSingleValid(const QString&_what, return it->second.findSingleValid(what,check_valid_subs); } -template<class C> template<class T> inline void itemCache<C>::listsubs_if(const QString&_what,T&oper)const +template<class C> template<class T> inline void itemCache<C>::listsubs_if(const TQString&_what,T&oper)const { if (m_contentMap.size()==0) { return; } - QStringList what = QStringList::split("/",_what); + TQStringList what = TQStringList::split("/",_what); if (what.count()==0) { return; } @@ -567,9 +567,9 @@ class ValidRemoteOnly svn::StatusEntries m_List; public: ValidRemoteOnly():m_List(){} - void operator()(const std::pair<QString,helpers::ptrEntry>&_data) + void operator()(const std::pair<TQString,helpers::ptrEntry>&_data) { - if(_data.second.isValid() && _data.second.content()->validReposStatus()&&!_data.second.content()->validLocalStatus()) { + if(_data.second.isValid() && _data.second.content()->validRepostqStatus()&&!_data.second.content()->validLocaltqStatus()) { m_List.push_back(_data.second.content()); } } diff --git a/src/svnfrontend/ccontextlistener.cpp b/src/svnfrontend/ccontextlistener.cpp index a331db4..ddcdaa4 100644 --- a/src/svnfrontend/ccontextlistener.cpp +++ b/src/svnfrontend/ccontextlistener.cpp @@ -31,9 +31,9 @@ #include <kdebug.h> #include <kfiledialog.h> -#include <qmap.h> -#include <qtextstream.h> -#include <qthread.h> +#include <tqmap.h> +#include <tqtextstream.h> +#include <tqthread.h> class CContextListenerData { @@ -43,7 +43,7 @@ public: // data bool m_cancelMe; - QMutex m_CancelMutex; + TQMutex m_CancelMutex; bool noDialogs; }; @@ -59,7 +59,7 @@ CContextListenerData::~CContextListenerData() const int CContextListener::smax_actionstring=svn_wc_notify_failed_unlock+1; -const QString CContextListener::action_strings[]={ +const TQString CContextListener::action_strings[]={ I18N_NOOP("Add to revision control"), I18N_NOOP("Copy"), I18N_NOOP("Delete"), @@ -73,48 +73,48 @@ const QString CContextListener::action_strings[]={ I18N_NOOP("Update"), //svn_wc_notify_update_update I18N_NOOP("Update complete"), I18N_NOOP("Update external module"), - QString::null, // status completed - will not send is just noisy - I18N_NOOP("Status on external"), //svn_wc_notify_status_external + TQString(), // status completed - will not send is just noisy + I18N_NOOP("tqStatus on external"), //svn_wc_notify_status_external I18N_NOOP("Commit Modified"), I18N_NOOP("Commit Added"), I18N_NOOP("Commit Deleted"), I18N_NOOP("Commit Replaced"), - QString::null, //tx delta -> making ticks instead - QString::null, //svn_wc_notify_blame_revision - using ticks + TQString(), //tx delta -> making ticks instead + TQString(), //svn_wc_notify_blame_revision - using ticks I18N_NOOP("Locking"), I18N_NOOP("Unlocked"), I18N_NOOP("Lock failed"), I18N_NOOP("Unlock failed") }; -const QString CContextListener::notify_state_strings[]={ - QString::null, // = 0 - QString::null, +const TQString CContextListener::notify_state_strings[]={ + TQString(), // = 0 + TQString(), I18N_NOOP("unchanged"), I18N_NOOP("item wasn't present"), I18N_NOOP("unversioned item obstructed work"), // I18N_NOOP("Pristine state was modified."), // should send a signal with path instead of message? - QString::null, + TQString(), I18N_NOOP("Modified state had mods merged in."), I18N_NOOP("Modified state got conflicting mods.") }; -QString CContextListener::NotifyAction(svn_wc_notify_action_t action) +TQString CContextListener::NotifyAction(svn_wc_notify_action_t action) { if (action>=smax_actionstring||action<0) { - return QString::null; + return TQString(); } - return action_strings[action].isEmpty()?QString::null:i18n(action_strings[action]); + return action_strings[action].isEmpty()?TQString():i18n(action_strings[action]); } -QString CContextListener::NotifyState(svn_wc_notify_state_t state) +TQString CContextListener::NotifyState(svn_wc_notify_state_t state) { - if (state > svn_wc_notify_state_conflicted || state<0) return QString::null; - return notify_state_strings[state].isEmpty()?QString::null:i18n(notify_state_strings[state]); + if (state > svn_wc_notify_state_conflicted || state<0) return TQString(); + return notify_state_strings[state].isEmpty()?TQString():i18n(notify_state_strings[state]); } -CContextListener::CContextListener(QObject *parent, const char *name) - : QObject(parent, name), svn::ContextListener(),ref_count() +CContextListener::CContextListener(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), svn::ContextListener(),ref_count() { m_Data = new CContextListenerData(); } @@ -125,13 +125,13 @@ CContextListener::~CContextListener() delete m_Data; } -bool CContextListener::contextGetCachedLogin (const QString & realm,QString & username,QString & password) +bool CContextListener::contextGetCachedLogin (const TQString & realm,TQString & username,TQString & password) { PwStorage::self()->getCachedLogin(realm,username,password); return true; } -bool CContextListener::contextGetSavedLogin (const QString & realm,QString & username,QString & password) +bool CContextListener::contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password) { PwStorage::self()->getLogin(realm,username,password); PwStorage::self()->setCachedLogin(realm,username,password); @@ -140,16 +140,16 @@ bool CContextListener::contextGetSavedLogin (const QString & realm,QString & use } bool CContextListener::contextGetLogin ( - const QString & realm, - QString & username, - QString & password, + const TQString & realm, + TQString & username, + TQString & password, bool & maySave) { maySave = false; emit waitShow(true); emit sendNotify(realm); AuthDialogImpl auth(realm,username); - if (auth.exec()==QDialog::Accepted) { + if (auth.exec()==TQDialog::Accepted) { username=auth.Username(); password=auth.Password(); maySave = (Kdesvnsettings::passwords_in_wallet()?false:auth.maySave()); @@ -166,7 +166,7 @@ bool CContextListener::contextGetLogin ( return false; } -void CContextListener::contextNotify(const QString&aMsg) +void CContextListener::contextNotify(const TQString&aMsg) { if (aMsg.isEmpty()) { emit tickProgress(); @@ -183,12 +183,12 @@ void CContextListener::contextNotify (const char *path, svn_wc_notify_state_t prop_state, svn_revnum_t revision) { - QString msg; - QString aString = NotifyAction(action); + TQString msg; + TQString aString = NotifyAction(action); if (!aString.isEmpty()) { - QTextStream ts(&msg,IO_WriteOnly); - ts << NotifyAction(action) << " " << QString::FROMUTF8(path); + TQTextStream ts(&msg,IO_WriteOnly); + ts << NotifyAction(action) << " " << TQString::FROMUTF8(path); if (revision>-1) { ts << " (Rev "<<revision<<")"; } @@ -208,7 +208,7 @@ void CContextListener::contextNotify (const svn_wc_notify_t *action) action->content_state,action->prop_state,action->revision); // return; // } -// QString aString = NotifyAction(action->action); +// TQString aString = NotifyAction(action->action); } void CContextListener::sendTick() @@ -219,7 +219,7 @@ void CContextListener::sendTick() bool CContextListener::contextCancel() { { - QMutexLocker lock(&(m_Data->m_CancelMutex)); + TQMutexLocker lock(&(m_Data->m_CancelMutex)); if (m_Data->m_cancelMe) { m_Data->m_cancelMe=false; return true; @@ -230,11 +230,11 @@ bool CContextListener::contextCancel() return false; } -bool CContextListener::contextGetLogMessage (QString & msg,const svn::CommitItemList&items) +bool CContextListener::contextGetLogMessage (TQString & msg,const svn::CommitItemList&items) { bool isOk = false; emit waitShow(true); - QString logMessage = Logmsg_impl::getLogmessage(items,&isOk,0,0,0); + TQString logMessage = Logmsg_impl::getLogmessage(items,&isOk,0,0,0); if (isOk) { msg = logMessage; } @@ -265,13 +265,13 @@ svn::ContextListener::SslServerTrustAnswer CContextListener::contextSslServerTru return ACCEPT_PERMANENTLY; } -bool CContextListener::contextSslClientCertPrompt (QString & certFile) +bool CContextListener::contextSslClientCertPrompt (TQString & certFile) { kdDebug()<<"CContextListener::contextSslClientCertPrompt " << certFile << endl; emit waitShow(true); - QString afile = KFileDialog::getOpenFileName(QString::null, - QString::null, + TQString afile = KFileDialog::getOpenFileName(TQString(), + TQString(), 0, i18n("Open a file with a #PKCS12 certificate")); emit waitShow(false); @@ -282,21 +282,21 @@ bool CContextListener::contextSslClientCertPrompt (QString & certFile) return true; } -bool CContextListener::contextLoadSslClientCertPw(QString&password,const QString&realm) +bool CContextListener::contextLoadSslClientCertPw(TQString&password,const TQString&realm) { PwStorage::self()->getCertPw(realm,password); return true; } -bool CContextListener::contextSslClientCertPwPrompt (QString & password, - const QString & realm, bool & maysave) +bool CContextListener::contextSslClientCertPwPrompt (TQString & password, + const TQString & realm, bool & maysave) { maysave = false; emit waitShow(true); - QCString npass; + TQCString npass; int keep = 1; int res = KPasswordDialog::getPassword(npass, - i18n("Enter password for realm %1").arg(realm), + i18n("Enter password for realm %1").tqarg(realm), &keep); emit waitShow(false); if (res!=KPasswordDialog::Accepted) { @@ -312,13 +312,13 @@ bool CContextListener::contextSslClientCertPwPrompt (QString & password, void CContextListener::setCanceled(bool how) { - QMutexLocker lock(&(m_Data->m_CancelMutex)); + TQMutexLocker lock(&(m_Data->m_CancelMutex)); m_Data->m_cancelMe = how; } -QStringList CContextListener::failure2Strings(apr_uint32_t acceptedFailures) +TQStringList CContextListener::failure2Strings(apr_uint32_t acceptedFailures) { - QStringList res; + TQStringList res; if (acceptedFailures&SVN_AUTH_SSL_UNKNOWNCA) { res << i18n("The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually!"); } @@ -337,7 +337,7 @@ QStringList CContextListener::failure2Strings(apr_uint32_t acceptedFailures) return res; } -QString CContextListener::translate(const QString&what) +TQString CContextListener::translate(const TQString&what) { return i18n(what); } diff --git a/src/svnfrontend/ccontextlistener.h b/src/svnfrontend/ccontextlistener.h index 216243b..3bb48bd 100644 --- a/src/svnfrontend/ccontextlistener.h +++ b/src/svnfrontend/ccontextlistener.h @@ -23,28 +23,29 @@ #include "src/svnqt/context_listener.hpp" #include "src/svnqt/smart_pointer.hpp" -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class CContextListenerData; /** @author Rajko Albrecht */ -class CContextListener : public QObject, public svn::ContextListener,public svn::ref_count +class CContextListener : public TQObject, public svn::ContextListener,public svn::ref_count { Q_OBJECT + TQ_OBJECT public: - CContextListener(QObject *parent = 0, const char *name = 0); + CContextListener(TQObject *tqparent = 0, const char *name = 0); virtual ~CContextListener(); /* context-listener methods */ - virtual bool contextGetLogin (const QString & realm, - QString & username, - QString & password, + virtual bool contextGetLogin (const TQString & realm, + TQString & username, + TQString & password, bool & maySave); - virtual bool contextGetSavedLogin (const QString & realm,QString & username,QString & password); - virtual bool contextGetCachedLogin(const QString & realm,QString & username,QString & password); + virtual bool contextGetSavedLogin (const TQString & realm,TQString & username,TQString & password); + virtual bool contextGetCachedLogin(const TQString & realm,TQString & username,TQString & password); virtual void contextNotify (const char *path, @@ -54,7 +55,7 @@ public: svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision); - virtual void contextNotify(const QString&aMsg); + virtual void contextNotify(const TQString&aMsg); virtual void sendTick(); virtual void contextNotify (const svn_wc_notify_t *action); @@ -62,34 +63,34 @@ public: /*! * Get logmessage for checkin and so on... */ - virtual bool contextGetLogMessage (QString & msg,const svn::CommitItemList&); + virtual bool contextGetLogMessage (TQString & msg,const svn::CommitItemList&); virtual SslServerTrustAnswer contextSslServerTrustPrompt (const SslServerTrustData & data, apr_uint32_t & acceptedFailures); - virtual bool contextSslClientCertPrompt (QString & certFile); - virtual bool contextSslClientCertPwPrompt (QString & password, - const QString & realm, bool & maySave); - virtual bool contextLoadSslClientCertPw(QString&password,const QString&realm); - virtual QString translate(const QString&what); + virtual bool contextSslClientCertPrompt (TQString & certFile); + virtual bool contextSslClientCertPwPrompt (TQString & password, + const TQString & realm, bool & maySave); + virtual bool contextLoadSslClientCertPw(TQString&password,const TQString&realm); + virtual TQString translate(const TQString&what); - static QString NotifyAction(svn_wc_notify_action_t action); - static QString NotifyState(svn_wc_notify_state_t); + static TQString NotifyAction(svn_wc_notify_action_t action); + static TQString NotifyState(svn_wc_notify_state_t); - static QStringList failure2Strings(apr_uint32_t acceptedFailures); + static TQStringList failure2Strings(apr_uint32_t acceptedFailures); virtual void contextProgress(long long int current, long long int max); public slots: virtual void setCanceled(bool); signals: - void sendNotify(const QString&); + void sendNotify(const TQString&); void tickProgress(); void waitShow(bool); void netProgress(long long int, long long int); protected: static const int smax_actionstring; - static const QString action_strings[]; - static const QString notify_state_strings[]; + static const TQString action_strings[]; + static const TQString notify_state_strings[]; CContextListenerData*m_Data; }; diff --git a/src/svnfrontend/commandexec.cpp b/src/svnfrontend/commandexec.cpp index 86638de..daeab29 100644 --- a/src/svnfrontend/commandexec.cpp +++ b/src/svnfrontend/commandexec.cpp @@ -39,10 +39,10 @@ #include <kdialogbase.h> #include <ktextbrowser.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qvaluelist.h> -#include <qvbox.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqvaluelist.h> +#include <tqvbox.h> class pCPart { @@ -50,8 +50,8 @@ public: pCPart(); ~pCPart(); - QString cmd; - QStringList url; + TQString cmd; + TQStringList url; bool ask_revision; bool rev_set; bool outfile_set; @@ -63,12 +63,12 @@ public: svn::Revision start,end; // for output - QFile toStdout,toStderr; - QString outfile; - QTextStream Stdout,Stderr; + TQFile toStdout,toStderr; + TQString outfile; + TQTextStream Stdout,Stderr; DummyDisplay * disp; - QMap<int,svn::Revision> extraRevisions; - QMap<int,QString> baseUrls; + TQMap<int,svn::Revision> extraRevisions; + TQMap<int,TQString> baseUrls; }; pCPart::pCPart() @@ -79,8 +79,8 @@ pCPart::pCPart() end = svn::Revision::UNDEFINED; toStdout.open(IO_WriteOnly, stdout); toStderr.open(IO_WriteOnly, stderr); - Stdout.setDevice(&toStdout); - Stderr.setDevice(&toStderr); + Stdout.setDevice(TQT_TQIODEVICE(&toStdout)); + Stderr.setDevice(TQT_TQIODEVICE(&toStderr)); disp = new DummyDisplay(); m_SvnWrapper = new SvnActions(disp,0,true); } @@ -91,16 +91,16 @@ pCPart::~pCPart() delete disp; } -CommandExec::CommandExec(QObject*parent, const char *name,KCmdLineArgs *args) - : QObject(parent,name) +CommandExec::CommandExec(TQObject*tqparent, const char *name,KCmdLineArgs *args) + : TQObject(tqparent,name) { m_pCPart = new pCPart; m_pCPart->args = args; SshAgent ag; ag.querySshAgent(); - connect(m_pCPart->m_SvnWrapper,SIGNAL(clientException(const QString&)),this,SLOT(clientException(const QString&))); - connect(m_pCPart->m_SvnWrapper,SIGNAL(sendNotify(const QString&)),this,SLOT(slotNotifyMessage(const QString&))); + connect(m_pCPart->m_SvnWrapper,TQT_SIGNAL(clientException(const TQString&)),this,TQT_SLOT(clientException(const TQString&))); + connect(m_pCPart->m_SvnWrapper,TQT_SIGNAL(sendNotify(const TQString&)),this,TQT_SLOT(slotNotifyMessage(const TQString&))); m_pCPart->m_SvnWrapper->reInitClient(); } @@ -128,111 +128,111 @@ int CommandExec::exec() m_pCPart->cmd=m_pCPart->args->arg(1); m_pCPart->cmd=m_pCPart->cmd.lower(); } - QString slotCmd; - if (!QString::compare(m_pCPart->cmd,"log")) { - slotCmd=SLOT(slotCmd_log()); - } else if (!QString::compare(m_pCPart->cmd,"cat")) { - slotCmd=SLOT(slotCmd_cat()); + TQString slotCmd; + if (!TQString::compare(m_pCPart->cmd,"log")) { + slotCmd=TQT_SLOT(slotCmd_log()); + } else if (!TQString::compare(m_pCPart->cmd,"cat")) { + slotCmd=TQT_SLOT(slotCmd_cat()); m_pCPart->single_revision=true; - } else if (!QString::compare(m_pCPart->cmd,"get")) { - slotCmd=SLOT(slotCmd_get()); + } else if (!TQString::compare(m_pCPart->cmd,"get")) { + slotCmd=TQT_SLOT(slotCmd_get()); m_pCPart->single_revision=true; - } else if (!QString::compare(m_pCPart->cmd,"help")) { - slotCmd=SLOT(slotCmd_help()); - } else if (!QString::compare(m_pCPart->cmd,"blame")|| - !QString::compare(m_pCPart->cmd,"annotate")) { - slotCmd=SLOT(slotCmd_blame()); - } else if (!QString::compare(m_pCPart->cmd,"update")) { - slotCmd=SLOT(slotCmd_update()); + } else if (!TQString::compare(m_pCPart->cmd,"help")) { + slotCmd=TQT_SLOT(slotCmd_help()); + } else if (!TQString::compare(m_pCPart->cmd,"blame")|| + !TQString::compare(m_pCPart->cmd,"annotate")) { + slotCmd=TQT_SLOT(slotCmd_blame()); + } else if (!TQString::compare(m_pCPart->cmd,"update")) { + slotCmd=TQT_SLOT(slotCmd_update()); m_pCPart->single_revision=true; - } else if (!QString::compare(m_pCPart->cmd,"diff")) { + } else if (!TQString::compare(m_pCPart->cmd,"diff")) { m_pCPart->start = svn::Revision::WORKING; - slotCmd=SLOT(slotCmd_diff()); - } else if (!QString::compare(m_pCPart->cmd,"info")) { - slotCmd=SLOT(slotCmd_info()); + slotCmd=TQT_SLOT(slotCmd_diff()); + } else if (!TQString::compare(m_pCPart->cmd,"info")) { + slotCmd=TQT_SLOT(slotCmd_info()); m_pCPart->single_revision=true; - } else if (!QString::compare(m_pCPart->cmd,"commit")|| - !QString::compare(m_pCPart->cmd,"ci")) { - slotCmd=SLOT(slotCmd_commit()); - } else if (!QString::compare(m_pCPart->cmd,"list")|| - !QString::compare(m_pCPart->cmd,"ls")) { - slotCmd=SLOT(slotCmd_list()); - } else if (!QString::compare(m_pCPart->cmd,"copy")|| - !QString::compare(m_pCPart->cmd,"cp")) { - slotCmd=SLOT(slotCmd_copy()); + } else if (!TQString::compare(m_pCPart->cmd,"commit")|| + !TQString::compare(m_pCPart->cmd,"ci")) { + slotCmd=TQT_SLOT(slotCmd_commit()); + } else if (!TQString::compare(m_pCPart->cmd,"list")|| + !TQString::compare(m_pCPart->cmd,"ls")) { + slotCmd=TQT_SLOT(slotCmd_list()); + } else if (!TQString::compare(m_pCPart->cmd,"copy")|| + !TQString::compare(m_pCPart->cmd,"cp")) { + slotCmd=TQT_SLOT(slotCmd_copy()); dont_check_second = true; - } else if (!QString::compare(m_pCPart->cmd,"move")|| - !QString::compare(m_pCPart->cmd,"rename")|| - !QString::compare(m_pCPart->cmd,"mv")) { - slotCmd=SLOT(slotCmd_move()); + } else if (!TQString::compare(m_pCPart->cmd,"move")|| + !TQString::compare(m_pCPart->cmd,"rename")|| + !TQString::compare(m_pCPart->cmd,"mv")) { + slotCmd=TQT_SLOT(slotCmd_move()); dont_check_second = true; - } else if (!QString::compare(m_pCPart->cmd,"checkout")|| - !QString::compare(m_pCPart->cmd,"co")) { - slotCmd=SLOT(slotCmd_checkout()); + } else if (!TQString::compare(m_pCPart->cmd,"checkout")|| + !TQString::compare(m_pCPart->cmd,"co")) { + slotCmd=TQT_SLOT(slotCmd_checkout()); dont_check_second = true; - } else if (!QString::compare(m_pCPart->cmd,"checkoutto")|| - !QString::compare(m_pCPart->cmd,"coto")) { - slotCmd=SLOT(slotCmd_checkoutto()); + } else if (!TQString::compare(m_pCPart->cmd,"checkoutto")|| + !TQString::compare(m_pCPart->cmd,"coto")) { + slotCmd=TQT_SLOT(slotCmd_checkoutto()); dont_check_second = true; - } else if (!QString::compare(m_pCPart->cmd,"export")) { - slotCmd=SLOT(slotCmd_export()); + } else if (!TQString::compare(m_pCPart->cmd,"export")) { + slotCmd=TQT_SLOT(slotCmd_export()); dont_check_second = true; - } else if (!QString::compare(m_pCPart->cmd,"exportto")) { - slotCmd=SLOT(slotCmd_exportto()); + } else if (!TQString::compare(m_pCPart->cmd,"exportto")) { + slotCmd=TQT_SLOT(slotCmd_exportto()); dont_check_second = true; - } else if (!QString::compare(m_pCPart->cmd,"delete")|| - !QString::compare(m_pCPart->cmd,"del")|| - !QString::compare(m_pCPart->cmd,"rm")|| - !QString::compare(m_pCPart->cmd,"remove")) { - slotCmd=SLOT(slotCmd_delete()); - } else if (!QString::compare(m_pCPart->cmd,"add")) { - slotCmd=SLOT(slotCmd_add()); + } else if (!TQString::compare(m_pCPart->cmd,"delete")|| + !TQString::compare(m_pCPart->cmd,"del")|| + !TQString::compare(m_pCPart->cmd,"rm")|| + !TQString::compare(m_pCPart->cmd,"remove")) { + slotCmd=TQT_SLOT(slotCmd_delete()); + } else if (!TQString::compare(m_pCPart->cmd,"add")) { + slotCmd=TQT_SLOT(slotCmd_add()); dont_check_all = true; path_only=true; - } else if (!QString::compare(m_pCPart->cmd,"undo")|| - !QString::compare(m_pCPart->cmd,"revert")) { - slotCmd=SLOT(slotCmd_revert()); - } else if (!QString::compare(m_pCPart->cmd,"checknew")|| - !QString::compare(m_pCPart->cmd,"addnew")) { - slotCmd=SLOT(slotCmd_addnew()); - } else if (!QString::compare(m_pCPart->cmd,"switch")) { - slotCmd=SLOT(slotCmd_switch()); - } else if (!QString::compare(m_pCPart->cmd,"tree")) { - slotCmd=SLOT(slotCmd_tree()); - } else if (!QString::compare(m_pCPart->cmd,"lock")) { - slotCmd=SLOT(slotCmd_lock()); + } else if (!TQString::compare(m_pCPart->cmd,"undo")|| + !TQString::compare(m_pCPart->cmd,"revert")) { + slotCmd=TQT_SLOT(slotCmd_revert()); + } else if (!TQString::compare(m_pCPart->cmd,"checknew")|| + !TQString::compare(m_pCPart->cmd,"addnew")) { + slotCmd=TQT_SLOT(slotCmd_addnew()); + } else if (!TQString::compare(m_pCPart->cmd,"switch")) { + slotCmd=TQT_SLOT(slotCmd_switch()); + } else if (!TQString::compare(m_pCPart->cmd,"tree")) { + slotCmd=TQT_SLOT(slotCmd_tree()); + } else if (!TQString::compare(m_pCPart->cmd,"lock")) { + slotCmd=TQT_SLOT(slotCmd_lock()); no_revision = true; check_force=true; - } else if (!QString::compare(m_pCPart->cmd,"unlock")) { - slotCmd=SLOT(slotCmd_unlock()); + } else if (!TQString::compare(m_pCPart->cmd,"unlock")) { + slotCmd=TQT_SLOT(slotCmd_unlock()); no_revision=true; check_force=true; } - bool found = connect(this,SIGNAL(executeMe()),this,slotCmd.ascii()); + bool found = connect(this,TQT_SIGNAL(executeMe()),this,slotCmd.ascii()); if (!found) { - slotCmd=i18n("Command \"%1\" not implemented or known").arg(m_pCPart->cmd); + slotCmd=i18n("Command \"%1\" not implemented or known").tqarg(m_pCPart->cmd); KMessageBox::sorry(0,slotCmd,i18n("SVN Error")); return -1; } - QString tmp,query,proto,v; - QMap<QString,QString> q; + TQString tmp,query,proto,v; + TQMap<TQString,TQString> q; KURL tmpurl; - QString mainProto; - QString _baseurl; + TQString mainProto; + TQString _baseurl; for (int j = 2; j<m_pCPart->args->count();++j) { tmpurl = helpers::KTranslateUrl::translateSystemUrl(m_pCPart->args->url(j).prettyURL()); query = tmpurl.query(); q = m_pCPart->args->url(j).queryItems(); - if (q.find("rev")!=q.end()) { + if (q.tqfind("rev")!=q.end()) { v = q["rev"]; } else { v = ""; } tmpurl.setProtocol(svn::Url::transformProtokoll(tmpurl.protocol())); - if (tmpurl.protocol().find("ssh")!=-1) { + if (tmpurl.protocol().tqfind("ssh")!=-1) { SshAgent ag; // this class itself checks if done before ag.addSshIdentities(); @@ -260,7 +260,7 @@ int CommandExec::exec() tmp = tmpurl.path(); } } - QStringList l = QStringList::split('?',tmp); + TQStringList l = TQStringList::split('?',tmp); if (l.count()>0) { tmp=l[0]; } @@ -303,7 +303,7 @@ int CommandExec::exec() m_pCPart->outfile = m_pCPart->args->getOption("o"); } if (m_pCPart->args->isSet("l")) { - QString s = m_pCPart->args->getOption("l"); + TQString s = m_pCPart->args->getOption("l"); m_pCPart->log_limit = s.toInt(); if (m_pCPart->log_limit<0) { m_pCPart->log_limit = 0; @@ -314,13 +314,13 @@ int CommandExec::exec() if (Kdesvnsettings::self()->cmdline_show_logwindow() && m_lastMessagesLines >= Kdesvnsettings::self()->cmdline_log_minline()) { KDialogBase dlg ( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "execution_log", true, i18n("Execution log"), KDialogBase::Ok); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); KTextBrowser*ptr = new KTextBrowser(Dialog1Layout); ptr->setText(m_lastMessages); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),"kdesvn_cmd_log")); @@ -333,9 +333,9 @@ int CommandExec::exec() /*! - \fn CommandExec::clientException(const QString&) + \fn CommandExec::clientException(const TQString&) */ -void CommandExec::clientException(const QString&what) +void CommandExec::clientException(const TQString&what) { m_pCPart->Stderr<<what<<endl; KMessageBox::sorry(0,what,i18n("SVN Error")); @@ -410,7 +410,7 @@ void CommandExec::slotCmd_blame() void CommandExec::slotCmd_cat() { - if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) { + if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) { m_pCPart->rev_set=true; m_pCPart->start=m_pCPart->extraRevisions[0]; } else { @@ -423,7 +423,7 @@ void CommandExec::slotCmd_cat() void CommandExec::slotCmd_get() { - if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) { + if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) { m_pCPart->rev_set=true; m_pCPart->start=m_pCPart->extraRevisions[0]; } else { @@ -454,12 +454,12 @@ void CommandExec::slotCmd_diff() } else { svn::Revision r1 = svn::Revision::HEAD; svn::Revision r2 = svn::Revision::HEAD; - if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) { + if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) { r1 = m_pCPart->extraRevisions[0]; } else if (!svn::Url::isValid(m_pCPart->url[0])) { r1 = svn::Revision::WORKING; } - if (m_pCPart->extraRevisions.find(1)!=m_pCPart->extraRevisions.end()) { + if (m_pCPart->extraRevisions.tqfind(1)!=m_pCPart->extraRevisions.end()) { r2 = m_pCPart->extraRevisions[1]; } else if (!svn::Url::isValid(m_pCPart->url[1])) { r2 = svn::Revision::WORKING; @@ -470,7 +470,7 @@ void CommandExec::slotCmd_diff() void CommandExec::slotCmd_info() { - if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) { + if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) { m_pCPart->rev_set=true; m_pCPart->start=m_pCPart->extraRevisions[0]; } @@ -479,7 +479,7 @@ void CommandExec::slotCmd_info() void CommandExec::slotCmd_commit() { - QValueList<svn::Path> targets; + TQValueList<svn::Path> targets; for (unsigned j=0; j<m_pCPart->url.count();++j) { targets.push_back(svn::Path(m_pCPart->url[j])); } @@ -499,7 +499,7 @@ void CommandExec::slotCmd_list() return; } for (unsigned int i = 0; i < res.count();++i) { - QString d = svn::DateTime(res[i]->time()).toString(QString("yyyy-MM-dd hh:mm::ss")); + TQString d = svn::DateTime(res[i]->time()).toString(TQString("yyyy-MM-dd hh:mm::ss")); m_pCPart->Stdout << (res[i]->kind()==svn_node_dir?"D":"F")<<" " << d << " " @@ -509,7 +509,7 @@ void CommandExec::slotCmd_list() void CommandExec::slotCmd_copy() { - QString target; + TQString target; if (m_pCPart->url.count()<2) { bool force_move,ok; target = CopyMoveView_impl::getMoveCopyTo(&ok,&force_move,false, @@ -520,7 +520,7 @@ void CommandExec::slotCmd_copy() } else { target = m_pCPart->url[1]; } - if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) { + if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) { m_pCPart->rev_set=true; m_pCPart->start=m_pCPart->extraRevisions[0]; } else { @@ -533,7 +533,7 @@ void CommandExec::slotCmd_move() { bool force_move,ok; force_move = false; - QString target; + TQString target; if (m_pCPart->url.count()<2) { target = CopyMoveView_impl::getMoveCopyTo(&ok,&force_move,true, m_pCPart->url[0],"",0,"move_name"); @@ -571,8 +571,8 @@ void CommandExec::slotCmd_addnew() */ bool CommandExec::scanRevision() { - QString revstring = m_pCPart->args->getOption("r"); - QStringList revl = QStringList::split(":",revstring); + TQString revstring = m_pCPart->args->getOption("r"); + TQStringList revl = TQStringList::split(":",revstring); if (revl.count()==0) { return false; } @@ -584,7 +584,7 @@ bool CommandExec::scanRevision() return true; } -void CommandExec::slotNotifyMessage(const QString&msg) +void CommandExec::slotNotifyMessage(const TQString&msg) { m_pCPart->m_SvnWrapper->slotExtraLogMsg(msg); if (Kdesvnsettings::self()->cmdline_show_logwindow()) { @@ -596,19 +596,19 @@ void CommandExec::slotNotifyMessage(const QString&msg) bool CommandExec::askRevision() { - QString _head = m_pCPart->cmd+" - Revision"; + TQString _head = m_pCPart->cmd+" - Revision"; KDialogBase dlg( 0, "Revisiondlg", true, _head, KDialogBase::Ok|KDialogBase::Cancel); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); Rangeinput_impl*rdlg; rdlg = new Rangeinput_impl(Dialog1Layout); - dlg.resize( QSize(120,60).expandedTo(dlg.minimumSizeHint())); + dlg.resize( TQSize(120,60).expandedTo(dlg.tqminimumSizeHint())); rdlg->setStartOnly(m_pCPart->single_revision); - if (dlg.exec()==QDialog::Accepted) { + if (dlg.exec()==TQDialog::Accepted) { Rangeinput_impl::revision_range range = rdlg->getRange(); m_pCPart->start = range.first; m_pCPart->end = range.second; @@ -624,12 +624,12 @@ bool CommandExec::askRevision() */ void CommandExec::slotCmd_switch() { - QString base; + TQString base; if (m_pCPart->url.count()>1) { clientException(i18n("May only switch one url at time!")); return; } - if (m_pCPart->baseUrls.find(0)==m_pCPart->baseUrls.end()) { + if (m_pCPart->baseUrls.tqfind(0)==m_pCPart->baseUrls.end()) { clientException(i18n("Switch only on working copies!")); return; } diff --git a/src/svnfrontend/commandexec.h b/src/svnfrontend/commandexec.h index bd8f16e..ec66fe7 100644 --- a/src/svnfrontend/commandexec.h +++ b/src/svnfrontend/commandexec.h @@ -20,8 +20,8 @@ #ifndef COMMANDEXEC_H #define COMMANDEXEC_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class KCmdLineArgs; class KURL; @@ -34,17 +34,18 @@ namespace svn { /** @author Rajko Albrecht */ -class CommandExec : public QObject +class CommandExec : public TQObject { Q_OBJECT + TQ_OBJECT public: - CommandExec(QObject*parent,const char *name,KCmdLineArgs *args); + CommandExec(TQObject*tqparent,const char *name,KCmdLineArgs *args); virtual ~CommandExec(); virtual int exec(); protected slots: - virtual void clientException(const QString&); - virtual void slotNotifyMessage(const QString&); + virtual void clientException(const TQString&); + virtual void slotNotifyMessage(const TQString&); virtual void slotCmd_log(); virtual void slotCmd_update(); virtual void slotCmd_diff(); @@ -74,7 +75,7 @@ protected: virtual bool scanRevision(); virtual bool askRevision(); - QString m_lastMessages; + TQString m_lastMessages; unsigned int m_lastMessagesLines; private: diff --git a/src/svnfrontend/copymoveview.ui b/src/svnfrontend/copymoveview.ui index 260f333..c567484 100644 --- a/src/svnfrontend/copymoveview.ui +++ b/src/svnfrontend/copymoveview.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CopyMoveView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CopyMoveView</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,14 +19,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_HeadOneLabel</cstring> </property> <property name="text"> <string><p align="right">Rename</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> </widget> @@ -37,24 +37,24 @@ <property name="text"> <string>this long text</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_HeadTwoLabel</cstring> </property> <property name="text"> <string>to</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> @@ -67,7 +67,7 @@ <property name="text"> <string>/there/</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -78,7 +78,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_ForceBox</cstring> </property> @@ -93,7 +93,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="2" margin="2"/> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>ksqueezedtextlabel.h</includehint> <includehint>ksqueezedtextlabel.h</includehint> diff --git a/src/svnfrontend/copymoveview_impl.cpp b/src/svnfrontend/copymoveview_impl.cpp index 24d3114..bfcd2ea 100644 --- a/src/svnfrontend/copymoveview_impl.cpp +++ b/src/svnfrontend/copymoveview_impl.cpp @@ -21,15 +21,15 @@ #include "copymoveview_impl.h" #include <ksqueezedtextlabel.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klineedit.h> #include <klocale.h> #include <kdialogbase.h> -#include <qvbox.h> +#include <tqvbox.h> -CopyMoveView_impl::CopyMoveView_impl(const QString&baseName,const QString&sourceName,bool move,QWidget* parent, const char* name, WFlags fl) -: CopyMoveView(parent,name,fl) +CopyMoveView_impl::CopyMoveView_impl(const TQString&baseName,const TQString&sourceName,bool move,TQWidget* tqparent, const char* name, WFlags fl) +: CopyMoveView(tqparent,name,fl) { m_BaseName = baseName; if (m_BaseName.length()>0 && !m_BaseName.endsWith("/")) { @@ -39,7 +39,7 @@ CopyMoveView_impl::CopyMoveView_impl(const QString&baseName,const QString&source m_OldNameLabel->setText("<b>"+sourceName+"</b>"); m_OldName = sourceName; if (m_BaseName.length()>0) { - QString t = m_OldName.right(m_OldName.length()-m_BaseName.length()); + TQString t = m_OldName.right(m_OldName.length()-m_BaseName.length()); m_NewNameInput->setText(t); } else { m_PrefixLabel->hide(); @@ -61,7 +61,7 @@ CopyMoveView_impl::~CopyMoveView_impl() /*! \fn CopyMoveView_impl::newName() */ -QString CopyMoveView_impl::newName() +TQString CopyMoveView_impl::newName() { return m_BaseName+m_NewNameInput->text(); } @@ -77,19 +77,19 @@ bool CopyMoveView_impl::force() /*! - \fn CopyMoveView_impl::getMoveCopyTo(bool*ok,bool*force,const QString&old,const QString&base,QWidget*) + \fn CopyMoveView_impl::getMoveCopyTo(bool*ok,bool*force,const TQString&old,const TQString&base,TQWidget*) */ -QString CopyMoveView_impl::getMoveCopyTo(bool*ok,bool*force,bool move, - const QString&old,const QString&base,QWidget*parent,const char*name) +TQString CopyMoveView_impl::getMoveCopyTo(bool*ok,bool*force,bool move, + const TQString&old,const TQString&base,TQWidget*tqparent,const char*name) { - KDialogBase dlg(parent,name,true,(move?i18n("Move/Rename file/dir"):i18n("Copy file/dir")), + KDialogBase dlg(tqparent,name,true,(move?i18n("Move/Rename file/dir"):i18n("Copy file/dir")), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::NoDefault); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); CopyMoveView_impl*ptr=new CopyMoveView_impl(base,old,(move),Dialog1Layout); - QString nName = QString::null; - dlg.resize( QSize(500,160).expandedTo(dlg.minimumSizeHint()) ); - if (dlg.exec()!=QDialog::Accepted) { + TQString nName = TQString(); + dlg.resize( TQSize(500,160).expandedTo(dlg.tqminimumSizeHint()) ); + if (dlg.exec()!=TQDialog::Accepted) { if (ok) *ok = false; } else { if (force) *force = ptr->force(); diff --git a/src/svnfrontend/copymoveview_impl.h b/src/svnfrontend/copymoveview_impl.h index 2c17fd1..c6871f5 100644 --- a/src/svnfrontend/copymoveview_impl.h +++ b/src/svnfrontend/copymoveview_impl.h @@ -26,14 +26,15 @@ class CopyMoveView_impl : public CopyMoveView { Q_OBJECT + TQ_OBJECT public: - CopyMoveView_impl(const QString&baseName,const QString&sourceName,bool move,QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CopyMoveView_impl(const TQString&baseName,const TQString&sourceName,bool move,TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~CopyMoveView_impl(); - virtual QString newName(); + virtual TQString newName(); bool force(); - static QString getMoveCopyTo(bool*ok,bool*force,bool move, const QString&old,const QString&base, - QWidget*,const char*name); + static TQString getMoveCopyTo(bool*ok,bool*force,bool move, const TQString&old,const TQString&base, + TQWidget*,const char*name); /*$PUBLIC_FUNCTIONS$*/ public slots: @@ -46,8 +47,8 @@ protected slots: /*$PROTECTED_SLOTS$*/ protected: - QString m_OldName; - QString m_BaseName; + TQString m_OldName; + TQString m_BaseName; }; #endif diff --git a/src/svnfrontend/createrepo_dlg.ui b/src/svnfrontend/createrepo_dlg.ui index f2b2440..69194a5 100644 --- a/src/svnfrontend/createrepo_dlg.ui +++ b/src/svnfrontend/createrepo_dlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CreateRepo_Dlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CreateRepo_Dlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,22 +19,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>Type of repository:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -67,20 +67,20 @@ <number>18</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Path to repository:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_DisableFsync</cstring> </property> @@ -91,7 +91,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_LogKeep</cstring> </property> @@ -102,7 +102,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_CreateMainDirs</cstring> </property> @@ -119,10 +119,10 @@ <string>Create trunk, tags and branches folder</string> </property> <property name="whatsThis" stdset="0"> - <string>If this is set then the base layout (<tt>/trunk</tt>,<tt>/branches</tt> and <tt>/tags</tt>) will created after opening the fresh repository.</string> + <string>If this is set then the base tqlayout (<tt>/trunk</tt>,<tt>/branches</tt> and <tt>/tags</tt>) will created after opening the fresh repository.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_svn13compat</cstring> </property> @@ -142,7 +142,7 @@ <string>If set, the repository created will compatible to subversion prior 1.4. This is only usefull when svnqt is running with subversion 1.4 or above.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_svn14compat</cstring> </property> @@ -192,12 +192,12 @@ <tabstop>m_svn13compat</tabstop> <tabstop>m_svn14compat</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">fsTypeChanged(int)</slot> <slot access="protected">compatChanged13(bool)</slot> <slot access="protected">compatChanged14(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/src/svnfrontend/createrepo_impl.cpp b/src/svnfrontend/createrepo_impl.cpp index 160f0ab..5fdd126 100644 --- a/src/svnfrontend/createrepo_impl.cpp +++ b/src/svnfrontend/createrepo_impl.cpp @@ -24,7 +24,7 @@ #include <kurlrequester.h> #include <kcombobox.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> class RecurseCheck { @@ -34,8 +34,8 @@ public: ~RecurseCheck(){value = false;} }; -Createrepo_impl::Createrepo_impl(bool enable_compat13, bool enable_compat14, QWidget *parent, const char *name) - :CreateRepo_Dlg(parent, name) +Createrepo_impl::Createrepo_impl(bool enable_compat13, bool enable_compat14, TQWidget *tqparent, const char *name) + :CreateRepo_Dlg(tqparent, name) { inChangeCompat=true; m_DisableFsync->setEnabled(false); @@ -61,17 +61,17 @@ void Createrepo_impl::fsTypeChanged(int which) m_LogKeep->setEnabled(which==1); } -QString Createrepo_impl::targetDir() +TQString Createrepo_impl::targetDir() { KURL u = m_ReposPathinput->url(); - QString res = u.path(); + TQString res = u.path(); while (res.endsWith("/")) { res.truncate(res.length()-1); } return res; } -QString Createrepo_impl::fsType() +TQString Createrepo_impl::fsType() { return m_FilesystemSelector->currentText(); } diff --git a/src/svnfrontend/createrepo_impl.h b/src/svnfrontend/createrepo_impl.h index 14f2743..6fab516 100644 --- a/src/svnfrontend/createrepo_impl.h +++ b/src/svnfrontend/createrepo_impl.h @@ -24,10 +24,11 @@ class Createrepo_impl: public CreateRepo_Dlg { Q_OBJECT + TQ_OBJECT public: - Createrepo_impl(bool enable_compat13,bool enable_compat14, QWidget *parent = 0, const char *name = 0); - QString targetDir(); - QString fsType(); + Createrepo_impl(bool enable_compat13,bool enable_compat14, TQWidget *tqparent = 0, const char *name = 0); + TQString targetDir(); + TQString fsType(); bool disableFsync(); bool keepLogs(); bool createMain(); diff --git a/src/svnfrontend/dummydisplay.cpp b/src/svnfrontend/dummydisplay.cpp index 75037e2..045bc84 100644 --- a/src/svnfrontend/dummydisplay.cpp +++ b/src/svnfrontend/dummydisplay.cpp @@ -29,7 +29,7 @@ DummyDisplay::~DummyDisplay() { } -QWidget*DummyDisplay::realWidget() +TQWidget*DummyDisplay::realWidget() { return 0L; } @@ -39,7 +39,7 @@ SvnItem*DummyDisplay::Selected() return 0L; } -void DummyDisplay::SelectionList(QPtrList<SvnItem>*) +void DummyDisplay::SelectionList(TQPtrList<SvnItem>*) { } diff --git a/src/svnfrontend/dummydisplay.h b/src/svnfrontend/dummydisplay.h index 255a35c..2a9b89d 100644 --- a/src/svnfrontend/dummydisplay.h +++ b/src/svnfrontend/dummydisplay.h @@ -30,9 +30,9 @@ class DummyDisplay : public ItemDisplay public: DummyDisplay(); virtual ~DummyDisplay(); - virtual QWidget*realWidget(); + virtual TQWidget*realWidget(); virtual SvnItem*Selected(); - virtual void SelectionList(QPtrList<SvnItem>*); + virtual void SelectionList(TQPtrList<SvnItem>*); virtual bool openURL( const KURL &url,bool noReinit=false ); virtual SvnItem*SelectedOrMain(); }; diff --git a/src/svnfrontend/dumprepo_dlg.ui b/src/svnfrontend/dumprepo_dlg.ui index 8799419..af92bfd 100644 --- a/src/svnfrontend/dumprepo_dlg.ui +++ b/src/svnfrontend/dumprepo_dlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DumpRepoDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DumpRepoDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> @@ -35,25 +35,25 @@ <number>18</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_RepoLabel</cstring> </property> <property name="text"> <string>Repository to dump:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_OutfileLabel</cstring> </property> <property name="text"> <string>Dump into:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -64,7 +64,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_incrementalDump</cstring> </property> @@ -78,7 +78,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_UseDeltas</cstring> </property> @@ -92,7 +92,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_Rangeonly</cstring> </property> @@ -103,33 +103,33 @@ <string></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>End revision:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Start revision:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -181,10 +181,10 @@ <slot>slotDumpRange(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotDumpRange(bool)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/svnfrontend/dumprepo_impl.cpp b/src/svnfrontend/dumprepo_impl.cpp index dfaeb69..577c0bd 100644 --- a/src/svnfrontend/dumprepo_impl.cpp +++ b/src/svnfrontend/dumprepo_impl.cpp @@ -25,10 +25,10 @@ #include <kcombobox.h> #include <knuminput.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -DumpRepo_impl::DumpRepo_impl(QWidget *parent, const char *name) - :DumpRepoDlg(parent, name) +DumpRepo_impl::DumpRepo_impl(TQWidget *tqparent, const char *name) + :DumpRepoDlg(tqparent, name) { } @@ -42,10 +42,10 @@ void DumpRepo_impl::slotDumpRange(bool how) /*! \fn DumpRepo_impl::reposPath() */ -QString DumpRepo_impl::reposPath() +TQString DumpRepo_impl::reposPath() { KURL u = m_ReposPath->url(); - QString res = u.path(); + TQString res = u.path(); while (res.endsWith("/")) { res.truncate(res.length()-1); } @@ -56,10 +56,10 @@ QString DumpRepo_impl::reposPath() /*! \fn DumpRepo_impl::targetFile() */ -QString DumpRepo_impl::targetFile() +TQString DumpRepo_impl::targetFile() { KURL u = m_OutputFile->url(); - QString res = u.path(); + TQString res = u.path(); while (res.endsWith("/")) { res.truncate(res.length()-1); } diff --git a/src/svnfrontend/dumprepo_impl.h b/src/svnfrontend/dumprepo_impl.h index 6e58256..8b947d7 100644 --- a/src/svnfrontend/dumprepo_impl.h +++ b/src/svnfrontend/dumprepo_impl.h @@ -24,10 +24,11 @@ class DumpRepo_impl: public DumpRepoDlg { Q_OBJECT + TQ_OBJECT public: - DumpRepo_impl(QWidget *parent = 0, const char *name = 0); - QString reposPath(); - QString targetFile(); + DumpRepo_impl(TQWidget *tqparent = 0, const char *name = 0); + TQString reposPath(); + TQString targetFile(); bool incremental(); bool use_deltas(); bool useNumbers(); diff --git a/src/svnfrontend/editproperty_impl.cpp b/src/svnfrontend/editproperty_impl.cpp index eef6218..8fe82fe 100644 --- a/src/svnfrontend/editproperty_impl.cpp +++ b/src/svnfrontend/editproperty_impl.cpp @@ -17,9 +17,9 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qstringlist.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqstringlist.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <ktextedit.h> #include <kcombobox.h> @@ -30,8 +30,8 @@ #include "editproperty_impl.h" -EditProperty_impl::EditProperty_impl(QWidget *parent, const char *name) - :EditPropsDlgData(parent, name) +EditProperty_impl::EditProperty_impl(TQWidget *tqparent, const char *name) + :EditPropsDlgData(tqparent, name) { /// @TODO Read these values from a text or config file fileProperties += ("svn:eol-style"); @@ -44,7 +44,7 @@ EditProperty_impl::EditProperty_impl(QWidget *parent, const char *name) fileComments += i18n("If present, make the file executable.<br>" "This property can not be set on a directory. " "A non-recursive attempt will fail, and a recursive attempt " - "will set the property only on the file children of the folder."); + "will set the property only on the file tqchildren of the folder."); fileComments += i18n("Keywords to be expanded into the contents of a file.<br>" "They can be inserted into documents by placing a keyword anchor " "which is formatted as $KeywordName$.<br>" @@ -80,7 +80,7 @@ EditProperty_impl::EditProperty_impl(QWidget *parent, const char *name) dirComments += i18n("If present, make the file executable.<br>" "This property can not be set on a directory. " "A non-recursive attempt will fail, and a recursive attempt " - "will set the property only on the file children of the folder."); + "will set the property only on the file tqchildren of the folder."); /* TRANSLATORS: Do not translate "example" in the URL because this is according TRANSLATORS: to http://www.rfc-editor.org/rfc/rfc2606.txt a reserved URL.*/ dirComments += i18n("A newline separated list of module specifiers, each " @@ -122,8 +122,8 @@ EditProperty_impl::EditProperty_impl(QWidget *parent, const char *name) m_NameEdit->setHistoryItems(fileProperties, true); isDir = false; - QToolTip::add(m_NameEdit, "Select or enter new property"); - connect(m_NameEdit, SIGNAL(activated(const QString &)), this, SLOT(updateToolTip(const QString &))); + TQToolTip::add(m_NameEdit, "Select or enter new property"); + connect(m_NameEdit, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(updateToolTip(const TQString &))); } @@ -132,19 +132,19 @@ EditProperty_impl::~EditProperty_impl() { } -void EditProperty_impl::updateToolTip(const QString & selection) +void EditProperty_impl::updateToolTip(const TQString & selection) { int i; if (isDir) { - i = dirProperties.findIndex(selection); + i = dirProperties.tqfindIndex(selection); if (i >= 0) { comment = dirComments[i]; } else { comment = "No help for this property available"; } } else { - i = fileProperties.findIndex(selection); + i = fileProperties.tqfindIndex(selection); if (i >= 0) { comment = fileComments[i]; } else { @@ -152,7 +152,7 @@ void EditProperty_impl::updateToolTip(const QString & selection) } } - QToolTip::add(m_NameEdit, comment); + TQToolTip::add(m_NameEdit, comment); } void EditProperty_impl::setDir(bool dir) @@ -173,18 +173,18 @@ void EditProperty_impl::setDir(bool dir) } -QString EditProperty_impl::propName()const +TQString EditProperty_impl::propName()const { return m_NameEdit->currentText(); } -QString EditProperty_impl::propValue()const +TQString EditProperty_impl::propValue()const { return m_ValueEdit->text(); } -void EditProperty_impl::setPropName(const QString&n) +void EditProperty_impl::setPropName(const TQString&n) { m_NameEdit->addToHistory(n); m_NameEdit->setCurrentItem(n); @@ -192,17 +192,17 @@ void EditProperty_impl::setPropName(const QString&n) } -void EditProperty_impl::setPropValue(const QString&v) +void EditProperty_impl::setPropValue(const TQString&v) { m_ValueEdit->setText(v); } void EditProperty_impl::showHelp() { - QPoint pos = m_ValueEdit->pos(); + TQPoint pos = m_ValueEdit->pos(); pos.setX(pos.x() + m_ValueEdit->width()/2); pos.setY(pos.y() + m_ValueEdit->height()/4); - QWhatsThis::display(comment, mapToGlobal(pos)); + TQWhatsThis::display(comment, mapToGlobal(pos)); } diff --git a/src/svnfrontend/editproperty_impl.h b/src/svnfrontend/editproperty_impl.h index 89fce30..6bf220b 100644 --- a/src/svnfrontend/editproperty_impl.h +++ b/src/svnfrontend/editproperty_impl.h @@ -22,30 +22,31 @@ #include "editpropsdlg.h" -class QStringList; -class QString; +class TQStringList; +class TQString; class EditProperty_impl: public EditPropsDlgData { Q_OBJECT + TQ_OBJECT public: - EditProperty_impl(QWidget *parent = 0, const char *name = 0); + EditProperty_impl(TQWidget *tqparent = 0, const char *name = 0); ~EditProperty_impl(); - QString propName()const; - QString propValue()const; - void setPropName(const QString&); - void setPropValue(const QString&); + TQString propName()const; + TQString propValue()const; + void setPropName(const TQString&); + void setPropValue(const TQString&); void setDir(bool dir); protected slots: - void updateToolTip(const QString&); + void updateToolTip(const TQString&); private: - QStringList fileProperties; - QStringList fileComments; - QStringList dirProperties; - QStringList dirComments; - QString comment; + TQStringList fileProperties; + TQStringList fileComments; + TQStringList dirProperties; + TQStringList dirComments; + TQString comment; bool isDir; protected slots: virtual void showHelp(); diff --git a/src/svnfrontend/editpropsdlg.ui b/src/svnfrontend/editpropsdlg.ui index 460a468..e7d6ac1 100644 --- a/src/svnfrontend/editpropsdlg.ui +++ b/src/svnfrontend/editpropsdlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>EditPropsDlgData</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>EditPropsDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -37,14 +37,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>107</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -61,7 +61,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -77,9 +77,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <grid> <property name="name"> @@ -90,7 +90,7 @@ <cstring>m_NameEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_NameLabel</cstring> </property> @@ -103,9 +103,9 @@ <cstring>m_ValueEdit</cstring> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <vbox> <property name="name"> @@ -121,14 +121,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_ValueLabel</cstring> </property> @@ -136,7 +136,7 @@ <string>Property value:</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame5</cstring> </property> @@ -150,11 +150,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>helpButton</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>36</width> <height>36</height> @@ -185,7 +185,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>50</height> @@ -230,12 +230,12 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">nameChanged(const QString&)</slot> <slot access="protected">valueChanged()</slot> <slot access="protected">showHelp()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/svnfrontend/filelistviewitem.cpp b/src/svnfrontend/filelistviewitem.cpp index 19af4fe..bb5d4d5 100644 --- a/src/svnfrontend/filelistviewitem.cpp +++ b/src/svnfrontend/filelistviewitem.cpp @@ -33,8 +33,8 @@ #include <kdebug.h> #include <kconfig.h> -#include <qfileinfo.h> -#include <qpainter.h> +#include <tqfileinfo.h> +#include <tqpainter.h> const int FileListViewItem::COL_ICON = 0; const int FileListViewItem::COL_NAME = 0; @@ -46,21 +46,21 @@ const int FileListViewItem::COL_IS_LOCKED = 5; //const int FileListViewItem::COL_CURRENT_REV = 5; -FileListViewItem::FileListViewItem(kdesvnfilelist*_parent,const svn::StatusPtr&_stat) - : KListViewItem(_parent),SvnItem(_stat), +FileListViewItem::FileListViewItem(kdesvnfilelist*_tqparent,const svn::StatusPtr&_stat) + : KListViewItem(_tqparent),SvnItem(_stat), sortChar(0), - m_Ksvnfilelist(_parent) + m_Ksvnfilelist(_tqparent) { - m_SvnWrapper = _parent->m_SvnWrapper; + m_SvnWrapper = _tqparent->m_SvnWrapper; init(); } -FileListViewItem::FileListViewItem(kdesvnfilelist*_parent,FileListViewItem*_parentItem,const svn::StatusPtr&_stat) - : KListViewItem(_parentItem),SvnItem(_stat), +FileListViewItem::FileListViewItem(kdesvnfilelist*_tqparent,FileListViewItem*_tqparentItem,const svn::StatusPtr&_stat) + : KListViewItem(_tqparentItem),SvnItem(_stat), sortChar(0), - m_Ksvnfilelist(_parent) + m_Ksvnfilelist(_tqparent) { - m_SvnWrapper = _parent->m_SvnWrapper; + m_SvnWrapper = _tqparent->m_SvnWrapper; init(); } @@ -105,7 +105,7 @@ FileListViewItem::~FileListViewItem() if (isSelected()) { /* when item is selected and deleted signal selectionChanged isn't emitted - in QListView anymore and let kdesvn crash. + in TQListView anymore and let kdesvn crash. */ setSelected(false); m_Ksvnfilelist->selectionChanged(); @@ -118,7 +118,7 @@ void FileListViewItem::setStat(const svn::StatusPtr&stat) init(); } -void FileListViewItem::refreshStatus(bool childs,QPtrList<SvnItem>*exclude,bool depsonly) +void FileListViewItem::refreshtqStatus(bool childs,TQPtrList<SvnItem>*exclude,bool depsonly) { FileListViewItem*it; @@ -130,28 +130,28 @@ void FileListViewItem::refreshStatus(bool childs,QPtrList<SvnItem>*exclude,bool if (!isValid()) { return; } - it = static_cast<FileListViewItem*>(parent()); + it = static_cast<FileListViewItem*>(tqparent()); if (!childs) { - if (it && (!exclude || exclude->find(it)==-1)) { - it->refreshStatus(false,exclude); + if (it && (!exclude || exclude->tqfind(it)==-1)) { + it->refreshtqStatus(false,exclude); } } else if (firstChild()){ it = static_cast<FileListViewItem*>(firstChild()); while (it) { - if (!exclude || exclude->find(it)==-1) { - it->refreshStatus(true,exclude); + if (!exclude || exclude->tqfind(it)==-1) { + it->refreshtqStatus(true,exclude); } it = static_cast<FileListViewItem*>(it->nextSibling()); } } - repaint(); + tqrepaint(); } void FileListViewItem::makePixmap() { int size = Kdesvnsettings::listview_icon_size(); bool overlay = Kdesvnsettings::display_overlays(); - QPixmap pm; + TQPixmap pm; if (m_Pixmap.isNull()) { pm = getPixmap(size,overlay); } else { @@ -160,21 +160,21 @@ void FileListViewItem::makePixmap() setPixmap(COL_ICON,pm); } -void FileListViewItem::setPreviewPix(const QPixmap& pixmap) +void FileListViewItem::setPreviewPix(const TQPixmap& pixmap) { if (pixmap.isNull()) return; m_Pixmap = pixmap; int size = Kdesvnsettings::listview_icon_size(); bool overlay = Kdesvnsettings::display_overlays(); - QPixmap pm = getPixmap(pixmap,size,overlay); + TQPixmap pm = getPixmap(pixmap,size,overlay); setPixmap(COL_ICON,pm); } -bool FileListViewItem::isParent(QListViewItem*which) +bool FileListViewItem::isParent(TQListViewItem*which) { if (!which) return false; - QListViewItem*item = this; - while ( (item=item->parent())) { + TQListViewItem*item = this; + while ( (item=item->tqparent())) { if (item==which) { return true; } @@ -192,11 +192,11 @@ void FileListViewItem::update() setText(COL_STATUS,infoText()); setText(COL_LAST_AUTHOR,cmtAuthor()); setText(COL_LAST_DATE,KGlobal::locale()->formatDateTime(fullDate())); - setText(COL_LAST_REV,QString("%1").arg(cmtRev())); + setText(COL_LAST_REV,TQString("%1").tqarg(cmtRev())); setText(COL_IS_LOCKED,lockOwner()); } -int FileListViewItem::compare( QListViewItem* item, int col, bool ascending ) const +int FileListViewItem::compare( TQListViewItem* item, int col, bool ascending ) const { FileListViewItem* k = static_cast<FileListViewItem*>( item ); if ( sortChar != k->sortChar ) { @@ -222,40 +222,40 @@ int FileListViewItem::compare( QListViewItem* item, int col, bool ascending ) co void FileListViewItem::removeChilds() { - QListViewItem*temp; + TQListViewItem*temp; while ((temp=firstChild())) { delete temp; } } -void FileListViewItem::updateStatus(const svn::StatusPtr&s) +void FileListViewItem::updatetqStatus(const svn::StatusPtr&s) { setStat(s); } SvnItem* FileListViewItem::getParentItem()const { - return static_cast<FileListViewItem*>(parent()); + return static_cast<FileListViewItem*>(tqparent()); } /*! \fn FileListViewItem::getParentDir()const */ - QString FileListViewItem::getParentDir()const + TQString FileListViewItem::getParentDir()const { SvnItem*temp = getParentItem(); - if (!temp) return QString::null; + if (!temp) return TQString(); return temp->fullName(); } -void FileListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void FileListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { bool colors = Kdesvnsettings::colored_state(); if (!colors||m_bgColor==NONE) { - KListViewItem::paintCell(p,cg,column,width,alignment); + KListViewItem::paintCell(p,cg,column,width,tqalignment); return; } - QColorGroup _cg = cg; - QColor _bgColor; + TQColorGroup _cg = cg; + TQColor _bgColor; switch(m_bgColor) { case UPDATES: _bgColor = Kdesvnsettings::color_need_update(); @@ -285,23 +285,23 @@ void FileListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, _bgColor = Kdesvnsettings::color_need_lock(); break; default: - KListViewItem::paintCell(p,cg,column,width,alignment); + KListViewItem::paintCell(p,cg,column,width,tqalignment); return; break; } - const QPixmap *pm = listView()->viewport()->backgroundPixmap(); + const TQPixmap *pm = listView()->viewport()->backgroundPixmap(); if (pm && !pm->isNull()) { - _cg.setBrush(QColorGroup::Base, QBrush(_bgColor, *pm)); - QPoint o = p->brushOrigin(); + _cg.setBrush(TQColorGroup::Base, TQBrush(_bgColor, *pm)); + TQPoint o = p->brushOrigin(); p->setBrushOrigin( o.x()-listView()->contentsX(), o.y()-listView()->contentsY() ); } else { - if (listView()->viewport()->backgroundMode()==Qt::FixedColor) { - _cg.setColor(QColorGroup::Background,_bgColor); + if (listView()->viewport()->backgroundMode()==TQt::FixedColor) { + _cg.setColor(TQColorGroup::Background,_bgColor); } else { - _cg.setColor(QColorGroup::Base,_bgColor); + _cg.setColor(TQColorGroup::Base,_bgColor); } } - QListViewItem::paintCell(p, _cg, column, width, alignment); + TQListViewItem::paintCell(p, _cg, column, width, tqalignment); } const svn::Revision&FileListViewItem::correctPeg()const @@ -309,7 +309,7 @@ const svn::Revision&FileListViewItem::correctPeg()const return m_Ksvnfilelist->remoteRevision(); } -FileListViewItem*FileListViewItem::findChild(const QString&aName) +FileListViewItem*FileListViewItem::findChild(const TQString&aName) { FileListViewItem*_item = (FileListViewItem*)firstChild(); while (_item) { diff --git a/src/svnfrontend/filelistviewitem.h b/src/svnfrontend/filelistviewitem.h index e8f0d64..3c5780f 100644 --- a/src/svnfrontend/filelistviewitem.h +++ b/src/svnfrontend/filelistviewitem.h @@ -22,11 +22,11 @@ #include "svnitem.h" #include <klistview.h> -#include <qdatetime.h> -#include <qptrlist.h> +#include <tqdatetime.h> +#include <tqptrlist.h> #include "src/svnqt/svnqttypes.hpp" -class QPainter; +class TQPainter; class KFileItem; class kdesvnfilelist; class SvnActions; @@ -42,34 +42,34 @@ public: FileListViewItem(kdesvnfilelist*,FileListViewItem*,const svn::StatusPtr&); virtual ~FileListViewItem(); - virtual int compare( QListViewItem* i, int col, bool ascending ) const; + virtual int compare( TQListViewItem* i, int col, bool ascending ) const; - virtual void updateStatus(const svn::StatusPtr&s); - virtual void refreshStatus(bool childs=false,QPtrList<SvnItem> *exclude = 0,bool depsonly=false); + virtual void updatetqStatus(const svn::StatusPtr&s); + virtual void refreshtqStatus(bool childs=false,TQPtrList<SvnItem> *exclude = 0,bool depsonly=false); #if 0 virtual void refreshMe(); #endif void removeChilds(); - bool isParent(QListViewItem*which); + bool isParent(TQListViewItem*which); static const int COL_ICON,COL_NAME,COL_LAST_REV,COL_LAST_AUTHOR,COL_LAST_DATE,COL_STATUS/*,COL_CURRENT_REV*/,COL_IS_LOCKED; - virtual QString getParentDir()const; + virtual TQString getParentDir()const; virtual SvnItem* getParentItem()const; virtual FileListViewItem*fItem(){return this;} virtual void setStat(const svn::StatusPtr&); - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); virtual void setOpen(bool o); virtual void setOpenNoBlock(bool o); - virtual void setPreviewPix(const QPixmap& pixmap); + virtual void setPreviewPix(const TQPixmap& pixmap); virtual const svn::Revision&correctPeg()const; - virtual FileListViewItem*findChild(const QString&); + virtual FileListViewItem*findChild(const TQString&); protected: - QColor m_highColor; + TQColor m_highColor; short int sortChar; kdesvnfilelist*m_Ksvnfilelist; @@ -79,10 +79,10 @@ protected: void init(); virtual SvnActions*getWrapper()const; SvnActions*m_SvnWrapper; - QPixmap m_Pixmap; + TQPixmap m_Pixmap; }; -typedef QPtrList<FileListViewItem> FileListViewItemList; -typedef QPtrListIterator<FileListViewItem> FileListViewItemListIterator; +typedef TQPtrList<FileListViewItem> FileListViewItemList; +typedef TQPtrListIterator<FileListViewItem> FileListViewItemListIterator; #endif diff --git a/src/svnfrontend/fillcachethread.cpp b/src/svnfrontend/fillcachethread.cpp index ddaa934..4930cce 100644 --- a/src/svnfrontend/fillcachethread.cpp +++ b/src/svnfrontend/fillcachethread.cpp @@ -25,19 +25,19 @@ #include "src/svnqt/cache/DatabaseException.hpp" #include "src/kdesvn_events.h" -#include <qobject.h> +#include <tqobject.h> #include <kdebug.h> #include <kapplication.h> #include <klocale.h> -FillCacheThread::FillCacheThread(QObject*_parent,const QString&reposRoot) - : QThread(),mutex(),m_SvnContextListener(0) +FillCacheThread::FillCacheThread(TQObject*_tqparent,const TQString&reposRoot) + : TQThread(),mutex(),m_SvnContextListener(0) { - m_Parent = _parent; + m_Parent = _tqparent; m_CurrentContext = new svn::Context(); m_SvnContextListener = new ThreadContextListener(m_Parent); - QObject::connect(m_SvnContextListener,SIGNAL(sendNotify(const QString&)),m_Parent,SLOT(slotNotifyMessage(const QString&))); + TQObject::connect(m_SvnContextListener,TQT_SIGNAL(sendNotify(const TQString&)),m_Parent,TQT_SLOT(slotNotifyMessage(const TQString&))); m_CurrentContext->setListener(m_SvnContextListener); m_what = reposRoot; @@ -51,7 +51,7 @@ FillCacheThread::~FillCacheThread() m_SvnContextListener=0; } -const QString&FillCacheThread::reposRoot()const +const TQString&FillCacheThread::reposRoot()const { return m_what; } @@ -65,21 +65,21 @@ void FillCacheThread::cancelMe() void FillCacheThread::run() { svn::Revision where = svn::Revision::HEAD; - QString ex; + TQString ex; svn::cache::ReposLog rl(m_Svnclient,m_what); bool breakit=false; KApplication*k = KApplication::kApplication(); try { svn::Revision latestCache = rl.latestCachedRev(); svn::Revision Head = rl.latestHeadRev(); - Q_LLONG i = latestCache.revnum(); + TQ_LLONG i = latestCache.revnum(); if (i<0) { i=0; } - Q_LLONG j = Head.revnum(); + TQ_LLONG j = Head.revnum(); - Q_LLONG _max=j-i; - Q_LLONG _cur=0; + TQ_LLONG _max=j-i; + TQ_LLONG _cur=0; FillCacheStatusEvent*fev; if (k) { @@ -110,13 +110,13 @@ void FillCacheThread::run() rl.fillCache(Head.revnum()); } i=Head.revnum(); - m_SvnContextListener->contextNotify(i18n("Cache filled up to revision %1").arg(i)); + m_SvnContextListener->contextNotify(i18n("Cache filled up to revision %1").tqarg(i)); } } catch (const svn::Exception&e) { m_SvnContextListener->contextNotify(e.msg()); } if (k && !breakit) { - QCustomEvent*ev = new QCustomEvent(EVENT_LOGCACHE_FINISHED); + TQCustomEvent*ev = new TQCustomEvent(EVENT_LOGCACHE_FINISHED); ev->setData((void*)this); k->postEvent(m_Parent,ev); } diff --git a/src/svnfrontend/fillcachethread.h b/src/svnfrontend/fillcachethread.h index 04b0ec2..90951c9 100644 --- a/src/svnfrontend/fillcachethread.h +++ b/src/svnfrontend/fillcachethread.h @@ -27,28 +27,28 @@ #include "eventnumbers.h" #include "frontendtypes.h" -#include <qthread.h> -#include <qevent.h> +#include <tqthread.h> +#include <tqevent.h> -class QObject; +class TQObject; -class FillCacheThread:public QThread +class FillCacheThread:public TQThread { public: - FillCacheThread(QObject*,const QString&reposRoot); + FillCacheThread(TQObject*,const TQString&reposRoot); virtual ~FillCacheThread(); virtual void run(); virtual void cancelMe(); - const QString&reposRoot()const; + const TQString&reposRoot()const; protected: - QMutex mutex; + TQMutex mutex; svn::Client* m_Svnclient; svn::ContextP m_CurrentContext; svn::smart_pointer<ThreadContextListener> m_SvnContextListener; - QObject*m_Parent; - QString m_what; + TQObject*m_Parent; + TQString m_what; }; #endif diff --git a/src/svnfrontend/fronthelpers/checkoutinfo.ui b/src/svnfrontend/fronthelpers/checkoutinfo.ui index a880bd3..77e1398 100644 --- a/src/svnfrontend/fronthelpers/checkoutinfo.ui +++ b/src/svnfrontend/fronthelpers/checkoutinfo.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CheckoutInfo</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CheckoutInfo</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -38,7 +38,7 @@ <number>18</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_TargetLabel</cstring> </property> @@ -57,14 +57,14 @@ <number>18</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_UrlLabel</cstring> </property> <property name="text"> <string>Enter URL:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -83,7 +83,7 @@ </sizepolicy> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_CreateDirButton</cstring> </property> @@ -94,15 +94,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_overwriteButton</cstring> </property> @@ -119,7 +119,7 @@ <string>May existing unversioned items ovewritten</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_ignoreExternals</cstring> </property> @@ -132,9 +132,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -144,14 +144,14 @@ <property name="name"> <cstring>m_DepthSelector</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>20</height> </size> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_ShowExplorer</cstring> </property> @@ -206,10 +206,10 @@ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data> </image> </images> -<slots> +<Q_SLOTS> <slot access="protected">urlChanged(const QString&)</slot> -</slots> -<layoutdefaults spacing="2" margin="2"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/svnfrontend/fronthelpers/checkoutinfo_impl.cpp b/src/svnfrontend/fronthelpers/checkoutinfo_impl.cpp index 8d207e7..46b6452 100644 --- a/src/svnfrontend/fronthelpers/checkoutinfo_impl.cpp +++ b/src/svnfrontend/fronthelpers/checkoutinfo_impl.cpp @@ -23,16 +23,16 @@ #include "src/svnqt/url.hpp" #include "helpers/ktranslateurl.h" #include <kurlrequester.h> -#include <qlabel.h> -#include <qtooltip.h> +#include <tqlabel.h> +#include <tqtooltip.h> #include <klineedit.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdebug.h> -CheckoutInfo_impl::CheckoutInfo_impl(QWidget *parent, const char *name) - :CheckoutInfo(parent, name) +CheckoutInfo_impl::CheckoutInfo_impl(TQWidget *tqparent, const char *name) + :CheckoutInfo(tqparent, name) { m_RangeInput->setStartOnly(true); m_RangeInput->setHeadDefault(); @@ -47,10 +47,10 @@ svn::Revision CheckoutInfo_impl::toRevision() return m_RangeInput->getRange().first; } -QString CheckoutInfo_impl::reposURL() +TQString CheckoutInfo_impl::reposURL() { KURL uri(m_UrlEdit->url()); - QString proto = svn::Url::transformProtokoll(uri.protocol()); + TQString proto = svn::Url::transformProtokoll(uri.protocol()); if (proto=="file"&&!m_UrlEdit->url().startsWith("ksvn+file:")) { uri.setProtocol(""); } else { @@ -59,16 +59,16 @@ QString CheckoutInfo_impl::reposURL() return uri.prettyURL(); } -QString CheckoutInfo_impl::targetDir() +TQString CheckoutInfo_impl::targetDir() { if (!m_CreateDirButton->isChecked()) { return m_TargetSelector->url(); } - QString _uri = reposURL(); + TQString _uri = reposURL(); while (_uri.endsWith("/")) { _uri.truncate(_uri.length()-1); } - QStringList l = QStringList::split('/',_uri); + TQStringList l = TQStringList::split('/',_uri); if (l.count()==0) { return m_TargetSelector->url(); } @@ -81,14 +81,14 @@ bool CheckoutInfo_impl::overwrite() } /*! - \fn CheckoutInfo_impl::setTargetUrl(const QString&) + \fn CheckoutInfo_impl::setTargetUrl(const TQString&) */ -void CheckoutInfo_impl::setTargetUrl(const QString&what) +void CheckoutInfo_impl::setTargetUrl(const TQString&what) { m_TargetSelector->setURL(what); } -void CheckoutInfo_impl::setStartUrl(const QString&what) +void CheckoutInfo_impl::setStartUrl(const TQString&what) { KURL uri(what); if (uri.protocol()=="file") { @@ -109,14 +109,14 @@ void CheckoutInfo_impl::hideDepth(bool how,bool overwriteAsRecurse) m_DepthSelector->setEnabled(false); m_DepthSelector->hide(); if (overwriteAsRecurse) { - QToolTip::add( m_overwriteButton, i18n( "Make operation recursive." ) ); + TQToolTip::add( m_overwriteButton, i18n( "Make operation recursive." ) ); m_overwriteButton->setText(i18n("Recursive")); } } else if (!how) { m_DepthSelector->setEnabled(false); m_DepthSelector->show(); m_overwriteButton->setText( tr2i18n( "Overwrite existing" ) ); - QToolTip::add( m_overwriteButton, tr2i18n( "May existing unversioned items ovewritten" ) ); + TQToolTip::add( m_overwriteButton, tr2i18n( "May existing unversioned items ovewritten" ) ); } adjustSize(); } @@ -176,7 +176,7 @@ void CheckoutInfo_impl::disableRange(bool how) } } -void CheckoutInfo_impl::urlChanged(const QString&) +void CheckoutInfo_impl::urlChanged(const TQString&) { } diff --git a/src/svnfrontend/fronthelpers/checkoutinfo_impl.h b/src/svnfrontend/fronthelpers/checkoutinfo_impl.h index 600e179..1816c74 100644 --- a/src/svnfrontend/fronthelpers/checkoutinfo_impl.h +++ b/src/svnfrontend/fronthelpers/checkoutinfo_impl.h @@ -27,17 +27,18 @@ class CheckoutInfo_impl: public CheckoutInfo { Q_OBJECT + TQ_OBJECT public: - CheckoutInfo_impl(QWidget *parent = 0, const char *name = 0); + CheckoutInfo_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~CheckoutInfo_impl(); svn::Revision toRevision(); - QString reposURL(); - QString targetDir(); + TQString reposURL(); + TQString targetDir(); bool overwrite(); svn::Depth getDepth(); - void setStartUrl(const QString&); + void setStartUrl(const TQString&); void disableForce(bool how); void disableTargetDir(bool how); @@ -46,11 +47,11 @@ public: void disableExternals(bool how); bool openAfterJob(); virtual void disableRange(bool how); - void setTargetUrl(const QString&); + void setTargetUrl(const TQString&); bool ignoreExternals(); void hideDepth(bool hide,bool overwriteAsRecurse); protected slots: - virtual void urlChanged(const QString&); + virtual void urlChanged(const TQString&); }; #endif diff --git a/src/svnfrontend/fronthelpers/cursorstack.h b/src/svnfrontend/fronthelpers/cursorstack.h index 471af6e..4daf061 100644 --- a/src/svnfrontend/fronthelpers/cursorstack.h +++ b/src/svnfrontend/fronthelpers/cursorstack.h @@ -25,7 +25,7 @@ #define __CURSOR_STACK_H #include <kapplication.h> -#include <qcursor.h> +#include <tqcursor.h> //! Change cursor on stack. /*! May used in methods where more than returns exists. Cursor will restored on destruction @@ -39,9 +39,9 @@ public: * Create instance and changes the application cursor to \a c * \param c cursortype to set. */ - CursorStack(Qt::CursorShape c = Qt::WaitCursor) + CursorStack(TQt::tqCursorShape c = TQt::WaitCursor) { - KApplication::setOverrideCursor(QCursor(c)); + KApplication::setOverrideCursor(TQCursor(c)); } //! Destructor. /*! diff --git a/src/svnfrontend/fronthelpers/propertyitem.cpp b/src/svnfrontend/fronthelpers/propertyitem.cpp index 0e25d5f..2e48324 100644 --- a/src/svnfrontend/fronthelpers/propertyitem.cpp +++ b/src/svnfrontend/fronthelpers/propertyitem.cpp @@ -2,16 +2,16 @@ #include <klocale.h> #include <kiconloader.h> -PropertyListViewItem::PropertyListViewItem(KListView *parent,const QString&aName,const QString&aValue) - : KListViewItem(parent),m_currentName(aName),m_startName(aName),m_currentValue(aValue),m_startValue(aValue),m_deleted(false) +PropertyListViewItem::PropertyListViewItem(KListView *tqparent,const TQString&aName,const TQString&aValue) + : KListViewItem(tqparent),m_currentName(aName),m_startName(aName),m_currentValue(aValue),m_startValue(aValue),m_deleted(false) { setMultiLinesEnabled(true); setText(0,startName()); setText(1,startValue()); } -PropertyListViewItem::PropertyListViewItem(KListView *parent) - : KListViewItem(parent),m_currentName(""),m_startName(""),m_currentValue(""),m_startValue(""),m_deleted(false) +PropertyListViewItem::PropertyListViewItem(KListView *tqparent) + : KListViewItem(tqparent),m_currentName(""),m_startName(""),m_currentValue(""),m_startValue(""),m_deleted(false) { setMultiLinesEnabled(true); setText(0,startName()); @@ -46,10 +46,10 @@ void PropertyListViewItem::deleteIt() void PropertyListViewItem::unDeleteIt() { m_deleted = false; - setPixmap(0,QPixmap()); + setPixmap(0,TQPixmap()); } -bool PropertyListViewItem::protected_Property(const QString&what) +bool PropertyListViewItem::protected_Property(const TQString&what) { if (what.compare("svn:special")!=0) return false; return true; diff --git a/src/svnfrontend/fronthelpers/propertyitem.h b/src/svnfrontend/fronthelpers/propertyitem.h index c630c7c..c72af05 100644 --- a/src/svnfrontend/fronthelpers/propertyitem.h +++ b/src/svnfrontend/fronthelpers/propertyitem.h @@ -13,14 +13,14 @@ class PropertyListViewItem:public KListViewItem public: static const int _RTTI_ = 1001; - PropertyListViewItem(KListView *parent,const QString&,const QString&); - PropertyListViewItem(KListView *parent); + PropertyListViewItem(KListView *tqparent,const TQString&,const TQString&); + PropertyListViewItem(KListView *tqparent); virtual ~PropertyListViewItem(); - const QString&startName()const{return m_startName;} - const QString&startValue()const{return m_startValue;} - const QString¤tName()const{return m_currentName;} - const QString¤tValue()const{return m_currentValue;} + const TQString&startName()const{return m_startName;} + const TQString&startValue()const{return m_startValue;} + const TQString¤tName()const{return m_currentName;} + const TQString¤tValue()const{return m_currentValue;} void checkValue(); void checkName(); @@ -39,10 +39,10 @@ class PropertyListViewItem:public KListViewItem * This moment it just checks for "svn:special" * \return true if protected property otherwise false */ - static bool protected_Property(const QString&); + static bool protected_Property(const TQString&); protected: - QString m_currentName,m_startName,m_currentValue,m_startValue; + TQString m_currentName,m_startName,m_currentValue,m_startValue; bool m_deleted; }; diff --git a/src/svnfrontend/fronthelpers/propertylist.cpp b/src/svnfrontend/fronthelpers/propertylist.cpp index 8fa3b66..118f281 100644 --- a/src/svnfrontend/fronthelpers/propertylist.cpp +++ b/src/svnfrontend/fronthelpers/propertylist.cpp @@ -25,8 +25,8 @@ #include <kmessagebox.h> -Propertylist::Propertylist(QWidget *parent, const char *name) - : KListView(parent, name),m_commitit(false) +Propertylist::Propertylist(TQWidget *tqparent, const char *name) + : KListView(tqparent, name),m_commitit(false) { addColumn(i18n("Property")); addColumn(i18n("Value")); @@ -35,10 +35,10 @@ Propertylist::Propertylist(QWidget *parent, const char *name) setRootIsDecorated(false); setSortColumn(0); setAcceptDrops(false); - connect(this,SIGNAL(itemRenamed(QListViewItem*,const QString&,int)),this,SLOT(slotItemRenamed(QListViewItem*,const QString&,int))); + connect(this,TQT_SIGNAL(itemRenamed(TQListViewItem*,const TQString&,int)),this,TQT_SLOT(slotItemRenamed(TQListViewItem*,const TQString&,int))); - connect(this,SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),this, - SLOT(slotContextMenuRequested(QListViewItem *, const QPoint &, int))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),this, + TQT_SLOT(slotContextMenuRequested(TQListViewItem *, const TQPoint &, int))); //setFullWidth( TRUE ); } @@ -47,7 +47,7 @@ Propertylist::~Propertylist() { } -void Propertylist::displayList(const svn::PathPropertiesMapListPtr&propList,bool editable,const QString&aCur) +void Propertylist::displayList(const svn::PathPropertiesMapListPtr&propList,bool editable,const TQString&aCur) { viewport()->setUpdatesEnabled(false); clear(); @@ -71,7 +71,7 @@ void Propertylist::displayList(const svn::PathPropertiesMapListPtr&propList,bool } } viewport()->setUpdatesEnabled(true); - viewport()->repaint(); + viewport()->tqrepaint(); } void Propertylist::clear() @@ -80,9 +80,9 @@ void Propertylist::clear() } /*! - \fn PropertiesDlg::slotItemRenamed(QListViewItem*item,const QString & str,int col ) + \fn PropertiesDlg::slotItemRenamed(TQListViewItem*item,const TQString & str,int col ) */ -void Propertylist::slotItemRenamed(QListViewItem*_item,const QString & text,int col ) +void Propertylist::slotItemRenamed(TQListViewItem*_item,const TQString & text,int col ) { if (!_item || _item->rtti()!=PropertyListViewItem::_RTTI_) return; PropertyListViewItem*item = static_cast<PropertyListViewItem*> (_item); @@ -119,7 +119,7 @@ void Propertylist::slotItemRenamed(QListViewItem*_item,const QString & text,int } if (commitchanges() && item->different()) { svn::PropertiesMap pm; - QValueList<QString> dels; + TQValueList<TQString> dels; pm[item->currentName()]=item->currentValue(); if (item->currentName()!=item->startName()){ dels.push_back(item->startName()); @@ -128,12 +128,12 @@ void Propertylist::slotItemRenamed(QListViewItem*_item,const QString & text,int } } -bool Propertylist::checkExisting(const QString&aName,QListViewItem*it) +bool Propertylist::checkExisting(const TQString&aName,TQListViewItem*it) { if (!it) { - return findItem(aName,0)!=0; + return tqfindItem(aName,0)!=0; } - QListViewItemIterator iter(this); + TQListViewItemIterator iter(this); while ( iter.current() ) { if ( iter.current()==it) { ++iter; @@ -147,18 +147,18 @@ bool Propertylist::checkExisting(const QString&aName,QListViewItem*it) return false; } -void Propertylist::addCallback(QObject*ob) +void Propertylist::addCallback(TQObject*ob) { if (ob) { - connect(this,SIGNAL(sigSetProperty(const svn::PropertiesMap&,const QValueList<QString>&,const QString&)), - ob,SLOT(slotChangeProperties(const svn::PropertiesMap&,const QValueList<QString>&,const QString&))); + connect(this,TQT_SIGNAL(sigSetProperty(const svn::PropertiesMap&,const TQValueList<TQString>&,const TQString&)), + ob,TQT_SLOT(slotChangeProperties(const svn::PropertiesMap&,const TQValueList<TQString>&,const TQString&))); } } /*! - \fn Propertylist::slotContextMenuRequested(QListViewItem *, const QPoint &, int) + \fn Propertylist::slotContextMenuRequested(TQListViewItem *, const TQPoint &, int) */ -void Propertylist::slotContextMenuRequested(QListViewItem *, const QPoint &, int) +void Propertylist::slotContextMenuRequested(TQListViewItem *, const TQPoint &, int) { /// @todo implement me } diff --git a/src/svnfrontend/fronthelpers/propertylist.h b/src/svnfrontend/fronthelpers/propertylist.h index d3cf245..be4cd81 100644 --- a/src/svnfrontend/fronthelpers/propertylist.h +++ b/src/svnfrontend/fronthelpers/propertylist.h @@ -29,29 +29,30 @@ class Propertylist : public KListView { Q_OBJECT + TQ_OBJECT public: - Propertylist(QWidget *parent = 0, const char *name = 0); + Propertylist(TQWidget *tqparent = 0, const char *name = 0); ~Propertylist(); - bool checkExisting(const QString&aName,QListViewItem*it=0); + bool checkExisting(const TQString&aName,TQListViewItem*it=0); bool commitchanges()const{return m_commitit;} void setCommitchanges(bool how){m_commitit=how;} - void addCallback(QObject*); + void addCallback(TQObject*); public slots: - virtual void displayList(const svn::PathPropertiesMapListPtr&,bool,const QString&); + virtual void displayList(const svn::PathPropertiesMapListPtr&,bool,const TQString&); virtual void clear(); protected slots: - virtual void slotItemRenamed(QListViewItem*item,const QString & str,int col ); + virtual void slotItemRenamed(TQListViewItem*item,const TQString & str,int col ); signals: - void sigSetProperty(const svn::PropertiesMap&,const QValueList<QString>&,const QString&); + void sigSetProperty(const svn::PropertiesMap&,const TQValueList<TQString>&,const TQString&); protected: bool m_commitit; - QString m_current; + TQString m_current; protected slots: - virtual void slotContextMenuRequested(QListViewItem *, const QPoint &, int); + virtual void slotContextMenuRequested(TQListViewItem *, const TQPoint &, int); }; #endif diff --git a/src/svnfrontend/fronthelpers/rangeinput.ui b/src/svnfrontend/fronthelpers/rangeinput.ui index 18e8884..b06e7da 100644 --- a/src/svnfrontend/fronthelpers/rangeinput.ui +++ b/src/svnfrontend/fronthelpers/rangeinput.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>RangeInputDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RangeInput</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_startRevBox</cstring> </property> @@ -51,7 +51,7 @@ </sizepolicy> </property> </widget> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_startNumberButton</cstring> </property> @@ -62,7 +62,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>m_startDateButton</cstring> </property> @@ -73,7 +73,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_startStartButton</cstring> </property> @@ -86,7 +86,7 @@ <cstring>m_startDateInput</cstring> </property> </widget> - <widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_startHeadButton</cstring> </property> @@ -94,7 +94,7 @@ <string>HEAD</string> </property> </widget> - <widget class="QRadioButton" row="4" column="0"> + <widget class="TQRadioButton" row="4" column="0"> <property name="name"> <cstring>m_startWorkingButton</cstring> </property> @@ -107,7 +107,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_stopRevBox</cstring> </property> @@ -139,7 +139,7 @@ </sizepolicy> </property> </widget> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_stopNumberButton</cstring> </property> @@ -155,7 +155,7 @@ <cstring>m_stopDateInput</cstring> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>m_stopDateButton</cstring> </property> @@ -166,7 +166,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_stopStartButton</cstring> </property> @@ -174,7 +174,7 @@ <string>START</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_stopHeadButton</cstring> </property> @@ -182,7 +182,7 @@ <string>HEAD</string> </property> </widget> - <widget class="QRadioButton" row="4" column="0"> + <widget class="TQRadioButton" row="4" column="0"> <property name="name"> <cstring>m_stopWorkingButton</cstring> </property> @@ -259,7 +259,7 @@ <tabstop>m_stopStartButton</tabstop> <tabstop>m_stopHeadButton</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="protected">stopHeadToggled(bool)</slot> <slot access="protected">stopBaseToggled(bool)</slot> <slot access="protected">stopNumberToggled(bool)</slot> @@ -268,8 +268,8 @@ <slot access="protected">startNumberToggled(bool)</slot> <slot access="protected">startDateToggled(bool)</slot> <slot access="protected">stopDateToggled(bool)</slot> -</slots> -<layoutdefaults spacing="2" margin="2"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/src/svnfrontend/fronthelpers/rangeinput_impl.cpp b/src/svnfrontend/fronthelpers/rangeinput_impl.cpp index bf18bf9..e05e968 100644 --- a/src/svnfrontend/fronthelpers/rangeinput_impl.cpp +++ b/src/svnfrontend/fronthelpers/rangeinput_impl.cpp @@ -20,24 +20,24 @@ #include "rangeinput_impl.h" #include "helpers/sub2qt.h" -#include <qpushbutton.h> -#include <qlayout.h> -#include <qradiobutton.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqradiobutton.h> #include <knuminput.h> #include <kdatetimewidget.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include <klocale.h> #include <kdebug.h> -Rangeinput_impl::Rangeinput_impl(QWidget *parent, const char *name) - :RangeInputDlg(parent, name) +Rangeinput_impl::Rangeinput_impl(TQWidget *tqparent, const char *name) + :RangeInputDlg(tqparent, name) { m_startRevInput->setRange(0,INT_MAX,1,false); m_endRevInput->setRange(0,INT_MAX,1,false); m_startRevInput->setValue(1); m_endRevInput->setValue(1); - m_startDateInput->setDateTime(QDateTime::currentDateTime ()); - m_stopDateInput->setDateTime(QDateTime::currentDateTime ()); + m_startDateInput->setDateTime(TQDateTime::tqcurrentDateTime ()); + m_stopDateInput->setDateTime(TQDateTime::tqcurrentDateTime ()); m_stopDateInput->setEnabled(false); m_startDateInput->setEnabled(false); m_stopHeadButton->setChecked(true); @@ -186,8 +186,8 @@ void Rangeinput_impl::setStartOnly(bool theValue) m_startRevBox->setTitle(i18n( "Start with revision" )); } updateGeometry(); - setMinimumSize(minimumSizeHint()); - resize( QSize(397, 272).expandedTo(minimumSizeHint()) ); + setMinimumSize(tqminimumSizeHint()); + resize( TQSize(397, 272).expandedTo(tqminimumSizeHint()) ); } #include "rangeinput_impl.moc" diff --git a/src/svnfrontend/fronthelpers/rangeinput_impl.h b/src/svnfrontend/fronthelpers/rangeinput_impl.h index a7ca29e..8be32c9 100644 --- a/src/svnfrontend/fronthelpers/rangeinput_impl.h +++ b/src/svnfrontend/fronthelpers/rangeinput_impl.h @@ -22,15 +22,16 @@ #include "rangeinput.h" #include "src/svnqt/revision.hpp" -#include <qpair.h> +#include <tqpair.h> class Rangeinput_impl: public RangeInputDlg { Q_OBJECT + TQ_OBJECT public: - Rangeinput_impl(QWidget *parent = 0, const char *name = 0); + Rangeinput_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~Rangeinput_impl(); - typedef QPair<svn::Revision,svn::Revision> revision_range; + typedef TQPair<svn::Revision,svn::Revision> revision_range; revision_range getRange(); diff --git a/src/svnfrontend/fronthelpers/revisionbutton.ui b/src/svnfrontend/fronthelpers/revisionbutton.ui index 34b7b5a..efbf34b 100644 --- a/src/svnfrontend/fronthelpers/revisionbutton.ui +++ b/src/svnfrontend/fronthelpers/revisionbutton.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>RevisionButton</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RevisionButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -45,10 +45,10 @@ <slot>askRevision()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>askRevision()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> </includehints> diff --git a/src/svnfrontend/fronthelpers/revisionbuttonimpl.cpp b/src/svnfrontend/fronthelpers/revisionbuttonimpl.cpp index 15a2e6b..3d97dce 100644 --- a/src/svnfrontend/fronthelpers/revisionbuttonimpl.cpp +++ b/src/svnfrontend/fronthelpers/revisionbuttonimpl.cpp @@ -27,10 +27,10 @@ #include <kapplication.h> #include <klocale.h> -#include <qvbox.h> +#include <tqvbox.h> -RevisionButtonImpl::RevisionButtonImpl(QWidget *parent, const char *name) - :RevisionButton(parent, name),m_Rev(svn::Revision::UNDEFINED),m_noWorking(false) +RevisionButtonImpl::RevisionButtonImpl(TQWidget *tqparent, const char *name) + :RevisionButton(tqparent, name),m_Rev(svn::Revision::UNDEFINED),m_noWorking(false) { } @@ -50,17 +50,17 @@ void RevisionButtonImpl::askRevision() Rangeinput_impl*rdlg; int buttons = KDialogBase::Ok|KDialogBase::Cancel; - KDialogBase * dlg = new KDialogBase(KApplication::activeModalWidget(),"Revinput",true,i18n("Select revision"),buttons); + KDialogBase * dlg = new KDialogBase(TQT_TQWIDGET(KApplication::activeModalWidget()),"Revinput",true,i18n("Select revision"),buttons); if (!dlg) { return; } - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); rdlg = new Rangeinput_impl(Dialog1Layout); rdlg->setStartOnly(true); rdlg->setNoWorking(m_noWorking); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"log_revisions_dlg")); - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { setRevision(rdlg->getRange().first); } dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"log_revisions_dlg",false); diff --git a/src/svnfrontend/fronthelpers/revisionbuttonimpl.h b/src/svnfrontend/fronthelpers/revisionbuttonimpl.h index a8f31a0..a2265b4 100644 --- a/src/svnfrontend/fronthelpers/revisionbuttonimpl.h +++ b/src/svnfrontend/fronthelpers/revisionbuttonimpl.h @@ -25,9 +25,10 @@ class RevisionButtonImpl: public RevisionButton { Q_OBJECT + TQ_OBJECT public: - RevisionButtonImpl(QWidget *parent = 0, const char *name = 0); + RevisionButtonImpl(TQWidget *tqparent = 0, const char *name = 0); virtual ~RevisionButtonImpl(); virtual void setRevision(const svn::Revision&aRev); diff --git a/src/svnfrontend/fronthelpers/widgetblockstack.cpp b/src/svnfrontend/fronthelpers/widgetblockstack.cpp index 9b8af8f..bd03faa 100644 --- a/src/svnfrontend/fronthelpers/widgetblockstack.cpp +++ b/src/svnfrontend/fronthelpers/widgetblockstack.cpp @@ -19,9 +19,9 @@ ***************************************************************************/ #include "widgetblockstack.h" -#include <qwidget.h> +#include <tqwidget.h> -WidgetBlockStack::WidgetBlockStack(QWidget*w) +WidgetBlockStack::WidgetBlockStack(TQWidget*w) { if ( (_w=w)) { diff --git a/src/svnfrontend/fronthelpers/widgetblockstack.h b/src/svnfrontend/fronthelpers/widgetblockstack.h index 88d24c5..c223515 100644 --- a/src/svnfrontend/fronthelpers/widgetblockstack.h +++ b/src/svnfrontend/fronthelpers/widgetblockstack.h @@ -20,13 +20,13 @@ #ifndef __WIDGET_BLOCK_STACK_H #define __WIDGET_BLOCK_STACK_H -class QWidget; +class TQWidget; class WidgetBlockStack { - QWidget*_w; + TQWidget*_w; public: - WidgetBlockStack(QWidget*); + WidgetBlockStack(TQWidget*); ~WidgetBlockStack(); }; diff --git a/src/svnfrontend/graphtree/drawparams.cpp b/src/svnfrontend/graphtree/drawparams.cpp index ced7bd4..74e4953 100644 --- a/src/svnfrontend/graphtree/drawparams.cpp +++ b/src/svnfrontend/graphtree/drawparams.cpp @@ -19,16 +19,16 @@ /* * A Widget for visualizing hierarchical metrics as areas. - * The API is similar to QListView. + * The API is similar to TQListView. */ #include <math.h> -#include <qpainter.h> -#include <qtooltip.h> -#include <qregexp.h> -#include <qstyle.h> -#include <qpopupmenu.h> +#include <tqpainter.h> +#include <tqtooltip.h> +#include <tqregexp.h> +#include <tqstyle.h> +#include <tqpopupmenu.h> #include <klocale.h> #include <kconfig.h> @@ -52,12 +52,12 @@ StoredDrawParams::StoredDrawParams() _shaded = true; _rotated = false; - _backColor = Qt::white; + _backColor = TQt::white; // field array has size 0 } -StoredDrawParams::StoredDrawParams(QColor c, +StoredDrawParams::StoredDrawParams(TQColor c, bool selected, bool current) { _backColor = c; @@ -71,18 +71,18 @@ StoredDrawParams::StoredDrawParams(QColor c, // field array has size 0 } -QString StoredDrawParams::text(int f) const +TQString StoredDrawParams::text(int f) const { if ((f<0) || (f >= (int)_field.size())) - return QString::null; + return TQString(); return _field[f].text; } -QPixmap StoredDrawParams::pixmap(int f) const +TQPixmap StoredDrawParams::pixmap(int f) const { if ((f<0) || (f >= (int)_field.size())) - return QPixmap(); + return TQPixmap(); return _field[f].pix; } @@ -103,10 +103,10 @@ int StoredDrawParams::maxLines(int f) const return _field[f].maxLines; } -const QFont& StoredDrawParams::font() const +const TQFont& StoredDrawParams::font() const { - static QFont* f = 0; - if (!f) f = new QFont(QApplication::font()); + static TQFont* f = 0; + if (!f) f = new TQFont(TQApplication::font()); return *f; } @@ -126,7 +126,7 @@ void StoredDrawParams::ensureField(int f) } -void StoredDrawParams::setField(int f, QString t, QPixmap pm, +void StoredDrawParams::setField(int f, TQString t, TQPixmap pm, Position p, int maxLines) { if (f<0 || f>=MAX_FIELD) return; @@ -138,7 +138,7 @@ void StoredDrawParams::setField(int f, QString t, QPixmap pm, _field[f].maxLines = maxLines; } -void StoredDrawParams::setText(int f, QString t) +void StoredDrawParams::setText(int f, TQString t) { if (f<0 || f>=MAX_FIELD) return; ensureField(f); @@ -146,7 +146,7 @@ void StoredDrawParams::setText(int f, QString t) _field[f].text = t; } -void StoredDrawParams::setPixmap(int f, QPixmap pm) +void StoredDrawParams::setPixmap(int f, TQPixmap pm) { if (f<0 || f>=MAX_FIELD) return; ensureField(f); @@ -176,7 +176,7 @@ void StoredDrawParams::setMaxLines(int f, int m) // RectDrawing // -RectDrawing::RectDrawing(QRect r) +RectDrawing::RectDrawing(TQRect r) { _fm = 0; _dp = 0; @@ -205,7 +205,7 @@ void RectDrawing::setDrawParams(DrawParams* dp) _dp = dp; } -void RectDrawing::setRect(QRect r) +void RectDrawing::setRect(TQRect r) { _rect = r; @@ -219,7 +219,7 @@ void RectDrawing::setRect(QRect r) _fontHeight = 0; } -QRect RectDrawing::remainingRect(DrawParams* dp) +TQRect RectDrawing::remainingRect(DrawParams* dp) { if (!dp) dp = drawParams(); @@ -244,20 +244,20 @@ QRect RectDrawing::remainingRect(DrawParams* dp) } -void RectDrawing::drawBack(QPainter* p, DrawParams* dp) +void RectDrawing::drawBack(TQPainter* p, DrawParams* dp) { if (!dp) dp = drawParams(); if (_rect.width()<=0 || _rect.height()<=0) return; - QRect r = _rect; - QColor normal = dp->backColor(); + TQRect r = _rect; + TQColor normal = dp->backColor(); if (dp->selected()) normal = normal.light(); bool isCurrent = dp->current(); if (dp->drawFrame() || isCurrent) { // 3D raised/sunken frame effect... - QColor high = normal.light(); - QColor low = normal.dark(); + TQColor high = normal.light(); + TQColor low = normal.dark(); p->setPen( isCurrent ? low:high); p->drawLine(r.left(), r.top(), r.right(), r.top()); p->drawLine(r.left(), r.top(), r.left(), r.bottom()); @@ -270,10 +270,10 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp) if (dp->shaded()) { // some shading - bool goDark = qGray(normal.rgb())>128; + bool goDark = tqGray(normal.rgb())>128; int rBase, gBase, bBase; normal.rgb(&rBase, &gBase, &bBase); - p->setBrush(QBrush::NoBrush); + p->setBrush(TQBrush::NoBrush); // shade parameters: int d = 7; @@ -294,7 +294,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp) int gDiff = goDark ? -gBase/d : (255-gBase)/d; int bDiff = goDark ? -bBase/d : (255-bBase)/d; - QColor shadeColor; + TQColor shadeColor; while (factor<.95) { shadeColor.setRgb((int)(rBase+factor*rDiff+.5), (int)(gBase+factor*gDiff+.5), @@ -333,22 +333,22 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp) } // fill inside - p->setPen(QPen::NoPen); + p->setPen(TQPen::NoPen); p->setBrush(normal); p->drawRect(r); } -bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) +bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp) { if (!dp) dp = drawParams(); if (!_fm) { - _fm = new QFontMetrics(dp->font()); + _fm = new TQFontMetrics(dp->font()); _fontHeight = _fm->height(); } - QRect r = _rect; + TQRect r = _rect; if (0) kdDebug(90100) << "DrawField: Rect " << r.x() << "/" << r.y() << " - " << r.width() << "x" << r.height() << endl; @@ -488,9 +488,9 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) // get text and pixmap now, only if we need to, because it is possible // that they are calculated on demand (and this can take some time) - QString name = dp->text(f); + TQString name = dp->text(f); if (name.isEmpty()) return 0; - QPixmap pix = dp->pixmap(f); + TQPixmap pix = dp->pixmap(f); // check if pixmap can be drawn int pixW = pix.width(); @@ -529,7 +529,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) } p->save(); - p->setPen( (qGray(dp->backColor().rgb())>100) ? Qt::black : Qt::white); + p->setPen( (tqGray(dp->backColor().rgb())>100) ? TQt::black : TQt::white); p->setFont(dp->font()); if (rotate) { //p->translate(r.x()+2, r.y()+r.height()); @@ -552,14 +552,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) * If the text is to be written at the bottom, we start with the * end of the string (so everything is reverted) */ - QString remaining; + TQString remaining; int origLines = lines; while (lines>0) { if (w>width && lines>1) { int lastBreakPos = name.length(), lastWidth = w; int len = name.length(); - QChar::Category caOld, ca; + TQChar::Category caOld, ca; if (!isBottom) { // start with comparing categories of last 2 chars @@ -569,8 +569,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) ca = name[len-1].category(); if (ca != caOld) { // "Aa" has no break between... - if (ca == QChar::Letter_Uppercase && - caOld == QChar::Letter_Lowercase) { + if (ca == TQChar::Letter_Uppercase && + caOld == TQChar::Letter_Lowercase) { caOld = ca; continue; } @@ -584,7 +584,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) w = lastWidth; remaining = name.mid(lastBreakPos); // remove space on break point - if (name[lastBreakPos-1].category() == QChar::Separator_Space) + if (name[lastBreakPos-1].category() == TQChar::Separator_Space) name = name.left(lastBreakPos-1); else name = name.left(lastBreakPos); @@ -598,8 +598,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) if (ca != caOld) { // "Aa" has no break between... - if (caOld == QChar::Letter_Uppercase && - ca == QChar::Letter_Lowercase) { + if (caOld == TQChar::Letter_Uppercase && + ca == TQChar::Letter_Lowercase) { caOld = ca; continue; } @@ -613,14 +613,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) w = lastWidth; remaining = name.left(l-lastBreakPos); // remove space on break point - if (name[l-lastBreakPos].category() == QChar::Separator_Space) + if (name[l-lastBreakPos].category() == TQChar::Separator_Space) name = name.right(lastBreakPos-1); else name = name.right(lastBreakPos); } } else - remaining = QString::null; + remaining = TQString(); /* truncate and add ... if needed */ if (w>width) { @@ -659,7 +659,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) p->drawText( x+pixW, y, width - pixW, h, - Qt::AlignLeft, name); + TQt::AlignLeft, name); y = isBottom ? (y-h) : (y+h); lines--; diff --git a/src/svnfrontend/graphtree/drawparams.h b/src/svnfrontend/graphtree/drawparams.h index 4898111..eee2445 100644 --- a/src/svnfrontend/graphtree/drawparams.h +++ b/src/svnfrontend/graphtree/drawparams.h @@ -19,7 +19,7 @@ /** * A Widget for visualizing hierarchical metrics as areas. - * The API is similar to QListView. + * The API is similar to TQListView. * * This file defines the following classes: * DrawParams, RectDrawing, TreeMapItem, TreeMapWidget @@ -31,17 +31,17 @@ #ifndef DRAWPARAMS_H #define DRAWPARAMS_H -#include <qstring.h> -#include <qwidget.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qvaluevector.h> -#include <qcolor.h> -#include <qapplication.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqvaluevector.h> +#include <tqcolor.h> +#include <tqapplication.h> +#include <tqstringlist.h> -class QPopupMenu; -class QString; +class TQPopupMenu; +class TQString; class KConfigGroup; @@ -71,15 +71,15 @@ public: // no constructor as this is an abstract class virtual ~DrawParams() {} - virtual QString text(int) const = 0; - virtual QPixmap pixmap(int) const = 0; + virtual TQString text(int) const = 0; + virtual TQPixmap pixmap(int) const = 0; virtual Position position(int) const = 0; // 0: no limit, negative: leave at least -maxLines() free virtual int maxLines(int) const { return 0; } virtual int fieldCount() const { return 0; } - virtual QColor backColor() const { return Qt::white; } - virtual const QFont& font() const = 0; + virtual TQColor backColor() const { return TQt::white; } + virtual const TQFont& font() const = 0; virtual bool selected() const { return false; } virtual bool current() const { return false; } @@ -96,33 +96,33 @@ class StoredDrawParams: public DrawParams { public: StoredDrawParams(); - StoredDrawParams(QColor c, + StoredDrawParams(TQColor c, bool selected = false, bool current = false); // getters - QString text(int) const; - QPixmap pixmap(int) const; + TQString text(int) const; + TQPixmap pixmap(int) const; Position position(int) const; int maxLines(int) const; int fieldCount() const { return _field.size(); } - QColor backColor() const { return _backColor; } + TQColor backColor() const { return _backColor; } bool selected() const { return _selected; } bool current() const { return _current; } bool shaded() const { return _shaded; } bool rotated() const { return _rotated; } bool drawFrame() const { return _drawFrame; } - const QFont& font() const; + const TQFont& font() const; // attribute setters - void setField(int f, QString t, QPixmap pm = QPixmap(), + void setField(int f, TQString t, TQPixmap pm = TQPixmap(), Position p = Default, int maxLines = 0); - void setText(int f, QString); - void setPixmap(int f, QPixmap); + void setText(int f, TQString); + void setPixmap(int f, TQPixmap); void setPosition(int f, Position); void setMaxLines(int f, int); - void setBackColor(QColor c) { _backColor = c; } + void setBackColor(TQColor c) { _backColor = c; } void setSelected(bool b) { _selected = b; } void setCurrent(bool b) { _current = b; } void setShaded(bool b) { _shaded = b; } @@ -130,7 +130,7 @@ public: void drawFrame(bool b) { _drawFrame = b; } protected: - QColor _backColor; + TQColor _backColor; bool _selected :1; bool _current :1; bool _shaded :1; @@ -142,13 +142,13 @@ private: void ensureField(int f); struct Field { - QString text; - QPixmap pix; + TQString text; + TQPixmap pix; Position pos; int maxLines; }; - QValueVector<Field> _field; + TQValueVector<Field> _field; }; @@ -164,7 +164,7 @@ private: class RectDrawing { public: - RectDrawing(QRect); + RectDrawing(TQRect); ~RectDrawing(); // The default DrawParams object used. @@ -172,28 +172,28 @@ public: // we take control over the given object (i.e. delete at destruction) void setDrawParams(DrawParams*); - // draw on a given QPainter, use this class as info provider per default - void drawBack(QPainter*, DrawParams* dp = 0); + // draw on a given TQPainter, use this class as info provider per default + void drawBack(TQPainter*, DrawParams* dp = 0); /* Draw field at position() from pixmap()/text() with maxLines(). * Returns true if something was drawn */ - bool drawField(QPainter*, int f, DrawParams* dp = 0); + bool drawField(TQPainter*, int f, DrawParams* dp = 0); // resets rectangle for free space - void setRect(QRect); + void setRect(TQRect); // Returns the rectangle area still free of text/pixmaps after // a number of drawText() calls. - QRect remainingRect(DrawParams* dp = 0); + TQRect remainingRect(DrawParams* dp = 0); private: int _usedTopLeft, _usedTopCenter, _usedTopRight; int _usedBottomLeft, _usedBottomCenter, _usedBottomRight; - QRect _rect; + TQRect _rect; // temporary int _fontHeight; - QFontMetrics* _fm; + TQFontMetrics* _fm; DrawParams* _dp; }; diff --git a/src/svnfrontend/graphtree/elogentry.cpp b/src/svnfrontend/graphtree/elogentry.cpp index 924332c..573476b 100644 --- a/src/svnfrontend/graphtree/elogentry.cpp +++ b/src/svnfrontend/graphtree/elogentry.cpp @@ -35,7 +35,7 @@ eLog_Entry::~eLog_Entry() { } -void eLog_Entry::addCopyTo(const QString¤t,const QString&target, +void eLog_Entry::addCopyTo(const TQString¤t,const TQString&target, svn_revnum_t target_rev,char _action,svn_revnum_t from_rev) { svn::LogChangePathEntry _entry; diff --git a/src/svnfrontend/graphtree/elogentry.h b/src/svnfrontend/graphtree/elogentry.h index 0fa63ef..3bcbabc 100644 --- a/src/svnfrontend/graphtree/elogentry.h +++ b/src/svnfrontend/graphtree/elogentry.h @@ -31,7 +31,7 @@ struct eLog_Entry : public svn::LogEntry eLog_Entry(const svn::LogEntry&); ~eLog_Entry(); - void addCopyTo(const QString&,const QString&,svn_revnum_t,char _action,svn_revnum_t fromRev=-1); - void addAction(const QString&,char _action); + void addCopyTo(const TQString&,const TQString&,svn_revnum_t,char _action,svn_revnum_t fromRev=-1); + void addAction(const TQString&,char _action); }; #endif diff --git a/src/svnfrontend/graphtree/graphtreelabel.cpp b/src/svnfrontend/graphtree/graphtreelabel.cpp index 9770fef..cf51c9b 100644 --- a/src/svnfrontend/graphtree/graphtreelabel.cpp +++ b/src/svnfrontend/graphtree/graphtreelabel.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "graphtreelabel.h" #include "graphtree_defines.h" -#include <qpainter.h> +#include <tqpainter.h> -GraphTreeLabel::GraphTreeLabel(const QString&text, const QString&_nodename,const QRect&r,QCanvas*c) - : QCanvasRectangle(r,c),StoredDrawParams() +GraphTreeLabel::GraphTreeLabel(const TQString&text, const TQString&_nodename,const TQRect&r,TQCanvas*c) + : TQCanvasRectangle(r,c),StoredDrawParams() { m_Nodename = _nodename; - m_SourceNode = QString::null; + m_SourceNode = TQString(); setText(0,text); setPosition(0, DrawParams::TopCenter); drawFrame(true); @@ -35,7 +35,7 @@ GraphTreeLabel::~GraphTreeLabel() { } -const QString&GraphTreeLabel::nodename()const +const TQString&GraphTreeLabel::nodename()const { return m_Nodename; } @@ -45,14 +45,14 @@ int GraphTreeLabel::rtti()const return GRAPHTREE_LABEL; } -void GraphTreeLabel::setBgColor(const QColor&c) +void GraphTreeLabel::setBgColor(const TQColor&c) { _backColor=c; } -void GraphTreeLabel::drawShape(QPainter& p) +void GraphTreeLabel::drawShape(TQPainter& p) { - QRect r = rect(); + TQRect r = rect(); /* p.setPen(blue); p.drawRect(r); @@ -65,23 +65,23 @@ void GraphTreeLabel::drawShape(QPainter& p) void GraphTreeLabel::setSelected(bool s) { - QCanvasRectangle::setSelected(s); + TQCanvasRectangle::setSelected(s); StoredDrawParams::setSelected(s); update(); } -const QString&GraphTreeLabel::source()const +const TQString&GraphTreeLabel::source()const { return m_SourceNode; } -void GraphTreeLabel::setSource(const QString&_s) +void GraphTreeLabel::setSource(const TQString&_s) { m_SourceNode=_s; } -GraphEdge::GraphEdge(QCanvas*c) - : QCanvasSpline(c) +GraphEdge::GraphEdge(TQCanvas*c) + : TQCanvasSpline(c) { } @@ -89,12 +89,12 @@ GraphEdge::~GraphEdge() { } -void GraphEdge::drawShape(QPainter& p) +void GraphEdge::drawShape(TQPainter& p) { p.drawPolyline(poly); } -QPointArray GraphEdge::areaPoints() const +TQPointArray GraphEdge::areaPoints() const { int minX = poly[0].x(), minY = poly[0].y(); int maxX = minX, maxY = minY; @@ -109,7 +109,7 @@ QPointArray GraphEdge::areaPoints() const if (poly[i].y() > maxY) maxY = poly[i].y(); if (0) qDebug(" P %d: %d/%d", i, poly[i].x(), poly[i].y()); } - QPointArray a = poly.copy(), b = poly.copy(); + TQPointArray a = poly.copy(), b = poly.copy(); if (minX == maxX) { a.translate(-2, 0); b.translate(2, 0); @@ -137,14 +137,14 @@ int GraphEdge::rtti()const return GRAPHTREE_LINE; } -GraphEdgeArrow::GraphEdgeArrow(GraphEdge*_parent,QCanvas*c) - : QCanvasPolygon(c),_edge(_parent) +GraphEdgeArrow::GraphEdgeArrow(GraphEdge*_tqparent,TQCanvas*c) + : TQCanvasPolygon(c),_edge(_tqparent) { } -void GraphEdgeArrow::drawShape(QPainter&p) +void GraphEdgeArrow::drawShape(TQPainter&p) { - QCanvasPolygon::drawShape(p); + TQCanvasPolygon::drawShape(p); } int GraphEdgeArrow::rtti()const @@ -158,10 +158,10 @@ GraphEdge*GraphEdgeArrow::edge() } /* taken from KCacheGrind project */ -QPixmap*GraphMark::_p=0; +TQPixmap*GraphMark::_p=0; -GraphMark::GraphMark(GraphTreeLabel*n,QCanvas*c) - : QCanvasRectangle(c) +GraphMark::GraphMark(GraphTreeLabel*n,TQCanvas*c) + : TQCanvasRectangle(c) { if (!_p) { @@ -169,27 +169,27 @@ GraphMark::GraphMark(GraphTreeLabel*n,QCanvas*c) float v1 = 130.0, v2 = 10.0, v = v1, f = 1.03; // calculate pix size - QRect r(0, 0, 30, 30); + TQRect r(0, 0, 30, 30); while (v>v2) { r.setRect(r.x()-d, r.y()-d, r.width()+2*d, r.height()+2*d); v /= f; } - _p = new QPixmap(r.size()); - _p->fill(Qt::white); - QPainter p(_p); - p.setPen(Qt::NoPen); + _p = new TQPixmap(r.size()); + _p->fill(TQt::white); + TQPainter p(_p); + p.setPen(TQt::NoPen); r.moveBy(-r.x(), -r.y()); while (v<v1) { v *= f; - p.setBrush(QColor(265-(int)v, 265-(int)v, 265-(int)v)); + p.setBrush(TQColor(265-(int)v, 265-(int)v, 265-(int)v)); - p.drawRect(QRect(r.x(), r.y(), r.width(), d)); - p.drawRect(QRect(r.x(), r.bottom()-d, r.width(), d)); - p.drawRect(QRect(r.x(), r.y()+d, d, r.height()-2*d)); - p.drawRect(QRect(r.right()-d, r.y()+d, d, r.height()-2*d)); + p.drawRect(TQRect(r.x(), r.y(), r.width(), d)); + p.drawRect(TQRect(r.x(), r.bottom()-d, r.width(), d)); + p.drawRect(TQRect(r.x(), r.y()+d, d, r.height()-2*d)); + p.drawRect(TQRect(r.right()-d, r.y()+d, d, r.height()-2*d)); r.setRect(r.x()+d, r.y()+d, r.width()-2*d, r.height()-2*d); } @@ -204,7 +204,7 @@ GraphMark::~ GraphMark() { } -bool GraphMark::hit(const QPoint&)const +bool GraphMark::hit(const TQPoint&)const { return false; } @@ -214,7 +214,7 @@ int GraphMark::rtti()const return GRAPHTREE_MARK; } -void GraphMark::drawShape(QPainter&p) +void GraphMark::drawShape(TQPainter&p) { p.drawPixmap( int(x()), int(y()), *_p ); } diff --git a/src/svnfrontend/graphtree/graphtreelabel.h b/src/svnfrontend/graphtree/graphtreelabel.h index dec788f..70cb31f 100644 --- a/src/svnfrontend/graphtree/graphtreelabel.h +++ b/src/svnfrontend/graphtree/graphtreelabel.h @@ -21,40 +21,40 @@ #define GRAPHTREELABEL_H #include "graphtree/drawparams.h" -#include <qcanvas.h> +#include <tqcanvas.h> /** @author Rajko Albrecht <ral@alwins-world.de> */ -class GraphTreeLabel : public QCanvasRectangle,StoredDrawParams +class GraphTreeLabel : public TQCanvasRectangle,StoredDrawParams { public: - GraphTreeLabel(const QString&,const QString&,const QRect&r,QCanvas*c); + GraphTreeLabel(const TQString&,const TQString&,const TQRect&r,TQCanvas*c); virtual ~GraphTreeLabel(); virtual int rtti()const; - virtual void drawShape(QPainter& p); + virtual void drawShape(TQPainter& p); - void setBgColor(const QColor&); + void setBgColor(const TQColor&); - const QString&nodename()const; - const QString&source()const; - void setSource(const QString&); + const TQString&nodename()const; + const TQString&source()const; + void setSource(const TQString&); virtual void setSelected(bool); protected: - QString m_Nodename; - QString m_SourceNode; + TQString m_Nodename; + TQString m_SourceNode; }; class GraphEdge; -class GraphEdgeArrow:public QCanvasPolygon +class GraphEdgeArrow:public TQCanvasPolygon { public: - GraphEdgeArrow(GraphEdge*,QCanvas*); + GraphEdgeArrow(GraphEdge*,TQCanvas*); GraphEdge*edge(); - virtual void drawShape(QPainter&); + virtual void drawShape(TQPainter&); virtual int rtti()const; private: @@ -62,28 +62,28 @@ private: }; /* line */ -class GraphEdge:public QCanvasSpline +class GraphEdge:public TQCanvasSpline { public: - GraphEdge(QCanvas*); + GraphEdge(TQCanvas*); virtual ~GraphEdge(); - virtual void drawShape(QPainter&); - QPointArray areaPoints() const; + virtual void drawShape(TQPainter&); + TQPointArray areaPoints() const; virtual int rtti()const; }; -class GraphMark:public QCanvasRectangle +class GraphMark:public TQCanvasRectangle { public: - GraphMark(GraphTreeLabel*,QCanvas*); + GraphMark(GraphTreeLabel*,TQCanvas*); virtual ~GraphMark(); virtual int rtti()const; - virtual bool hit(const QPoint&)const; + virtual bool hit(const TQPoint&)const; - virtual void drawShape(QPainter&); + virtual void drawShape(TQPainter&); private: - static QPixmap*_p; + static TQPixmap*_p; }; #endif diff --git a/src/svnfrontend/graphtree/pannerview.cpp b/src/svnfrontend/graphtree/pannerview.cpp index 5f14e82..c3a2586 100644 --- a/src/svnfrontend/graphtree/pannerview.cpp +++ b/src/svnfrontend/graphtree/pannerview.cpp @@ -18,46 +18,46 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "pannerview.h" -#include <qpainter.h> +#include <tqpainter.h> -PannerView::PannerView(QWidget* parent, const char* name) - : QCanvasView(parent, name,WNoAutoErase | WStaticContents ) +PannerView::PannerView(TQWidget* tqparent, const char* name) + : TQCanvasView(tqparent, name,WNoAutoErase | WStaticContents ) { m_Moving = false; - viewport()->setBackgroundMode(Qt::NoBackground); - setBackgroundMode(Qt::NoBackground); + viewport()->setBackgroundMode(TQt::NoBackground); + setBackgroundMode(TQt::NoBackground); } PannerView::~PannerView() { } -void PannerView::drawContents(QPainter* p, int clipx, int clipy, int clipw, int cliph) +void PannerView::drawContents(TQPainter* p, int clipx, int clipy, int clipw, int cliph) { p->save(); - QCanvasView::drawContents(p,clipx,clipy,clipw,cliph); + TQCanvasView::drawContents(p,clipx,clipy,clipw,cliph); p->restore(); if (m_ZoomRect.isValid()) { p->setPen(red.dark()); p->drawRect(m_ZoomRect); p->setPen( red); - p->drawRect(QRect(m_ZoomRect.x()+1, m_ZoomRect.y()+1, + p->drawRect(TQRect(m_ZoomRect.x()+1, m_ZoomRect.y()+1, m_ZoomRect.width()-2, m_ZoomRect.height()-2)); } } -void PannerView::setZoomRect(const QRect& theValue) +void PannerView::setZoomRect(const TQRect& theValue) { - QRect oldRect = m_ZoomRect; + TQRect oldRect = m_ZoomRect; m_ZoomRect = theValue; updateContents(oldRect); updateContents(m_ZoomRect); } /*! - \fn PannerView::contentsMouseMoveEvent(QMouseEvent* e) + \fn PannerView::contentsMouseMoveEvent(TQMouseEvent* e) */ -void PannerView::contentsMouseMoveEvent(QMouseEvent* e) +void PannerView::contentsMouseMoveEvent(TQMouseEvent* e) { if (m_Moving) { emit zoomRectMoved(e->pos().x() - m_LastPos.x(), e->pos().y() - m_LastPos.y()); @@ -66,12 +66,12 @@ void PannerView::contentsMouseMoveEvent(QMouseEvent* e) } /*! - \fn PannerView::contentsMousePressEvent(QMouseEvent* e) + \fn PannerView::contentsMousePressEvent(TQMouseEvent* e) */ -void PannerView::contentsMousePressEvent(QMouseEvent* e) +void PannerView::contentsMousePressEvent(TQMouseEvent* e) { if (m_ZoomRect.isValid()) { - if (!m_ZoomRect.contains(e->pos())) { + if (!m_ZoomRect.tqcontains(e->pos())) { emit zoomRectMoved(e->pos().x() - m_ZoomRect.center().x(), e->pos().y() - m_ZoomRect.center().y()); } @@ -81,9 +81,9 @@ void PannerView::contentsMousePressEvent(QMouseEvent* e) } /*! - \fn PannerView::contentsMouseReleaseEvent(QMouseEvent*) + \fn PannerView::contentsMouseReleaseEvent(TQMouseEvent*) */ -void PannerView::contentsMouseReleaseEvent(QMouseEvent*) +void PannerView::contentsMouseReleaseEvent(TQMouseEvent*) { m_Moving = false; emit zoomRectMoveFinished(); diff --git a/src/svnfrontend/graphtree/pannerview.h b/src/svnfrontend/graphtree/pannerview.h index 6c1a310..026488d 100644 --- a/src/svnfrontend/graphtree/pannerview.h +++ b/src/svnfrontend/graphtree/pannerview.h @@ -20,19 +20,20 @@ #ifndef PANNERVIEW_H #define PANNERVIEW_H -#include <qcanvas.h> +#include <tqcanvas.h> /** @author Rajko Albrecht <ral@alwins-world.de> */ -class PannerView : public QCanvasView +class PannerView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - PannerView(QWidget* parent=0, const char* name=0); + PannerView(TQWidget* tqparent=0, const char* name=0); virtual ~PannerView(); - void setZoomRect(const QRect& theValue); + void setZoomRect(const TQRect& theValue); void updateCurrentRect(); signals: @@ -40,14 +41,14 @@ signals: void zoomRectMoveFinished(); protected: - virtual void drawContents(QPainter* p, int clipx, int clipy, int clipw, int cliph); - virtual void contentsMouseMoveEvent(QMouseEvent* e); - virtual void contentsMousePressEvent(QMouseEvent* e); - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void drawContents(TQPainter* p, int clipx, int clipy, int clipw, int cliph); + virtual void contentsMouseMoveEvent(TQMouseEvent* e); + virtual void contentsMousePressEvent(TQMouseEvent* e); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); protected: - QRect m_ZoomRect; + TQRect m_ZoomRect; bool m_Moving; - QPoint m_LastPos; + TQPoint m_LastPos; }; #endif diff --git a/src/svnfrontend/graphtree/revgraphview.cpp b/src/svnfrontend/graphtree/revgraphview.cpp index cc85c0e..afb9d3a 100644 --- a/src/svnfrontend/graphtree/revgraphview.cpp +++ b/src/svnfrontend/graphtree/revgraphview.cpp @@ -34,11 +34,11 @@ #include <kfiledialog.h> #include <kmessagebox.h> -#include <qtooltip.h> -#include <qwmatrix.h> -#include <qpopupmenu.h> -#include <qpainter.h> -#include <qregexp.h> +#include <tqtooltip.h> +#include <tqwmatrix.h> +#include <tqpopupmenu.h> +#include <tqpainter.h> +#include <tqregexp.h> #include <math.h> @@ -46,38 +46,38 @@ #define LABEL_HEIGHT 90 -class GraphViewTip:public QToolTip +class GraphViewTip:public TQToolTip { public: - GraphViewTip( QWidget* p ):QToolTip(p) {} + GraphViewTip( TQWidget* p ):TQToolTip(p) {} virtual ~GraphViewTip(){} protected: - void maybeTip( const QPoint & ); + void maybeTip( const TQPoint & ); }; -void GraphViewTip::maybeTip( const QPoint & pos) +void GraphViewTip::maybeTip( const TQPoint & pos) { - if (!parentWidget()->inherits( "RevGraphView" )) return; - RevGraphView* cgv = (RevGraphView*)parentWidget(); - QPoint cPos = cgv->viewportToContents(pos); - QCanvasItemList l = cgv->canvas()->collisions(cPos); + if (!tqparentWidget()->inherits( "RevGraphView" )) return; + RevGraphView* cgv = (RevGraphView*)tqparentWidget(); + TQPoint cPos = cgv->viewportToContents(pos); + TQCanvasItemList l = cgv->canvas()->collisions(cPos); if (l.count() == 0) return; - QCanvasItem* i = l.first(); + TQCanvasItem* i = l.first(); if (i->rtti() == GRAPHTREE_LABEL) { GraphTreeLabel*tl = (GraphTreeLabel*)i; - QString nm = tl->nodename(); - QString tipStr = cgv->toolTip(nm); + TQString nm = tl->nodename(); + TQString tipStr = cgv->toolTip(nm); if (tipStr.length()>0) { - QPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft()); - QPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight()); - tip(QRect(vPosTL, vPosBR), tipStr); + TQPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft()); + TQPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight()); + tip(TQRect(vPosTL, vPosBR), tipStr); } } } -RevGraphView::RevGraphView(QObject*aListener,svn::Client*_client,QWidget * parent, const char * name, WFlags f) - : QCanvasView(parent,name,f) +RevGraphView::RevGraphView(TQObject*aListener,svn::Client*_client,TQWidget * tqparent, const char * name, WFlags f) + : TQCanvasView(tqparent,name,f) { m_Canvas = 0L; m_Client = _client; @@ -88,16 +88,16 @@ RevGraphView::RevGraphView(QObject*aListener,svn::Client*_client,QWidget * paren m_Marker = 0; m_Tip = new GraphViewTip(this); m_CompleteView = new PannerView(this); - m_CompleteView->setVScrollBarMode(QScrollView::AlwaysOff); - m_CompleteView->setHScrollBarMode(QScrollView::AlwaysOff); + m_CompleteView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_CompleteView->setHScrollBarMode(TQScrollView::AlwaysOff); m_CompleteView->raise(); m_CompleteView->hide(); - connect(this, SIGNAL(contentsMoving(int,int)), - this, SLOT(contentsMovingSlot(int,int))); - connect(m_CompleteView, SIGNAL(zoomRectMoved(int,int)), - this, SLOT(zoomRectMoved(int,int))); - connect(m_CompleteView, SIGNAL(zoomRectMoveFinished()), - this, SLOT(zoomRectMoveFinished())); + connect(this, TQT_SIGNAL(contentsMoving(int,int)), + this, TQT_SLOT(contentsMovingSlot(int,int))); + connect(m_CompleteView, TQT_SIGNAL(zoomRectMoved(int,int)), + this, TQT_SLOT(zoomRectMoved(int,int))); + connect(m_CompleteView, TQT_SIGNAL(zoomRectMoveFinished()), + this, TQT_SLOT(zoomRectMoveFinished())); m_LastAutoPosition = TopLeft; _isMoving = false; _noUpdateZoomerPos = false; @@ -114,13 +114,13 @@ RevGraphView::~RevGraphView() delete renderProcess; } -void RevGraphView::showText(const QString&s) +void RevGraphView::showText(const TQString&s) { clear(); - m_Canvas = new QCanvas(QApplication::desktop()->width(), - QApplication::desktop()->height()); + m_Canvas = new TQCanvas(TQApplication::desktop()->width(), + TQApplication::desktop()->height()); - QCanvasText* t = new QCanvasText(s, m_Canvas); + TQCanvasText* t = new TQCanvasText(s, m_Canvas); t->move(5, 5); t->show(); center(0,0); @@ -164,20 +164,20 @@ void RevGraphView::endInsert() void RevGraphView::readDotOutput(KProcess*,char * buffer,int buflen) { - dotOutput+=QString::fromLocal8Bit(buffer, buflen); + dotOutput+=TQString::fromLocal8Bit(buffer, buflen); } void RevGraphView::dotExit(KProcess*p) { if (p!=renderProcess)return; // remove line breaks when lines to long - QRegExp endslash("\\\\\\n"); - dotOutput.replace(endslash,""); + TQRegExp endslash("\\\\\\n"); + dotOutput.tqreplace(endslash,""); double scale = 1.0, scaleX = 1.0, scaleY = 1.0; double dotWidth, dotHeight; - QTextStream* dotStream; - dotStream = new QTextStream(dotOutput, IO_ReadOnly); - QString line,cmd; + TQTextStream* dotStream; + dotStream = new TQTextStream(dotOutput, IO_ReadOnly); + TQString line,cmd; int lineno=0; clear(); beginInsert(); @@ -187,7 +187,7 @@ void RevGraphView::dotExit(KProcess*p) if (line.isNull()) break; lineno++; if (line.isEmpty()) continue; - QTextStream lineStream(line, IO_ReadOnly); + TQTextStream lineStream(line, IO_ReadOnly); lineStream >> cmd; if (cmd == "stop") {break; } @@ -198,12 +198,12 @@ void RevGraphView::dotExit(KProcess*p) int h = (int)(scaleY * dotHeight); _xMargin = 50; - if (w < QApplication::desktop()->width()) - _xMargin += (QApplication::desktop()->width()-w)/2; + if (w < TQApplication::desktop()->width()) + _xMargin += (TQApplication::desktop()->width()-w)/2; _yMargin = 50; - if (h < QApplication::desktop()->height()) - _yMargin += (QApplication::desktop()->height()-h)/2; - m_Canvas = new QCanvas(int(w+2*_xMargin), int(h+2*_yMargin)); + if (h < TQApplication::desktop()->height()) + _yMargin += (TQApplication::desktop()->height()-h)/2; + m_Canvas = new TQCanvas(int(w+2*_xMargin), int(h+2*_yMargin)); continue; } if ((cmd != "node") && (cmd != "edge")) { @@ -212,8 +212,8 @@ void RevGraphView::dotExit(KProcess*p) continue; } if (cmd=="node") { - QString nodeName, label; - QString _x,_y,_w,_h; + TQString nodeName, label; + TQString _x,_y,_w,_h; double x, y, width, height; lineStream >> nodeName >> _x >> _y >> _w >> _h; x=_x.toDouble(); @@ -227,7 +227,7 @@ void RevGraphView::dotExit(KProcess*p) int yy = (int)(scaleY * (dotHeight - y) + _yMargin); int w = (int)(scaleX * width); int h = (int)(scaleY * height); - QRect r(xx-w/2, yy-h/2, w, h); + TQRect r(xx-w/2, yy-h/2, w, h); GraphTreeLabel*t=new GraphTreeLabel(label,nodeName,r,m_Canvas); if (isStart(nodeName)) { ensureVisible(r.x(),r.y()); @@ -237,10 +237,10 @@ void RevGraphView::dotExit(KProcess*p) t->show(); m_NodeList[nodeName]=t; } else { - QString node1Name, node2Name, label; - QString _x,_y; + TQString node1Name, node2Name, label; + TQString _x,_y; double x, y; - QPointArray pa; + TQPointArray pa; int points, i; lineStream >> node1Name >> node2Name; lineStream >> points; @@ -264,26 +264,26 @@ void RevGraphView::dotExit(KProcess*p) } GraphEdge * n = new GraphEdge(m_Canvas); - QColor arrowColor = Qt::black; - n->setPen(QPen(arrowColor,1)); + TQColor arrowColor = TQt::black; + n->setPen(TQPen(arrowColor,1)); n->setControlPoints(pa,false); n->setZ(0.5); n->show(); /* arrow */ - QPoint arrowDir; + TQPoint arrowDir; int indexHead = -1; - QMap<QString,GraphTreeLabel*>::Iterator it; - it = m_NodeList.find(node2Name); + TQMap<TQString,GraphTreeLabel*>::Iterator it; + it = m_NodeList.tqfind(node2Name); if (it!=m_NodeList.end()) { it.data()->setSource(node1Name); } - it = m_NodeList.find(node1Name); + it = m_NodeList.tqfind(node1Name); if (it!=m_NodeList.end()) { GraphTreeLabel*tlab = it.data(); if (tlab) { - QPoint toCenter = tlab->rect().center(); + TQPoint toCenter = tlab->rect().center(); int dx0 = pa.point(0).x() - toCenter.x(); int dy0 = pa.point(0).y() - toCenter.y(); int dx1 = pa.point(points-1).x() - toCenter.x(); @@ -310,11 +310,11 @@ void RevGraphView::dotExit(KProcess*p) if (!arrowDir.isNull()) { arrowDir *= 10.0/sqrt(double(arrowDir.x()*arrowDir.x() + arrowDir.y()*arrowDir.y())); - QPointArray a(3); + TQPointArray a(3); a.setPoint(0, pa.point(indexHead) + arrowDir); - a.setPoint(1, pa.point(indexHead) + QPoint(arrowDir.y()/2, + a.setPoint(1, pa.point(indexHead) + TQPoint(arrowDir.y()/2, -arrowDir.x()/2)); - a.setPoint(2, pa.point(indexHead) + QPoint(-arrowDir.y()/2, + a.setPoint(2, pa.point(indexHead) + TQPoint(-arrowDir.y()/2, arrowDir.x()/2)); GraphEdgeArrow* aItem = new GraphEdgeArrow(n,m_Canvas); aItem->setPoints(a); @@ -326,7 +326,7 @@ void RevGraphView::dotExit(KProcess*p) } } if (!m_Canvas) { - QString s = i18n("Error running the graph layouting tool.\n"); + TQString s = i18n("Error running the graph tqlayouting tool.\n"); s += i18n("Please check that 'dot' is installed (package GraphViz)."); showText(s); } else { @@ -338,11 +338,11 @@ void RevGraphView::dotExit(KProcess*p) renderProcess=0; } -bool RevGraphView::isStart(const QString&nodeName)const +bool RevGraphView::isStart(const TQString&nodeName)const { bool res = false; trevTree::ConstIterator it; - it = m_Tree.find(nodeName); + it = m_Tree.tqfind(nodeName); if (it==m_Tree.end()) { return res; } @@ -354,21 +354,21 @@ bool RevGraphView::isStart(const QString&nodeName)const return res; } -char RevGraphView::getAction(const QString&nodeName)const +char RevGraphView::getAction(const TQString&nodeName)const { trevTree::ConstIterator it; - it = m_Tree.find(nodeName); + it = m_Tree.tqfind(nodeName); if (it==m_Tree.end()) { return (char)0; } return it.data().Action; } -QColor RevGraphView::getBgColor(const QString&nodeName)const +TQColor RevGraphView::getBgColor(const TQString&nodeName)const { trevTree::ConstIterator it; - it = m_Tree.find(nodeName); - QColor res = Qt::white; + it = m_Tree.tqfind(nodeName); + TQColor res = TQt::white; if (it==m_Tree.end()) { return res; } @@ -397,43 +397,43 @@ QColor RevGraphView::getBgColor(const QString&nodeName)const return res; } -const QString&RevGraphView::getLabelstring(const QString&nodeName) +const TQString&RevGraphView::getLabelstring(const TQString&nodeName) { - QMap<QString,QString>::ConstIterator nIt; - nIt = m_LabelMap.find(nodeName); + TQMap<TQString,TQString>::ConstIterator nIt; + nIt = m_LabelMap.tqfind(nodeName); if (nIt!=m_LabelMap.end()) { return nIt.data(); } trevTree::ConstIterator it1; - it1 = m_Tree.find(nodeName); + it1 = m_Tree.tqfind(nodeName); if (it1==m_Tree.end()) { return m_LabelMap[""]; } - QString res; + TQString res; switch (it1.data().Action) { case 'D': - res = i18n("Deleted at revision %1").arg(it1.data().rev); + res = i18n("Deleted at revision %1").tqarg(it1.data().rev); break; case 'A': res = i18n("Added at revision %1 as %2") - .arg(it1.data().rev) - .arg(it1.data().name); + .tqarg(it1.data().rev) + .tqarg(it1.data().name); break; case 'C': case 1: - res = i18n("Copied to %1 at revision %2").arg(it1.data().name).arg(it1.data().rev); + res = i18n("Copied to %1 at revision %2").tqarg(it1.data().name).tqarg(it1.data().rev); break; case 2: - res = i18n("Renamed to %1 at revision %2").arg(it1.data().name).arg(it1.data().rev); + res = i18n("Renamed to %1 at revision %2").tqarg(it1.data().name).tqarg(it1.data().rev); break; case 'M': - res = i18n("Modified at revision %1").arg(it1.data().rev); + res = i18n("Modified at revision %1").tqarg(it1.data().rev); break; case 'R': - res = i18n("Replaced at revision %1").arg(it1.data().rev); + res = i18n("Replaced at revision %1").tqarg(it1.data().rev); break; default: - res=i18n("Revision %1").arg(it1.data().rev); + res=i18n("Revision %1").tqarg(it1.data().rev); break; } m_LabelMap[nodeName]=res; @@ -445,19 +445,19 @@ void RevGraphView::dumpRevtree() delete dotTmpFile; clear(); dotOutput = ""; - dotTmpFile = new KTempFile(QString::null,".dot"); + dotTmpFile = new KTempFile(TQString(),".dot"); dotTmpFile->setAutoDelete(true); - QTextStream* stream = dotTmpFile->textStream(); + TQTextStream* stream = dotTmpFile->textStream(); if (!stream) { - showText(i18n("Could not open tempfile %1 for writing.").arg(dotTmpFile->name())); + showText(i18n("Could not open tempfile %1 for writing.").tqarg(dotTmpFile->name())); return; } *stream << "digraph \"callgraph\" {\n"; *stream << " bgcolor=\"transparent\";\n"; int dir = Kdesvnsettings::tree_direction(); - *stream << QString(" rankdir=\""); + *stream << TQString(" rankdir=\""); switch (dir) { case 3: *stream << "TB"; @@ -475,13 +475,13 @@ void RevGraphView::dumpRevtree() } *stream << "\";\n"; - //*stream << QString(" overlap=false;\n splines=true;\n"); + //*stream << TQString(" overlap=false;\n splines=true;\n"); RevGraphView::trevTree::ConstIterator it1; for (it1=m_Tree.begin();it1!=m_Tree.end();++it1) { *stream << " " << it1.key() << "[ " - << "shape=box, " + << "tqshape=box, " << "label=\""<<getLabelstring(it1.key())<<"\"," << "];\n"; for (unsigned j=0;j<it1.data().targets.count();++j) { @@ -495,31 +495,31 @@ void RevGraphView::dumpRevtree() renderProcess->setEnvironment("LANG","C"); *renderProcess << "dot"; *renderProcess << dotTmpFile->name() << "-Tplain"; - connect(renderProcess,SIGNAL(processExited(KProcess*)),this,SLOT(dotExit(KProcess*))); - connect(renderProcess,SIGNAL(receivedStdout(KProcess*,char*,int)), - this,SLOT(readDotOutput(KProcess*,char*,int)) ); + connect(renderProcess,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(dotExit(KProcess*))); + connect(renderProcess,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this,TQT_SLOT(readDotOutput(KProcess*,char*,int)) ); if (!renderProcess->start(KProcess::NotifyOnExit,KProcess::Stdout)) { - QString arguments; + TQString arguments; for (unsigned c=0;c<renderProcess->args().count();++c) { - arguments+=QString(" %1").arg(renderProcess->args()[c]); + arguments+=TQString(" %1").tqarg(renderProcess->args()[c].data()); } - QString error = i18n("Could not start process \"%1\".").arg(arguments); + TQString error = i18n("Could not start process \"%1\".").tqarg(arguments); showText(error); renderProcess=0; //delete renderProcess;< } } -QString RevGraphView::toolTip(const QString&_nodename,bool full)const +TQString RevGraphView::toolTip(const TQString&_nodename,bool full)const { - QString res = QString::null; + TQString res = TQString(); trevTree::ConstIterator it; - it = m_Tree.find(_nodename); + it = m_Tree.tqfind(_nodename); if (it==m_Tree.end()) { return res; } - QStringList sp = QStringList::split("\n",it.data().Message); - QString sm; + TQStringList sp = TQStringList::split("\n",it.data().Message); + TQString sm; if (sp.count()==0) { sm = it.data().Message; } else { @@ -536,34 +536,34 @@ QString RevGraphView::toolTip(const QString&_nodename,bool full)const sm.truncate(47); sm+="..."; } - static QString csep = "</td><td>"; - static QString rend = "</td></tr>"; - static QString rstart = "<tr><td>"; - res = QString("<html><body>"); + static TQString csep = "</td><td>"; + static TQString rend = "</td></tr>"; + static TQString rstart = "<tr><td>"; + res = TQString("<html><body>"); if (!full) { - res+=QString("<b>%1</b>").arg(it.data().name); + res+=TQString("<b>%1</b>").tqarg(it.data().name); res += i18n("<br>Revision: %1<br>Author: %2<br>Date: %3<br>Log: %4</html>") - .arg(it.data().rev) - .arg(it.data().Author) - .arg(it.data().Date) - .arg(sm); + .tqarg(it.data().rev) + .tqarg(it.data().Author) + .tqarg(it.data().Date) + .tqarg(sm); } else { res+="<table><tr><th colspan=\"2\"><b>"+it.data().name+"</b></th></tr>"; res+=rstart; - res+=i18n("<b>Revision</b>%1%2%3").arg(csep).arg(it.data().rev).arg(rend); - res+=rstart+i18n("<b>Author</b>%1%2%3").arg(csep).arg(it.data().Author).arg(rend); - res+=rstart+i18n("<b>Date</b>%1%2%3").arg(csep).arg(it.data().Date).arg(rend); - res+=rstart+i18n("<b>Log</b>%1%2%3").arg(csep).arg(sm).arg(rend); + res+=i18n("<b>Revision</b>%1%2%3").tqarg(csep).tqarg(it.data().rev).tqarg(rend); + res+=rstart+i18n("<b>Author</b>%1%2%3").tqarg(csep).tqarg(it.data().Author).tqarg(rend); + res+=rstart+i18n("<b>Date</b>%1%2%3").tqarg(csep).tqarg(it.data().Date).tqarg(rend); + res+=rstart+i18n("<b>Log</b>%1%2%3").tqarg(csep).tqarg(sm).tqarg(rend); res+="</table></body></html>"; } return res; } -void RevGraphView::updateSizes(QSize s) +void RevGraphView::updateSizes(TQSize s) { if (!m_Canvas) return; - if (s == QSize(0,0)) s = size(); + if (s == TQSize(0,0)) s = size(); // the part of the canvas that should be visible int cWidth = m_Canvas->width() - 2*_xMargin + 100; @@ -597,7 +597,7 @@ void RevGraphView::updateSizes(QSize s) m_Canvas->width(), m_Canvas->height(), cWidth, cHeight, zoom); - QWMatrix wm; + TQWMatrix wm; wm.scale( zoom, zoom ); m_CompleteView->setWorldMatrix(wm); @@ -621,8 +621,8 @@ void RevGraphView::updateZoomerPos() int x = width()- cvW - verticalScrollBar()->width() -2; int y = height()-cvH - horizontalScrollBar()->height() -2; - QPoint oldZoomPos = m_CompleteView->pos(); - QPoint newZoomPos = QPoint(0,0); + TQPoint oldZoomPos = m_CompleteView->pos(); + TQPoint newZoomPos = TQPoint(0,0); #if 0 ZoomPosition zp = _zoomPosition; @@ -630,18 +630,18 @@ void RevGraphView::updateZoomerPos() #else ZoomPosition zp = m_LastAutoPosition; #endif - QPoint tl1Pos = viewportToContents(QPoint(0,0)); - QPoint tl2Pos = viewportToContents(QPoint(cvW,cvH)); - QPoint tr1Pos = viewportToContents(QPoint(x,0)); - QPoint tr2Pos = viewportToContents(QPoint(x+cvW,cvH)); - QPoint bl1Pos = viewportToContents(QPoint(0,y)); - QPoint bl2Pos = viewportToContents(QPoint(cvW,y+cvH)); - QPoint br1Pos = viewportToContents(QPoint(x,y)); - QPoint br2Pos = viewportToContents(QPoint(x+cvW,y+cvH)); - int tlCols = m_Canvas->collisions(QRect(tl1Pos,tl2Pos)).count(); - int trCols = m_Canvas->collisions(QRect(tr1Pos,tr2Pos)).count(); - int blCols = m_Canvas->collisions(QRect(bl1Pos,bl2Pos)).count(); - int brCols = m_Canvas->collisions(QRect(br1Pos,br2Pos)).count(); + TQPoint tl1Pos = viewportToContents(TQPoint(0,0)); + TQPoint tl2Pos = viewportToContents(TQPoint(cvW,cvH)); + TQPoint tr1Pos = viewportToContents(TQPoint(x,0)); + TQPoint tr2Pos = viewportToContents(TQPoint(x+cvW,cvH)); + TQPoint bl1Pos = viewportToContents(TQPoint(0,y)); + TQPoint bl2Pos = viewportToContents(TQPoint(cvW,y+cvH)); + TQPoint br1Pos = viewportToContents(TQPoint(x,y)); + TQPoint br2Pos = viewportToContents(TQPoint(x+cvW,y+cvH)); + int tlCols = m_Canvas->collisions(TQRect(tl1Pos,tl2Pos)).count(); + int trCols = m_Canvas->collisions(TQRect(tr1Pos,tr2Pos)).count(); + int blCols = m_Canvas->collisions(TQRect(bl1Pos,bl2Pos)).count(); + int brCols = m_Canvas->collisions(TQRect(br1Pos,br2Pos)).count(); int minCols = tlCols; zp = m_LastAutoPosition; switch(zp) { @@ -662,13 +662,13 @@ void RevGraphView::updateZoomerPos() #endif switch(zp) { case TopRight: - newZoomPos = QPoint(x,0); + newZoomPos = TQPoint(x,0); break; case BottomLeft: - newZoomPos = QPoint(0,y); + newZoomPos = TQPoint(0,y); break; case BottomRight: - newZoomPos = QPoint(x,y); + newZoomPos = TQPoint(x,y); break; default: break; @@ -678,7 +678,7 @@ void RevGraphView::updateZoomerPos() void RevGraphView::contentsMovingSlot(int x,int y) { - QRect z(int(x * _cvZoom), int(y * _cvZoom), + TQRect z(int(x * _cvZoom), int(y * _cvZoom), int(visibleWidth() * _cvZoom)-1, int(visibleHeight() * _cvZoom)-1); if (0) qDebug("moving: (%d,%d) => (%d/%d - %dx%d)", x, y, z.x(), z.y(), z.width(), z.height()); @@ -705,9 +705,9 @@ void RevGraphView::zoomRectMoveFinished() updateZoomerPos(); } -void RevGraphView::resizeEvent(QResizeEvent*e) +void RevGraphView::resizeEvent(TQResizeEvent*e) { - QCanvasView::resizeEvent(e); + TQCanvasView::resizeEvent(e); if (m_Canvas) updateSizes(e->size()); } @@ -732,13 +732,13 @@ void RevGraphView::makeSelected(GraphTreeLabel*gtl) m_CompleteView->updateCurrentRect(); } -void RevGraphView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) +void RevGraphView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { setFocus(); if (e->button() == Qt::LeftButton) { - QCanvasItemList l = canvas()->collisions(e->pos()); + TQCanvasItemList l = canvas()->collisions(e->pos()); if (l.count()>0) { - QCanvasItem* i = l.first(); + TQCanvasItem* i = l.first(); if (i->rtti()==GRAPHTREE_LABEL) { makeSelected( (GraphTreeLabel*)i); emit dispDetails(toolTip(((GraphTreeLabel*)i)->nodename(),true)); @@ -747,20 +747,20 @@ void RevGraphView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) } } -void RevGraphView::contentsMousePressEvent ( QMouseEvent * e ) +void RevGraphView::contentsMousePressEvent ( TQMouseEvent * e ) { setFocus(); _isMoving = true; _lastPos = e->globalPos(); } -void RevGraphView::contentsMouseReleaseEvent ( QMouseEvent * ) +void RevGraphView::contentsMouseReleaseEvent ( TQMouseEvent * ) { _isMoving = false; updateZoomerPos(); } -void RevGraphView::contentsMouseMoveEvent ( QMouseEvent * e ) +void RevGraphView::contentsMouseMoveEvent ( TQMouseEvent * e ) { if (_isMoving) { int dx = e->globalPos().x() - _lastPos.x(); @@ -780,13 +780,13 @@ void RevGraphView::setNewDirection(int dir) dumpRevtree(); } -void RevGraphView::contentsContextMenuEvent(QContextMenuEvent* e) +void RevGraphView::contentsContextMenuEvent(TQContextMenuEvent* e) { if (!m_Canvas) return; - QCanvasItemList l = canvas()->collisions(e->pos()); - QCanvasItem* i = (l.count() == 0) ? 0 : l.first(); + TQCanvasItemList l = canvas()->collisions(e->pos()); + TQCanvasItem* i = (l.count() == 0) ? 0 : l.first(); - QPopupMenu popup; + TQPopupMenu popup; if (i && i->rtti()==GRAPHTREE_LABEL) { if (!((GraphTreeLabel*)i)->source().isEmpty() && getAction(((GraphTreeLabel*)i)->nodename())!='D') { popup.insertItem(i18n("Diff to previous"),301); @@ -832,7 +832,7 @@ void RevGraphView::contentsContextMenuEvent(QContextMenuEvent* e) break; case 201: { - QString fn = KFileDialog::getSaveFileName(":","*.png"); + TQString fn = KFileDialog::getSaveFileName(":","*.png"); if (!fn.isEmpty()) { if (m_Marker) { m_Marker->hide(); @@ -840,8 +840,8 @@ void RevGraphView::contentsContextMenuEvent(QContextMenuEvent* e) if (m_Selected) { m_Selected->setSelected(false); } - QPixmap pix(m_Canvas->size()); - QPainter p(&pix); + TQPixmap pix(m_Canvas->size()); + TQPainter p(&pix); m_Canvas->drawArea( m_Canvas->rect(), &p ); pix.save(fn,"PNG"); if (m_Marker) { @@ -894,57 +894,57 @@ void RevGraphView::makeCat(GraphTreeLabel*_l) if (!_l) { return; } - QString n1 = _l->nodename(); - trevTree::ConstIterator it = m_Tree.find(n1); + TQString n1 = _l->nodename(); + trevTree::ConstIterator it = m_Tree.tqfind(n1); if (it==m_Tree.end()) { return; } svn::Revision tr(it.data().rev); - QString tp = _basePath+it.data().name; - emit makeCat(tr,tp,it.data().name,tr,kapp->activeModalWidget()); + TQString tp = _basePath+it.data().name; + emit makeCat(tr,tp,it.data().name,tr,TQT_TQWIDGET(kapp->activeModalWidget())); } void RevGraphView::makeDiffPrev(GraphTreeLabel*_l) { if (!_l) return; - QString n1,n2; + TQString n1,n2; n1 = _l->nodename(); n2 = _l->source(); makeDiff(n1,n2); } -void RevGraphView::makeDiff(const QString&n1,const QString&n2) +void RevGraphView::makeDiff(const TQString&n1,const TQString&n2) { if (n1.isEmpty()||n2.isEmpty()) return; trevTree::ConstIterator it; - it = m_Tree.find(n2); + it = m_Tree.tqfind(n2); if (it==m_Tree.end()) { return; } svn::Revision sr(it.data().rev); - QString sp = _basePath+it.data().name; + TQString sp = _basePath+it.data().name; - it = m_Tree.find(n1); + it = m_Tree.tqfind(n1); if (it==m_Tree.end()) { return; } svn::Revision tr(it.data().rev); - QString tp = _basePath+it.data().name; + TQString tp = _basePath+it.data().name; if (Kdesvnsettings::tree_diff_rec()) { - emit makeRecDiff(sp,sr,tp,tr,kapp->activeModalWidget()); + emit makeRecDiff(sp,sr,tp,tr,TQT_TQWIDGET(kapp->activeModalWidget())); } else { - emit makeNorecDiff(sp,sr,tp,tr,kapp->activeModalWidget()); + emit makeNorecDiff(sp,sr,tp,tr,TQT_TQWIDGET(kapp->activeModalWidget())); } } -void RevGraphView::setBasePath(const QString&_path) +void RevGraphView::setBasePath(const TQString&_path) { _basePath = _path; } -void RevGraphView::slotClientException(const QString&what) +void RevGraphView::slotClientException(const TQString&what) { - KMessageBox::sorry(KApplication::activeModalWidget(),what,i18n("SVN Error")); + KMessageBox::sorry(TQT_TQWIDGET(KApplication::activeModalWidget()),what,i18n("SVN Error")); } #include "revgraphview.moc" diff --git a/src/svnfrontend/graphtree/revgraphview.h b/src/svnfrontend/graphtree/revgraphview.h index 039bc4b..dcfc007 100644 --- a/src/svnfrontend/graphtree/revgraphview.h +++ b/src/svnfrontend/graphtree/revgraphview.h @@ -22,7 +22,7 @@ #include <svnqt/revision.hpp> -#include <qcanvas.h> +#include <tqcanvas.h> namespace svn { class LogEntry; @@ -41,18 +41,19 @@ class CContextListener; /** @author Rajko Albrecht <ral@alwins-world.de> */ -class RevGraphView : public QCanvasView +class RevGraphView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: enum ZoomPosition { TopLeft, TopRight, BottomLeft, BottomRight, Auto }; /* avoid large copy operations */ friend class RevisionTree; - RevGraphView(QObject*,svn::Client*,QWidget * parent = 0, const char * name = 0, WFlags f = 0); + RevGraphView(TQObject*,svn::Client*,TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0); virtual ~RevGraphView(); - void showText(const QString&s); + void showText(const TQString&s); void clear(); void beginInsert(); @@ -60,63 +61,63 @@ public: struct targetData { char Action; - QString key; - targetData(const QString&n,char _a) + TQString key; + targetData(const TQString&n,char _a) { key = n; Action = _a; } targetData(){Action=0;key="";} }; - typedef QValueList<targetData> tlist; + typedef TQValueList<targetData> tlist; struct keyData { - QString name,Author,Date,Message; + TQString name,Author,Date,Message; long rev; char Action; tlist targets; }; - typedef QMap<QString,keyData> trevTree; + typedef TQMap<TQString,keyData> trevTree; - QString toolTip(const QString&nodename,bool full=false)const; + TQString toolTip(const TQString&nodename,bool full=false)const; - void setBasePath(const QString&); + void setBasePath(const TQString&); void dumpRevtree(); signals: - void dispDetails(const QString&); - void makeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*); - void makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); - void makeRecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); + void dispDetails(const TQString&); + void makeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*); + void makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); + void makeRecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); public slots: virtual void contentsMovingSlot(int,int); virtual void zoomRectMoved(int,int); virtual void zoomRectMoveFinished(); - virtual void slotClientException(const QString&what); + virtual void slotClientException(const TQString&what); protected slots: virtual void readDotOutput(KProcess * proc,char * buffer,int buflen); virtual void dotExit(KProcess*); protected: - QCanvas*m_Canvas; + TQCanvas*m_Canvas; GraphMark*m_Marker; svn::Client*m_Client; GraphTreeLabel*m_Selected; - QObject*m_Listener; + TQObject*m_Listener; KTempFile*dotTmpFile; - QString dotOutput; + TQString dotOutput; KProcess*renderProcess; trevTree m_Tree; - QColor getBgColor(const QString&nodeName)const; - bool isStart(const QString&nodeName)const; - char getAction(const QString&)const; - const QString&getLabelstring(const QString&nodeName); + TQColor getBgColor(const TQString&nodeName)const; + bool isStart(const TQString&nodeName)const; + char getAction(const TQString&)const; + const TQString&getLabelstring(const TQString&nodeName); - QMap<QString,GraphTreeLabel*> m_NodeList; - QMap<QString,QString> m_LabelMap; + TQMap<TQString,GraphTreeLabel*> m_NodeList; + TQMap<TQString,TQString> m_LabelMap; int _xMargin,_yMargin; GraphViewTip*m_Tip; @@ -124,26 +125,26 @@ protected: double _cvZoom; ZoomPosition m_LastAutoPosition; - virtual void resizeEvent(QResizeEvent*); - virtual void contentsMousePressEvent ( QMouseEvent * e ); - virtual void contentsMouseReleaseEvent ( QMouseEvent * e ); - virtual void contentsMouseMoveEvent ( QMouseEvent*e); - virtual void contentsContextMenuEvent(QContextMenuEvent*e); - virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e ); + virtual void resizeEvent(TQResizeEvent*); + virtual void contentsMousePressEvent ( TQMouseEvent * e ); + virtual void contentsMouseReleaseEvent ( TQMouseEvent * e ); + virtual void contentsMouseMoveEvent ( TQMouseEvent*e); + virtual void contentsContextMenuEvent(TQContextMenuEvent*e); + virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e ); bool _isMoving; - QPoint _lastPos; + TQPoint _lastPos; bool _noUpdateZoomerPos; - QString _basePath; + TQString _basePath; private: - void updateSizes(QSize s = QSize(0,0)); + void updateSizes(TQSize s = TQSize(0,0)); void updateZoomerPos(); void setNewDirection(int dir); void makeDiffPrev(GraphTreeLabel*); - void makeDiff(const QString&,const QString&); + void makeDiff(const TQString&,const TQString&); void makeSelected(GraphTreeLabel*); void makeCat(GraphTreeLabel*_l); }; diff --git a/src/svnfrontend/graphtree/revisiontree.cpp b/src/svnfrontend/graphtree/revisiontree.cpp index bb64cf7..a334a0c 100644 --- a/src/svnfrontend/graphtree/revisiontree.cpp +++ b/src/svnfrontend/graphtree/revisiontree.cpp @@ -38,12 +38,12 @@ #include <kmdcodec.h> #include <kmessagebox.h> -#include <qwidget.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qregexp.h> +#include <tqwidget.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqregexp.h> #define INTERNALCOPY 1 #define INTERNALRENAME 2 @@ -54,21 +54,21 @@ public: RtreeData(); virtual ~RtreeData(); - QMap<long,eLog_Entry> m_History; + TQMap<long,eLog_Entry> m_History; svn::LogEntriesMap m_OldHistory; long max_rev,min_rev; KProgressDialog*progress; - QTime m_stopTick; + TQTime m_stopTick; - QWidget*dlgParent; + TQWidget*dlgParent; RevTreeWidget*m_TreeDisplay; svn::Client*m_Client; - QObject* m_Listener; + TQObject* m_Listener; - bool getLogs(const QString&,const svn::Revision&startr,const svn::Revision&endr,const QString&origin); + bool getLogs(const TQString&,const svn::Revision&startr,const svn::Revision&endr,const TQString&origin); }; RtreeData::RtreeData() @@ -86,13 +86,13 @@ RtreeData::~RtreeData() delete progress; } -bool RtreeData::getLogs(const QString&reposRoot,const svn::Revision&startr,const svn::Revision&endr,const QString&origin) +bool RtreeData::getLogs(const TQString&reposRoot,const svn::Revision&startr,const svn::Revision&endr,const TQString&origin) { if (!m_Listener||!m_Client) { return false; } try { - CursorStack a(Qt::BusyCursor); + CursorStack a(TQt::BusyCursor); StopDlg sdlg(m_Listener,dlgParent, 0,"Logs",i18n("Getting logs - hit cancel for abort")); if (svn::Url::isLocal(reposRoot) ) { @@ -104,31 +104,31 @@ bool RtreeData::getLogs(const QString&reposRoot,const svn::Revision&startr,const } else if (Kdesvnsettings::network_on()) { m_Client->log(reposRoot,endr,startr,m_OldHistory,startr,true,false,0); } else { - KMessageBox::error(0,i18n("Could not retrieve logs, reason:\n%1").arg(i18n("No logcache possible due broken database and networking not allowed."))); + KMessageBox::error(0,i18n("Could not retrieve logs, reason:\n%1").tqarg(i18n("No logcache possible due broken database and networking not allowed."))); return false; } } } catch (const svn::Exception&ce) { kdDebug()<<ce.msg() << endl; - KMessageBox::error(0,i18n("Could not retrieve logs, reason:\n%1").arg(ce.msg())); + KMessageBox::error(0,i18n("Could not retrieve logs, reason:\n%1").tqarg(ce.msg())); return false; } return true; } RevisionTree::RevisionTree(svn::Client*aClient, - QObject*aListener, - const QString& reposRoot, + TQObject*aListener, + const TQString& reposRoot, const svn::Revision&startr,const svn::Revision&endr, - const QString&origin, + const TQString&origin, const svn::Revision& baserevision, - QWidget*treeParent,QWidget*parent) + TQWidget*treeParent,TQWidget*tqparent) :m_InitialRevsion(0),m_Path(origin),m_Valid(false) { m_Data = new RtreeData; m_Data->m_Client=aClient; m_Data->m_Listener=aListener; - m_Data->dlgParent=parent; + m_Data->dlgParent=tqparent; if (!m_Data->getLogs(reposRoot,startr,endr,origin)) { return; @@ -138,7 +138,7 @@ RevisionTree::RevisionTree(svn::Client*aClient, kdDebug()<<"Origin: "<<origin << endl; m_Data->progress=new KProgressDialog( - parent,"progressdlg",i18n("Scanning logs"),i18n("Scanning the logs for %1").arg(origin),true); + tqparent,"progressdlg",i18n("Scanning logs"),i18n("Scanning the logs for %1").tqarg(origin),true); m_Data->progress->setMinimumDuration(100); m_Data->progress->show(); m_Data->progress->setAllowCancel(true); @@ -206,7 +206,7 @@ RevisionTree::~RevisionTree() delete m_Data; } -bool RevisionTree::isDeleted(long revision,const QString&path) +bool RevisionTree::isDeleted(long revision,const TQString&path) { for (unsigned i = 0;i<m_Data->m_History[revision].changedPaths.count();++i) { if (isParent(m_Data->m_History[revision].changedPaths[i].path,path) && @@ -221,8 +221,8 @@ bool RevisionTree::topDownScan() { m_Data->progress->progressBar()->setTotalSteps(m_Data->max_rev-m_Data->min_rev); bool cancel=false; - QString label; - QString olabel = m_Data->progress->labelText(); + TQString label; + TQString olabel = m_Data->progress->labelText(); for (long j=m_Data->max_rev;j>=m_Data->min_rev;--j) { m_Data->progress->progressBar()->setProgress(m_Data->max_rev-j); kapp->processEvents(); @@ -237,7 +237,7 @@ bool RevisionTree::topDownScan() break; } label = i18n("%1<br>Check change entry %2 of %3") - .arg(olabel).arg(i).arg(m_Data->m_OldHistory[j].changedPaths.count()); + .tqarg(olabel).tqarg(i).tqarg(m_Data->m_OldHistory[j].changedPaths.count()); m_Data->progress->setLabel(label); kapp->processEvents(); } @@ -247,8 +247,8 @@ bool RevisionTree::topDownScan() { if (!m_Data->m_OldHistory[j].changedPaths[i].copyFromPath.isEmpty()) { if (m_InitialRevsion<m_Data->m_OldHistory[j].revision) { - QString tmpPath = m_Path; - QString r = m_Path.mid(m_Data->m_OldHistory[j].changedPaths[i].path.length()); + TQString tmpPath = m_Path; + TQString r = m_Path.mid(m_Data->m_OldHistory[j].changedPaths[i].path.length()); m_Path=m_Data->m_OldHistory[j].changedPaths[i].copyFromPath; m_Path+=r; } @@ -278,13 +278,13 @@ bool RevisionTree::topDownScan() cancel=true; break; } - label = i18n("%1<br>Check change entry %2 of %3").arg(olabel).arg(i).arg(m_Data->m_OldHistory[j].changedPaths.count()); + label = i18n("%1<br>Check change entry %2 of %3").tqarg(olabel).tqarg(i).tqarg(m_Data->m_OldHistory[j].changedPaths.count()); m_Data->progress->setLabel(label); kapp->processEvents(); } if (!m_Data->m_OldHistory[j].changedPaths[i].copyFromPath.isEmpty()) { long r = m_Data->m_OldHistory[j].changedPaths[i].copyFromRevision; - QString sourcepath = m_Data->m_OldHistory[j].changedPaths[i].copyFromPath; + TQString sourcepath = m_Data->m_OldHistory[j].changedPaths[i].copyFromPath; char a = m_Data->m_OldHistory[j].changedPaths[i].action; if (m_Data->m_OldHistory[j].changedPaths[i].path.isEmpty()) { kdDebug()<<"Empty entry! rev " << j << " source " << sourcepath << endl; @@ -331,11 +331,11 @@ bool RevisionTree::topDownScan() cancel=true; break; } - label = i18n("%1<br>Check change entry %2 of %3").arg(olabel).arg(i).arg(m_Data->m_OldHistory[j].changedPaths.count()); + label = i18n("%1<br>Check change entry %2 of %3").tqarg(olabel).tqarg(i).tqarg(m_Data->m_OldHistory[j].changedPaths.count()); m_Data->progress->setLabel(label); kapp->processEvents(); } - m_Data->m_History[j].addCopyTo(m_Data->m_OldHistory[j].changedPaths[i].path,QString::null,-1,m_Data->m_OldHistory[j].changedPaths[i].action); + m_Data->m_History[j].addCopyTo(m_Data->m_OldHistory[j].changedPaths[i].path,TQString(),-1,m_Data->m_OldHistory[j].changedPaths[i].action); } m_Data->m_History[j].author=m_Data->m_OldHistory[j].author; m_Data->m_History[j].date=m_Data->m_OldHistory[j].date; @@ -346,10 +346,10 @@ bool RevisionTree::topDownScan() return !cancel; } -bool RevisionTree::isParent(const QString&_par,const QString&tar) +bool RevisionTree::isParent(const TQString&_par,const TQString&tar) { if (_par==tar) return true; - QString par = _par+(_par.endsWith("/")?"":"/"); + TQString par = _par+(_par.endsWith("/")?"":"/"); return tar.startsWith(par); } @@ -358,22 +358,22 @@ bool RevisionTree::isValid()const return m_Valid; } -static QString uniqueNodeName(long rev,const QString&path) +static TQString uniqueNodeName(long rev,const TQString&path) { - QString res = KCodecs::base64Encode(path.local8Bit(),false); - res.replace("\"","_quot_"); - res.replace(" ","_space_"); - QString n; n.sprintf("%05ld",rev); - res = "\""+n+QString("_%1\"").arg(res); + TQString res = KCodecs::base64Encode(path.local8Bit(),false); + res.tqreplace("\"","_quot_"); + res.tqreplace(" ","_space_"); + TQString n; n.sprintf("%05ld",rev); + res = "\""+n+TQString("_%1\"").tqarg(res); return res; } -bool RevisionTree::bottomUpScan(long startrev,unsigned recurse,const QString&_path,long _last) +bool RevisionTree::bottomUpScan(long startrev,unsigned recurse,const TQString&_path,long _last) { #define REVENTRY m_Data->m_History[j] #define FORWARDENTRY m_Data->m_History[j].changedPaths[i] - QString path = _path; + TQString path = _path; long lastrev = _last; /* this is required if an item will modified AND copied at same revision.*/ long trev = -1; @@ -396,7 +396,7 @@ bool RevisionTree::bottomUpScan(long startrev,unsigned recurse,const QString&_pa if (!isParent(FORWARDENTRY.path,path)) { continue; } - QString n1,n2; + TQString n1,n2; if (isParent(FORWARDENTRY.path,path)) { bool get_out = false; if (FORWARDENTRY.path!=path) { @@ -407,12 +407,12 @@ bool RevisionTree::bottomUpScan(long startrev,unsigned recurse,const QString&_pa if (FORWARDENTRY.action==INTERNALCOPY || FORWARDENTRY.action==INTERNALRENAME ) { bool ren = FORWARDENTRY.action==INTERNALRENAME; - QString tmpPath = path; - QString recPath; + TQString tmpPath = path; + TQString recPath; if (FORWARDENTRY.copyToPath.length()==0) { continue; } - QString r = path.mid(FORWARDENTRY.path.length()); + TQString r = path.mid(FORWARDENTRY.path.length()); recPath= FORWARDENTRY.copyToPath; recPath+=r; n1 = uniqueNodeName(lastrev,tmpPath); @@ -521,12 +521,12 @@ bool RevisionTree::bottomUpScan(long startrev,unsigned recurse,const QString&_pa return !cancel; } -QWidget*RevisionTree::getView() +TQWidget*RevisionTree::getView() { return m_Data->m_TreeDisplay; } -void RevisionTree::fillItem(long rev,int pathIndex,const QString&nodeName,const QString&path) +void RevisionTree::fillItem(long rev,int pathIndex,const TQString&nodeName,const TQString&path) { m_Data->m_TreeDisplay->m_RevGraphView->m_Tree[nodeName].name=path; m_Data->m_TreeDisplay->m_RevGraphView->m_Tree[nodeName].rev = rev; diff --git a/src/svnfrontend/graphtree/revisiontree.h b/src/svnfrontend/graphtree/revisiontree.h index 508306f..175754d 100644 --- a/src/svnfrontend/graphtree/revisiontree.h +++ b/src/svnfrontend/graphtree/revisiontree.h @@ -24,12 +24,12 @@ #include "src/svnqt/revision.hpp" #include "src/svnqt/client.hpp" -#include <qstring.h> -#include <qmap.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqpixmap.h> class RtreeData; -class QWidget; +class TQWidget; class KListViewItem; class KListView; class CContextListener; @@ -45,31 +45,31 @@ namespace svn class RevisionTree{ public: RevisionTree(svn::Client*, - QObject*aListener, - const QString& reposRoot, + TQObject*aListener, + const TQString& reposRoot, const svn::Revision&startr,const svn::Revision&endr, - const QString&,const svn::Revision& baserevision,QWidget*treeParent, - QWidget*parent=0); + const TQString&,const svn::Revision& baserevision,TQWidget*treeParent, + TQWidget*tqparent=0); virtual ~RevisionTree(); bool isValid()const; - QWidget*getView(); + TQWidget*getView(); protected: long m_Baserevision; long m_InitialRevsion; - QString m_Path; + TQString m_Path; bool m_Valid; RtreeData*m_Data; bool topDownScan(); - bool bottomUpScan(long startrev,unsigned recurse,const QString&path,long sRev = -1); - bool isDeleted(long revision,const QString&); + bool bottomUpScan(long startrev,unsigned recurse,const TQString&path,long sRev = -1); + bool isDeleted(long revision,const TQString&); - static bool isParent(const QString&_par,const QString&tar); + static bool isParent(const TQString&_par,const TQString&tar); - void fillItem(long revIndex,int pathIndex,const QString&nodeName,const QString&path); + void fillItem(long revIndex,int pathIndex,const TQString&nodeName,const TQString&path); }; #endif diff --git a/src/svnfrontend/graphtree/revtreewidget.cpp b/src/svnfrontend/graphtree/revtreewidget.cpp index 35b5258..eaf6fcc 100644 --- a/src/svnfrontend/graphtree/revtreewidget.cpp +++ b/src/svnfrontend/graphtree/revtreewidget.cpp @@ -20,55 +20,55 @@ #include "revtreewidget.h" #include "src/settings/kdesvnsettings.h" -#include <qvariant.h> -#include <qsplitter.h> +#include <tqvariant.h> +#include <tqsplitter.h> #include <ktextbrowser.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "revgraphview.h" #include "ktextbrowser.h" /* - * Constructs a RevTreeWidget as a child of 'parent', with the + * Constructs a RevTreeWidget as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. */ -RevTreeWidget::RevTreeWidget(QObject*lt,svn::Client*cl, QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +RevTreeWidget::RevTreeWidget(TQObject*lt,svn::Client*cl, TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "RevTreeWidget" ); - RevTreeWidgetLayout = new QVBoxLayout( this, 11, 6, "RevTreeWidgetLayout"); + RevTreeWidgetLayout = new TQVBoxLayout( this, 11, 6, "RevTreeWidgetLayout"); - m_Splitter = new QSplitter( this, "m_Splitter" ); - m_Splitter->setOrientation( QSplitter::Vertical ); + m_Splitter = new TQSplitter( this, "m_Splitter" ); + m_Splitter->setOrientation( Qt::Vertical ); m_RevGraphView = new RevGraphView(lt,cl, m_Splitter, "m_RevGraphView" ); - m_RevGraphView->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 2, m_RevGraphView->sizePolicy().hasHeightForWidth() ) ); - connect(m_RevGraphView,SIGNAL(dispDetails(const QString&)),this,SLOT(setDetailText(const QString&))); + m_RevGraphView->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 2, m_RevGraphView->sizePolicy().hasHeightForWidth() ) ); + connect(m_RevGraphView,TQT_SIGNAL(dispDetails(const TQString&)),this,TQT_SLOT(setDetailText(const TQString&))); connect(m_RevGraphView, - SIGNAL(makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)), + TQT_SIGNAL(makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)), this, - SIGNAL(makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)) + TQT_SIGNAL(makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)) ); connect(m_RevGraphView, - SIGNAL(makeRecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)), + TQT_SIGNAL(makeRecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)), this, - SIGNAL(makeRecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)) + TQT_SIGNAL(makeRecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)) ); connect(m_RevGraphView, - SIGNAL(makeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*)), + TQT_SIGNAL(makeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*)), this, - SIGNAL(makeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*)) + TQT_SIGNAL(makeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*)) ); m_Detailstext = new KTextBrowser( m_Splitter, "m_Detailstext" ); - m_Detailstext->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, m_Detailstext->sizePolicy().hasHeightForWidth() ) ); + m_Detailstext->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_Detailstext->sizePolicy().hasHeightForWidth() ) ); m_Detailstext->setResizePolicy( KTextBrowser::Manual ); RevTreeWidgetLayout->addWidget( m_Splitter ); - resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 480).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); - QValueList<int> list = Kdesvnsettings::tree_detail_height(); + TQValueList<int> list = Kdesvnsettings::tree_detail_height(); if (list.count()==2 && (list[0]>0||list[1]>0)) { m_Splitter->setSizes(list); } @@ -79,15 +79,15 @@ RevTreeWidget::RevTreeWidget(QObject*lt,svn::Client*cl, QWidget* parent, const c */ RevTreeWidget::~RevTreeWidget() { - // no need to delete child widgets, Qt does it all for us - QValueList<int> list = m_Splitter->sizes(); + // no need to delete child widgets, TQt does it all for us + TQValueList<int> list = m_Splitter->sizes(); if (list.count()==2) { Kdesvnsettings::setTree_detail_height(list); Kdesvnsettings::writeConfig(); } } -void RevTreeWidget::setBasePath(const QString&_p) +void RevTreeWidget::setBasePath(const TQString&_p) { m_RevGraphView->setBasePath(_p); } @@ -97,10 +97,10 @@ void RevTreeWidget::dumpRevtree() m_RevGraphView->dumpRevtree(); } -void RevTreeWidget::setDetailText(const QString&_s) +void RevTreeWidget::setDetailText(const TQString&_s) { m_Detailstext->setText(_s); - QValueList<int> list = m_Splitter->sizes(); + TQValueList<int> list = m_Splitter->sizes(); if (list.count()!=2) return; if (list[1]==0) { int h = height(); diff --git a/src/svnfrontend/graphtree/revtreewidget.h b/src/svnfrontend/graphtree/revtreewidget.h index 324f0ba..61e4753 100644 --- a/src/svnfrontend/graphtree/revtreewidget.h +++ b/src/svnfrontend/graphtree/revtreewidget.h @@ -22,16 +22,16 @@ #include <svnqt/revision.hpp> -#include <qvariant.h> -#include <qpixmap.h> -#include <qwidget.h> +#include <tqvariant.h> +#include <tqpixmap.h> +#include <tqwidget.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; class RevGraphView; -class QSplitter; +class TQSplitter; class KTextBrowser; class CContextListener; @@ -40,34 +40,35 @@ namespace svn { class Client; } -class RevTreeWidget : public QWidget +class RevTreeWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - RevTreeWidget(QObject*,svn::Client*,QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + RevTreeWidget(TQObject*,svn::Client*,TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~RevTreeWidget(); - QSplitter* m_Splitter; + TQSplitter* m_Splitter; RevGraphView* m_RevGraphView; - void setBasePath(const QString&); + void setBasePath(const TQString&); void dumpRevtree(); protected: - QVBoxLayout* RevTreeWidgetLayout; + TQVBoxLayout* RevTreeWidgetLayout; KTextBrowser* m_Detailstext; signals: - void makeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*); - void makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); - void makeRecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); + void makeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*); + void makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); + void makeRecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); protected slots: - virtual void setDetailText(const QString&); + virtual void setDetailText(const TQString&); private: - QPixmap image0; + TQPixmap image0; }; diff --git a/src/svnfrontend/hotcopydlg.ui b/src/svnfrontend/hotcopydlg.ui index ac0ac7d..27d41df 100644 --- a/src/svnfrontend/hotcopydlg.ui +++ b/src/svnfrontend/hotcopydlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HotcopyDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HotcopyDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,22 +16,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_Destlabel</cstring> </property> <property name="text"> <string>Destination folder:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -51,20 +51,20 @@ <number>18</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_Srclabel</cstring> </property> <property name="text"> <string>Repository to copy:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_Cleanlogs</cstring> </property> @@ -82,7 +82,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/svnfrontend/hotcopydlg_impl.cpp b/src/svnfrontend/hotcopydlg_impl.cpp index 9211929..67ef264 100644 --- a/src/svnfrontend/hotcopydlg_impl.cpp +++ b/src/svnfrontend/hotcopydlg_impl.cpp @@ -19,12 +19,12 @@ ***************************************************************************/ #include "hotcopydlg_impl.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kurl.h> #include <kurlrequester.h> -HotcopyDlg_impl::HotcopyDlg_impl(QWidget *parent, const char *name) - :HotcopyDlg(parent, name) +HotcopyDlg_impl::HotcopyDlg_impl(TQWidget *tqparent, const char *name) + :HotcopyDlg(tqparent, name) { } @@ -32,12 +32,12 @@ HotcopyDlg_impl::~HotcopyDlg_impl() { } -QString HotcopyDlg_impl::srcPath()const +TQString HotcopyDlg_impl::srcPath()const { return checkPath(m_SrcpathEditor->url()); } -QString HotcopyDlg_impl::destPath()const +TQString HotcopyDlg_impl::destPath()const { return checkPath(m_DestpathEditor->url()); } @@ -47,10 +47,10 @@ bool HotcopyDlg_impl::cleanLogs()const return m_Cleanlogs->isChecked(); } -QString HotcopyDlg_impl::checkPath(const QString&_p)const +TQString HotcopyDlg_impl::checkPath(const TQString&_p)const { KURL u = _p; - QString res = u.path(); + TQString res = u.path(); while (res.endsWith("/")) { res.truncate(res.length()-1); } diff --git a/src/svnfrontend/hotcopydlg_impl.h b/src/svnfrontend/hotcopydlg_impl.h index 54655ac..fcfb9f7 100644 --- a/src/svnfrontend/hotcopydlg_impl.h +++ b/src/svnfrontend/hotcopydlg_impl.h @@ -24,16 +24,17 @@ class HotcopyDlg_impl: public HotcopyDlg { Q_OBJECT + TQ_OBJECT public: - HotcopyDlg_impl(QWidget *parent = 0, const char *name = 0); + HotcopyDlg_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~HotcopyDlg_impl(); - QString srcPath()const; - QString destPath()const; + TQString srcPath()const; + TQString destPath()const; bool cleanLogs()const; private: - QString checkPath(const QString&)const; + TQString checkPath(const TQString&)const; public slots: diff --git a/src/svnfrontend/importdir_logmsg.cpp b/src/svnfrontend/importdir_logmsg.cpp index 16a6394..9300d59 100644 --- a/src/svnfrontend/importdir_logmsg.cpp +++ b/src/svnfrontend/importdir_logmsg.cpp @@ -23,39 +23,39 @@ #include <klocale.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qwhatsthis.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> +#include <tqtooltip.h> -Importdir_logmsg::Importdir_logmsg(QWidget *parent, const char *name) - : Logmsg_impl(parent, name) +Importdir_logmsg::Importdir_logmsg(TQWidget *tqparent, const char *name) + : Logmsg_impl(tqparent, name) { - m_createDirBox = new QCheckBox("",this,"create_dir_checkbox"); + m_createDirBox = new TQCheckBox("",this,"create_dir_checkbox"); m_keepLocksButton->hide(); //delete m_keepLocksButton; createDirboxDir(); addItemWidget(m_createDirBox); m_createDirBox->setChecked(true); - QHBoxLayout* tmpLayout = new QHBoxLayout( this, 11, 6, "ExtraLayout"); - m_noIgnore = new QCheckBox("",this,"no_ignore_pattern"); + TQHBoxLayout* tmpLayout = new TQHBoxLayout( this, 11, 6, "ExtraLayout"); + m_noIgnore = new TQCheckBox("",this,"no_ignore_pattern"); m_noIgnore->setText(i18n("No ignore")); - QToolTip::add(m_noIgnore,i18n("If set, add files or directories that match ignore patterns.")); + TQToolTip::add(m_noIgnore,i18n("If set, add files or directories that match ignore patterns.")); tmpLayout->addWidget(m_noIgnore); //LogmessageDataLayout->addWidget(m_createDirBox); if (svn::Version::version_major()>1|| svn::Version::version_minor()>4 ) { - m_ignoreUnknownNodes = new QCheckBox("",this,"ignore_unknown_nodes_box"); + m_ignoreUnknownNodes = new TQCheckBox("",this,"ignore_unknown_nodes_box"); m_ignoreUnknownNodes->setText(i18n("Ignore unknown node types")); - QToolTip::add(m_ignoreUnknownNodes,i18n("Should files with unknown node types be ignored")); - QWhatsThis::add(m_ignoreUnknownNodes,i18n("Ignore files of which the node type is unknown, such as device files and pipes.")); + TQToolTip::add(m_ignoreUnknownNodes,i18n("Should files with unknown node types be ignored")); + TQWhatsThis::add(m_ignoreUnknownNodes,i18n("Ignore files of which the node type is unknown, such as device files and pipes.")); tmpLayout->addWidget(m_ignoreUnknownNodes); //addItemWidget(m_ignoreUnknownNodes); } else { m_ignoreUnknownNodes=0; } - QSpacerItem* m_leftspacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* m_leftspacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); tmpLayout->addItem(m_leftspacer); LogmessageDataLayout->addItem(tmpLayout); } @@ -79,9 +79,9 @@ bool Importdir_logmsg::createDir() return m_createDirBox->isChecked(); } -void Importdir_logmsg::createDirboxDir(const QString & which) +void Importdir_logmsg::createDirboxDir(const TQString & which) { - m_createDirBox->setText(i18n("Create subdir %1 on import").arg(which.isEmpty()?i18n("(Last part)"):which)); + m_createDirBox->setText(i18n("Create subdir %1 on import").tqarg(which.isEmpty()?i18n("(Last part)"):which)); } #include "importdir_logmsg.moc" diff --git a/src/svnfrontend/importdir_logmsg.h b/src/svnfrontend/importdir_logmsg.h index 8a7aacb..a32ca1b 100644 --- a/src/svnfrontend/importdir_logmsg.h +++ b/src/svnfrontend/importdir_logmsg.h @@ -22,27 +22,28 @@ #include "src/ksvnwidgets/logmsg_impl.h" -class QCheckBox; +class TQCheckBox; /** @author Rajko Albrecht */ class Importdir_logmsg : public Logmsg_impl { Q_OBJECT + TQ_OBJECT public: - Importdir_logmsg(QWidget *parent = 0, const char *name = 0); + Importdir_logmsg(TQWidget *tqparent = 0, const char *name = 0); virtual ~Importdir_logmsg(); bool createDir(); bool ignoreUnknownNodes(); bool noIgnore(); - void createDirboxDir(const QString & which=QString::null); + void createDirboxDir(const TQString & which=TQString()); protected: - QCheckBox*m_createDirBox; - QCheckBox*m_ignoreUnknownNodes; - QCheckBox*m_noIgnore; + TQCheckBox*m_createDirBox; + TQCheckBox*m_ignoreUnknownNodes; + TQCheckBox*m_noIgnore; }; #endif diff --git a/src/svnfrontend/itemdisplay.cpp b/src/svnfrontend/itemdisplay.cpp index 6a675ed..d037e80 100644 --- a/src/svnfrontend/itemdisplay.cpp +++ b/src/svnfrontend/itemdisplay.cpp @@ -34,7 +34,7 @@ bool ItemDisplay::isWorkingCopy()const return m_isWorkingCopy; } -const QString&ItemDisplay::baseUri()const +const TQString&ItemDisplay::baseUri()const { return m_baseUri; } @@ -57,7 +57,7 @@ void ItemDisplay::setNetworked(bool how) m_isNetworked=how; } -void ItemDisplay::setBaseUri(const QString&uri) +void ItemDisplay::setBaseUri(const TQString&uri) { m_baseUri = uri; /* otherwise subversion lib asserts! */ @@ -66,7 +66,7 @@ void ItemDisplay::setBaseUri(const QString&uri) } } -const QString&ItemDisplay::lastError()const +const TQString&ItemDisplay::lastError()const { return m_LastException; } @@ -82,13 +82,13 @@ bool ItemDisplay::filterOut(const SvnItem*item) /*! - \fn ItemDisplay::filterOut(const svn::Status&) + \fn ItemDisplay::filterOut(const svn::tqStatus&) */ bool ItemDisplay::filterOut(const svn::StatusPtr&item) { bool res = false; - if (!item->validReposStatus()) { + if (!item->validRepostqStatus()) { if ((!Kdesvnsettings::display_unknown_files() && !item->isVersioned()) || (Kdesvnsettings::hide_unchanged_files() && item->isRealVersioned() && !item->isModified() && !item->entry().isDir())) { res = true; @@ -101,12 +101,12 @@ bool ItemDisplay::filterOut(const svn::StatusPtr&item) /*! \fn ItemDisplay::relativePath(const SvnItem*item) */ -QString ItemDisplay::relativePath(const SvnItem*item) +TQString ItemDisplay::relativePath(const SvnItem*item) { if (!isWorkingCopy()||!item->fullName().startsWith(baseUri())) { return item->fullName(); } - QString name = item->fullName(); + TQString name = item->fullName(); if (name==baseUri()) { name = "."; } else { diff --git a/src/svnfrontend/itemdisplay.h b/src/svnfrontend/itemdisplay.h index b487904..caf09da 100644 --- a/src/svnfrontend/itemdisplay.h +++ b/src/svnfrontend/itemdisplay.h @@ -22,17 +22,17 @@ #define __ITEMDISPLAY_H #include "src/svnqt/svnqttypes.hpp" -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> #include <kurl.h> -class QWidget; +class TQWidget; class SvnItem; namespace svn { - class Status; + class tqStatus; } class ItemDisplay @@ -41,28 +41,28 @@ public: ItemDisplay(); virtual ~ItemDisplay(){} virtual bool isWorkingCopy()const; - virtual QWidget*realWidget() = 0; + virtual TQWidget*realWidget() = 0; virtual SvnItem*Selected()=0; - virtual void SelectionList(QPtrList<SvnItem>*)=0; - virtual const QString&baseUri()const; + virtual void SelectionList(TQPtrList<SvnItem>*)=0; + virtual const TQString&baseUri()const; virtual bool openURL( const KURL &url,bool noReinit=false )=0; virtual SvnItem*SelectedOrMain()=0; virtual bool isNetworked()const; - virtual const QString&lastError()const; + virtual const TQString&lastError()const; virtual bool filterOut(const SvnItem*); virtual bool filterOut(const svn::StatusPtr&); - QString relativePath(const SvnItem*item); + TQString relativePath(const SvnItem*item); protected: void setWorkingCopy(bool); void setNetworked(bool); - void setBaseUri(const QString&); - QString m_LastException; + void setBaseUri(const TQString&); + TQString m_LastException; private: bool m_isWorkingCopy; bool m_isNetworked; - QString m_baseUri; + TQString m_baseUri; }; #endif diff --git a/src/svnfrontend/kdesvnfilelist.cpp b/src/svnfrontend/kdesvnfilelist.cpp index d9116cb..ba2249d 100644 --- a/src/svnfrontend/kdesvnfilelist.cpp +++ b/src/svnfrontend/kdesvnfilelist.cpp @@ -61,18 +61,18 @@ #include <kurldrag.h> #include <ktrader.h> -#include <qvbox.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qregexp.h> -#include <qpopupmenu.h> -#include <qcursor.h> -#include <qheader.h> -#include <qcheckbox.h> +#include <tqvbox.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqregexp.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> +#include <tqheader.h> +#include <tqcheckbox.h> #include <unistd.h> @@ -88,9 +88,9 @@ public: delete m_fileTip; kdDebug()<<"Destructor KdesvnFileListPrivate done"<<endl; }; - QListViewItem *dragOverItem; - QPoint dragOverPoint; - QRect mOldDropHighlighter; + TQListViewItem *dragOverItem; + TQPoint dragOverPoint; + TQRect mOldDropHighlighter; svn::Revision m_remoteRevision; KDirWatch*m_DirWatch; SvnFileTip*m_fileTip; @@ -103,17 +103,17 @@ public: bool intern_dropRunning; KURL::List intern_drops; - QString intern_drop_target,merge_Src1, merge_Src2,merge_Target; - QDropEvent::Action intern_drop_action; - QPoint intern_drop_pos; - QTimer drop_timer; - QTimer dirwatch_timer; - QTimer propTimer; + TQString intern_drop_target,merge_Src1, merge_Src2,merge_Target; + TQDropEvent::Action intern_drop_action; + TQPoint intern_drop_pos; + TQTimer drop_timer; + TQTimer dirwatch_timer; + TQTimer propTimer; bool mousePressed; - QPoint presspos; + TQPoint presspos; - QMap<QString,QChar> dirItems; + TQMap<TQString,TQChar> dirItems; void stopDirTimer() { @@ -125,9 +125,9 @@ public: dirwatch_timer.start(250,true); } - void connectDirTimer(QObject*ob) + void connectDirTimer(TQObject*ob) { - QObject::connect(&dirwatch_timer,SIGNAL(timeout()),ob,SLOT(_dirwatchTimeout())); + TQObject::connect(&dirwatch_timer,TQT_SIGNAL(timeout()),ob,TQT_SLOT(_dirwatchTimeout())); } void stopScan() { @@ -149,9 +149,9 @@ public: { propTimer.stop(); } - void connectPropTimer(QObject*ob) + void connectPropTimer(TQObject*ob) { - QObject::connect(&propTimer,SIGNAL(timeout()),ob,SLOT(_propListTimeout())); + TQObject::connect(&propTimer,TQT_SIGNAL(timeout()),ob,TQT_SLOT(_propListTimeout())); } private: @@ -159,7 +159,7 @@ private: }; KdesvnFileListPrivate::KdesvnFileListPrivate() - : dragOverItem(0),dragOverPoint(QPoint(0,0)),mOldDropHighlighter() + : dragOverItem(0),dragOverPoint(TQPoint(0,0)),mOldDropHighlighter() { m_remoteRevision = svn::Revision::HEAD; m_DirWatch = 0; @@ -189,15 +189,15 @@ bool KdesvnFileListPrivate::reReadSettings() _unknown != mdisp_unknown_files); } -kdesvnfilelist::kdesvnfilelist(KActionCollection*aCollect,QWidget *parent, const char *name) - : KListView(parent, name),ItemDisplay(),m_SvnWrapper(new SvnActions(this)) +kdesvnfilelist::kdesvnfilelist(KActionCollection*aCollect,TQWidget *tqparent, const char *name) + : KListView(tqparent, name),ItemDisplay(),m_SvnWrapper(new SvnActions(this)) { m_SelectedItems = 0; m_pList = new KdesvnFileListPrivate; m_filesAction = aCollect; m_pList->m_fileTip=new SvnFileTip(this); m_pList->m_fileTip->setOptions(Kdesvnsettings::display_file_tips()&& - QToolTip::isGloballyEnabled(),true,6); + TQToolTip::isGloballyEnabled(),true,6); SshAgent ssh; ssh.querySshAgent(); @@ -208,7 +208,7 @@ kdesvnfilelist::kdesvnfilelist(KActionCollection*aCollect,QWidget *parent, const setAllColumnsShowFocus (true); setRootIsDecorated(true); addColumn(i18n("Name")); - addColumn(i18n("Status")); + addColumn(i18n("tqStatus")); addColumn(i18n("Last changed Revision")); addColumn(i18n("Last author")); addColumn(i18n("Last change date")); @@ -216,30 +216,30 @@ kdesvnfilelist::kdesvnfilelist(KActionCollection*aCollect,QWidget *parent, const setSortColumn(FileListViewItem::COL_NAME); setupActions(); - connect(this,SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),this, - SLOT(slotContextMenuRequested(QListViewItem *, const QPoint &, int))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),this, + TQT_SLOT(slotContextMenuRequested(TQListViewItem *, const TQPoint &, int))); /* not via executed 'cause click may used for selection - single click execution just confuses in an application */ - connect(this,SIGNAL(doubleClicked(QListViewItem*)),this,SLOT(slotItemDoubleClicked(QListViewItem*))); - connect(this,SIGNAL(returnPressed(QListViewItem*)),this,SLOT(slotItemDoubleClicked(QListViewItem*))); - - connect(this,SIGNAL(selectionChanged()),this,SLOT(slotSelectionChanged())); - connect(m_SvnWrapper,SIGNAL(clientException(const QString&)),this,SLOT(slotClientException(const QString&))); - connect(m_SvnWrapper,SIGNAL(sendNotify(const QString&)),this,SLOT(slotNotifyMessage(const QString&))); - connect(m_SvnWrapper,SIGNAL(reinitItem(SvnItem*)),this,SLOT(slotReinitItem(SvnItem*))); - connect(m_SvnWrapper,SIGNAL(sigRefreshAll()),this,SLOT(refreshCurrentTree())); - connect(m_SvnWrapper,SIGNAL(sigRefreshCurrent(SvnItem*)),this,SLOT(refreshCurrent(SvnItem*))); - connect(m_SvnWrapper,SIGNAL(sigRefreshIcons(bool)),this,SLOT(slotRescanIcons(bool))); - connect(this,SIGNAL(dropped (QDropEvent*,QListViewItem*)), - this,SLOT(slotDropped(QDropEvent*,QListViewItem*))); - connect(m_SvnWrapper,SIGNAL(sigGotourl(const QString&)),this,SLOT(_openURL(const QString&))); - - connect(m_SvnWrapper,SIGNAL(sigCacheStatus(Q_LONG,Q_LONG)),this,SIGNAL(sigCacheStatus(Q_LONG,Q_LONG))); - connect(m_SvnWrapper,SIGNAL(sigThreadsChanged()),this,SLOT(enableActions())); - - m_pList->connectDirTimer(this); - m_pList->connectPropTimer(this); + connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem*)),this,TQT_SLOT(slotItemDoubleClicked(TQListViewItem*))); + connect(this,TQT_SIGNAL(returnPressed(TQListViewItem*)),this,TQT_SLOT(slotItemDoubleClicked(TQListViewItem*))); + + connect(this,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotSelectionChanged())); + connect(m_SvnWrapper,TQT_SIGNAL(clientException(const TQString&)),this,TQT_SLOT(slotClientException(const TQString&))); + connect(m_SvnWrapper,TQT_SIGNAL(sendNotify(const TQString&)),this,TQT_SLOT(slotNotifyMessage(const TQString&))); + connect(m_SvnWrapper,TQT_SIGNAL(reinitItem(SvnItem*)),this,TQT_SLOT(slotReinitItem(SvnItem*))); + connect(m_SvnWrapper,TQT_SIGNAL(sigRefreshAll()),this,TQT_SLOT(refreshCurrentTree())); + connect(m_SvnWrapper,TQT_SIGNAL(sigRefreshCurrent(SvnItem*)),this,TQT_SLOT(refreshCurrent(SvnItem*))); + connect(m_SvnWrapper,TQT_SIGNAL(sigRefreshIcons(bool)),this,TQT_SLOT(slotRescanIcons(bool))); + connect(this,TQT_SIGNAL(dropped (TQDropEvent*,TQListViewItem*)), + this,TQT_SLOT(slotDropped(TQDropEvent*,TQListViewItem*))); + connect(m_SvnWrapper,TQT_SIGNAL(sigGotourl(const TQString&)),this,TQT_SLOT(_openURL(const TQString&))); + + connect(m_SvnWrapper,TQT_SIGNAL(sigCachetqStatus(TQ_LONG,TQ_LONG)),this,TQT_SIGNAL(sigCachetqStatus(TQ_LONG,TQ_LONG))); + connect(m_SvnWrapper,TQT_SIGNAL(sigThreadsChanged()),this,TQT_SLOT(enableActions())); + + m_pList->connectDirTimer(TQT_TQOBJECT(this)); + m_pList->connectPropTimer(TQT_TQOBJECT(this)); setDropHighlighter(true); setDragEnabled(true); @@ -259,152 +259,152 @@ void kdesvnfilelist::setupActions() KAction*tmp_action; /* local and remote actions */ /* 1. actions on dirs AND files */ - //new KAction(i18n("Log..."),"kdesvnlog",KShortcut(SHIFT+CTRL+Key_L),this,SLOT(slotMakeRangeLog()),m_filesAction,"make_svn_log"); - new KAction(i18n("Full Log"),"kdesvnlog",KShortcut(CTRL+Key_L),this,SLOT(slotMakeLog()),m_filesAction,"make_svn_log_full"); - new KAction(i18n("Full revision tree"),"kdesvnlog",KShortcut(CTRL+Key_T),this,SLOT(slotMakeTree()),m_filesAction,"make_svn_tree"); + //new KAction(i18n("Log..."),"kdesvnlog",KShortcut(SHIFT+CTRL+Key_L),this,TQT_SLOT(slotMakeRangeLog()),m_filesAction,"make_svn_log"); + new KAction(i18n("Full Log"),"kdesvnlog",KShortcut(CTRL+Key_L),TQT_TQOBJECT(this),TQT_SLOT(slotMakeLog()),m_filesAction,"make_svn_log_full"); + new KAction(i18n("Full revision tree"),"kdesvnlog",KShortcut(CTRL+Key_T),TQT_TQOBJECT(this),TQT_SLOT(slotMakeTree()),m_filesAction,"make_svn_tree"); new KAction(i18n("Partial revision tree"),"kdesvnlog",KShortcut(SHIFT+CTRL+Key_T), - this,SLOT(slotMakePartTree()),m_filesAction,"make_svn_partialtree"); + TQT_TQOBJECT(this),TQT_SLOT(slotMakePartTree()),m_filesAction,"make_svn_partialtree"); new KAction(i18n("Properties"),"edit", - KShortcut(CTRL+Key_P),m_SvnWrapper,SLOT(slotProperties()),m_filesAction,"make_svn_property"); + KShortcut(CTRL+Key_P),m_SvnWrapper,TQT_SLOT(slotProperties()),m_filesAction,"make_svn_property"); new KAction(i18n("Display Properties"),"edit", - KShortcut(SHIFT+CTRL+Key_P),this,SLOT(slotDisplayProperties()),m_filesAction,"get_svn_property"); + KShortcut(SHIFT+CTRL+Key_P),TQT_TQOBJECT(this),TQT_SLOT(slotDisplayProperties()),m_filesAction,"get_svn_property"); tmp_action = new KAction(i18n("Display last changes"),"kdesvndiff", - KShortcut(),this,SLOT(slotDisplayLastDiff()),m_filesAction,"make_last_change"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotDisplayLastDiff()),m_filesAction,"make_last_change"); tmp_action->setToolTip(i18n("Display last changes as difference to previous commit.")); m_InfoAction = new KAction(i18n("Details"),"kdesvninfo", - KShortcut(CTRL+Key_I),this,SLOT(slotInfo()),m_filesAction,"make_svn_info"); + KShortcut(CTRL+Key_I),TQT_TQOBJECT(this),TQT_SLOT(slotInfo()),m_filesAction,"make_svn_info"); m_RenameAction = new KAction(i18n("Move"),"move", - KShortcut(Key_F2),this,SLOT(slotRename()),m_filesAction,"make_svn_rename"); + KShortcut(Key_F2),TQT_TQOBJECT(this),TQT_SLOT(slotRename()),m_filesAction,"make_svn_rename"); m_CopyAction = new KAction(i18n("Copy"),"kdesvncopy", - KShortcut(CTRL+Key_C),this,SLOT(slotCopy()),m_filesAction,"make_svn_copy"); - tmp_action = new KAction(i18n("Check for updates"),"kdesvncheckupdates",KShortcut(),this,SLOT(slotCheckUpdates()),m_filesAction,"make_check_updates"); + KShortcut(CTRL+Key_C),TQT_TQOBJECT(this),TQT_SLOT(slotCopy()),m_filesAction,"make_svn_copy"); + tmp_action = new KAction(i18n("Check for updates"),"kdesvncheckupdates",KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotCheckUpdates()),m_filesAction,"make_check_updates"); tmp_action->setToolTip(i18n("Check if current working copy has items with newer version in repository")); /* 2. actions only on files */ m_BlameAction = new KAction(i18n("Blame"),"kdesvnblame", - KShortcut(),this,SLOT(slotBlame()),m_filesAction,"make_svn_blame"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotBlame()),m_filesAction,"make_svn_blame"); m_BlameAction->setToolTip(i18n("Output the content of specified files or URLs with revision and author information in-line.")); m_BlameRangeAction = new KAction(i18n("Blame range"),"kdesvnblame", - KShortcut(),this,SLOT(slotRangeBlame()),m_filesAction,"make_svn_range_blame"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotRangeBlame()),m_filesAction,"make_svn_range_blame"); m_BlameRangeAction->setToolTip(i18n("Output the content of specified files or URLs with revision and author information in-line.")); m_CatAction = new KAction(i18n("Cat head"), "kdesvncat", - KShortcut(),this,SLOT(slotCat()),m_filesAction,"make_svn_cat"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotCat()),m_filesAction,"make_svn_cat"); m_CatAction->setToolTip(i18n("Output the content of specified files or URLs.")); tmp_action = new KAction(i18n("Cat revision..."),"kdesvncat", - KShortcut(),this,SLOT(slotRevisionCat()),m_filesAction,"make_revisions_cat"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotRevisionCat()),m_filesAction,"make_revisions_cat"); tmp_action->setToolTip(i18n("Output the content of specified files or URLs at specific revision.")); m_LockAction = new KAction(i18n("Lock current items"),"kdesvnlock", - KShortcut(),this,SLOT(slotLock()),m_filesAction,"make_svn_lock"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotLock()),m_filesAction,"make_svn_lock"); m_UnlockAction = new KAction(i18n("Unlock current items"),"kdesvnunlock", - KShortcut(),this,SLOT(slotUnlock()),m_filesAction,"make_svn_unlock"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotUnlock()),m_filesAction,"make_svn_unlock"); /* 3. actions only on dirs */ m_MkdirAction = new KAction(i18n("New folder"),"folder_new", - KShortcut(),this,SLOT(slotMkdir()),m_filesAction,"make_svn_mkdir"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotMkdir()),m_filesAction,"make_svn_mkdir"); m_switchRepository = new KAction(i18n("Switch repository"),"kdesvnswitch", - KShortcut(), m_SvnWrapper,SLOT(slotSwitch()),m_filesAction,"make_svn_switch"); + KShortcut(), m_SvnWrapper,TQT_SLOT(slotSwitch()),m_filesAction,"make_svn_switch"); m_switchRepository->setToolTip(i18n("Switch repository path of current working copy path (\"svn switch\")")); tmp_action = new KAction(i18n("Relocate current working copy url"),"kdesvnrelocate",KShortcut(), - this,SLOT(slotRelocate()),m_filesAction,"make_svn_relocate"); + TQT_TQOBJECT(this),TQT_SLOT(slotRelocate()),m_filesAction,"make_svn_relocate"); tmp_action->setToolTip(i18n("Relocate url of current working copy path to other url")); tmp_action = new KAction(i18n("Check for unversioned items"),"kdesvnaddrecursive",KShortcut(), - this,SLOT(slotCheckNewItems()),m_filesAction,"make_check_unversioned"); + TQT_TQOBJECT(this),TQT_SLOT(slotCheckNewItems()),m_filesAction,"make_check_unversioned"); tmp_action->setToolTip(i18n("Browse folder for unversioned items and add them if wanted.")); m_changeToRepository = new KAction(i18n("Open repository of working copy"),"gohome",KShortcut(), - this,SLOT(slotChangeToRepository()),m_filesAction,"make_switch_to_repo"); + TQT_TQOBJECT(this),TQT_SLOT(slotChangeToRepository()),m_filesAction,"make_switch_to_repo"); m_changeToRepository->setToolTip(i18n("Opens the repository the current working copy was checked out from")); m_CleanupAction = new KAction(i18n("Cleanup"),"kdesvncleanup", - KShortcut(),this,SLOT(slotCleanupAction()),m_filesAction,"make_cleanup"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotCleanupAction()),m_filesAction,"make_cleanup"); m_CleanupAction->setToolTip(i18n("Recursively clean up the working copy, removing locks, resuming unfinished operations, etc.")); m_ImportDirsIntoCurrent = new KAction(i18n("Import folders into current"),"fileimport",KShortcut(), - this,SLOT(slotImportDirsIntoCurrent()),m_filesAction,"make_import_dirs_into_current"); + TQT_TQOBJECT(this),TQT_SLOT(slotImportDirsIntoCurrent()),m_filesAction,"make_import_dirs_into_current"); m_ImportDirsIntoCurrent->setToolTip(i18n("Import folder content into current url")); /* local only actions */ /* 1. actions on files AND dirs*/ m_AddCurrent = new KAction(i18n("Add selected files/dirs"), - "kdesvnadd",KShortcut(Key_Insert),m_SvnWrapper,SLOT(slotAdd()),m_filesAction,"make_svn_add"); + "kdesvnadd",KShortcut(Key_Insert),m_SvnWrapper,TQT_SLOT(slotAdd()),m_filesAction,"make_svn_add"); m_AddCurrent->setToolTip(i18n("Adding selected files and/or directories to repository")); tmp_action = new KAction("Add selected files/dirs recursive", - "kdesvnaddrecursive",KShortcut(CTRL+Key_Insert),m_SvnWrapper,SLOT(slotAddRec()),m_filesAction,"make_svn_addrec"); + "kdesvnaddrecursive",KShortcut(CTRL+Key_Insert),m_SvnWrapper,TQT_SLOT(slotAddRec()),m_filesAction,"make_svn_addrec"); tmp_action->setToolTip(i18n("Adding selected files and/or directories to repository and all subitems of folders")); m_DelCurrent = new KAction(i18n("Delete selected files/dirs"),"kdesvndelete", - KShortcut(Key_Delete),this,SLOT(slotDelete()),m_filesAction,"make_svn_remove"); + KShortcut(Key_Delete),TQT_TQOBJECT(this),TQT_SLOT(slotDelete()),m_filesAction,"make_svn_remove"); m_DelCurrent->setToolTip(i18n("Deleting selected files and/or directories from repository")); m_RevertAction = new KAction(i18n("Revert current changes"),"revert", - KShortcut(),m_SvnWrapper,SLOT(slotRevert()),m_filesAction,"make_svn_revert"); + KShortcut(),m_SvnWrapper,TQT_SLOT(slotRevert()),m_filesAction,"make_svn_revert"); m_ResolvedAction = new KAction(i18n("Mark resolved"),KShortcut(), - this,SLOT(slotResolved()),m_filesAction,"make_resolved"); + TQT_TQOBJECT(this),TQT_SLOT(slotResolved()),m_filesAction,"make_resolved"); m_ResolvedAction->setToolTip(i18n("Marking files or dirs resolved")); tmp_action = new KAction(i18n("Resolve conflicts"),KShortcut(), - this,SLOT(slotTryResolve()),m_filesAction,"make_try_resolve"); + TQT_TQOBJECT(this),TQT_SLOT(slotTryResolve()),m_filesAction,"make_try_resolve"); - m_IgnoreAction = new KAction(i18n("Ignore/Unignore current item"),KShortcut(),this,SLOT(slotIgnore()),m_filesAction,"make_svn_ignore"); + m_IgnoreAction = new KAction(i18n("Ignore/Unignore current item"),KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotIgnore()),m_filesAction,"make_svn_ignore"); m_UpdateHead = new KAction(i18n("Update to head"),"kdesvnupdate", - KShortcut(),m_SvnWrapper,SLOT(slotUpdateHeadRec()),m_filesAction,"make_svn_headupdate"); + KShortcut(),m_SvnWrapper,TQT_SLOT(slotUpdateHeadRec()),m_filesAction,"make_svn_headupdate"); m_UpdateRev = new KAction(i18n("Update to revision..."),"kdesvnupdate", - KShortcut(),m_SvnWrapper,SLOT(slotUpdateTo()),m_filesAction,"make_svn_revupdate"); + KShortcut(),m_SvnWrapper,TQT_SLOT(slotUpdateTo()),m_filesAction,"make_svn_revupdate"); m_commitAction = new KAction(i18n("Commit"),"kdesvncommit", - KShortcut("CTRL+#"),m_SvnWrapper,SLOT(slotCommit()),m_filesAction,"make_svn_commit"); + KShortcut("CTRL+#"),m_SvnWrapper,TQT_SLOT(slotCommit()),m_filesAction,"make_svn_commit"); tmp_action = new KAction(i18n("Diff local changes"),"kdesvndiff", - KShortcut(CTRL+Key_D),this,SLOT(slotSimpleBaseDiff()),m_filesAction,"make_svn_basediff"); + KShortcut(CTRL+Key_D),TQT_TQOBJECT(this),TQT_SLOT(slotSimpleBaseDiff()),m_filesAction,"make_svn_basediff"); tmp_action->setToolTip(i18n("Diff working copy against BASE (last checked out version) - doesn't require access to repository")); tmp_action = new KAction(i18n("Diff against HEAD"),"kdesvndiff", - KShortcut(CTRL+Key_H),this,SLOT(slotSimpleHeadDiff()),m_filesAction,"make_svn_headdiff"); + KShortcut(CTRL+Key_H),TQT_TQOBJECT(this),TQT_SLOT(slotSimpleHeadDiff()),m_filesAction,"make_svn_headdiff"); tmp_action->setToolTip(i18n("Diff working copy against HEAD (last checked in version)- requires access to repository")); tmp_action = new KAction(i18n("Diff items"),"kdesvndiff", - KShortcut(),this,SLOT(slotDiffPathes()),m_filesAction,"make_svn_itemsdiff"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotDiffPathes()),m_filesAction,"make_svn_itemsdiff"); tmp_action->setToolTip(i18n("Diff two items")); m_MergeRevisionAction = new KAction(i18n("Merge two revisions"),"kdesvnmerge", - KShortcut(),this,SLOT(slotMergeRevisions()),m_filesAction,"make_svn_merge_revisions"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotMergeRevisions()),m_filesAction,"make_svn_merge_revisions"); m_MergeRevisionAction->setToolTip(i18n("Merge two revisions of this entry into itself")); tmp_action=new KAction(i18n("Merge..."),"kdesvnmerge", - KShortcut(),this,SLOT(slotMerge()),m_filesAction,"make_svn_merge"); + KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotMerge()),m_filesAction,"make_svn_merge"); tmp_action->setToolTip("Merge repository path into current worky copy path or current repository path into a target"); - tmp_action=new KAction( i18n( "Open With..." ), 0, this, SLOT( slotOpenWith() ), m_filesAction, "openwith" ); + tmp_action=new KAction( i18n( "Open With..." ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotOpenWith() ), m_filesAction, "openwith" ); /* remote actions only */ m_CheckoutCurrentAction = new KAction(i18n("Checkout current repository path"),"kdesvncheckout",KShortcut(), - m_SvnWrapper,SLOT(slotCheckoutCurrent()),m_filesAction,"make_svn_checkout_current"); + m_SvnWrapper,TQT_SLOT(slotCheckoutCurrent()),m_filesAction,"make_svn_checkout_current"); m_ExportCurrentAction = new KAction(i18n("Export current repository path"),"kdesvnexport",KShortcut(), - m_SvnWrapper,SLOT(slotExportCurrent()),m_filesAction,"make_svn_export_current"); - new KAction(i18n("Select browse revision"),KShortcut(),this,SLOT(slotSelectBrowsingRevision()),m_filesAction,"switch_browse_revision"); + m_SvnWrapper,TQT_SLOT(slotExportCurrent()),m_filesAction,"make_svn_export_current"); + new KAction(i18n("Select browse revision"),KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotSelectBrowsingRevision()),m_filesAction,"switch_browse_revision"); /* independe actions */ m_CheckoutAction = new KAction(i18n("Checkout a repository"),"kdesvncheckout", - KShortcut(),m_SvnWrapper,SLOT(slotCheckout()),m_filesAction,"make_svn_checkout"); + KShortcut(),m_SvnWrapper,TQT_SLOT(slotCheckout()),m_filesAction,"make_svn_checkout"); m_ExportAction = new KAction(i18n("Export a repository"),"kdesvnexport", - KShortcut(),m_SvnWrapper,SLOT(slotExport()),m_filesAction,"make_svn_export"); - m_RefreshViewAction = new KAction(i18n("Refresh view"),"reload",KShortcut(Key_F5),this,SLOT(refreshCurrentTree()),m_filesAction,"make_view_refresh"); + KShortcut(),m_SvnWrapper,TQT_SLOT(slotExport()),m_filesAction,"make_svn_export"); + m_RefreshViewAction = new KAction(i18n("Refresh view"),"reload",KShortcut(Key_F5),TQT_TQOBJECT(this),TQT_SLOT(refreshCurrentTree()),m_filesAction,"make_view_refresh"); - new KAction(i18n("Diff revisions"),"kdesvndiff",KShortcut(),this,SLOT(slotDiffRevisions()),m_filesAction,"make_revisions_diff"); + new KAction(i18n("Diff revisions"),"kdesvndiff",KShortcut(),TQT_TQOBJECT(this),TQT_SLOT(slotDiffRevisions()),m_filesAction,"make_revisions_diff"); /* folding options */ - tmp_action = new KAction( i18n("Unfold File Tree"), 0, this , SLOT(slotUnfoldTree()), m_filesAction, "view_unfold_tree" ); + tmp_action = new KAction( i18n("Unfold File Tree"), 0, TQT_TQOBJECT(this) , TQT_SLOT(slotUnfoldTree()), m_filesAction, "view_unfold_tree" ); tmp_action->setToolTip(i18n("Opens all branches of the file tree")); - tmp_action = new KAction( i18n("Fold File Tree"), 0, this, SLOT(slotFoldTree()), m_filesAction, "view_fold_tree" ); + tmp_action = new KAction( i18n("Fold File Tree"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFoldTree()), m_filesAction, "view_fold_tree" ); tmp_action->setToolTip(i18n("Closes all branches of the file tree")); /* caching */ - tmp_action = new KAction( i18n("Update log cache"),0,this,SLOT(slotUpdateLogCache()),m_filesAction,"update_log_cache" ); + tmp_action = new KAction( i18n("Update log cache"),0,TQT_TQOBJECT(this),TQT_SLOT(slotUpdateLogCache()),m_filesAction,"update_log_cache" ); tmp_action->setToolTip(i18n("Update the log cache for current repository")); - /* tmp_action = new KAction( i18n("Stop update log cache"),0,this,SLOT(slotUpdateLogCache()),m_filesAction,"stop_update_log_cache" ); + /* tmp_action = new KAction( i18n("Stop update log cache"),0,this,TQT_SLOT(slotUpdateLogCache()),m_filesAction,"stop_update_log_cache" ); tmp_action->setToolTip(i18n("Stop the update of the log cache")); */ @@ -461,7 +461,7 @@ KURL::List kdesvnfilelist::selectedUrls() return lst; } -QWidget*kdesvnfilelist::realWidget() +TQWidget*kdesvnfilelist::realWidget() { return this; } @@ -479,7 +479,7 @@ SvnItem*kdesvnfilelist::Selected() return singleSelected(); } -void kdesvnfilelist::_openURL(const QString&url) +void kdesvnfilelist::_openURL(const TQString&url) { openURL(url,true); emit sigUrlChanged(baseUri()); @@ -490,7 +490,7 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) CursorStack a; m_SvnWrapper->killallThreads(); clear(); - emit sigProplist(svn::PathPropertiesMapListPtr(new svn::PathPropertiesMapList()),false,QString("")); + emit sigProplist(svn::PathPropertiesMapListPtr(new svn::PathPropertiesMapList()),false,TQString("")); m_Dirsread.clear(); if (m_SelectedItems) { m_SelectedItems->clear(); @@ -503,15 +503,15 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) if (!noReinit) m_SvnWrapper->reInitClient(); - QString query = url.query(); + TQString query = url.query(); KURL _url = url; - QString proto = svn::Url::transformProtokoll(url.protocol()); + TQString proto = svn::Url::transformProtokoll(url.protocol()); _url.cleanPath(true); _url.setProtocol(proto); proto = _url.url(-1); - QStringList s = QStringList::split("?",proto); + TQStringList s = TQStringList::split("?",proto); if (s.size()>1) { setBaseUri(s[0]); } else { @@ -523,19 +523,19 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) m_pList->m_remoteRevision=svn::Revision::HEAD; - QString _dummy; + TQString _dummy; - if (!QString::compare("svn+file",url.protocol())) { + if (!TQString::compare("svn+file",url.protocol())) { setBaseUri("file://"+url.path()); } else { if (url.isLocalFile()) { - QString s = url.path(); + TQString s = url.path(); while(s.endsWith("/")) { s.remove(s.length()-1,1); } - QFileInfo fi(s); + TQFileInfo fi(s); if (fi.exists() && fi.isSymLink()) { - QString sl = fi.readLink(); + TQString sl = fi.readLink(); if (sl.startsWith("/")) { setBaseUri(sl); } else { @@ -567,9 +567,9 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) } } if (query.length()>1) { - QMap<QString,QString> q = url.queryItems(); - if (q.find("rev")!=q.end()) { - QString v = q["rev"]; + TQMap<TQString,TQString> q = url.queryItems(); + if (q.tqfind("rev")!=q.end()) { + TQString v = q["rev"]; svn::Revision tmp; m_SvnWrapper->svnclient()->url2Revision(v,m_pList->m_remoteRevision,tmp); if (m_pList->m_remoteRevision==svn::Revision::UNDEFINED) { @@ -585,10 +585,10 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) } m_SvnWrapper->clearUpdateCache(); if (isWorkingCopy()) { - m_pList->m_DirWatch=new KDirWatch(this); - connect(m_pList->m_DirWatch,SIGNAL(dirty(const QString&)),this,SLOT(slotDirItemDirty(const QString&))); - connect(m_pList->m_DirWatch,SIGNAL(created(const QString&)),this,SLOT(slotDirItemCreated(const QString&))); - connect(m_pList->m_DirWatch,SIGNAL(deleted(const QString&)),this,SLOT(slotDirItemDeleted(const QString&))); + m_pList->m_DirWatch=new KDirWatch(TQT_TQOBJECT(this)); + connect(m_pList->m_DirWatch,TQT_SIGNAL(dirty(const TQString&)),this,TQT_SLOT(slotDirItemDirty(const TQString&))); + connect(m_pList->m_DirWatch,TQT_SIGNAL(created(const TQString&)),this,TQT_SLOT(slotDirItemCreated(const TQString&))); + connect(m_pList->m_DirWatch,TQT_SIGNAL(deleted(const TQString&)),this,TQT_SLOT(slotDirItemDeleted(const TQString&))); /* seems that recursive does not work */ if (m_pList->m_DirWatch) { m_pList->m_DirWatch->addDir(baseUri()+"/",false,false); @@ -606,7 +606,7 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) clear(); } m_pList->m_fileTip->setOptions(!isNetworked()&&Kdesvnsettings::display_file_tips()&& - QToolTip::isGloballyEnabled(),true,6); + TQToolTip::isGloballyEnabled(),true,6); if (result && isWorkingCopy()) { m_SvnWrapper->createModifiedCache(baseUri()); @@ -620,7 +620,7 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit ) } emit changeCaption(baseUri()); emit sigUrlOpend(result); - QTimer::singleShot(1,this,SLOT(readSupportData())); + TQTimer::singleShot(1,this,TQT_SLOT(readSupportData())); enableActions(); return result; } @@ -646,28 +646,28 @@ void kdesvnfilelist::closeMe() m_pList->m_fileTip->setItem(0); } -bool kdesvnfilelist::checkDirs(const QString&_what,FileListViewItem * _parent) +bool kdesvnfilelist::checkDirs(const TQString&_what,FileListViewItem * _tqparent) { - QString what = _what; + TQString what = _what; svn::StatusEntries dlist; while (what.endsWith("/")) { what.truncate(what.length()-1); } // prevent this from checking unversioned folder. FIXME: what happen when we do open url on a non-working-copy folder?? - if (!isWorkingCopy()|| (!_parent) || ((_parent) && (_parent->isVersioned()))) { - if (!m_SvnWrapper->makeStatus(what,dlist,m_pList->m_remoteRevision) ) { - kdDebug() << "unable makeStatus" <<endl; + if (!isWorkingCopy()|| (!_tqparent) || ((_tqparent) && (_tqparent->isVersioned()))) { + if (!m_SvnWrapper->maketqStatus(what,dlist,m_pList->m_remoteRevision) ) { + kdDebug() << "unable maketqStatus" <<endl; return false; } } else { - checkUnversionedDirs(_parent); + checkUnversionedDirs(_tqparent); return true; } svn::StatusEntries neweritems; m_SvnWrapper->getaddedItems(what,neweritems); dlist+=neweritems; bool ownupdates = true; - //kdDebug() << "makeStatus on " << what << " created: " << dlist.count() << "items" <<endl; + //kdDebug() << "maketqStatus on " << what << " created: " << dlist.count() << "items" <<endl; if (isUpdatesEnabled()) { viewport()->setUpdatesEnabled(false); @@ -682,15 +682,15 @@ bool kdesvnfilelist::checkDirs(const QString&_what,FileListViewItem * _parent) // current item is not versioned if (!(*it)->isVersioned() && !filterOut((*it))) { - // if empty, we may want to create a default svn::Status for each folder inside this _parent - // iterate over QDir and create new filelistviewitem - checkUnversionedDirs(_parent); + // if empty, we may want to create a default svn::tqStatus for each folder inside this _tqparent + // iterate over TQDir and create new filelistviewitem + checkUnversionedDirs(_tqparent); } - if ((*it)->path()==what||QString::compare((*it)->entry().url(),what)==0){ - if (!_parent) { + if ((*it)->path()==what||TQString::compare((*it)->entry().url(),what)==0){ + if (!_tqparent) { pitem = new FileListViewItem(this,*it); - //kdDebug()<< "CheckDirs::creating new FileListViewitem as parent " + (*it)->path() << endl; + //kdDebug()<< "CheckDirs::creating new FileListViewitem as tqparent " + (*it)->path() << endl; m_Dirsread[pitem->fullName()]=true; pitem->setDropEnabled(true); } @@ -699,31 +699,31 @@ bool kdesvnfilelist::checkDirs(const QString&_what,FileListViewItem * _parent) break; } } - if (_parent) { - pitem = _parent; + if (_tqparent) { + pitem = _tqparent; } insertDirs(pitem,dlist); if (ownupdates) { kdDebug()<<"Enable update"<<endl; viewport()->setUpdatesEnabled(true); - viewport()->repaint(); + viewport()->tqrepaint(); } return true; } -void kdesvnfilelist::insertDirs(FileListViewItem * _parent,svn::StatusEntries&dlist) +void kdesvnfilelist::insertDirs(FileListViewItem * _tqparent,svn::StatusEntries&dlist) { svn::StatusEntries::iterator it; #if 0 KFileItemList oneItem; #endif - QTime _t; + TQTime _t; _t.start(); for (it = dlist.begin();it!=dlist.end();++it) { /* if (_t.elapsed()>300) { viewport()->setUpdatesEnabled(true); - viewport()->repaint(); + viewport()->tqrepaint(); viewport()->setUpdatesEnabled(false); _t.restart(); }*/ @@ -732,13 +732,13 @@ void kdesvnfilelist::insertDirs(FileListViewItem * _parent,svn::StatusEntries&dl continue; } FileListViewItem * item; - if (!_parent) { + if (!_tqparent) { item = new FileListViewItem(this,*it); } else { - if ( (item = _parent->findChild( (*it)->path() )) ) { + if ( (item = _tqparent->findChild( (*it)->path() )) ) { delete item; } - item = new FileListViewItem(this,_parent,*it); + item = new FileListViewItem(this,_tqparent,*it); } if (item->isDir()) { m_Dirsread[item->fullName()]=false; @@ -753,10 +753,10 @@ void kdesvnfilelist::insertDirs(FileListViewItem * _parent,svn::StatusEntries&dl } /* newdir is the NEW directory! just required if local */ -void kdesvnfilelist::slotDirAdded(const QString&newdir,FileListViewItem*k) +void kdesvnfilelist::slotDirAdded(const TQString&newdir,FileListViewItem*k) { if (k) { - k->refreshStatus(); + k->refreshtqStatus(); } if (!isWorkingCopy()) { if (k) { @@ -769,7 +769,7 @@ void kdesvnfilelist::slotDirAdded(const QString&newdir,FileListViewItem*k) } return; } - QListViewItem*temp; + TQListViewItem*temp; while ((temp=firstChild())) { delete temp; } @@ -779,7 +779,7 @@ void kdesvnfilelist::slotDirAdded(const QString&newdir,FileListViewItem*k) } svn::StatusPtr stat; try { - stat = m_SvnWrapper->svnclient()->singleStatus(newdir); + stat = m_SvnWrapper->svnclient()->singletqStatus(newdir); } catch (const svn::ClientException&e) { m_LastException = e.msg(); kdDebug()<<"Catched on singlestatus"<< endl; @@ -818,20 +818,20 @@ kdesvnfilelist::~kdesvnfilelist() ssh.killSshAgent(); } -void kdesvnfilelist::slotItemRead(QListViewItem*aItem) +void kdesvnfilelist::slotItemRead(TQListViewItem*aItem) { if (!aItem) return; - CursorStack a(Qt::BusyCursor); + CursorStack a(TQt::BusyCursor); FileListViewItem* k = static_cast<FileListViewItem*>( aItem ); bool _ex = true; if (isWorkingCopy()) { - QDir d(k->fullName()); //FIXME: remove this as soon as we've been able to set entry->kind in Checkdirs + TQDir d(k->fullName()); //FIXME: remove this as soon as we've been able to set entry->kind in Checkdirs _ex = k->isDir()||d.exists(); } else { _ex = k->isDir(); } - if (_ex &&(m_Dirsread.find(k->fullName())==m_Dirsread.end()||m_Dirsread[k->fullName()]==false)) { + if (_ex &&(m_Dirsread.tqfind(k->fullName())==m_Dirsread.end()||m_Dirsread[k->fullName()]==false)) { if (checkDirs(k->fullName(),k)) { m_Dirsread[k->fullName()]=true; } else { @@ -912,7 +912,7 @@ void kdesvnfilelist::enableActions() m_DelCurrent->setEnabled( (multi||single)); m_LockAction->setEnabled( (multi||single)); m_UnlockAction->setEnabled( (multi||single)); - m_IgnoreAction->setEnabled((single)&&singleSelected()->parent()!=0&&!singleSelected()->isRealVersioned()); + m_IgnoreAction->setEnabled((single)&&singleSelected()->tqparent()!=0&&!singleSelected()->isRealVersioned()); m_RenameAction->setEnabled(single && (!isWorkingCopy()||singleSelected()!=firstChild())); m_CopyAction->setEnabled(single && (!isWorkingCopy()||singleSelected()!=firstChild())); @@ -1026,7 +1026,7 @@ void kdesvnfilelist::slotSelectionChanged() } m_SelectedItems->clear(); - QListViewItemIterator it( this, QListViewItemIterator::Selected ); + TQListViewItemIterator it( this, TQListViewItemIterator::Selected ); while ( it.current() ) { m_SelectedItems->append( static_cast<FileListViewItem*>(it.current()) ); ++it; @@ -1036,22 +1036,22 @@ void kdesvnfilelist::slotSelectionChanged() } /*! - \fn kdesvnfilelist::slotClientException(const QString&) + \fn kdesvnfilelist::slotClientException(const TQString&) */ -void kdesvnfilelist::slotClientException(const QString&what) +void kdesvnfilelist::slotClientException(const TQString&what) { emit sigLogMessage(what); - KMessageBox::sorry(KApplication::activeModalWidget(),what,i18n("SVN Error")); + KMessageBox::sorry(TQT_TQWIDGET(KApplication::activeModalWidget()),what,i18n("SVN Error")); } /*! - \fn kdesvnfilelist::slotNotifyMessage(const QString&) + \fn kdesvnfilelist::slotNotifyMessage(const TQString&) */ -void kdesvnfilelist::slotNotifyMessage(const QString&what) +void kdesvnfilelist::slotNotifyMessage(const TQString&what) { emit sigLogMessage(what); - kapp->processEvents(20); + kapp->tqprocessEvents(20); } void kdesvnfilelist::slotChangeToRepository() @@ -1067,13 +1067,13 @@ void kdesvnfilelist::slotChangeToRepository() return; } if (i.reposRoot().isEmpty()) { - KMessageBox::sorry(KApplication::activeModalWidget(),i18n("Could not retrieve repository of working copy."),i18n("SVN Error")); + KMessageBox::sorry(TQT_TQWIDGET(KApplication::activeModalWidget()),i18n("Could not retrieve repository of working copy."),i18n("SVN Error")); } else { sigSwitchUrl(i.reposRoot()); } } -void kdesvnfilelist::slotItemDoubleClicked(QListViewItem*item) +void kdesvnfilelist::slotItemDoubleClicked(TQListViewItem*item) { if (!item) return; @@ -1087,7 +1087,7 @@ void kdesvnfilelist::slotItemDoubleClicked(QListViewItem*item) return; } svn::Revision rev(isWorkingCopy()?svn::Revision::UNDEFINED:m_pList->m_remoteRevision); - QString feditor = Kdesvnsettings::external_display(); + TQString feditor = Kdesvnsettings::external_display(); if ( feditor.compare("default") == 0 ) { KURL::List lst; lst.append(fki->kdeName(rev)); @@ -1103,7 +1103,7 @@ void kdesvnfilelist::slotItemDoubleClicked(QListViewItem*item) } } else { if ( KRun::runCommand(feditor + " " + fki->kdeName(rev).prettyURL()) <= 0) { - KMessageBox::error(this,i18n("Failed: %1 %2").arg(feditor).arg(fki->fullName())); + KMessageBox::error(this,i18n("Failed: %1 %2").tqarg(feditor).tqarg(fki->fullName())); } } } @@ -1115,7 +1115,7 @@ void kdesvnfilelist::slotCleanupAction() if (!which) which = static_cast<FileListViewItem*>(firstChild()); if (!which||!which->isDir()) return; if (m_SvnWrapper->makeCleanup(which->fullName())) { - which->refreshStatus(true); + which->refreshtqStatus(true); } } @@ -1126,7 +1126,7 @@ void kdesvnfilelist::slotResolved() if (!which) which = static_cast<FileListViewItem*>(firstChild()); if (!which) return; m_SvnWrapper->slotResolved(which->fullName()); - which->refreshStatus(true); + which->refreshtqStatus(true); slotRescanIcons(false); } @@ -1140,7 +1140,7 @@ void kdesvnfilelist::slotTryResolve() m_SvnWrapper->slotResolve(which->fullName()); } -template<class T> KDialogBase* kdesvnfilelist::createDialog(T**ptr,const QString&_head,bool OkCancel,const char*name,bool showHelp) +template<class T> KDialogBase* kdesvnfilelist::createDialog(T**ptr,const TQString&_head,bool OkCancel,const char*name,bool showHelp) { int buttons = KDialogBase::Ok; if (OkCancel) { @@ -1150,14 +1150,14 @@ template<class T> KDialogBase* kdesvnfilelist::createDialog(T**ptr,const QString buttons = buttons|KDialogBase::Help; } KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(TQT_TQWIDGET(KApplication::activeModalWidget())), name, true, _head, buttons); if (!dlg) return dlg; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); *ptr = new T(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),name?name:"standard_size")); return dlg; @@ -1177,15 +1177,15 @@ void kdesvnfilelist::slotImportIntoCurrent(bool dirs) KMessageBox::error(this,i18n("Cannot import into multiple targets!")); return; } - QString targetUri; + TQString targetUri; if (allSelected()->count()==0) { targetUri=baseUri(); } else { targetUri = allSelected()->at(0)->Url(); } KURL uri; - if (dirs) uri = KFileDialog::getExistingDirectory(QString::null,this,"Import files from folder"); - else uri = KFileDialog::getImageOpenURL(QString::null,this,"Import file"); + if (dirs) uri = KFileDialog::getExistingDirectory(TQString(),this,"Import files from folder"); + else uri = KFileDialog::getImageOpenURL(TQString(),this,"Import file"); if (uri.url().isEmpty()) return; @@ -1196,30 +1196,30 @@ void kdesvnfilelist::slotImportIntoCurrent(bool dirs) slotImportIntoDir(uri,targetUri,dirs); } -void kdesvnfilelist::slotImportIntoDir(const KURL&importUrl,const QString&target,bool dirs) +void kdesvnfilelist::slotImportIntoDir(const KURL&importUrl,const TQString&target,bool dirs) { Logmsg_impl*ptr; Importdir_logmsg*ptr2 = 0; KDialogBase*dlg; KURL uri = importUrl; - QString targetUri = target; + TQString targetUri = target; while (targetUri.endsWith("/")) { targetUri.truncate(targetUri.length()-1); } if (dirs) { - dlg = createDialog(&ptr2,QString(i18n("Import log")),true,"import_log_msg"); + dlg = createDialog(&ptr2,TQString(i18n("Import log")),true,"import_log_msg"); ptr = ptr2; ptr2->createDirboxDir("\""+uri.fileName(true)+"\""); } else { - dlg = createDialog(&ptr,QString(i18n("Import log")),true,"import_log_msg"); + dlg = createDialog(&ptr,TQString(i18n("Import log")),true,"import_log_msg"); } if (!dlg) return; ptr->initHistory(); - if (dlg->exec()!=QDialog::Accepted) { + if (dlg->exec()!=TQDialog::Accepted) { ptr->saveHistory(true); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"import_log_msg",false); delete dlg; @@ -1227,11 +1227,11 @@ void kdesvnfilelist::slotImportIntoDir(const KURL&importUrl,const QString&target } dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"import_log_msg",false); - QString logMessage = ptr->getMessage(); + TQString logMessage = ptr->getMessage(); svn::Depth rec = ptr->getDepth(); ptr->saveHistory(false); uri.setProtocol(""); - QString iurl = uri.path(); + TQString iurl = uri.path(); while (iurl.endsWith("/")) { iurl.truncate(iurl.length()-1); } @@ -1262,7 +1262,7 @@ void kdesvnfilelist::readSupportData() void kdesvnfilelist::refreshCurrentTree() { - QTime t; + TQTime t; t.start(); FileListViewItem*item = static_cast<FileListViewItem*>(firstChild()); if (!item) return; @@ -1273,7 +1273,7 @@ void kdesvnfilelist::refreshCurrentTree() if (item->fullName()==baseUri()) { if (!refreshItem(item)) { setUpdatesEnabled(true); - viewport()->repaint(); + viewport()->tqrepaint(); return; } else { refreshRecursive(item); @@ -1286,8 +1286,8 @@ void kdesvnfilelist::refreshCurrentTree() } kdDebug()<<"Refresh time: "<<t.elapsed()<<" ms"<<endl; setUpdatesEnabled(true); - viewport()->repaint(); - QTimer::singleShot(1,this,SLOT(readSupportData())); + viewport()->tqrepaint(); + TQTimer::singleShot(1,this,TQT_SLOT(readSupportData())); //m_pList->startScan(); } @@ -1301,14 +1301,14 @@ void kdesvnfilelist::refreshCurrent(SvnItem*cur) setUpdatesEnabled(false); refreshRecursive(cur->fItem()); setUpdatesEnabled(true); - viewport()->repaint(); + viewport()->tqrepaint(); } -bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) +bool kdesvnfilelist::refreshRecursive(FileListViewItem*_tqparent,bool down) { FileListViewItem*item; - if (_parent) { - item = static_cast<FileListViewItem*>(_parent->firstChild()); + if (_tqparent) { + item = static_cast<FileListViewItem*>(_tqparent->firstChild()); } else { item = static_cast<FileListViewItem*>(firstChild()); } @@ -1324,10 +1324,10 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) item = static_cast<FileListViewItem*>(item->nextSibling()); } - QString what = (_parent!=0?_parent->fullName():baseUri()); + TQString what = (_tqparent!=0?_tqparent->fullName():baseUri()); svn::StatusEntries dlist; - if (!m_SvnWrapper->makeStatus(what,dlist,m_pList->m_remoteRevision)) { + if (!m_SvnWrapper->maketqStatus(what,dlist,m_pList->m_remoteRevision)) { kdDebug()<<"Fehler bei makestatus fuer "<<what <<endl; return false; } @@ -1351,7 +1351,7 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) ++clistIter; if (k->fullName()==(*it)->path()) { currentSync.removeRef(k); - k->updateStatus(*it); + k->updatetqStatus(*it); if (filterOut(k)) { dispchanged=true; delete k; @@ -1363,10 +1363,10 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) if (!gotit &&!filterOut((*it)) ) { dispchanged = true; FileListViewItem * item; - if (!_parent) { + if (!_tqparent) { item = new FileListViewItem(this,*it); } else { - item = new FileListViewItem(this,_parent,*it); + item = new FileListViewItem(this,_tqparent,*it); } if (item->isDir()) { m_Dirsread[item->fullName()]=false; @@ -1392,7 +1392,7 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) // @todo just for debugging! #ifndef NDEBUG m_SelectedItems->clear(); - QListViewItemIterator qlvit( this, QListViewItemIterator::Selected ); + TQListViewItemIterator qlvit( this, TQListViewItemIterator::Selected ); while ( qlvit.current() ) { m_SelectedItems->append( static_cast<FileListViewItem*>(qlvit.current()) ); ++qlvit; @@ -1400,8 +1400,8 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) kdDebug() << "Selected items " << m_SelectedItems->count() << endl; #endif } - if (_parent) { - item = static_cast<FileListViewItem*>(_parent->firstChild()); + if (_tqparent) { + item = static_cast<FileListViewItem*>(_tqparent->firstChild()); } else { item = static_cast<FileListViewItem*>(firstChild()); } @@ -1410,7 +1410,7 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_parent,bool down) } while (item) { if (item->isDir()) { - if ((m_Dirsread.find(item->fullName())!=m_Dirsread.end()&&m_Dirsread[item->fullName()]==true)) { + if ((m_Dirsread.tqfind(item->fullName())!=m_Dirsread.end()&&m_Dirsread[item->fullName()]==true)) { if (item->childCount()==0) { checkDirs(item->fullName(),item); dispchanged = true; @@ -1430,7 +1430,7 @@ KTrader::OfferList kdesvnfilelist::offersList(SvnItem*item,bool execOnly) if (!item) { return offers; } - QString constraint; + TQString constraint; if (execOnly) { constraint = "Type == 'Application' or (exist Exec)"; } else { @@ -1441,14 +1441,14 @@ KTrader::OfferList kdesvnfilelist::offersList(SvnItem*item,bool execOnly) return offers; } -void kdesvnfilelist::slotContextMenuRequested(QListViewItem */* _item */, const QPoint &, int) +void kdesvnfilelist::slotContextMenuRequested(TQListViewItem */* _item */, const TQPoint &, int) { // FileListViewItem*item = static_cast<FileListViewItem*>(_item); bool isopen = baseUri().length()>0; SvnItemList l; SelectionList(&l); - QString menuname; + TQString menuname; if (!isopen) { menuname="empty"; @@ -1481,9 +1481,9 @@ void kdesvnfilelist::slotContextMenuRequested(QListViewItem */* _item */, const } } - QWidget * target; + TQWidget * target; emit sigShowPopup(menuname,&target); - QPopupMenu *popup = static_cast<QPopupMenu *>(target); + TQPopupMenu *popup = static_cast<TQPopupMenu *>(target); if (!popup) { kdDebug()<<"Error getting popupMenu"<<endl; return; @@ -1510,7 +1510,7 @@ void kdesvnfilelist::slotContextMenuRequested(QListViewItem */* _item */, const } } } - popup->exec(QCursor::pos()); + popup->exec(TQCursor::pos()); if (id>-1) { popup->removeItem(id); } @@ -1521,11 +1521,11 @@ void kdesvnfilelist::slotContextMenuRequested(QListViewItem */* _item */, const } /** -* Overridden virtuals for Qt drag 'n drop (XDND) +* Overridden virtuals for TQt drag 'n drop (XDND) */ -void kdesvnfilelist::contentsDragEnterEvent(QDragEnterEvent *event) +void kdesvnfilelist::contentsDragEnterEvent(TQDragEnterEvent *event) { - QListViewItem*item; + TQListViewItem*item; bool ok = validDropEvent(event,item); if (ok) { event->accept(); @@ -1535,14 +1535,14 @@ void kdesvnfilelist::contentsDragEnterEvent(QDragEnterEvent *event) } //void kdesvnfilelist::startDrag() -QDragObject* kdesvnfilelist::dragObject() +TQDragObject* kdesvnfilelist::dragObject() { m_pList->m_fileTip->setItem(0); - QListViewItem * m_pressedItem = currentItem(); + TQListViewItem * m_pressedItem = currentItem(); if (!m_pressedItem) { return 0; } - QPixmap pixmap2; + TQPixmap pixmap2; KURL::List urls = selectedUrls(); if (urls.count()==0) { return 0; @@ -1567,8 +1567,8 @@ QDragObject* kdesvnfilelist::dragObject() /* workaround for KURL::Drag - it always forget the revision part on drop :( */ if (!isWorkingCopy()) { - QStrList l; - QString t; + TQStrList l; + TQString t; KURL::List::ConstIterator it = urls.begin(); for (;it!=urls.end();++it) { l.append((*it).prettyURL()); @@ -1585,17 +1585,17 @@ QDragObject* kdesvnfilelist::dragObject() return drag; } -void kdesvnfilelist::contentsDragLeaveEvent( QDragLeaveEvent * ) +void kdesvnfilelist::contentsDragLeaveEvent( TQDragLeaveEvent * ) { cleanHighLighter(); } -bool kdesvnfilelist::acceptDrag(QDropEvent *event)const +bool kdesvnfilelist::acceptDrag(TQDropEvent *event)const { return KURLDrag::canDecode(event); } -bool kdesvnfilelist::validDropEvent(QDropEvent*event,QListViewItem*&item) +bool kdesvnfilelist::validDropEvent(TQDropEvent*event,TQListViewItem*&item) { if (!event) return false; if (!isWorkingCopy()) { @@ -1614,7 +1614,7 @@ bool kdesvnfilelist::validDropEvent(QDropEvent*event,QListViewItem*&item) if (baseUri().length()==0) { ok = true; } else { - QPoint vp = contentsToViewport( event->pos() ); + TQPoint vp = contentsToViewport( event->pos() ); item = isExecuteArea( vp ) ? itemAt( vp ) : 0L; FileListViewItem*which=static_cast<FileListViewItem*>(item); if (!isWorkingCopy()) { @@ -1632,9 +1632,9 @@ bool kdesvnfilelist::validDropEvent(QDropEvent*event,QListViewItem*&item) return ok; } -void kdesvnfilelist::contentsDropEvent(QDropEvent * event) +void kdesvnfilelist::contentsDropEvent(TQDropEvent * event) { - QListViewItem *item = 0; + TQListViewItem *item = 0; bool ok = validDropEvent(event,item); cleanHighLighter(); if (ok) { @@ -1644,20 +1644,20 @@ void kdesvnfilelist::contentsDropEvent(QDropEvent * event) } } -void kdesvnfilelist::contentsDragMoveEvent( QDragMoveEvent* event) +void kdesvnfilelist::contentsDragMoveEvent( TQDragMoveEvent* event) { - QListViewItem * item; + TQListViewItem * item; bool ok = validDropEvent(event,item); if (item && item!=m_pList->dragOverItem) { - QPoint vp = contentsToViewport( event->pos() ); + TQPoint vp = contentsToViewport( event->pos() ); m_pList->dragOverItem=item; m_pList->dragOverPoint = vp; - QRect tmpRect = drawItemHighlighter(0, m_pList->dragOverItem); + TQRect tmpRect = drawItemHighlighter(0, m_pList->dragOverItem); if (tmpRect!=m_pList->mOldDropHighlighter) { cleanHighLighter(); m_pList->mOldDropHighlighter=tmpRect; - viewport()->repaint(tmpRect); + viewport()->tqrepaint(tmpRect); kapp->processEvents(); } } @@ -1668,22 +1668,22 @@ void kdesvnfilelist::contentsDragMoveEvent( QDragMoveEvent* event) } } -void kdesvnfilelist::viewportPaintEvent(QPaintEvent *ev) +void kdesvnfilelist::viewportPaintEvent(TQPaintEvent *ev) { KListView::viewportPaintEvent(ev); if (m_pList->mOldDropHighlighter.isValid() && ev->rect().intersects(m_pList->mOldDropHighlighter)) { - QPainter painter(viewport()); - style().drawPrimitive(QStyle::PE_FocusRect, &painter, m_pList->mOldDropHighlighter, colorGroup(), - QStyle::Style_FocusAtBorder); + TQPainter painter(viewport()); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, m_pList->mOldDropHighlighter, tqcolorGroup(), + TQStyle::Style_FocusAtBorder); } } void kdesvnfilelist::cleanHighLighter() { if (m_pList->mOldDropHighlighter.isValid()) { - QRect rect=m_pList->mOldDropHighlighter; - m_pList->mOldDropHighlighter=QRect(); - viewport()->repaint(rect, true); + TQRect rect=m_pList->mOldDropHighlighter; + m_pList->mOldDropHighlighter=TQRect(); + viewport()->tqrepaint(rect, true); } } @@ -1715,7 +1715,7 @@ void kdesvnfilelist::slotMergeRevisions() void kdesvnfilelist::slotMerge() { FileListViewItem*which= singleSelected(); - QString src1,src2,target; + TQString src1,src2,target; if (isWorkingCopy()) { if (m_pList->merge_Target.isEmpty()) { target = which?which->fullName():baseUri(); @@ -1735,7 +1735,7 @@ void kdesvnfilelist::slotMerge() bool force,dry,rec,irelated,useExternal; Rangeinput_impl::revision_range range; MergeDlg_impl*ptr; - KDialogBase*dlg = createDialog(&ptr,QString(i18n("Merge")),true,"merge_dialog",true); + KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Merge")),true,"merge_dialog",true); if (!dlg) { return; } @@ -1743,7 +1743,7 @@ void kdesvnfilelist::slotMerge() ptr->setDest(target); ptr->setSrc1(src1); ptr->setSrc2(src1); - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { src1=ptr->Src1(); src2=ptr->Src2(); if (src2.isEmpty()) { @@ -1779,16 +1779,16 @@ void kdesvnfilelist::slotMerge() delete dlg; } -void kdesvnfilelist::slotDropped(QDropEvent* event,QListViewItem*item) +void kdesvnfilelist::slotDropped(TQDropEvent* event,TQListViewItem*item) { KURL::List urlList; - QMap<QString,QString> metaData; - QDropEvent::Action action = event->action(); + TQMap<TQString,TQString> metaData; + TQDropEvent::Action action = event->action(); if (!event || m_pList->intern_dropRunning||!KURLDrag::decode( event, urlList, metaData)||urlList.count()<1) { return; } kdDebug()<<"slotDropped"<<endl; - QString tdir; + TQString tdir; if (item) { FileListViewItem*which = static_cast<FileListViewItem*>(item); clearSelection(); @@ -1807,15 +1807,15 @@ void kdesvnfilelist::slotDropped(QDropEvent* event,QListViewItem*item) return; } if (baseUri().length()>0 /*&& urlList[0].isLocalFile()*/) { - QString path = urlList[0].path(); - QFileInfo fi(path); + TQString path = urlList[0].path(); + TQFileInfo fi(path); if (!isWorkingCopy()) { slotImportIntoDir(urlList[0],tdir,fi.isDir()); } else { //m_pList->stopScan(); KIO::Job * job = 0L; job = KIO::copy(urlList,tdir); - connect( job, SIGNAL( result( KIO::Job * ) ),SLOT( slotCopyFinished( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ),TQT_SLOT( slotCopyFinished( KIO::Job * ) ) ); dispDummy(); event->acceptAction(); return; @@ -1825,26 +1825,26 @@ void kdesvnfilelist::slotDropped(QDropEvent* event,QListViewItem*item) kdDebug()<<"Dropped from inside " << action << endl; int root_x, root_y, win_x, win_y; uint keybstate; - QDropEvent::Action action = QDropEvent::UserAction; + TQDropEvent::Action action = TQDropEvent::UserAction; KeyState::keystate(&root_x,&root_y,&win_x,&win_y,&keybstate); - if (keybstate&Qt::ControlButton) { + if (keybstate&TQt::ControlButton) { kdDebug()<<"Control pressed" << endl; - action = QDropEvent::Copy; - } else if (keybstate&Qt::ShiftButton) { + action = TQDropEvent::Copy; + } else if (keybstate&TQt::ShiftButton) { kdDebug()<<"Shift pressed" << endl; - action = QDropEvent::Move; + action = TQDropEvent::Move; } /* converting urls to interal style */ - QString nProto; + TQString nProto; if (isWorkingCopy()) { nProto=""; } else { nProto = svn::Url::transformProtokoll(urlList[0].protocol()); } KURL::List::Iterator it = urlList.begin(); - QStringList l; + TQStringList l; for (;it!=urlList.end();++it) { - l = QStringList::split("?",(*it).prettyURL()); + l = TQStringList::split("?",(*it).prettyURL()); if (l.size()>1) { (*it) = l[0]; } else if (isWorkingCopy()) @@ -1859,8 +1859,8 @@ void kdesvnfilelist::slotDropped(QDropEvent* event,QListViewItem*item) m_pList->intern_drops = urlList; m_pList->intern_drop_target=tdir; m_pList->intern_drop_action=action; - m_pList->intern_drop_pos=QCursor::pos(); - QTimer::singleShot(0,this,SLOT(slotInternalDrop())); + m_pList->intern_drop_pos=TQCursor::pos(); + TQTimer::singleShot(0,this,TQT_SLOT(slotInternalDrop())); // internalDrop(action,urlList,tdir); } @@ -1868,17 +1868,17 @@ void kdesvnfilelist::slotDropped(QDropEvent* event,QListViewItem*item) void kdesvnfilelist::slotInternalDrop() { - QDropEvent::Action action = m_pList->intern_drop_action; - if (action==QDropEvent::UserAction) { - QPopupMenu popup; + TQDropEvent::Action action = m_pList->intern_drop_action; + if (action==TQDropEvent::UserAction) { + TQPopupMenu popup; popup.insertItem(SmallIconSet("goto"), i18n( "Move Here" ) + "\t" + KKey::modFlagLabel( KKey::SHIFT ), 2 ); popup.insertItem(SmallIconSet("editcopy"), i18n( "Copy Here" ) + "\t" + KKey::modFlagLabel( KKey::CTRL ), 1 ); popup.insertSeparator(); - popup.insertItem(SmallIconSet("cancel"), i18n( "Cancel" ) + "\t" + KKey( Qt::Key_Escape ).toString(), 5); + popup.insertItem(SmallIconSet("cancel"), i18n( "Cancel" ) + "\t" + KKey( TQt::Key_Escape ).toString(), 5); int result = popup.exec(m_pList->intern_drop_pos); switch (result) { - case 1 : action = QDropEvent::Copy; break; - case 2 : action = QDropEvent::Move; break; + case 1 : action = TQDropEvent::Copy; break; + case 2 : action = TQDropEvent::Move; break; default: { m_pList->intern_dropRunning=false; @@ -1886,7 +1886,7 @@ void kdesvnfilelist::slotInternalDrop() } } } - if (action==QDropEvent::Move) { + if (action==TQDropEvent::Move) { m_SvnWrapper->makeMove(m_pList->intern_drops,m_pList->intern_drop_target,false); } else { m_SvnWrapper->makeCopy(m_pList->intern_drops,m_pList->intern_drop_target,svn::Revision::HEAD); @@ -1915,7 +1915,7 @@ void kdesvnfilelist::copy_move(bool move) bool ok, force; FileListViewItem*which = singleSelected(); if (!which) return; - QString nName = CopyMoveView_impl::getMoveCopyTo(&ok,&force,move, + TQString nName = CopyMoveView_impl::getMoveCopyTo(&ok,&force,move, which->fullName(),baseUri(),this,"move_name"); if (!ok) { return; @@ -1946,7 +1946,7 @@ void kdesvnfilelist::slotCopyFinished( KIO::Job * job) } if (job) { bool ok = true; - qApp->exit_loop(); + tqApp->exit_loop(); if (job->error()) { job->showErrorDialog(this); ok = false; @@ -1955,9 +1955,9 @@ void kdesvnfilelist::slotCopyFinished( KIO::Job * job) if (ok) { KURL::List lst = static_cast<KIO::CopyJob*>(job)->srcURLs(); KURL turl = static_cast<KIO::CopyJob*>(job)->destURL(); - QString base = turl.path(1); + TQString base = turl.path(1); KURL::List::iterator iter; - QValueList<svn::Path> tmp; + TQValueList<svn::Path> tmp; for (iter=lst.begin();iter!=lst.end();++iter) { tmp.push_back(svn::Path((base+(*iter).fileName(true)))); } @@ -1975,7 +1975,7 @@ void kdesvnfilelist::slotCopyFinished( KIO::Job * job) void kdesvnfilelist::slotDelete() { m_deletePerfect = true; - QPtrList<FileListViewItem>*lst = allSelected(); + TQPtrList<FileListViewItem>*lst = allSelected(); if (lst->count()==0) { KMessageBox::error(this,i18n("Nothing selected for delete")); @@ -1986,8 +1986,8 @@ void kdesvnfilelist::slotDelete() //m_pList->stopScan(); m_pList->m_fileTip->setItem(0); - QValueList<svn::Path> items; - QStringList displist; + TQValueList<svn::Path> items; + TQStringList displist; KURL::List kioList; while ((cur=liter.current())!=0){ ++liter; @@ -2005,7 +2005,7 @@ void kdesvnfilelist::slotDelete() } if (kioList.count()>0) { KIO::Job*aJob = KIO::del(kioList); - connect(aJob,SIGNAL(result (KIO::Job *)),this,SLOT(slotDeleteFinished(KIO::Job*))); + connect(aJob,TQT_SIGNAL(result (KIO::Job *)),this,TQT_SLOT(slotDeleteFinished(KIO::Job*))); dispDummy(); } if (m_deletePerfect && items.size()>0) { @@ -2021,7 +2021,7 @@ void kdesvnfilelist::slotDelete() void kdesvnfilelist::slotDeleteFinished(KIO::Job*job) { if (job) { - qApp->exit_loop(); + tqApp->exit_loop(); if (job->error()) { job->showErrorDialog(this); m_deletePerfect = false; @@ -2035,15 +2035,15 @@ void kdesvnfilelist::slotDeleteFinished(KIO::Job*job) void kdesvnfilelist::dispDummy() { // wait for job - QLabel dummy(this,0,WStyle_NoBorder|WShowModal); - QSize csize = size(); + TQLabel dummy(this,0,WStyle_NoBorder|WShowModal); + TQSize csize = size(); dummy.setText(i18n("Please wait until job is finished")); - dummy.resize(dummy.minimumSizeHint()); + dummy.resize(dummy.tqminimumSizeHint()); if (dummy.width()<=width()&&dummy.height()<=height()) { dummy.move(csize.width()/2-dummy.width()/2,csize.height()/2-dummy.height()/2); } dummy.show(); - qApp->enter_loop(); + tqApp->enter_loop(); dummy.hide(); } @@ -2053,7 +2053,7 @@ void kdesvnfilelist::dispDummy() */ void kdesvnfilelist::slotLock() { - QPtrList<FileListViewItem>*lst = allSelected(); + TQPtrList<FileListViewItem>*lst = allSelected(); FileListViewItemListIterator liter(*lst); FileListViewItem*cur; if (lst->count()==0) { @@ -2062,27 +2062,27 @@ void kdesvnfilelist::slotLock() } KDialogBase*dlg; Logmsg_impl*ptr; - dlg = createDialog(&ptr,QString(i18n("Lock message")),true,"locking_log_msg"); + dlg = createDialog(&ptr,TQString(i18n("Lock message")),true,"locking_log_msg"); if (!dlg) return; ptr->initHistory(); ptr->hideDepth(true); - QCheckBox*_stealLock = new QCheckBox("",ptr,"create_dir_checkbox"); + TQCheckBox*_stealLock = new TQCheckBox("",ptr,"create_dir_checkbox"); _stealLock->setText(i18n("Steal lock?")); ptr->addItemWidget(_stealLock); ptr->m_keepLocksButton->hide(); - if (dlg->exec()!=QDialog::Accepted) { + if (dlg->exec()!=TQDialog::Accepted) { ptr->saveHistory(true); delete dlg; return; } dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"locking_log_msg",false); - QString logMessage = ptr->getMessage(); + TQString logMessage = ptr->getMessage(); bool steal = _stealLock->isChecked(); ptr->saveHistory(false); - QStringList displist; + TQStringList displist; while ((cur=liter.current())!=0){ ++liter; displist.append(cur->fullName()); @@ -2097,7 +2097,7 @@ void kdesvnfilelist::slotLock() */ void kdesvnfilelist::slotUnlock() { - QPtrList<FileListViewItem>*lst = allSelected(); + TQPtrList<FileListViewItem>*lst = allSelected(); FileListViewItemListIterator liter(*lst); FileListViewItem*cur; if (lst->count()==0) { @@ -2110,7 +2110,7 @@ void kdesvnfilelist::slotUnlock() } bool breakit = res==KMessageBox::Yes; - QStringList displist; + TQStringList displist; while ((cur=liter.current())!=0){ ++liter; displist.append(cur->fullName()); @@ -2154,11 +2154,11 @@ void kdesvnfilelist::slotRangeBlame() SvnItem*k = singleSelected(); if (!k) return; Rangeinput_impl*rdlg; - KDialogBase*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true,"revisions_dlg"); + KDialogBase*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true,"revisions_dlg"); if (!dlg) { return; } - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { Rangeinput_impl::revision_range r = rdlg->getRange(); m_SvnWrapper->makeBlame(r.first,r.second,k); } @@ -2175,7 +2175,7 @@ void kdesvnfilelist::slotSimpleBaseDiff() chdir(baseUri().local8Bit()); } - QString what; + TQString what; if (!kitem) { what=="."; } else { @@ -2188,7 +2188,7 @@ void kdesvnfilelist::slotSimpleBaseDiff() void kdesvnfilelist::slotSimpleHeadDiff() { FileListViewItem*kitem = singleSelected(); - QString what; + TQString what; if (isWorkingCopy()) { chdir(baseUri().local8Bit()); @@ -2206,7 +2206,7 @@ void kdesvnfilelist::slotSimpleHeadDiff() void kdesvnfilelist::slotDisplayLastDiff() { FileListViewItem*kitem = singleSelected(); - QString what; + TQString what; if (isWorkingCopy()) { chdir(baseUri().local8Bit()); @@ -2214,7 +2214,7 @@ void kdesvnfilelist::slotDisplayLastDiff() svn::Revision end = svn::Revision::PREV; if (!kitem) { if (isWorkingCopy()) { - QListViewItem*fi = firstChild(); + TQListViewItem*fi = firstChild(); kitem = static_cast<FileListViewItem*>(fi); if (!kitem) { return; @@ -2248,7 +2248,7 @@ void kdesvnfilelist::slotDisplayLastDiff() void kdesvnfilelist::slotDiffPathes() { - QPtrList<FileListViewItem>*lst = allSelected(); + TQPtrList<FileListViewItem>*lst = allSelected(); if (lst->count()!=2 || !uniqueTypeSelected()) { return; @@ -2258,7 +2258,7 @@ void kdesvnfilelist::slotDiffPathes() FileListViewItem*k1,*k2; k1 = lst->at(0); k2 = lst->at(1); - QString w1,w2; + TQString w1,w2; svn::Revision r1; if (isWorkingCopy()) { @@ -2280,17 +2280,17 @@ void kdesvnfilelist::slotDiffPathes() void kdesvnfilelist::slotMkdir() { SvnItem*k = singleSelected(); - QString parentDir; + TQString tqparentDir; if (k) { if (!k->isDir()) { KMessageBox::sorry(0,i18n("May not make subdirs of a file")); return; } - parentDir=k->fullName(); + tqparentDir=k->fullName(); } else { - parentDir=baseUri(); + tqparentDir=baseUri(); } - QString ex = m_SvnWrapper->makeMkdir(parentDir); + TQString ex = m_SvnWrapper->makeMkdir(tqparentDir); if (!ex.isEmpty()) { slotDirAdded(ex,static_cast<FileListViewItem*>(k)); } @@ -2302,12 +2302,12 @@ void kdesvnfilelist::slotMkBaseDirs() if (!isopen) { return; } - QString parentDir=baseUri(); - QStringList targets; - targets.append(parentDir+"/trunk"); - targets.append(parentDir+"/branches"); - targets.append(parentDir+"/tags"); - QString msg = i18n("Automatic generated base layout by kdesvn"); + TQString tqparentDir=baseUri(); + TQStringList targets; + targets.append(tqparentDir+"/trunk"); + targets.append(tqparentDir+"/branches"); + targets.append(tqparentDir+"/tags"); + TQString msg = i18n("Automatic generated base tqlayout by kdesvn"); isopen = m_SvnWrapper->makeMkdir(targets,msg); if (isopen) { slotDirAdded(targets[0],0); @@ -2322,7 +2322,7 @@ void kdesvnfilelist::slotMkBaseDirs() void kdesvnfilelist::slotDiffRevisions() { SvnItem*k = singleSelected(); - QString what; + TQString what; if (isWorkingCopy()) { chdir(baseUri().local8Bit()); @@ -2334,11 +2334,11 @@ void kdesvnfilelist::slotDiffRevisions() what = relativePath(k); } Rangeinput_impl*rdlg; - KDialogBase*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true,"revisions_dlg"); + KDialogBase*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true,"revisions_dlg"); if (!dlg) { return; } - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { Rangeinput_impl::revision_range r = rdlg->getRange(); svn::Revision _peg=(isWorkingCopy()?svn::Revision::WORKING:remoteRevision()); m_SvnWrapper->makeDiff(what,r.first,r.second,_peg,k?k->isDir():true); @@ -2352,12 +2352,12 @@ void kdesvnfilelist::slotSelectBrowsingRevision() { if (isWorkingCopy()) return; Rangeinput_impl*rdlg; - KDialogBase*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true,"revisions_dlg"); + KDialogBase*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true,"revisions_dlg"); if (!dlg) { return; } rdlg->setStartOnly(true); - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { Rangeinput_impl::revision_range r = rdlg->getRange(); m_pList->m_remoteRevision= r.first; if (childCount()==0) { @@ -2378,12 +2378,12 @@ void kdesvnfilelist::slotRevisionCat() SvnItem*k = singleSelected(); if (!k) return; Rangeinput_impl*rdlg; - KDialogBase*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true,"revisions_dlg"); + KDialogBase*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true,"revisions_dlg"); if (!dlg) { return; } rdlg->setStartOnly(true); - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { Rangeinput_impl::revision_range r = rdlg->getRange(); m_SvnWrapper->slotMakeCat(r.first, k->fullName(),k->shortName(),r.first,0); } @@ -2401,9 +2401,9 @@ bool kdesvnfilelist::refreshItem(FileListViewItem*item) return false; } try { - item->setStat(svnclient()->singleStatus(item->fullName(),false,m_pList->m_remoteRevision)); + item->setStat(svnclient()->singletqStatus(item->fullName(),false,m_pList->m_remoteRevision)); } catch (const svn::ClientException&e) { - item->setStat(new svn::Status()); + item->setStat(new svn::tqStatus()); return false; } return true; @@ -2453,7 +2453,7 @@ void kdesvnfilelist::reinitItems(FileListViewItem*_item) */ void kdesvnfilelist::slotInfo() { - QPtrList<SvnItem> lst; + TQPtrList<SvnItem> lst; SelectionList(&lst); svn::Revision rev(isWorkingCopy()?svn::Revision::UNDEFINED:m_pList->m_remoteRevision); if (!isWorkingCopy()) { @@ -2473,9 +2473,9 @@ void kdesvnfilelist::slotInfo() /*! - \fn kdesvnfilelist::slotDirItemCreated(const QString&) + \fn kdesvnfilelist::slotDirItemCreated(const TQString&) */ -void kdesvnfilelist::slotDirItemCreated(const QString&what) +void kdesvnfilelist::slotDirItemCreated(const TQString&what) { m_pList->stopDirTimer(); m_pList->dirItems[what]='C'; @@ -2486,16 +2486,16 @@ void kdesvnfilelist::slotDirItemCreated(const QString&what) void kdesvnfilelist::updateParents(FileListViewItem*item) { - if (!item || !item->parent()) return; - FileListViewItem*it = static_cast<FileListViewItem*>(item->parent()); + if (!item || !item->tqparent()) return; + FileListViewItem*it = static_cast<FileListViewItem*>(item->tqparent()); it->update(); updateParents(it); } /*! - \fn kdesvnfilelist::slotDirItemDirty(const QString&) + \fn kdesvnfilelist::slotDirItemDirty(const TQString&) */ -void kdesvnfilelist::slotDirItemDirty(const QString&what) +void kdesvnfilelist::slotDirItemDirty(const TQString&what) { m_pList->stopDirTimer(); m_pList->dirItems[what]='M'; @@ -2514,12 +2514,12 @@ void kdesvnfilelist::slotDisplayProperties() void kdesvnfilelist::dispProperties(bool force) { - CursorStack a(Qt::BusyCursor); + CursorStack a(TQt::BusyCursor); bool cache_Only = (!force && isNetworked() && !Kdesvnsettings::properties_on_remote_items()); svn::PathPropertiesMapListPtr pm; SvnItem*k = singleSelected(); if (!k || !k->isRealVersioned()) { - emit sigProplist(svn::PathPropertiesMapListPtr(),false,QString("")); + emit sigProplist(svn::PathPropertiesMapListPtr(),false,TQString("")); return; } kdDebug()<<"Cacheonly: "<<cache_Only<<endl; @@ -2531,14 +2531,14 @@ void kdesvnfilelist::dispProperties(bool force) void kdesvnfilelist::_dirwatchTimeout() { kdDebug()<<"dirtimer"<<endl; - QMap<QString,QChar>::Iterator it; + TQMap<TQString,TQChar>::Iterator it; m_pList->m_fileTip->setItem(0); viewport()->setUpdatesEnabled(false); - bool repaintit=false; + bool tqrepaintit=false; for (it=m_pList->dirItems.begin();it!=m_pList->dirItems.end();++it) { - QString what = it.key(); - QChar c = it.data(); + TQString what = it.key(); + TQChar c = it.data(); FileListViewItem*item = findEntryItem(what); if (!item) { m_pList->m_DirWatch->removeDir(what); @@ -2554,9 +2554,9 @@ void kdesvnfilelist::_dirwatchTimeout() } if (item->isDir()) { if (item->isRealVersioned()) { - repaintit = refreshRecursive(item,false); + tqrepaintit = refreshRecursive(item,false); } else { - QListViewItem *_s; + TQListViewItem *_s; while ( (_s=item->firstChild())) { delete _s; @@ -2564,7 +2564,7 @@ void kdesvnfilelist::_dirwatchTimeout() checkUnversionedDirs(item); } } - updateParents(static_cast<FileListViewItem*>(item->parent())); + updateParents(static_cast<FileListViewItem*>(item->tqparent())); } else if (c=='D') { if (item->isDir()) { m_pList->m_DirWatch->removeDir(what); @@ -2574,11 +2574,11 @@ void kdesvnfilelist::_dirwatchTimeout() if (item->isDeleted()) { m_SvnWrapper->addModifiedCache(item->stat()); } else if (!item->isMissing()) { - QFileInfo fi(what); + TQFileInfo fi(what); if (!fi.exists()) { - FileListViewItem*p = static_cast<FileListViewItem*>(item->parent()); + FileListViewItem*p = static_cast<FileListViewItem*>(item->tqparent()); delete item; - repaintit=true; + tqrepaintit=true; item = 0; if (p && p->isVersioned()) { p->update(); @@ -2599,19 +2599,19 @@ void kdesvnfilelist::_dirwatchTimeout() } m_pList->dirItems.clear(); viewport()->setUpdatesEnabled(true); - if (repaintit) { -// viewport()->repaint(); + if (tqrepaintit) { +// viewport()->tqrepaint(); } } /*! - \fn kdesvnfilelist::slotDirItemDeleted(const QString&) + \fn kdesvnfilelist::slotDirItemDeleted(const TQString&) */ -void kdesvnfilelist::slotDirItemDeleted(const QString&what) +void kdesvnfilelist::slotDirItemDeleted(const TQString&what) { m_pList->stopDirTimer(); m_pList->m_fileTip->setItem(0); - QMap<QString,QChar>::Iterator it = m_pList->dirItems.find(what); + TQMap<TQString,TQChar>::Iterator it = m_pList->dirItems.tqfind(what); if (it!=m_pList->dirItems.end() && m_pList->dirItems[what]=='A') { m_pList->dirItems.erase(it); } else { @@ -2621,7 +2621,7 @@ void kdesvnfilelist::slotDirItemDeleted(const QString&what) } -void kdesvnfilelist::gotPreview( const KFileItem*, const QPixmap&) +void kdesvnfilelist::gotPreview( const KFileItem*, const TQPixmap&) { #if 0 FileListViewItem*which = findEntryItem(item->localPath()); @@ -2640,10 +2640,10 @@ void kdesvnfilelist::gotPreviewResult() // m_previewJob = 0; } -FileListViewItem* kdesvnfilelist::findEntryItem(const QString&what,FileListViewItem*startAt) +FileListViewItem* kdesvnfilelist::findEntryItem(const TQString&what,FileListViewItem*startAt) { if (!startAt && !what.startsWith(baseUri())) return 0; - QString _what = what; + TQString _what = what; FileListViewItem*_s,*_temp; if (!startAt) { while (_what.endsWith("/")) { @@ -2671,20 +2671,20 @@ FileListViewItem* kdesvnfilelist::findEntryItem(const QString&what,FileListViewI /*! - \fn kdesvnfilelist::contentsMouseMoveEvent( QMouseEvent *e ) + \fn kdesvnfilelist::contentsMouseMoveEvent( TQMouseEvent *e ) */ -void kdesvnfilelist::contentsMouseMoveEvent( QMouseEvent *e ) +void kdesvnfilelist::contentsMouseMoveEvent( TQMouseEvent *e ) { if (!m_pList->mousePressed) { if (Kdesvnsettings::display_file_tips()) { - QPoint vp = contentsToViewport( e->pos() ); + TQPoint vp = contentsToViewport( e->pos() ); FileListViewItem*item = isExecuteArea( vp ) ? static_cast<FileListViewItem*>(itemAt( vp )) : 0L; if (item) { - vp.setY( itemRect( item ).y() ); - QRect rect( viewportToContents( vp ), QSize(20, item->height()) ); + vp.setY( tqitemRect( item ).y() ); + TQRect rect( viewportToContents( vp ), TQSize(20, item->height()) ); m_pList->m_fileTip->setItem( static_cast<SvnItem*>(item), rect, item->pixmap(0)); m_pList->m_fileTip->setPreview(KGlobalSettings::showFilePreview(item->fullName())/*&&isWorkingCopy()*/ &&Kdesvnsettings::display_previews_in_file_tips()); @@ -2700,7 +2700,7 @@ void kdesvnfilelist::contentsMouseMoveEvent( QMouseEvent *e ) } else { - if (( m_pList->presspos - e->pos() ).manhattanLength() > QApplication::startDragDistance()) + if (( m_pList->presspos - e->pos() ).manhattanLength() > TQApplication::startDragDistance()) { m_pList->m_fileTip->setItem(0); m_pList->mousePressed=false; @@ -2710,12 +2710,12 @@ void kdesvnfilelist::contentsMouseMoveEvent( QMouseEvent *e ) KListView::contentsMouseMoveEvent( e ); } -void kdesvnfilelist::contentsMousePressEvent(QMouseEvent*e) +void kdesvnfilelist::contentsMousePressEvent(TQMouseEvent*e) { KListView::contentsMousePressEvent(e); m_pList->m_fileTip->setItem(0); - QPoint p(contentsToViewport( e->pos())); - QListViewItem *i = itemAt( p ); + TQPoint p(contentsToViewport( e->pos())); + TQListViewItem *i = itemAt( p ); // this is from qt the example - hopefully I got my problems with drag&drop fixed. if ( i ) { // if the user clicked into the root decoration of the item, don't try to start a drag! @@ -2729,23 +2729,23 @@ void kdesvnfilelist::contentsMousePressEvent(QMouseEvent*e) } } -void kdesvnfilelist::contentsMouseReleaseEvent(QMouseEvent*e) +void kdesvnfilelist::contentsMouseReleaseEvent(TQMouseEvent*e) { KListView::contentsMouseReleaseEvent(e); m_pList->mousePressed = false; } /*! - \fn kdesvnfilelist::contentsWheelEvent( QWheelEvent * e ) + \fn kdesvnfilelist::contentsWheelEvent( TQWheelEvent * e ) */ -void kdesvnfilelist::contentsWheelEvent( QWheelEvent * e ) +void kdesvnfilelist::contentsWheelEvent( TQWheelEvent * e ) { // when scrolling with mousewheel, stop possible pending filetip m_pList->m_fileTip->setItem(0); KListView::contentsWheelEvent( e ); } -void kdesvnfilelist::leaveEvent(QEvent*e) +void kdesvnfilelist::leaveEvent(TQEvent*e) { m_pList->m_fileTip->setItem( 0 ); KListView::leaveEvent( e ); @@ -2754,11 +2754,11 @@ void kdesvnfilelist::leaveEvent(QEvent*e) void kdesvnfilelist::slotSettingsChanged() { m_pList->m_fileTip->setOptions(!isNetworked()&&Kdesvnsettings::display_file_tips()&& - QToolTip::isGloballyEnabled(),true,6); + TQToolTip::isGloballyEnabled(),true,6); if (m_pList->reReadSettings()) { refreshCurrentTree(); } else { - viewport()->repaint(); + viewport()->tqrepaint(); } enableActions(); sort(); @@ -2779,11 +2779,11 @@ void kdesvnfilelist::slotRelocate() KMessageBox::error(0,i18n("Error getting entry to relocate")); return; } - QString path,fromUrl; + TQString path,fromUrl; path = k->fullName(); fromUrl = k->Url(); CheckoutInfo_impl*ptr; - KDialogBase * dlg = createDialog(&ptr,i18n("Relocate path %1").arg(path),true,"relocate_dlg"); + KDialogBase * dlg = createDialog(&ptr,i18n("Relocate path %1").tqarg(path),true,"relocate_dlg"); if (dlg) { ptr->setStartUrl(fromUrl); ptr->disableAppend(true); @@ -2794,7 +2794,7 @@ void kdesvnfilelist::slotRelocate() ptr->hideDepth(true,true); bool done = false; dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"relocate_dlg")); - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { done = m_SvnWrapper->makeRelocate(fromUrl,ptr->reposURL(),path,ptr->overwrite()); } dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"relocate_dlg",false); @@ -2804,22 +2804,22 @@ void kdesvnfilelist::slotRelocate() refreshItem(k->fItem()); } -void kdesvnfilelist::checkUnversionedDirs( FileListViewItem * _parent ) +void kdesvnfilelist::checkUnversionedDirs( FileListViewItem * _tqparent ) { - QDir d; - if (_parent) - d.setPath(_parent->fullName()); //FIXME: this one is not reliable, what if _parent == 0?? + TQDir d; + if (_tqparent) + d.setPath(_tqparent->fullName()); //FIXME: this one is not reliable, what if _tqparent == 0?? // else // d.setPath(this->firstChild()->fullName()); - d.setFilter( QDir::Files | QDir::Dirs ); + d.setFilter( TQDir::Files | TQDir::Dirs ); - const QFileInfoList *list = d.entryInfoList(); + const TQFileInfoList *list = d.entryInfoList(); if (!list) { return; } - QFileInfoListIterator nonversioned_it( *list ); - QFileInfo *fi; + TQFileInfoListIterator nonversioned_it( *list ); + TQFileInfo *fi; svn::StatusEntries nonversioned_list; @@ -2839,18 +2839,18 @@ void kdesvnfilelist::checkUnversionedDirs( FileListViewItem * _parent ) // else // entry.kind = svn_node_file; // -// svn::Status stat(fi->fileName(), &wc_stat); +// svn::tqStatus stat(fi->fileName(), &wc_stat); - svn::StatusPtr stat(new svn::Status(fi->absFilePath())); + svn::StatusPtr stat(new svn::tqStatus(fi->absFilePath())); // start copying insertDirs FileListViewItem * item; - if (!_parent) { + if (!_tqparent) { item = new FileListViewItem(this, stat); kdDebug()<< "creating new FileListViewitem " + item->fullName() << endl; } else { - item = new FileListViewItem(this,_parent, stat); - kdDebug()<< "creating new FileListViewitem (with parent) " + item->fullName() << endl; + item = new FileListViewItem(this,_tqparent, stat); + kdDebug()<< "creating new FileListViewitem (with tqparent) " + item->fullName() << endl; } if (fi->isDir()) { m_Dirsread[item->fullName()]=false; @@ -2866,13 +2866,13 @@ void kdesvnfilelist::checkUnversionedDirs( FileListViewItem * _parent ) // end of copying insertDirs nonversioned_list.append(stat); - kdDebug() << "creating new FileListViewItem from QDir entry: " << fi->fileName() << endl; + kdDebug() << "creating new FileListViewItem from TQDir entry: " << fi->fileName() << endl; } ++nonversioned_it; } // uncomment this if you've ben able to set svn_node_kind (see above) - //this->insertDirs(_parent, nonversioned_list); + //this->insertDirs(_tqparent, nonversioned_list); } void kdesvnfilelist::rescanIconsRec(FileListViewItem*startAt,bool checkNewer,bool no_update) @@ -2886,13 +2886,13 @@ void kdesvnfilelist::rescanIconsRec(FileListViewItem*startAt,bool checkNewer,boo if (!_s) { return; } - svn::SharedPointer<svn::Status> d; + svn::SharedPointer<svn::tqStatus> d; while (_s) { //_s->makePixmap(); if (!no_update) { if (m_SvnWrapper->getUpdated(_s->stat()->path(),d) && d) { - _s->updateStatus(d); + _s->updatetqStatus(d); } else { _s->update(); } @@ -2939,7 +2939,7 @@ void kdesvnfilelist::slotCheckNewItems() */ void kdesvnfilelist::slotMakeRangeLog() { - QString what; + TQString what; SvnItem*k = SelectedOrMain(); if (k) { what = k->fullName(); @@ -2949,13 +2949,13 @@ void kdesvnfilelist::slotMakeRangeLog() return; } Rangeinput_impl*rdlg; - KDialogBase*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true,"revisions_dlg"); + KDialogBase*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true,"revisions_dlg"); if (!dlg) { return; } bool list = Kdesvnsettings::self()->log_always_list_changed_files(); int i = dlg->exec(); - if (i==QDialog::Accepted) { + if (i==TQDialog::Accepted) { Rangeinput_impl::revision_range r = rdlg->getRange(); m_SvnWrapper->makeLog(r.first,r.second,(isWorkingCopy()?svn::Revision::UNDEFINED:m_pList->m_remoteRevision), what,list,0); } @@ -2965,7 +2965,7 @@ void kdesvnfilelist::slotMakeRangeLog() void kdesvnfilelist::slotMakeTree() { - QString what; + TQString what; SvnItem*k = SelectedOrMain(); if (k) { what = k->fullName(); @@ -2981,7 +2981,7 @@ void kdesvnfilelist::slotMakeTree() void kdesvnfilelist::slotMakePartTree() { - QString what; + TQString what; SvnItem*k = SelectedOrMain(); if (k) { what = k->fullName(); @@ -2991,18 +2991,18 @@ void kdesvnfilelist::slotMakePartTree() return; } Rangeinput_impl*rdlg; - KDialogBase*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true,"revisions_dlg"); + KDialogBase*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true,"revisions_dlg"); if (!dlg) { return; } int i = dlg->exec(); Rangeinput_impl::revision_range r; - if (i==QDialog::Accepted) { + if (i==TQDialog::Accepted) { r = rdlg->getRange(); } dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"revisions_dlg",false); - if (i==QDialog::Accepted) { + if (i==TQDialog::Accepted) { svn::Revision rev(isWorkingCopy()?svn::Revision::UNDEFINED:m_pList->m_remoteRevision); m_SvnWrapper->makeTree(what,rev,r.first,r.second); } @@ -3013,7 +3013,7 @@ void kdesvnfilelist::slotMakePartTree() */ void kdesvnfilelist::slotMakeLog() { - QString what; + TQString what; SvnItem*k = SelectedOrMain(); if (k) { what = k->fullName(); @@ -3059,16 +3059,16 @@ void kdesvnfilelist::slotUnfoldTree() { StopSimpleDlg sdlg(0,0,i18n("Unfold tree"),i18n("Unfold all folder")); - connect(this,SIGNAL(sigListError()), - &sdlg,SLOT(makeCancel())); + connect(this,TQT_SIGNAL(sigListError()), + &sdlg,TQT_SLOT(makeCancel())); - QListViewItemIterator it(this); - QTime t;t.start(); + TQListViewItemIterator it(this); + TQTime t;t.start(); setUpdatesEnabled(false); { WidgetBlockStack a(this); - while (QListViewItem* item = it.current()) + while (TQListViewItem* item = it.current()) { if (item->isExpandable()) { if (sdlg.isCanceld()) { @@ -3077,7 +3077,7 @@ void kdesvnfilelist::slotUnfoldTree() } if (t.elapsed()>=200) { sdlg.slotTick(); - kapp->processEvents(20); + kapp->tqprocessEvents(20); t.restart(); } ((FileListViewItem*)item)->setOpenNoBlock(true); @@ -3087,18 +3087,18 @@ void kdesvnfilelist::slotUnfoldTree() } setFocus(); setUpdatesEnabled(true); - viewport()->repaint(); - repaint(); + viewport()->tqrepaint(); + tqrepaint(); m_SvnWrapper->slotCancel(false); } void kdesvnfilelist::slotFoldTree() { - QListViewItemIterator it(this); - while (QListViewItem* item = it.current()) + TQListViewItemIterator it(this); + while (TQListViewItem* item = it.current()) { // don't close the top level directory - if (item->isExpandable() && item->parent()) + if (item->isExpandable() && item->tqparent()) item->setOpen(false); ++it; @@ -3126,13 +3126,13 @@ bool kdesvnfilelist::uniqueTypeSelected() return true; } -void kdesvnfilelist::slotChangeProperties(const svn::PropertiesMap&pm,const QValueList<QString>&dellist,const QString&path) +void kdesvnfilelist::slotChangeProperties(const svn::PropertiesMap&pm,const TQValueList<TQString>&dellist,const TQString&path) { m_SvnWrapper->changeProperties(pm,dellist,path); FileListViewItem* which = singleSelected(); kdDebug()<<(which?which->fullName():"nix") << " -> " << path<<endl; if (which && which->fullName()==path) { - which->refreshStatus(); + which->refreshtqStatus(); refreshCurrent(which); _propListTimeout(); } diff --git a/src/svnfrontend/kdesvnfilelist.h b/src/svnfrontend/kdesvnfilelist.h index 55ac7d3..0056cd7 100644 --- a/src/svnfrontend/kdesvnfilelist.h +++ b/src/svnfrontend/kdesvnfilelist.h @@ -28,9 +28,9 @@ #include <klistview.h> #include <kurl.h> #include <ktrader.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qevent.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqevent.h> class KAction; class KActionMenu; @@ -53,9 +53,10 @@ namespace svn { class kdesvnfilelist : public KListView,public ItemDisplay { Q_OBJECT + TQ_OBJECT friend class FileListViewItem; public: - kdesvnfilelist(KActionCollection*,QWidget *parent = 0, const char *name = 0); + kdesvnfilelist(KActionCollection*,TQWidget *tqparent = 0, const char *name = 0); virtual ~kdesvnfilelist(); virtual bool openURL( const KURL &url,bool noReinit=false ); @@ -63,7 +64,7 @@ public: virtual SvnItem*Selected(); virtual void SelectionList(SvnItemList*target); - virtual QWidget*realWidget(); + virtual TQWidget*realWidget(); KActionCollection*filesActions(); bool refreshItem(FileListViewItem*); @@ -71,7 +72,7 @@ public: protected: const svn::Revision& remoteRevision()const; bool m_deletePerfect; - QMap<QString,bool> m_Dirsread; + TQMap<TQString,bool> m_Dirsread; KActionCollection* m_filesAction; KAction*m_BlameAction,*m_BlameRangeAction,*m_CatAction,*m_MkdirAction; @@ -84,9 +85,9 @@ protected: SvnActions*m_SvnWrapper; - /* the parent entry must removed from list before */ - void insertDirs(FileListViewItem * _parent,svn::StatusEntries&); - bool checkDirs(const QString&,FileListViewItem * _parent); + /* the tqparent entry must removed from list before */ + void insertDirs(FileListViewItem * _tqparent,svn::StatusEntries&); + bool checkDirs(const TQString&,FileListViewItem * _tqparent); void setupActions(); svn::Client*svnclient(); @@ -95,62 +96,62 @@ protected: FileListViewItemList* allSelected(); template<class T> KDialogBase* createDialog(T**ptr, - const QString&_head, + const TQString&_head, bool OkCancel=false, const char*name="dialog", bool showHelp=false ); FileListViewItemList* m_SelectedItems; - FileListViewItem* findEntryItem(const QString&,FileListViewItem*startAt=0); + FileListViewItem* findEntryItem(const TQString&,FileListViewItem*startAt=0); virtual bool refreshRecursive(FileListViewItem*,bool down=true); virtual void updateParents(FileListViewItem*); - virtual void checkUnversionedDirs( FileListViewItem * _parent ); + virtual void checkUnversionedDirs( FileListViewItem * _tqparent ); /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - virtual void contentsDragEnterEvent( QDragEnterEvent* ); - virtual void contentsDragLeaveEvent( QDragLeaveEvent* ); - virtual void contentsDragMoveEvent( QDragMoveEvent* ); - virtual void contentsDropEvent( QDropEvent* ); - virtual bool acceptDrag(QDropEvent *event)const; + virtual void contentsDragEnterEvent( TQDragEnterEvent* ); + virtual void contentsDragLeaveEvent( TQDragLeaveEvent* ); + virtual void contentsDragMoveEvent( TQDragMoveEvent* ); + virtual void contentsDropEvent( TQDropEvent* ); + virtual bool acceptDrag(TQDropEvent *event)const; //virtual void startDrag(); - virtual QDragObject* dragObject(); + virtual TQDragObject* dragObject(); void dispDummy(); void reinitItems(FileListViewItem*_item = 0); KURL::List selectedUrls(); - virtual void contentsMouseMoveEvent( QMouseEvent *e ); - virtual void contentsMousePressEvent(QMouseEvent*e); - virtual void contentsMouseReleaseEvent(QMouseEvent*e); - virtual void contentsWheelEvent( QWheelEvent * e ); - virtual void leaveEvent(QEvent*e); - virtual void rescanIconsRec(FileListViewItem*_parent=0,bool checkNewer=false,bool no_update=false); + virtual void contentsMouseMoveEvent( TQMouseEvent *e ); + virtual void contentsMousePressEvent(TQMouseEvent*e); + virtual void contentsMouseReleaseEvent(TQMouseEvent*e); + virtual void contentsWheelEvent( TQWheelEvent * e ); + virtual void leaveEvent(TQEvent*e); + virtual void rescanIconsRec(FileListViewItem*_tqparent=0,bool checkNewer=false,bool no_update=false); KTrader::OfferList offersList(SvnItem*item,bool execOnly=false); private: KdesvnFileListPrivate*m_pList; void cleanHighLighter(); - bool validDropEvent(QDropEvent*event,QListViewItem*&item); + bool validDropEvent(TQDropEvent*event,TQListViewItem*&item); void copy_move(bool move); protected slots: virtual void slotSelectBrowsingRevision(); - virtual void slotItemRead(QListViewItem*); - virtual void slotContextMenuRequested(QListViewItem *, const QPoint &, int); + virtual void slotItemRead(TQListViewItem*); + virtual void slotContextMenuRequested(TQListViewItem *, const TQPoint &, int); virtual void slotSelectionChanged(); - virtual void slotClientException(const QString&); - virtual void slotNotifyMessage(const QString&); - virtual void slotDirAdded(const QString&,FileListViewItem*); + virtual void slotClientException(const TQString&); + virtual void slotNotifyMessage(const TQString&); + virtual void slotDirAdded(const TQString&,FileListViewItem*); virtual void slotReinitItem(SvnItem*); - virtual void slotItemDoubleClicked(QListViewItem*); + virtual void slotItemDoubleClicked(TQListViewItem*); virtual void slotImportIntoCurrent(bool); virtual void slotImportDirsIntoCurrent(); - virtual void slotImportIntoDir(const KURL&,const QString&,bool); + virtual void slotImportIntoDir(const KURL&,const TQString&,bool); /* subversion slots */ virtual void slotChangeToRepository(); @@ -159,8 +160,8 @@ protected slots: virtual void slotTryResolve(); virtual void slotMergeRevisions(); virtual void slotMerge(); - virtual void slotDropped(QDropEvent *,QListViewItem*); - virtual void viewportPaintEvent(QPaintEvent *); + virtual void slotDropped(TQDropEvent *,TQListViewItem*); + virtual void viewportPaintEvent(TQPaintEvent *); virtual void slotRename(); virtual void slotCopy(); virtual void slotCat(); @@ -170,7 +171,7 @@ protected slots: /* callback slots */ virtual void slotCopyFinished( KIO::Job *); virtual void slotDeleteFinished(KIO::Job*); - virtual void _openURL(const QString&); + virtual void _openURL(const TQString&); virtual void _dirwatchTimeout(); virtual void _propListTimeout(); @@ -181,15 +182,15 @@ protected slots: virtual void enableActions(); signals: - void sigLogMessage(const QString&); - void changeCaption(const QString&); - void sigShowPopup(const QString&,QWidget**); + void sigLogMessage(const TQString&); + void changeCaption(const TQString&); + void sigShowPopup(const TQString&,TQWidget**); void sigUrlOpend(bool); void sigSwitchUrl(const KURL&); - void sigUrlChanged(const QString&); - void sigProplist(const svn::PathPropertiesMapListPtr&,bool,const QString&); + void sigUrlChanged(const TQString&); + void sigProplist(const svn::PathPropertiesMapListPtr&,bool,const TQString&); void sigListError(); - void sigCacheStatus(Q_LONG,Q_LONG); + void sigCachetqStatus(TQ_LONG,TQ_LONG); public slots: virtual void refreshCurrentTree(); @@ -198,7 +199,7 @@ public slots: virtual void slotMkdir(); virtual void slotMkBaseDirs(); virtual void slotSettingsChanged(); - virtual void slotChangeProperties(const svn::PropertiesMap&,const QValueList<QString>&,const QString&); + virtual void slotChangeProperties(const svn::PropertiesMap&,const TQValueList<TQString>&,const TQString&); protected slots: @@ -215,9 +216,9 @@ protected slots: virtual void slotRevisionCat(); virtual void slotCheckUpdates(); virtual void slotInfo(); - virtual void slotDirItemCreated(const QString&); - virtual void slotDirItemDirty(const QString&); - virtual void slotDirItemDeleted(const QString&); + virtual void slotDirItemCreated(const TQString&); + virtual void slotDirItemDirty(const TQString&); + virtual void slotDirItemDeleted(const TQString&); virtual void slotRelocate(); virtual void slotRescanIcons(bool); virtual void slotCheckNewItems(); @@ -233,7 +234,7 @@ protected slots: virtual void slotFoldTree(); private slots: - void gotPreview( const KFileItem*, const QPixmap& ); + void gotPreview( const KFileItem*, const TQPixmap& ); void gotPreviewResult(); protected: virtual bool uniqueTypeSelected(); diff --git a/src/svnfrontend/keystatus.cpp b/src/svnfrontend/keystatus.cpp index 5e6a324..d3a3c54 100644 --- a/src/svnfrontend/keystatus.cpp +++ b/src/svnfrontend/keystatus.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "keystatus.h" -#include <qwidget.h> +#include <tqwidget.h> #include <X11/Xlib.h> void KeyState::keystate(int*root_x,int*root_y,int*win_x,int*win_y,unsigned int*keybstate) @@ -31,9 +31,9 @@ void KeyState::keystate(int*root_x,int*root_y,int*win_x,int*win_y,unsigned int*k root_x, root_y, win_x, win_y, &kstate); *keybstate=0; if (kstate&ControlMask) { - *keybstate|=Qt::ControlButton; + *keybstate|=TQt::ControlButton; } if (kstate&ShiftMask) { - *keybstate|=Qt::ShiftButton; + *keybstate|=TQt::ShiftButton; } } diff --git a/src/svnfrontend/keystatus.h b/src/svnfrontend/keystatus.h index 75fd3a9..eec7505 100644 --- a/src/svnfrontend/keystatus.h +++ b/src/svnfrontend/keystatus.h @@ -25,7 +25,7 @@ class KeyState public: KeyState(){} ~KeyState(){} - static void keystate(int*,int*,int*,int*,unsigned int*mask); + static void keystate(int*,int*,int*,int*,unsigned int*tqmask); }; diff --git a/src/svnfrontend/loaddmpdlg.ui b/src/svnfrontend/loaddmpdlg.ui index 5c22cee..1f1f845 100644 --- a/src/svnfrontend/loaddmpdlg.ui +++ b/src/svnfrontend/loaddmpdlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>LoadDmpDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>LoadDmpDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,22 +16,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string>Load into folder:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="toolTip" stdset="0"> @@ -41,14 +41,14 @@ <string>If not empty, load the dump into a specific folder instead into root of repository. This folder must exist before loading the dump.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string>Dump file:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -57,14 +57,14 @@ <cstring>m_Dumpfile</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Load into repository:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -89,7 +89,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_UuidGroup</cstring> </property> @@ -106,7 +106,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_UUidDefault</cstring> </property> @@ -120,7 +120,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_UUidIgnore</cstring> </property> @@ -131,7 +131,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_UUidForce</cstring> </property> @@ -144,7 +144,7 @@ </widget> </vbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_UsePre</cstring> </property> @@ -155,7 +155,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_UsePost</cstring> </property> @@ -170,7 +170,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/svnfrontend/loaddmpdlg_impl.cpp b/src/svnfrontend/loaddmpdlg_impl.cpp index 63954a2..48565b4 100644 --- a/src/svnfrontend/loaddmpdlg_impl.cpp +++ b/src/svnfrontend/loaddmpdlg_impl.cpp @@ -19,16 +19,16 @@ ***************************************************************************/ #include "loaddmpdlg_impl.h" -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <kurlrequester.h> #include <klineedit.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> -LoadDmpDlg_impl::LoadDmpDlg_impl(QWidget *parent, const char *name) - :LoadDmpDlg(parent, name) +LoadDmpDlg_impl::LoadDmpDlg_impl(TQWidget *tqparent, const char *name) + :LoadDmpDlg(tqparent, name) { } @@ -66,10 +66,10 @@ int LoadDmpDlg_impl::uuidAction()const /*! \fn LoadDmpDlg_impl::dumpFile()const */ -QString LoadDmpDlg_impl::dumpFile()const +TQString LoadDmpDlg_impl::dumpFile()const { KURL u = m_Dumpfile->url(); - QString res = u.path(); + TQString res = u.path(); while (res.endsWith("/")) { res.truncate(res.length()-1); } @@ -80,10 +80,10 @@ QString LoadDmpDlg_impl::dumpFile()const /*! \fn LoadDmpDlg_impl::repository()const */ -QString LoadDmpDlg_impl::repository()const +TQString LoadDmpDlg_impl::repository()const { KURL u = m_Repository->url(); - QString res = u.path(); + TQString res = u.path(); while (res.endsWith("/")) { res.truncate(res.length()-1); } @@ -92,11 +92,11 @@ QString LoadDmpDlg_impl::repository()const /*! - \fn LoadDmpDlg_impl::parentPath()const + \fn LoadDmpDlg_impl::tqparentPath()const */ -QString LoadDmpDlg_impl::parentPath()const +TQString LoadDmpDlg_impl::tqparentPath()const { - QString res = m_Rootfolder->text(); + TQString res = m_Rootfolder->text(); while (res.endsWith("/")) { res.truncate(res.length()-1); } diff --git a/src/svnfrontend/loaddmpdlg_impl.h b/src/svnfrontend/loaddmpdlg_impl.h index fef0950..2fa61ad 100644 --- a/src/svnfrontend/loaddmpdlg_impl.h +++ b/src/svnfrontend/loaddmpdlg_impl.h @@ -24,15 +24,16 @@ class LoadDmpDlg_impl: public LoadDmpDlg { Q_OBJECT + TQ_OBJECT public: - LoadDmpDlg_impl(QWidget *parent = 0, const char *name = 0); + LoadDmpDlg_impl(TQWidget *tqparent = 0, const char *name = 0); virtual ~LoadDmpDlg_impl(); bool usePost()const; bool usePre()const; int uuidAction()const; - QString dumpFile()const; - QString repository()const; - QString parentPath()const; + TQString dumpFile()const; + TQString repository()const; + TQString tqparentPath()const; public slots: }; diff --git a/src/svnfrontend/merge_dlg.ui b/src/svnfrontend/merge_dlg.ui index f26179a..142342c 100644 --- a/src/svnfrontend/merge_dlg.ui +++ b/src/svnfrontend/merge_dlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MergeDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MergeDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -45,14 +45,14 @@ <cstring>m_SrcTwoInput</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_SrcOneLabel</cstring> </property> <property name="text"> <string>Source 1:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -61,39 +61,39 @@ <cstring>m_OutInput</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_SrcTwoLabel</cstring> </property> <property name="text"> <string>Source 2:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_OutLabel</cstring> </property> <property name="text"> <string>Output to:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>m_ForceCheck</cstring> </property> @@ -104,7 +104,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>m_RelatedCheck</cstring> </property> @@ -112,7 +112,7 @@ <string>Handle unrelated as related items</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>m_DryCheck</cstring> </property> @@ -123,7 +123,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_RecursiveCheck</cstring> </property> @@ -145,14 +145,14 @@ <property name="name"> <cstring>m_RangeInput</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>40</width> <height>40</height> </size> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_useExternMerge</cstring> </property> @@ -194,10 +194,10 @@ <slot>externDisplayToggled(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">externDisplayToggled(bool)</slot> -</slots> -<layoutdefaults spacing="2" margin="2"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/src/svnfrontend/mergedlg_impl.cpp b/src/svnfrontend/mergedlg_impl.cpp index 28bb02e..ae45803 100644 --- a/src/svnfrontend/mergedlg_impl.cpp +++ b/src/svnfrontend/mergedlg_impl.cpp @@ -27,12 +27,12 @@ #include <kdialogbase.h> #include <klocale.h> #include <kdebug.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqvbox.h> -MergeDlg_impl::MergeDlg_impl(QWidget *parent, const char *name,bool src1,bool src2,bool out) - :MergeDlg(parent, name) +MergeDlg_impl::MergeDlg_impl(TQWidget *tqparent, const char *name,bool src1,bool src2,bool out) + :MergeDlg(tqparent, name) { m_SrcOneInput->setMode(KFile::Directory|KFile::File); if (!src1) { @@ -53,7 +53,7 @@ MergeDlg_impl::MergeDlg_impl(QWidget *parent, const char *name,bool src1,bool sr m_OutLabel->hide(); } adjustSize(); - setMinimumSize(minimumSizeHint()); + setMinimumSize(tqminimumSizeHint()); m_useExternMerge->setChecked(Kdesvnsettings::extern_merge_default()); } @@ -61,7 +61,7 @@ MergeDlg_impl::~MergeDlg_impl() { } -void MergeDlg_impl::setSrc1(const QString&what) +void MergeDlg_impl::setSrc1(const TQString&what) { if (what.isEmpty()) { m_SrcOneInput->setURL(""); @@ -81,7 +81,7 @@ void MergeDlg_impl::setSrc1(const QString&what) m_SrcOneInput->setURL(uri.url()); } -void MergeDlg_impl::setSrc2(const QString&what) +void MergeDlg_impl::setSrc2(const TQString&what) { if (what.isEmpty()) { m_SrcTwoInput->setURL(""); @@ -100,7 +100,7 @@ void MergeDlg_impl::setSrc2(const QString&what) m_SrcTwoInput->setURL(uri.url()); } -void MergeDlg_impl::setDest(const QString&what) +void MergeDlg_impl::setDest(const TQString&what) { if (what.isEmpty()) { m_OutInput->setURL(""); @@ -136,10 +136,10 @@ bool MergeDlg_impl::useExtern()const return m_useExternMerge->isChecked(); } -QString MergeDlg_impl::Src1()const +TQString MergeDlg_impl::Src1()const { KURL uri(m_SrcOneInput->url()); - QString proto = svn::Url::transformProtokoll(uri.protocol()); + TQString proto = svn::Url::transformProtokoll(uri.protocol()); if (proto=="file"&&!m_SrcOneInput->url().startsWith("ksvn+file:")) { uri.setProtocol(""); } else { @@ -148,13 +148,13 @@ QString MergeDlg_impl::Src1()const return uri.url(); } -QString MergeDlg_impl::Src2()const +TQString MergeDlg_impl::Src2()const { if (m_SrcTwoInput->url().isEmpty()) { return ""; } KURL uri(m_SrcTwoInput->url()); - QString proto = svn::Url::transformProtokoll(uri.protocol()); + TQString proto = svn::Url::transformProtokoll(uri.protocol()); if (proto=="file"&&!m_SrcTwoInput->url().startsWith("ksvn+file:")) { uri.setProtocol(""); } else { @@ -163,7 +163,7 @@ QString MergeDlg_impl::Src2()const return uri.url(); } -QString MergeDlg_impl::Dest()const +TQString MergeDlg_impl::Dest()const { KURL uri(m_OutInput->url()); uri.setProtocol(""); @@ -181,17 +181,17 @@ Rangeinput_impl::revision_range MergeDlg_impl::getRange()const */ bool MergeDlg_impl::getMergeRange(Rangeinput_impl::revision_range&range,bool*force,bool*recursive,bool*ignorerelated,bool*dry, bool*useExternal, - QWidget*parent,const char*name) + TQWidget*tqparent,const char*name) { MergeDlg_impl*ptr = 0; - KDialogBase dlg(parent,name,true,i18n("Enter merge range"), + KDialogBase dlg(tqparent,name,true,i18n("Enter merge range"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Help, KDialogBase::Ok,true); dlg.setHelp("merging-items","kdesvn"); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); ptr = new MergeDlg_impl(Dialog1Layout,"merge_range_dlg",false,false,false); - dlg.resize( QSize(480,360).expandedTo(dlg.minimumSizeHint()) ); - if (dlg.exec()!=QDialog::Accepted) { + dlg.resize( TQSize(480,360).expandedTo(dlg.tqminimumSizeHint()) ); + if (dlg.exec()!=TQDialog::Accepted) { return false; } range = ptr->getRange(); diff --git a/src/svnfrontend/mergedlg_impl.h b/src/svnfrontend/mergedlg_impl.h index 90dc3d8..1a2df6f 100644 --- a/src/svnfrontend/mergedlg_impl.h +++ b/src/svnfrontend/mergedlg_impl.h @@ -25,8 +25,9 @@ class MergeDlg_impl: public MergeDlg { Q_OBJECT + TQ_OBJECT public: - MergeDlg_impl(QWidget *parent = 0, const char *name = 0,bool src1=true,bool src2=true,bool out=true); + MergeDlg_impl(TQWidget *tqparent = 0, const char *name = 0,bool src1=true,bool src2=true,bool out=true); virtual ~MergeDlg_impl(); bool recursive()const; @@ -35,17 +36,17 @@ public: bool dryrun()const; bool useExtern()const; - QString Src1()const; - QString Src2()const; - QString Dest()const; + TQString Src1()const; + TQString Src2()const; + TQString Dest()const; Rangeinput_impl::revision_range getRange()const; - void setSrc1(const QString&); - void setSrc2(const QString&); - void setDest(const QString&); + void setSrc1(const TQString&); + void setSrc2(const TQString&); + void setDest(const TQString&); static bool getMergeRange(Rangeinput_impl::revision_range&range, - bool*force,bool*recursive,bool*ignorerelated,bool*dry,bool*useExternal,QWidget*parent=0,const char*name=0); + bool*force,bool*recursive,bool*ignorerelated,bool*dry,bool*useExternal,TQWidget*tqparent=0,const char*name=0); protected slots: virtual void externDisplayToggled(bool); diff --git a/src/svnfrontend/modifiedthread.cpp b/src/svnfrontend/modifiedthread.cpp index f7f6c90..21b71d5 100644 --- a/src/svnfrontend/modifiedthread.cpp +++ b/src/svnfrontend/modifiedthread.cpp @@ -23,17 +23,17 @@ #include "src/svnqt/svnqttypes.hpp" -#include <qobject.h> +#include <tqobject.h> #include <kdebug.h> #include <kapplication.h> -CheckModifiedThread::CheckModifiedThread(QObject*_parent,const QString&what,bool _updates) - : QThread(),mutex(),m_ContextListener(0) +CheckModifiedThread::CheckModifiedThread(TQObject*_tqparent,const TQString&what,bool _updates) + : TQThread(),mutex(),m_ContextListener(0) { - m_Parent = _parent; + m_Parent = _tqparent; m_CurrentContext = new svn::Context(); m_ContextListener = new ThreadContextListener(m_Parent); - QObject::connect(m_ContextListener,SIGNAL(sendNotify(const QString&)),m_Parent,SLOT(slotNotifyMessage(const QString&))); + TQObject::connect(m_ContextListener,TQT_SIGNAL(sendNotify(const TQString&)),m_Parent,TQT_SLOT(slotNotifyMessage(const TQString&))); m_CurrentContext->setListener(m_ContextListener); m_what = what; @@ -63,7 +63,7 @@ void CheckModifiedThread::run() { // what must be cleaned! svn::Revision where = svn::Revision::HEAD; - QString ex; + TQString ex; try { // rec all up noign m_Cache = m_Svnclient->status(m_what,svn::DepthInfinity,false,m_updates,false,where); @@ -72,7 +72,7 @@ void CheckModifiedThread::run() } KApplication*k = KApplication::kApplication(); if (k) { - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_FINISHED); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_FINISHED); ev->setData((void*)this); k->postEvent(m_Parent,ev); } diff --git a/src/svnfrontend/modifiedthread.h b/src/svnfrontend/modifiedthread.h index 93028e8..ea8a58c 100644 --- a/src/svnfrontend/modifiedthread.h +++ b/src/svnfrontend/modifiedthread.h @@ -27,27 +27,27 @@ #include "eventnumbers.h" #include "frontendtypes.h" -#include <qthread.h> -#include <qevent.h> +#include <tqthread.h> +#include <tqevent.h> -class QObject; +class TQObject; -class CheckModifiedThread:public QThread +class CheckModifiedThread:public TQThread { public: - CheckModifiedThread(QObject*,const QString&what,bool _updates=false); + CheckModifiedThread(TQObject*,const TQString&what,bool _updates=false); virtual ~CheckModifiedThread(); virtual void run(); virtual void cancelMe(); virtual const svn::StatusEntries&getList()const; protected: - QMutex mutex; + TQMutex mutex; svn::Client* m_Svnclient; svn::ContextP m_CurrentContext; ThreadContextListenerP m_ContextListener; - QObject*m_Parent; - QString m_what; + TQObject*m_Parent; + TQString m_what; bool m_updates; svn::StatusEntries m_Cache; }; diff --git a/src/svnfrontend/opencontextmenu.cpp b/src/svnfrontend/opencontextmenu.cpp index 796ac22..857f02c 100644 --- a/src/svnfrontend/opencontextmenu.cpp +++ b/src/svnfrontend/opencontextmenu.cpp @@ -22,8 +22,8 @@ #include <krun.h> #include <klocale.h> -OpenContextmenu::OpenContextmenu(const KURL&aPath,const KTrader::OfferList&aList,QWidget* parent, const char* name) - : QPopupMenu(parent, name),m_Path(aPath),m_List(aList) +OpenContextmenu::OpenContextmenu(const KURL&aPath,const KTrader::OfferList&aList,TQWidget* tqparent, const char* name) + : TQPopupMenu(tqparent, name),m_Path(aPath),m_List(aList) { setup(); } @@ -42,12 +42,12 @@ void OpenContextmenu::setup() if ((*it)->noDisplay()) continue; - QCString nam; + TQCString nam; nam.setNum( id ); - QString actionName( (*it)->name().replace("&", "&&") ); + TQString actionName( (*it)->name().tqreplace("&", "&&") ); act = new KAction( actionName, (*it)->pixmap( KIcon::Small ), 0, - this, SLOT( slotRunService() ), this, nam.prepend( "appservice_" ) ); + TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), TQT_TQOBJECT(this), nam.prepend( "appservice_" ) ); act->plug(this); m_mapPopup[ id++ ] = *it; } @@ -55,16 +55,16 @@ void OpenContextmenu::setup() insertSeparator( ); } act = new KAction(i18n("Other..."),0, 0, - this, SLOT( slotOpenWith() ),this,"openwith"); + TQT_TQOBJECT(this), TQT_SLOT( slotOpenWith() ),TQT_TQOBJECT(this),"openwith"); act->plug(this); } void OpenContextmenu::slotRunService() { - QCString senderName = sender()->name(); - int id = senderName.mid( senderName.find( '_' ) + 1 ).toInt(); + TQCString senderName = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name(); + int id = senderName.mid( senderName.tqfind( '_' ) + 1 ).toInt(); - QMap<int,KService::Ptr>::Iterator it = m_mapPopup.find( id ); + TQMap<int,KService::Ptr>::Iterator it = m_mapPopup.tqfind( id ); if ( it != m_mapPopup.end() ) { KRun::run( **it, m_Path ); diff --git a/src/svnfrontend/opencontextmenu.h b/src/svnfrontend/opencontextmenu.h index 0ec106b..682e278 100644 --- a/src/svnfrontend/opencontextmenu.h +++ b/src/svnfrontend/opencontextmenu.h @@ -23,22 +23,23 @@ #include <ktrader.h> #include <kaction.h> #include <kurl.h> -#include <qpopupmenu.h> -#include <qmap.h> +#include <tqpopupmenu.h> +#include <tqmap.h> /** @author Rajko Albrecht <ral@alwins-world.de> */ -class OpenContextmenu : public QPopupMenu +class OpenContextmenu : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - OpenContextmenu(const KURL&,const KTrader::OfferList&,QWidget* parent, const char* name); + OpenContextmenu(const KURL&,const KTrader::OfferList&,TQWidget* tqparent, const char* name); virtual ~OpenContextmenu(); protected: KURL m_Path; KTrader::OfferList m_List; - QMap<int,KService::Ptr> m_mapPopup; + TQMap<int,KService::Ptr> m_mapPopup; void setup(); diff --git a/src/svnfrontend/propertiesdlg.cpp b/src/svnfrontend/propertiesdlg.cpp index 4203765..7bef811 100644 --- a/src/svnfrontend/propertiesdlg.cpp +++ b/src/svnfrontend/propertiesdlg.cpp @@ -25,36 +25,36 @@ #include "svnitem.h" #include "src/svnqt/client.hpp" -#include <qvariant.h> -#include <qlabel.h> -#include <qheader.h> +#include <tqvariant.h> +#include <tqlabel.h> +#include <tqheader.h> #include <kpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kmessagebox.h> #include <kiconloader.h> #include <kdebug.h> /* - * Constructs a PropertiesDlg as a child of 'parent', with the + * Constructs a PropertiesDlg as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revision&aRev, QWidget* parent, const char* name, bool modal) +PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revision&aRev, TQWidget* tqparent, const char* name, bool modal) : - KDialogBase(parent,name,modal,i18n("Modify properties"),Ok|Cancel/*|Help|User1|User2*/, Ok, + KDialogBase(tqparent,name,modal,i18n("Modify properties"),Ok|Cancel/*|Help|User1|User2*/, Ok, true/*, KStdGuiItem::add(),KStdGuiItem::remove() */), m_Item(which),m_changed(false), m_Client(aClient),m_Rev(aRev) { if ( !name ) setName( "PropertiesDlg" ); - QWidget * m = makeMainWidget(); - PropertiesDlgLayout = new QHBoxLayout(m, marginHint(), spacingHint(), "PropertiesDlgLayout"); + TQWidget * m = makeMainWidget(); + PropertiesDlgLayout = new TQHBoxLayout(m, marginHint(), spacingHint(), "PropertiesDlgLayout"); m_PropertiesListview = new Propertylist(m, "m_PropertiesListview" ); m_PropertiesListview->setAllColumnsShowFocus( TRUE ); @@ -67,14 +67,14 @@ PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revi m_PropertiesListview->setFullWidth( TRUE ); PropertiesDlgLayout->addWidget( m_PropertiesListview); - m_rightLayout = new QVBoxLayout(0, marginHint(), spacingHint(), "m_rightLayout"); + m_rightLayout = new TQVBoxLayout(0, marginHint(), spacingHint(), "m_rightLayout"); m_AddButton = new KPushButton(m, "m_AddButton" ); m_rightLayout->addWidget( m_AddButton ); m_ModifyButton = new KPushButton(m, "m_ModifyButton" ); m_rightLayout->addWidget( m_ModifyButton ); m_DeleteButton = new KPushButton(m, "m_DeleteButton" ); m_rightLayout->addWidget( m_DeleteButton ); - m_rightSpacer = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); + m_rightSpacer = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); m_rightLayout->addItem(m_rightSpacer); PropertiesDlgLayout->addLayout(m_rightLayout); m_DeleteButton->setEnabled(false); @@ -85,12 +85,12 @@ PropertiesDlg::PropertiesDlg(SvnItem*which, svn::Client*aClient, const svn::Revi clearWState( WState_Polished ); // signals and slots connections - connect( m_AddButton, SIGNAL(clicked()), this, SLOT(slotAdd())); - connect( m_ModifyButton, SIGNAL(clicked()), this, SLOT(slotModify())); - connect( m_DeleteButton, SIGNAL(clicked()), this, SLOT(slotDelete())); - connect(this,SIGNAL(helpClicked()),SLOT(slotHelp())); - connect(m_PropertiesListview,SIGNAL(selectionChanged(QListViewItem*)),this,SLOT(slotSelectionChanged(QListViewItem*))); -// connect(m_PropertiesListview,SIGNAL(executed(QListViewItem*)),this,SLOT(slotSelectionExecuted(QListViewItem*))); + connect( m_AddButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd())); + connect( m_ModifyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModify())); + connect( m_DeleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelete())); + connect(this,TQT_SIGNAL(helpClicked()),TQT_SLOT(slotHelp())); + connect(m_PropertiesListview,TQT_SIGNAL(selectionChanged(TQListViewItem*)),this,TQT_SLOT(slotSelectionChanged(TQListViewItem*))); +// connect(m_PropertiesListview,TQT_SIGNAL(executed(TQListViewItem*)),this,TQT_SLOT(slotSelectionExecuted(TQListViewItem*))); if (!m_Client) { m_PropertiesListview->setEnabled(false); @@ -107,7 +107,7 @@ bool PropertiesDlg::hasChanged()const */ PropertiesDlg::~PropertiesDlg() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* @@ -117,7 +117,7 @@ PropertiesDlg::~PropertiesDlg() void PropertiesDlg::languageChange() { setCaption( i18n("View and modify properties") ); - QToolTip::add(m_PropertiesListview, i18n( "List of properties set" )); + TQToolTip::add(m_PropertiesListview, i18n( "List of properties set" )); m_AddButton->setText(i18n("Add property")); m_ModifyButton->setText(i18n("Modify property")); m_DeleteButton->setText(i18n("Delete property")); @@ -128,7 +128,7 @@ void PropertiesDlg::slotHelp() qWarning( "PropertiesDlg::slotHelp(): Not implemented yet" ); } -void PropertiesDlg::slotSelectionChanged(QListViewItem*item) +void PropertiesDlg::slotSelectionChanged(TQListViewItem*item) { m_DeleteButton->setEnabled(item); m_ModifyButton->setEnabled(item); @@ -153,7 +153,7 @@ void PropertiesDlg::slotSelectionChanged(QListViewItem*item) */ void PropertiesDlg::initItem() { - QString ex; + TQString ex; if (!m_Client) { ex = i18n("Missing SVN link"); emit clientException(ex); @@ -186,9 +186,9 @@ void PropertiesDlg::polish() } /*! - \fn PropertiesDlg::slotSelectionExecuted(QListViewItem*) + \fn PropertiesDlg::slotSelectionExecuted(TQListViewItem*) */ -void PropertiesDlg::slotSelectionExecuted(QListViewItem*) +void PropertiesDlg::slotSelectionExecuted(TQListViewItem*) { } @@ -200,7 +200,7 @@ void PropertiesDlg::slotAdd() /// @TODO Use a object variable to store a reference to dlg for further reuse EditProperty_impl dlg(this); dlg.setDir(m_Item->isDir()); - if (dlg.exec()==QDialog::Accepted) { + if (dlg.exec()==TQDialog::Accepted) { if (PropertyListViewItem::protected_Property(dlg.propName())) { KMessageBox::error(this,i18n("This property may not set by users.\nRejecting it."),i18n("Protected property")); return; @@ -223,7 +223,7 @@ void PropertiesDlg::slotAdd() */ void PropertiesDlg::slotDelete() { - QListViewItem*qi = m_PropertiesListview->selectedItem(); + TQListViewItem*qi = m_PropertiesListview->selectedItem(); if (!qi) return; PropertyListViewItem*ki = static_cast<PropertyListViewItem*> (qi); if (PropertyListViewItem::protected_Property(ki->currentName())) return; @@ -241,7 +241,7 @@ void PropertiesDlg::slotDelete() */ void PropertiesDlg::slotModify() { - QListViewItem*qi = m_PropertiesListview->selectedItem(); + TQListViewItem*qi = m_PropertiesListview->selectedItem(); if (!qi) return; PropertyListViewItem*ki = static_cast<PropertyListViewItem*> (qi); if (PropertyListViewItem::protected_Property(ki->currentName())) return; @@ -250,7 +250,7 @@ void PropertiesDlg::slotModify() dlg.setDir(m_Item->isDir()); dlg.setPropName(ki->currentName()); dlg.setPropValue(ki->currentValue()); - if (dlg.exec()==QDialog::Accepted) { + if (dlg.exec()==TQDialog::Accepted) { if (PropertyListViewItem::protected_Property(dlg.propName())) { KMessageBox::error(this,i18n("This property may not set by users.\nRejecting it."),i18n("Protected property")); return; @@ -266,11 +266,11 @@ void PropertiesDlg::slotModify() } } -void PropertiesDlg::changedItems(svn::PropertiesMap&toSet,QValueList<QString>&toDelete) +void PropertiesDlg::changedItems(svn::PropertiesMap&toSet,TQValueList<TQString>&toDelete) { toSet.clear(); toDelete.clear(); - QListViewItemIterator iter( m_PropertiesListview ); + TQListViewItemIterator iter( m_PropertiesListview ); PropertyListViewItem*ki; while ( iter.current() ) { ki = static_cast<PropertyListViewItem*> (iter.current()); diff --git a/src/svnfrontend/propertiesdlg.h b/src/svnfrontend/propertiesdlg.h index 006ad0a..9805f32 100644 --- a/src/svnfrontend/propertiesdlg.h +++ b/src/svnfrontend/propertiesdlg.h @@ -20,22 +20,22 @@ #ifndef PROPERTIESDLG_H #define PROPERTIESDLG_H -#include <qvariant.h> +#include <tqvariant.h> #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qmap.h> -#include <qstring.h> +#include <tqvaluelist.h> +#include <tqmap.h> +#include <tqstring.h> #include "src/svnqt/svnqttypes.hpp" #include "src/svnqt/revision.hpp" -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; -class QLabel; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; +class TQLabel; class Propertylist; -class QListViewItem; +class TQListViewItem; class KPushButton; class FileListViewItem; class SvnItem; @@ -47,15 +47,16 @@ namespace svn { class PropertiesDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: PropertiesDlg(SvnItem*, svn::Client*, const svn::Revision&aRev=svn::Revision(svn_opt_revision_working), - QWidget* parent = 0, const char* name = 0, bool modal = true); + TQWidget* tqparent = 0, const char* name = 0, bool modal = true); ~PropertiesDlg(); bool hasChanged()const; - void changedItems(svn::PropertiesMap&toSet,QValueList<QString>&toDelete); + void changedItems(svn::PropertiesMap&toSet,TQValueList<TQString>&toDelete); protected: Propertylist* m_PropertiesListview; @@ -63,9 +64,9 @@ protected: KPushButton* m_DeleteButton; KPushButton* m_ModifyButton; - QHBoxLayout* PropertiesDlgLayout; - QVBoxLayout* m_rightLayout; - QSpacerItem* m_rightSpacer; + TQHBoxLayout* PropertiesDlgLayout; + TQVBoxLayout* m_rightLayout; + TQSpacerItem* m_rightSpacer; SvnItem *m_Item; bool m_changed; @@ -77,8 +78,8 @@ protected slots: virtual void languageChange(); virtual void slotHelp(); - virtual void slotSelectionChanged(QListViewItem*); - virtual void slotSelectionExecuted(QListViewItem*); + virtual void slotSelectionChanged(TQListViewItem*); + virtual void slotSelectionExecuted(TQListViewItem*); virtual void slotAdd(); virtual void slotDelete(); virtual void slotModify(); @@ -91,7 +92,7 @@ public slots: virtual void polish(); signals: - void clientException(const QString&); + void clientException(const TQString&); }; #endif // PROPERTIESDLG_H diff --git a/src/svnfrontend/simple_logcb.h b/src/svnfrontend/simple_logcb.h index 71f6d1d..14b3365 100644 --- a/src/svnfrontend/simple_logcb.h +++ b/src/svnfrontend/simple_logcb.h @@ -26,7 +26,7 @@ namespace svn class Revision; } -class QString; +class TQString; //! Helper for getting specific svn logentries class SimpleLogCb @@ -45,7 +45,7 @@ public: * @param root the root repository of item, if not given, it has to get detected in implementation from \a what and used. * @return true if logentry and root found, otherwise false. */ - virtual bool getSingleLog(svn::LogEntry&logtarget,const svn::Revision&rev,const QString&what,const svn::Revision&peg,QString&root) = 0; + virtual bool getSingleLog(svn::LogEntry&logtarget,const svn::Revision&rev,const TQString&what,const svn::Revision&peg,TQString&root) = 0; }; #endif diff --git a/src/svnfrontend/stopdlg.cpp b/src/svnfrontend/stopdlg.cpp index 06bee04..6030b17 100644 --- a/src/svnfrontend/stopdlg.cpp +++ b/src/svnfrontend/stopdlg.cpp @@ -25,17 +25,17 @@ #include <kapplication.h> #include <klocale.h> #include <kwin.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qwidgetlist.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwidgetlist.h> #include <kprogress.h> #include <kdebug.h> #include <ktextbrowser.h> -StopDlg::StopDlg(QObject*listener,QWidget *parent, const char *name,const QString&caption,const QString&text) - : KDialogBase(KDialogBase::Plain,caption,KDialogBase::Cancel, KDialogBase::Cancel,parent, name,true) +StopDlg::StopDlg(TQObject*listener,TQWidget *tqparent, const char *name,const TQString&caption,const TQString&text) + : KDialogBase(KDialogBase::Plain,caption,KDialogBase::Cancel, KDialogBase::Cancel,tqparent, name,true) ,m_Context(listener),m_MinDuration(1000),mCancelled(false),mShown(false),m_BarShown(false), cstack(0) { @@ -43,44 +43,44 @@ StopDlg::StopDlg(QObject*listener,QWidget *parent, const char *name,const QStrin m_lastLogLines = 0; m_lastLog = ""; - mShowTimer = new QTimer(this); + mShowTimer = new TQTimer(this); m_StopTick.start(); showButton(KDialogBase::Close, false); mCancelText = actionButton(KDialogBase::Cancel)->text(); - QFrame* mainWidget = plainPage(); - layout = new QVBoxLayout(mainWidget, 10); - mLabel = new QLabel(text, mainWidget); - layout->addWidget(mLabel); + TQFrame* mainWidget = plainPage(); + tqlayout = new TQVBoxLayout(mainWidget, 10); + mLabel = new TQLabel(text, mainWidget); + tqlayout->addWidget(mLabel); m_ProgressBar=new KProgress(15,mainWidget); m_ProgressBar->setCenterIndicator (false); m_ProgressBar->setTextEnabled(false); - layout->addWidget(m_ProgressBar); + tqlayout->addWidget(m_ProgressBar); m_NetBar = new KProgress(15,mainWidget); - layout->addWidget(m_NetBar); + tqlayout->addWidget(m_NetBar); mWait = false; m_LogWindow = 0; - connect(mShowTimer, SIGNAL(timeout()), this, SLOT(slotAutoShow())); + connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow())); if (m_Context) { - connect(m_Context,SIGNAL(tickProgress()),this,SLOT(slotTick())); - connect(m_Context,SIGNAL(waitShow(bool)),this,SLOT(slotWait(bool))); - connect(m_Context,SIGNAL(netProgress(long long int, long long int)), - this,SLOT(slotNetProgres(long long int, long long int))); - connect(this,SIGNAL(sigCancel(bool)),m_Context,SLOT(setCanceled(bool))); + connect(m_Context,TQT_SIGNAL(tickProgress()),this,TQT_SLOT(slotTick())); + connect(m_Context,TQT_SIGNAL(waitShow(bool)),this,TQT_SLOT(slotWait(bool))); + connect(m_Context,TQT_SIGNAL(netProgress(long long int, long long int)), + this,TQT_SLOT(slotNetProgres(long long int, long long int))); + connect(this,TQT_SIGNAL(sigCancel(bool)),m_Context,TQT_SLOT(setCanceled(bool))); } mShowTimer->start(m_MinDuration, true); setMinimumSize(280,160); adjustSize(); } -void StopDlg::showEvent( QShowEvent*) +void StopDlg::showEvent( TQShowEvent*) { - cstack = new CursorStack(Qt::BusyCursor); + cstack = new CursorStack(TQt::BusyCursor); } -void StopDlg::hideEvent(QHideEvent*) +void StopDlg::hideEvent(TQHideEvent*) { delete cstack; cstack = 0; } @@ -102,8 +102,8 @@ StopDlg::~StopDlg() void StopDlg::slotAutoShow() { bool hasDialogs = false; - QWidget * w = kapp->activeModalWidget(); - if (w && w!=this && w!=parentWidget() ) { + TQWidget * w = TQT_TQWIDGET(kapp->activeModalWidget()); + if (w && w!=this && w!=tqparentWidget() ) { hasDialogs = true; } if (hasDialogs) { @@ -156,15 +156,15 @@ void StopDlg::slotTick() } } -void StopDlg::slotExtraMessage(const QString&msg) +void StopDlg::slotExtraMessage(const TQString&msg) { ++m_lastLogLines; if (!m_LogWindow) { - QFrame* mainWidget = plainPage(); + TQFrame* mainWidget = plainPage(); m_LogWindow = new KTextBrowser(mainWidget); - layout->addWidget(m_LogWindow); + tqlayout->addWidget(m_LogWindow); m_LogWindow->show(); - resize( QSize(500, 400).expandedTo(minimumSizeHint()) ); + resize( TQSize(500, 400).expandedTo(tqminimumSizeHint()) ); } if (m_lastLogLines >= Kdesvnsettings::self()->cmdline_log_minline() && isHidden() ) { @@ -181,14 +181,14 @@ void StopDlg::slotNetProgres(long long int current, long long int max) m_NetBar->show(); m_netBarShown=true; } - QString s1 = helpers::ByteToString()(current); + TQString s1 = helpers::ByteToString()(current); if (max > -1 && max != m_NetBar->totalSteps()) { - QString s2 = helpers::ByteToString()(max); - m_NetBar->setFormat(i18n("%1 of %2").arg(s1).arg(s2)); + TQString s2 = helpers::ByteToString()(max); + m_NetBar->setFormat(i18n("%1 of %2").tqarg(s1).tqarg(s2)); m_NetBar->setTotalSteps(max); } if (max == -1) { - m_NetBar->setFormat(i18n("%1 transferred.").arg(s1)); + m_NetBar->setFormat(i18n("%1 transferred.").tqarg(s1)); m_NetBar->setTotalSteps(current+1); } m_NetBar->setValue(current); @@ -197,10 +197,10 @@ void StopDlg::slotNetProgres(long long int current, long long int max) } } -StopSimpleDlg::StopSimpleDlg(QWidget *parent, const char *name,const QString&caption,const QString&text) - : StopDlg(0,parent,name,caption,text),cancelld(false) +StopSimpleDlg::StopSimpleDlg(TQWidget *tqparent, const char *name,const TQString&caption,const TQString&text) + : StopDlg(0,tqparent,name,caption,text),cancelld(false) { - connect(this,SIGNAL(sigCancel(bool)),this,SLOT(slotSimpleCancel(bool))); + connect(this,TQT_SIGNAL(sigCancel(bool)),this,TQT_SLOT(slotSimpleCancel(bool))); } void StopSimpleDlg::slotSimpleCancel(bool how) diff --git a/src/svnfrontend/stopdlg.h b/src/svnfrontend/stopdlg.h index 5d33d59..1a9813d 100644 --- a/src/svnfrontend/stopdlg.h +++ b/src/svnfrontend/stopdlg.h @@ -24,16 +24,16 @@ #include <kdialogbase.h> -#include <qdatetime.h> -#include <qobject.h> +#include <tqdatetime.h> +#include <tqobject.h> -class QTimer; +class TQTimer; class CContextListener; -class QLabel; +class TQLabel; class KProgress; class KTextBrowser; -class QVBoxLayout; +class TQVBoxLayout; /** @author Rajko Albrecht @@ -41,39 +41,40 @@ class QVBoxLayout; class StopDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - StopDlg(QObject*,QWidget *parent = 0, const char *name = 0,const QString&caption=QString::null,const QString&text=QString::null); + StopDlg(TQObject*,TQWidget *tqparent = 0, const char *name = 0,const TQString&caption=TQString(),const TQString&text=TQString()); virtual ~StopDlg(); bool cancelld(); protected: - QObject*m_Context; + TQObject*m_Context; int m_MinDuration; bool mCancelled; - QTimer * mShowTimer; - QString mCancelText; + TQTimer * mShowTimer; + TQString mCancelText; bool mShown,mWait; - QLabel*mLabel; + TQLabel*mLabel; KProgress*m_ProgressBar; KProgress*m_NetBar; bool m_BarShown; bool m_netBarShown; - QTime m_StopTick; + TQTime m_StopTick; KTextBrowser*m_LogWindow; - QVBoxLayout*layout; + TQVBoxLayout*tqlayout; - QString m_lastLog; + TQString m_lastLog; unsigned int m_lastLogLines; CursorStack * cstack; - virtual void showEvent(QShowEvent*); - virtual void hideEvent(QHideEvent*); + virtual void showEvent(TQShowEvent*); + virtual void hideEvent(TQHideEvent*); public slots: virtual void slotTick(); virtual void slotWait(bool); - virtual void slotExtraMessage(const QString&); + virtual void slotExtraMessage(const TQString&); protected slots: virtual void slotAutoShow(); @@ -86,8 +87,9 @@ signals: class StopSimpleDlg:public StopDlg { Q_OBJECT + TQ_OBJECT public: - StopSimpleDlg(QWidget *parent = 0, const char *name = 0,const QString&caption=QString::null,const QString&text=QString::null); + StopSimpleDlg(TQWidget *tqparent = 0, const char *name = 0,const TQString&caption=TQString(),const TQString&text=TQString()); virtual ~StopSimpleDlg(){} bool isCanceld()const{return cancelld;} diff --git a/src/svnfrontend/svnactions.cpp b/src/svnfrontend/svnactions.cpp index 082666f..390f480 100644 --- a/src/svnfrontend/svnactions.cpp +++ b/src/svnfrontend/svnactions.cpp @@ -75,22 +75,22 @@ #include <krun.h> #include <kstdguiitem.h> -#include <qstring.h> -#include <qmap.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qvaluelist.h> -#include <qvbox.h> -#include <qstylesheet.h> -#include <qregexp.h> -#include <qimage.h> -#include <qthread.h> -#include <qtimer.h> -#include <qlistview.h> -#include <qfileinfo.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqvaluelist.h> +#include <tqvbox.h> +#include <tqstylesheet.h> +#include <tqregexp.h> +#include <tqimage.h> +#include <tqthread.h> +#include <tqtimer.h> +#include <tqlistview.h> +#include <tqfileinfo.h> #include <sys/time.h> #include <unistd.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> // wait not longer than 10 seconds for a thread #define MAX_THREAD_WAITTIME 10000 @@ -116,15 +116,15 @@ public: delete m_LogDialog; } - QMap<KProcess*,QStringList>::iterator it; + TQMap<KProcess*,TQStringList>::iterator it; for (it=m_tempfilelist.begin();it!=m_tempfilelist.end();++it) { - for (QStringList::iterator it2 = (*it).begin(); + for (TQStringList::iterator it2 = (*it).begin(); it2 != (*it).end();++it2) { ::unlink((*it2).ascii()); } } for (it=m_tempdirlist.begin();it!=m_tempdirlist.end();++it) { - for (QStringList::iterator it2 = (*it).begin(); + for (TQStringList::iterator it2 = (*it).begin(); it2 != (*it).end();++it2) { KIO::NetAccess::del((*it2),0); } @@ -136,9 +136,9 @@ public: bool isExternalDiff() { if (Kdesvnsettings::use_external_diff()) { - QString edisp = Kdesvnsettings::external_diff_display(); - QStringList wlist = QStringList::split(" ",edisp); - if (wlist.count()>=3 && edisp.find("%1")!=-1 && edisp.find("%2")!=-1) { + TQString edisp = Kdesvnsettings::external_diff_display(); + TQStringList wlist = TQStringList::split(" ",edisp); + if (wlist.count()>=3 && edisp.tqfind("%1")!=-1 && edisp.tqfind("%2")!=-1) { return true; } } @@ -180,17 +180,17 @@ public: /// \todo as persistent cache (sqlite?) helpers::itemCache<svn::InfoEntry> m_InfoCache; - QMap<KProcess*,QStringList> m_tempfilelist; - QMap<KProcess*,QStringList> m_tempdirlist; + TQMap<KProcess*,TQStringList> m_tempfilelist; + TQMap<KProcess*,TQStringList> m_tempdirlist; - QTimer m_ThreadCheckTimer; - QTimer m_UpdateCheckTimer; - QTime m_UpdateCheckTick; - QGuardedPtr<DiffBrowser> m_DiffBrowserPtr; - QGuardedPtr<KDialogBase> m_DiffDialog; - QGuardedPtr<SvnLogDlgImp> m_LogDialog; + TQTimer m_ThreadCheckTimer; + TQTimer m_UpdateCheckTimer; + TQTime m_UpdateCheckTick; + TQGuardedPtr<DiffBrowser> m_DiffBrowserPtr; + TQGuardedPtr<KDialogBase> m_DiffDialog; + TQGuardedPtr<SvnLogDlgImp> m_LogDialog; - QMap<QString,QString> m_contextData; + TQMap<TQString,TQString> m_contextData; bool runblocked; }; @@ -199,19 +199,19 @@ public: #define EMIT_REFRESH emit sigRefreshAll() #define DIALOGS_SIZES "display_dialogs_sizes" -SvnActions::SvnActions(ItemDisplay *parent, const char *name,bool processes_blocked) - : QObject(parent?parent->realWidget():0, name),SimpleLogCb() +SvnActions::SvnActions(ItemDisplay *tqparent, const char *name,bool processes_blocked) + : TQObject(tqparent?tqparent->realWidget():0, name),SimpleLogCb() { m_CThread = 0; m_UThread = 0; m_FCThread = 0; m_Data = new SvnActionsData(); - m_Data->m_ParentList = parent; + m_Data->m_ParentList = tqparent; m_Data->m_SvnContextListener = new CContextListener(this); m_Data->runblocked = processes_blocked; - connect(m_Data->m_SvnContextListener,SIGNAL(sendNotify(const QString&)),this,SLOT(slotNotifyMessage(const QString&))); - connect(&(m_Data->m_ThreadCheckTimer),SIGNAL(timeout()),this,SLOT(checkModthread())); - connect(&(m_Data->m_UpdateCheckTimer),SIGNAL(timeout()),this,SLOT(checkUpdateThread())); + connect(m_Data->m_SvnContextListener,TQT_SIGNAL(sendNotify(const TQString&)),this,TQT_SLOT(slotNotifyMessage(const TQString&))); + connect(&(m_Data->m_ThreadCheckTimer),TQT_SIGNAL(timeout()),this,TQT_SLOT(checkModthread())); + connect(&(m_Data->m_UpdateCheckTimer),TQT_SIGNAL(timeout()),this,TQT_SLOT(checkUpdateThread())); } svn::Client* SvnActions::svnclient() @@ -224,7 +224,7 @@ SvnActions::~SvnActions() killallThreads(); } -void SvnActions::slotNotifyMessage(const QString&aMsg) +void SvnActions::slotNotifyMessage(const TQString&aMsg) { emit sendNotify(aMsg); } @@ -239,7 +239,7 @@ void SvnActions::reInitClient() m_Data->m_Svnclient->setContext(m_Data->m_CurrentContext); } -template<class T> KDialogBase* SvnActions::createDialog(T**ptr,const QString&_head,bool OkCancel,const char*name,bool showHelp,bool modal,const KGuiItem&u1) +template<class T> KDialogBase* SvnActions::createDialog(T**ptr,const TQString&_head,bool OkCancel,const char*name,bool showHelp,bool modal,const KGuiItem&u1) { int buttons = KDialogBase::Ok; if (OkCancel) { @@ -252,18 +252,18 @@ template<class T> KDialogBase* SvnActions::createDialog(T**ptr,const QString&_he buttons = buttons|KDialogBase::User1; } KDialogBase * dlg = new KDialogBase( - modal?KApplication::activeModalWidget():0, // parent + modal?TQT_TQWIDGET(TQT_TQWIDGET(KApplication::activeModalWidget())):0, // tqparent name, // name modal, // modal _head, // caption - buttons, // buttonmask + buttons, // buttontqmask KDialogBase::Ok, // defaultButton false , // separator (u1.text().isEmpty()?KGuiItem():u1) //user1 ); if (!dlg) return dlg; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); *ptr = new T(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),name?name:DIALOGS_SIZES)); return dlg; @@ -279,8 +279,8 @@ void SvnActions::makeLog(const svn::Revision&start,const svn::Revision&end,const } } -svn::SharedPointer<svn::LogEntriesMap> SvnActions::getLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,const QString&which,bool list_files, - int limit,QWidget*parent) +svn::SharedPointer<svn::LogEntriesMap> SvnActions::getLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,const TQString&which,bool list_files, + int limit,TQWidget*tqparent) { svn::SharedPointer<svn::LogEntriesMap> logs = new svn::LogEntriesMap; if (!m_Data->m_CurrentContext) return 0; @@ -289,9 +289,9 @@ svn::SharedPointer<svn::LogEntriesMap> SvnActions::getLog(const svn::Revision&st kdDebug()<<"Get logs for "<< which<<endl; try { - StopDlg sdlg(m_Data->m_SvnContextListener,(parent?parent:m_Data->m_ParentList->realWidget()),0,"Logs", + StopDlg sdlg(m_Data->m_SvnContextListener,(tqparent?tqparent:m_Data->m_ParentList->realWidget()),0,"Logs", i18n("Getting logs - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); if (doNetworking()) { m_Data->m_Svnclient->log(which,start,end,*logs,peg,list_files,!follow,limit); } else { @@ -303,7 +303,7 @@ svn::SharedPointer<svn::LogEntriesMap> SvnActions::getLog(const svn::Revision&st m_Data->m_Svnclient->log(which,start,end,*logs,peg,list_files,!follow,limit); } else { svn::cache::ReposLog rl(m_Data->m_Svnclient,e.reposRoot()); - QString s1,s2,what; + TQString s1,s2,what; s1=e.url().mid(e.reposRoot().length()); if (which==".") { what=s1; @@ -325,7 +325,7 @@ svn::SharedPointer<svn::LogEntriesMap> SvnActions::getLog(const svn::Revision&st return logs; } -bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const QString&what,const svn::Revision&peg,QString&root) +bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQString&what,const svn::Revision&peg,TQString&root) { bool res = false; @@ -345,7 +345,7 @@ bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const QStrin svn::LogEntriesMap _m; try { svn::cache::ReposLog rl(m_Data->m_Svnclient ,root); - if (rl.isValid() && rl.simpleLog(_m,r,r,true) && _m.find(r.revnum())!=_m.end() ) { + if (rl.isValid() && rl.simpleLog(_m,r,r,true) && _m.tqfind(r.revnum())!=_m.end() ) { t = _m[r.revnum()]; res = true; } @@ -357,7 +357,7 @@ bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const QStrin if (!res) { svn::SharedPointer<svn::LogEntriesMap> log = getLog(r,r,peg,root,true,1); if (log) { - if (log->find(r.revnum())!=log->end()) { + if (log->tqfind(r.revnum())!=log->end()) { t = (*log)[r.revnum()]; res = true; } @@ -366,12 +366,12 @@ bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const QStrin return res; } -bool SvnActions::singleInfo(const QString&what,const svn::Revision&_rev,svn::InfoEntry&target,const svn::Revision&_peg) +bool SvnActions::singleInfo(const TQString&what,const svn::Revision&_rev,svn::InfoEntry&target,const svn::Revision&_peg) { - QString url; - QString ex; - QString cacheKey; - QTime d; d.start(); + TQString url; + TQString ex; + TQString cacheKey; + TQTime d; d.start(); svn::Revision rev = _rev; svn::Revision peg = _peg; if (!m_Data->m_CurrentContext) return false; @@ -379,14 +379,14 @@ bool SvnActions::singleInfo(const QString&what,const svn::Revision&_rev,svn::Inf // working copy // url = svn::Wc::getUrl(what); url = what; - if (url.find("@")!=-1) { + if (url.tqfind("@")!=-1) { url+="@BASE"; } peg = svn::Revision::UNDEFINED; cacheKey=url; } else { KURL _uri = what; - QString prot = svn::Url::transformProtokoll(_uri.protocol()); + TQString prot = svn::Url::transformProtokoll(_uri.protocol()); _uri.setProtocol(prot); url = _uri.prettyURL(); if (peg==svn::Revision::UNDEFINED) @@ -428,24 +428,24 @@ bool SvnActions::singleInfo(const QString&what,const svn::Revision&_rev,svn::Inf return true; } -void SvnActions::makeTree(const QString&what,const svn::Revision&_rev,const svn::Revision&startr,const svn::Revision&endr) +void SvnActions::makeTree(const TQString&what,const svn::Revision&_rev,const svn::Revision&startr,const svn::Revision&endr) { svn::InfoEntry info; if (!singleInfo(what,_rev,info)) { return; } - QString reposRoot = info.reposRoot(); + TQString reposRoot = info.reposRoot(); bool restartCache = (m_FCThread && m_FCThread->running()); if (restartCache) { stopFillCache(); } kdDebug()<<"Logs for "<<reposRoot<<endl; - QWidget*disp; - KDialogBase dlg(m_Data->m_ParentList->realWidget(),"historylist",true,i18n("History of %1").arg(info.url().mid(reposRoot.length())), + TQWidget*disp; + KDialogBase dlg(m_Data->m_ParentList->realWidget(),"historylist",true,i18n("History of %1").tqarg(info.url().mid(reposRoot.length())), KDialogBase::Ok, KDialogBase::Ok,true); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); RevisionTree rt(m_Data->m_Svnclient,m_Data->m_SvnContextListener,reposRoot, startr,endr, @@ -454,15 +454,15 @@ void SvnActions::makeTree(const QString&what,const svn::Revision&_rev,const svn: disp = rt.getView(); if (disp) { connect( - disp,SIGNAL(makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)), - this,SLOT(makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)) + disp,TQT_SIGNAL(makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)), + this,TQT_SLOT(makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)) ); connect( - disp,SIGNAL(makeRecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)), - this,SLOT(makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)) + disp,TQT_SIGNAL(makeRecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)), + this,TQT_SLOT(makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)) ); - connect(disp,SIGNAL(makeCat(const svn::Revision&, const QString&,const QString&,const svn::Revision&,QWidget*)), - this,SLOT(slotMakeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*))); + connect(disp,TQT_SIGNAL(makeCat(const svn::Revision&, const TQString&,const TQString&,const svn::Revision&,TQWidget*)), + this,TQT_SLOT(slotMakeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*))); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),"revisiontree_dlg")); dlg.exec(); dlg.saveDialogSize(*(Kdesvnsettings::self()->config()),"revisiontree_dlg",false); @@ -473,23 +473,23 @@ void SvnActions::makeTree(const QString&what,const svn::Revision&_rev,const svn: } } -void SvnActions::makeLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,const QString&which,bool list_files,int limit) +void SvnActions::makeLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,const TQString&which,bool list_files,int limit) { svn::InfoEntry info; if (!singleInfo(which,start,info)) { return; } - QString reposRoot = info.reposRoot(); + TQString reposRoot = info.reposRoot(); kdDebug()<<"getting logs..."<<endl; svn::SharedPointer<svn::LogEntriesMap> logs = getLog(start,end,peg,which,list_files,limit); if (!logs) return; - bool need_modal = m_Data->runblocked||KApplication::activeModalWidget()!=0; + bool need_modal = m_Data->runblocked||TQT_TQWIDGET(KApplication::activeModalWidget())!=0; if (need_modal||!m_Data->m_LogDialog) { m_Data->m_LogDialog=new SvnLogDlgImp(this,0,"logdialog",need_modal); - connect(m_Data->m_LogDialog,SIGNAL(makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*)), - this,SLOT(makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*))); - connect(m_Data->m_LogDialog,SIGNAL(makeCat(const svn::Revision&, const QString&,const QString&,const svn::Revision&,QWidget*)), - this,SLOT(slotMakeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*))); + connect(m_Data->m_LogDialog,TQT_SIGNAL(makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*)), + this,TQT_SLOT(makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*))); + connect(m_Data->m_LogDialog,TQT_SIGNAL(makeCat(const svn::Revision&, const TQString&,const TQString&,const svn::Revision&,TQWidget*)), + this,TQT_SLOT(slotMakeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*))); } if (m_Data->m_LogDialog) { @@ -516,19 +516,19 @@ void SvnActions::makeBlame(const svn::Revision&start, const svn::Revision&end, S if (k) makeBlame(start,end,k->fullName(),m_Data->m_ParentList->realWidget()); } -void SvnActions::makeBlame(const svn::Revision&start, const svn::Revision&end,const QString&k,QWidget*_p,const svn::Revision&_peg,SimpleLogCb*_acb) +void SvnActions::makeBlame(const svn::Revision&start, const svn::Revision&end,const TQString&k,TQWidget*_p,const svn::Revision&_peg,SimpleLogCb*_acb) { if (!m_Data->m_CurrentContext) return; svn::AnnotatedFile blame; - QString ex; + TQString ex; svn::Path p(k); - QWidget*_parent = _p?_p:m_Data->m_ParentList->realWidget(); + TQWidget*_tqparent = _p?_p:m_Data->m_ParentList->realWidget(); svn::Revision peg = _peg==svn::Revision::UNDEFINED?end:_peg; try { - CursorStack a(Qt::BusyCursor); - StopDlg sdlg(m_Data->m_SvnContextListener,_parent,0,"Annotate",i18n("Annotate lines - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + CursorStack a(TQt::BusyCursor); + StopDlg sdlg(m_Data->m_SvnContextListener,_tqparent,0,"Annotate",i18n("Annotate lines - hit cancel for abort")); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->annotate(blame,p,start,end,peg); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -543,18 +543,18 @@ void SvnActions::makeBlame(const svn::Revision&start, const svn::Revision&end,co BlameDisplay_impl::displayBlame(_acb?_acb:this,k,blame,_p,"blame_dlg"); } -bool SvnActions::makeGet(const svn::Revision&start, const QString&what, const QString&target, - const svn::Revision&peg,QWidget*_dlgparent) +bool SvnActions::makeGet(const svn::Revision&start, const TQString&what, const TQString&target, + const svn::Revision&peg,TQWidget*_dlgtqparent) { if (!m_Data->m_CurrentContext) return false; - CursorStack a(Qt::BusyCursor); - QWidget*dlgp=_dlgparent?_dlgparent:m_Data->m_ParentList->realWidget(); - QString ex; + CursorStack a(TQt::BusyCursor); + TQWidget*dlgp=_dlgtqparent?_dlgtqparent:m_Data->m_ParentList->realWidget(); + TQString ex; svn::Path p(what); try { StopDlg sdlg(m_Data->m_SvnContextListener,dlgp, 0,"Content get",i18n("Getting content - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->get(p,target,start,peg); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -567,11 +567,11 @@ bool SvnActions::makeGet(const svn::Revision&start, const QString&what, const QS return true; } -void SvnActions::slotMakeCat(const svn::Revision&start, const QString&what, const QString&disp,const svn::Revision&peg,QWidget*_dlgparent) +void SvnActions::slotMakeCat(const svn::Revision&start, const TQString&what, const TQString&disp,const svn::Revision&peg,TQWidget*_dlgtqparent) { KTempFile content; content.setAutoDelete(true); - if (!makeGet(start,what,content.name(),peg,_dlgparent)) { + if (!makeGet(start,what,content.name(),peg,_dlgtqparent)) { return; } EMIT_FINISHED; @@ -594,27 +594,27 @@ void SvnActions::slotMakeCat(const svn::Revision&start, const QString&what, cons return; } KTextBrowser*ptr; - QFile file(content.name()); + TQFile file(content.name()); file.open( IO_ReadOnly ); - QByteArray co = file.readAll(); + TQByteArray co = file.readAll(); if (co.size()) { - KDialogBase*dlg = createDialog(&ptr,QString(i18n("Content of %1")).arg(disp),false,"cat_display_dlg"); + KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Content of %1")).tqarg(disp),false,"cat_display_dlg"); if (dlg) { ptr->setFont(KGlobalSettings::fixedFont()); - ptr->setWordWrap(QTextEdit::NoWrap); - ptr->setText(QString::FROMUTF8(co,co.size())); + ptr->setWordWrap(TQTextEdit::NoWrap); + ptr->setText(TQString::FROMUTF8(co,co.size())); dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"cat_display_dlg",false); delete dlg; } } else { - KMessageBox::information(_dlgparent?_dlgparent:m_Data->m_ParentList->realWidget(), + KMessageBox::information(_dlgtqparent?_dlgtqparent:m_Data->m_ParentList->realWidget(), i18n("Got no content.")); } } -bool SvnActions::makeMkdir(const QStringList&which,const QString&logMessage) +bool SvnActions::makeMkdir(const TQStringList&which,const TQString&logMessage) { if (!m_Data->m_CurrentContext||which.count()<1) return false; svn::Targets targets(which); @@ -627,35 +627,35 @@ bool SvnActions::makeMkdir(const QStringList&which,const QString&logMessage) return true; } -QString SvnActions::makeMkdir(const QString&parentDir) +TQString SvnActions::makeMkdir(const TQString&tqparentDir) { - if (!m_Data->m_CurrentContext) return QString::null; - QString ex; + if (!m_Data->m_CurrentContext) return TQString(); + TQString ex; bool isOk=false; - ex = KInputDialog::getText(i18n("New folder"),i18n("Enter folder name:"),QString::null,&isOk); + ex = KInputDialog::getText(i18n("New folder"),i18n("Enter folder name:"),TQString(),&isOk); if (!isOk) { - return QString::null; + return TQString(); } - svn::Path target(parentDir); + svn::Path target(tqparentDir); target.addComponent(ex); ex = ""; - QString logMessage=QString::null; + TQString logMessage=TQString(); try { m_Data->m_Svnclient->mkdir(target,logMessage); }catch (const svn::Exception&e) { emit clientException(e.msg()); - return QString::null; + return TQString(); } ex = target.path(); return ex; } -QString SvnActions::getInfo(QPtrList<SvnItem> lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all) +TQString SvnActions::getInfo(TQPtrList<SvnItem> lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all) { - QStringList l; - QString res = ""; + TQStringList l; + TQString res = ""; SvnItem*item; for (item=lst.first();item;item=lst.next()) { if (all) res+="<h4 align=\"center\">"+item->fullName()+"</h4>"; @@ -664,36 +664,36 @@ QString SvnActions::getInfo(QPtrList<SvnItem> lst,const svn::Revision&rev,const return res; } -QString SvnActions::getInfo(const QString& _what,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all) +TQString SvnActions::getInfo(const TQString& _what,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all) { - if (!m_Data->m_CurrentContext) return QString::null; - QString ex; + if (!m_Data->m_CurrentContext) return TQString(); + TQString ex; svn::InfoEntries entries; if (recursive) { try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,"Details", i18n("Retrieving infos - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); svn::InfoEntries e; entries = (m_Data->m_Svnclient->info(_what+ - (_what.find("@")>-1&&!svn::Url::isValid(_what)?"@BASE":""),recursive?svn::DepthInfinity:svn::DepthEmpty,rev,peg)); + (_what.tqfind("@")>-1&&!svn::Url::isValid(_what)?"@BASE":""),recursive?svn::DepthInfinity:svn::DepthEmpty,rev,peg)); } catch (const svn::Exception&e) { emit clientException(e.msg()); - return QString::null; + return TQString(); } } else { svn::InfoEntry info; if (!singleInfo(_what,rev,info,peg)) { - return QString::null; + return TQString(); } entries.append(info); } //if (!all) EMIT_FINISHED; - QString text = ""; + TQString text = ""; svn::InfoEntries::const_iterator it; - static QString rb = "<tr><td><nobr><font color=\"black\">"; - static QString re = "</font></nobr></td></tr>\n"; - static QString cs = "</font></nobr>:</td><td><nobr><font color=\"black\">"; + static TQString rb = "<tr><td><nobr><font color=\"black\">"; + static TQString re = "</font></nobr></td></tr>\n"; + static TQString cs = "</font></nobr>:</td><td><nobr><font color=\"black\">"; unsigned int val = 0; for (it=entries.begin();it!=entries.end();++it) { if (val>0) { @@ -791,7 +791,7 @@ QString SvnActions::getInfo(const QString& _what,const svn::Revision&rev,const s text+=rb+i18n("Lock comment")+cs+ (*it).lockEntry().Comment()+re; } else { - svn::SharedPointer<svn::Status> d; + svn::SharedPointer<svn::tqStatus> d; if (checkReposLockCache(_what,d)&& d && d->lockEntry().Locked()) { text+=rb+i18n("Lock token")+cs+(d->lockEntry().Token())+re; text+=rb+i18n("Owner")+cs+(d->lockEntry().Owner())+re; @@ -808,13 +808,13 @@ QString SvnActions::getInfo(const QString& _what,const svn::Revision&rev,const s return text; } -void SvnActions::makeInfo(QPtrList<SvnItem> lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive) +void SvnActions::makeInfo(TQPtrList<SvnItem> lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive) { - QStringList l; - QString res = "<html><head></head><body>"; + TQStringList l; + TQString res = "<html><head></head><body>"; SvnItem*item; for (item=lst.first();item;item=lst.next()) { - QString text = getInfo(item->fullName(),rev,peg,recursive,true); + TQString text = getInfo(item->fullName(),rev,peg,recursive,true); if (!text.isEmpty()) { res+="<h4 align=\"center\">"+item->fullName()+"</h4>"; res+=text; @@ -822,7 +822,7 @@ void SvnActions::makeInfo(QPtrList<SvnItem> lst,const svn::Revision&rev,const sv } res+="</body></html>"; KTextBrowser*ptr; - KDialogBase*dlg = createDialog(&ptr,QString(i18n("Infolist")),false,"info_dialog"); + KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Infolist")),false,"info_dialog"); if (dlg) { ptr->setText(res); dlg->exec(); @@ -831,11 +831,11 @@ void SvnActions::makeInfo(QPtrList<SvnItem> lst,const svn::Revision&rev,const sv } } -void SvnActions::makeInfo(const QStringList&lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive) +void SvnActions::makeInfo(const TQStringList&lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive) { - QString text = ""; + TQString text = ""; for (unsigned int i=0; i < lst.count();++i) { - QString res = getInfo(lst[i],rev,peg,recursive,true); + TQString res = getInfo(lst[i],rev,peg,recursive,true); if (!res.isEmpty()) { text+="<h4 align=\"center\">"+lst[i]+"</h4>"; text+=res; @@ -843,7 +843,7 @@ void SvnActions::makeInfo(const QStringList&lst,const svn::Revision&rev,const sv } text = "<html><head></head><body>"+text+"</body></html>"; KTextBrowser*ptr; - KDialogBase*dlg = createDialog(&ptr,QString(i18n("Infolist")),false,"info_dialog"); + KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Infolist")),false,"info_dialog"); if (dlg) { ptr->setText(text); dlg->exec(); @@ -858,33 +858,33 @@ void SvnActions::makeInfo(const QStringList&lst,const svn::Revision&rev,const sv */ void SvnActions::slotProperties() { - /// @todo remove reference to parentlist + /// @todo remove reference to tqparentlist if (!m_Data->m_CurrentContext) return; if (!m_Data->m_ParentList) return; SvnItem*k = m_Data->m_ParentList->Selected(); if (!k) return; PropertiesDlg dlg(k,svnclient(), m_Data->m_ParentList->isWorkingCopy()?svn::Revision::WORKING:svn::Revision::HEAD); - connect(&dlg,SIGNAL(clientException(const QString&)),m_Data->m_ParentList->realWidget(),SLOT(slotClientException(const QString&))); + connect(&dlg,TQT_SIGNAL(clientException(const TQString&)),m_Data->m_ParentList->realWidget(),TQT_SLOT(slotClientException(const TQString&))); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()), "properties_dlg")); - if (dlg.exec()!=QDialog::Accepted) { + if (dlg.exec()!=TQDialog::Accepted) { return; } dlg.saveDialogSize(*(Kdesvnsettings::self()->config()),"properties_dlg",false); - QString ex; + TQString ex; svn::PropertiesMap setList; - QValueList<QString> delList; + TQValueList<TQString> delList; dlg.changedItems(setList,delList); changeProperties(setList,delList,k->fullName()); - k->refreshStatus(); + k->refreshtqStatus(); EMIT_FINISHED; } -bool SvnActions::changeProperties(const svn::PropertiesMap&setList,const QValueList<QString>&delList,const QString&path) +bool SvnActions::changeProperties(const svn::PropertiesMap&setList,const TQValueList<TQString>&delList,const TQString&path) { try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,"Applying properties","<center>Applying<br>hit cancel for abort</center>"); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); unsigned int pos; for (pos = 0; pos<delList.size();++pos) { m_Data->m_Svnclient->propdel(delList[pos],svn::Path(path)); @@ -908,10 +908,10 @@ void SvnActions::slotCommit() if (!m_Data->m_CurrentContext||!m_Data->m_ParentList->isWorkingCopy()) { return; } - QPtrList<SvnItem> which; + TQPtrList<SvnItem> which; m_Data->m_ParentList->SelectionList(&which); SvnItem*cur; - QPtrListIterator<SvnItem> liter(which); + TQPtrListIterator<SvnItem> liter(which); svn::Pathes targets; if (which.count()==0) { @@ -940,7 +940,7 @@ bool SvnActions::makeCommit(const svn::Targets&targets) svn::Targets _targets; svn::Pathes _deldir; bool review = Kdesvnsettings::review_commit(); - QString msg,_p; + TQString msg,_p; if (!doNetworking()) { emit clientException(i18n("Not commiting because networking is disabled")); @@ -963,7 +963,7 @@ bool SvnActions::makeCommit(const svn::Targets&targets) for (unsigned j = 0; j < targets.size(); ++j) { svn::Revision where = svn::Revision::HEAD; try { - StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Status / List"),i18n("Creating list / check status")); + StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("tqStatus / List"),i18n("Creating list / check status")); _Cache = m_Data->m_Svnclient->status(targets.target(j).path(),svn::DepthInfinity,false,false,false,where); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -972,18 +972,18 @@ bool SvnActions::makeCommit(const svn::Targets&targets) for (unsigned int i = 0; i < _Cache.count();++i) { _p = _Cache[i]->path(); if (_Cache[i]->isRealVersioned()&& ( - _Cache[i]->textStatus()==svn_wc_status_modified|| - _Cache[i]->textStatus()==svn_wc_status_added|| - _Cache[i]->textStatus()==svn_wc_status_replaced|| - _Cache[i]->textStatus()==svn_wc_status_deleted|| - _Cache[i]->propStatus()==svn_wc_status_modified + _Cache[i]->texttqStatus()==svn_wc_status_modified|| + _Cache[i]->texttqStatus()==svn_wc_status_added|| + _Cache[i]->texttqStatus()==svn_wc_status_replaced|| + _Cache[i]->texttqStatus()==svn_wc_status_deleted|| + _Cache[i]->proptqStatus()==svn_wc_status_modified ) ) { - if (_Cache[i]->textStatus()==svn_wc_status_deleted) { + if (_Cache[i]->texttqStatus()==svn_wc_status_deleted) { _check.append(Logmsg_impl::logActionEntry(_p,i18n("Delete"),Logmsg_impl::logActionEntry::DELETE)); } else { _check.append(Logmsg_impl::logActionEntry(_p,i18n("Commit"),Logmsg_impl::logActionEntry::COMMIT)); } - } else if (_Cache[i]->textStatus()==svn_wc_status_missing) { + } else if (_Cache[i]->texttqStatus()==svn_wc_status_missing) { _uncheck.append(Logmsg_impl::logActionEntry(_p,i18n("Delete and Commit"),Logmsg_impl::logActionEntry::MISSING_DELETE)); } else if (!_Cache[i]->isVersioned()) { _uncheck.append(Logmsg_impl::logActionEntry(_p,i18n("Add and Commit"),Logmsg_impl::logActionEntry::ADD_COMMIT)); @@ -998,7 +998,7 @@ bool SvnActions::makeCommit(const svn::Targets&targets) svn::Pathes _add,_commit,_delete; for (unsigned int i=0; i < _result.count();++i) { if (_result[i]._kind==Logmsg_impl::logActionEntry::DELETE) { - QFileInfo fi(_result[i]._name); + TQFileInfo fi(_result[i]._name); if (fi.isDir()) { depth = svn::DepthInfinity; } @@ -1024,14 +1024,14 @@ bool SvnActions::makeCommit(const svn::Targets&targets) try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Commiting"), i18n("Commiting - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); nnum = m_Data->m_Svnclient->commit(_targets,msg,depth,keeplocks); } catch (const svn::Exception&e) { emit clientException(e.msg()); return false; } EMIT_REFRESH; - emit sendNotify(i18n("Committed revision %1.").arg(nnum.toString())); + emit sendNotify(i18n("Committed revision %1.").tqarg(nnum.toString())); return true; } @@ -1050,23 +1050,23 @@ void SvnActions::receivedStderr(KProcess*proc,char*buff,int len) if (!proc || !buff || len == 0) { return; } - QString msg(QCString(buff,len)); + TQString msg(TQCString(buff,len)); emit sendNotify(msg); } void SvnActions::procClosed(KProcess*proc) { if (!proc) return; - QMap<KProcess*,QStringList>::iterator it; - if ( (it=m_Data->m_tempfilelist.find(proc))!=m_Data->m_tempfilelist.end()) { - for (QStringList::iterator it2 = (*it).begin(); + TQMap<KProcess*,TQStringList>::iterator it; + if ( (it=m_Data->m_tempfilelist.tqfind(proc))!=m_Data->m_tempfilelist.end()) { + for (TQStringList::iterator it2 = (*it).begin(); it2 != (*it).end();++it2) { ::unlink((*it2).ascii()); } m_Data->m_tempfilelist.erase(it); } - if ( (it=m_Data->m_tempdirlist.find(proc))!=m_Data->m_tempdirlist.end()) { - for (QStringList::iterator it2 = (*it).begin(); + if ( (it=m_Data->m_tempdirlist.tqfind(proc))!=m_Data->m_tempdirlist.end()) { + for (TQStringList::iterator it2 = (*it).begin(); it2 != (*it).end();++it2) { KIO::NetAccess::del((*it2),0); } @@ -1075,7 +1075,7 @@ void SvnActions::procClosed(KProcess*proc) delete proc; } -bool SvnActions::get(const QString&what,const QString& to,const svn::Revision&rev,const svn::Revision&peg,QWidget*p) +bool SvnActions::get(const TQString&what,const TQString& to,const svn::Revision&rev,const svn::Revision&peg,TQWidget*p) { svn::Revision _peg = peg; if (_peg == svn::Revision::UNDEFINED) { @@ -1085,7 +1085,7 @@ bool SvnActions::get(const QString&what,const QString& to,const svn::Revision&re try { StopDlg sdlg(m_Data->m_SvnContextListener,p?p:m_Data->m_ParentList->realWidget(),0,"Downloading", i18n("Download - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->get(svn::Path(what), to,rev,_peg); } catch (const svn::Exception&e) { @@ -1096,19 +1096,19 @@ bool SvnActions::get(const QString&what,const QString& to,const svn::Revision&re } /*! - \fn SvnActions::makeDiff(const QString&,const svn::Revision&start,const svn::Revision&end) + \fn SvnActions::makeDiff(const TQString&,const svn::Revision&start,const svn::Revision&end) */ -void SvnActions::makeDiff(const QString&what,const svn::Revision&start,const svn::Revision&end,const svn::Revision&_peg,bool isDir) +void SvnActions::makeDiff(const TQString&what,const svn::Revision&start,const svn::Revision&end,const svn::Revision&_peg,bool isDir) { makeDiff(what,start,what,end,_peg,isDir,m_Data->m_ParentList->realWidget()); } -void SvnActions::makeDiff(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end) +void SvnActions::makeDiff(const TQString&p1,const svn::Revision&start,const TQString&p2,const svn::Revision&end) { - makeDiff(p1,start,p2,end,(QWidget*)0); + makeDiff(p1,start,p2,end,(TQWidget*)0); } -void SvnActions::makeDiff(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end,QWidget*p) +void SvnActions::makeDiff(const TQString&p1,const svn::Revision&start,const TQString&p2,const svn::Revision&end,TQWidget*p) { if (!doNetworking()&&start!=svn::Revision::BASE && end!=svn::Revision::WORKING) { emit sendNotify(i18n("Can not do this diff because networking is disabled.")); @@ -1126,21 +1126,21 @@ void SvnActions::makeDiff(const QString&p1,const svn::Revision&start,const QStri makeDiffinternal(p1,start,p2,end,p); } -void SvnActions::makeDiffExternal(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end,const svn::Revision&_peg, - bool isDir,QWidget*p,bool rec) +void SvnActions::makeDiffExternal(const TQString&p1,const svn::Revision&start,const TQString&p2,const svn::Revision&end,const svn::Revision&_peg, + bool isDir,TQWidget*p,bool rec) { - QString edisp = Kdesvnsettings::external_diff_display(); - QStringList wlist = QStringList::split(" ",edisp); - QFileInfo f1(p1); - QFileInfo f2(p2); - KTempFile tfile(QString::null,f1.fileName()+"-"+start.toString()),tfile2(QString::null,f2.fileName()+"-"+end.toString()); - QString s1 = f1.fileName()+"-"+start.toString(); - QString s2 = f2.fileName()+"-"+end.toString(); + TQString edisp = Kdesvnsettings::external_diff_display(); + TQStringList wlist = TQStringList::split(" ",edisp); + TQFileInfo f1(p1); + TQFileInfo f2(p2); + KTempFile tfile(TQString(),f1.fileName()+"-"+start.toString()),tfile2(TQString(),f2.fileName()+"-"+end.toString()); + TQString s1 = f1.fileName()+"-"+start.toString(); + TQString s2 = f2.fileName()+"-"+end.toString(); KTempDir tdir1; tdir1.setAutoDelete(true); tfile.setAutoDelete(true); tfile2.setAutoDelete(true); - QString first,second; + TQString first,second; svn::Revision peg = _peg; if (start != svn::Revision::WORKING) { @@ -1184,7 +1184,7 @@ void SvnActions::makeDiffExternal(const QString&p1,const svn::Revision&start,con } } KProcess*proc = new KProcess(); - for ( QStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { + for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { if (*it=="%1") { *proc<<first; } else if (*it=="%2") { @@ -1193,9 +1193,9 @@ void SvnActions::makeDiffExternal(const QString&p1,const svn::Revision&start,con *proc << *it; } } - connect(proc,SIGNAL(processExited(KProcess*)),this,SLOT(procClosed(KProcess*))); - connect(proc,SIGNAL(receivedStderr(KProcess*,char*,int)),this,SLOT(receivedStderr(KProcess*,char*,int))); - connect(proc,SIGNAL(receivedStdout(KProcess*,char*,int)),this,SLOT(receivedStderr(KProcess*,char*,int))); + connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*))); + connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int))); + connect(proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int))); if (proc->start(m_Data->runblocked?KProcess::Block:KProcess::NotifyOnExit,KProcess::All)) { if (!m_Data->runblocked) { if (!isDir) { @@ -1216,7 +1216,7 @@ void SvnActions::makeDiffExternal(const QString&p1,const svn::Revision&start,con return; } -void SvnActions::makeDiff(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end,const svn::Revision&_peg,bool isDir,QWidget*p) +void SvnActions::makeDiff(const TQString&p1,const svn::Revision&start,const TQString&p2,const svn::Revision&end,const svn::Revision&_peg,bool isDir,TQWidget*p) { if (m_Data->isExternalDiff()) { kdDebug()<<"External diff 2..."<<endl; @@ -1226,16 +1226,16 @@ void SvnActions::makeDiff(const QString&p1,const svn::Revision&start,const QStri } } -void SvnActions::makeDiffinternal(const QString&p1,const svn::Revision&r1,const QString&p2,const svn::Revision&r2,QWidget*p,const svn::Revision&_peg) +void SvnActions::makeDiffinternal(const TQString&p1,const svn::Revision&r1,const TQString&p2,const svn::Revision&r2,TQWidget*p,const svn::Revision&_peg) { if (!m_Data->m_CurrentContext) return; - QByteArray ex; + TQByteArray ex; KTempDir tdir; tdir.setAutoDelete(true); - QString tn = QString("%1/%2").arg(tdir.name()).arg("/svndiff"); + TQString tn = TQString("%1/%2").tqarg(tdir.name()).tqarg("/svndiff"); bool ignore_content = Kdesvnsettings::diff_ignore_content(); - QWidget*parent = p?p:m_Data->m_ParentList->realWidget(); - QStringList extraOptions; + TQWidget*tqparent = p?p:m_Data->m_ParentList->realWidget(); + TQStringList extraOptions; if (Kdesvnsettings::diff_ignore_spaces()) { extraOptions.append("-b"); @@ -1247,9 +1247,9 @@ void SvnActions::makeDiffinternal(const QString&p1,const svn::Revision&r1,const svn::Revision peg = _peg==svn::Revision::UNDEFINED?r2:_peg; try { - StopDlg sdlg(m_Data->m_SvnContextListener,parent,0,"Diffing", + StopDlg sdlg(m_Data->m_SvnContextListener,tqparent,0,"Diffing", i18n("Diffing - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); if (p1==p2 && (r1.isRemote()||r2.isRemote())) { kdDebug()<<"Pegged diff"<<endl; ex = m_Data->m_Svnclient->diff_peg(svn::Path(tn), @@ -1273,7 +1273,7 @@ void SvnActions::makeDiffinternal(const QString&p1,const svn::Revision&r1,const dispDiff(ex); } -void SvnActions::makeNorecDiff(const QString&p1,const svn::Revision&r1,const QString&p2,const svn::Revision&r2,QWidget*_p) +void SvnActions::makeNorecDiff(const TQString&p1,const svn::Revision&r1,const TQString&p2,const svn::Revision&r2,TQWidget*_p) { if (!m_Data->m_CurrentContext) return; if (m_Data->isExternalDiff()) { @@ -1283,7 +1283,7 @@ void SvnActions::makeNorecDiff(const QString&p1,const svn::Revision&r1,const QSt } return; } - QStringList extraOptions; + TQStringList extraOptions; if (Kdesvnsettings::diff_ignore_spaces()) { extraOptions.append("-b"); @@ -1292,15 +1292,15 @@ void SvnActions::makeNorecDiff(const QString&p1,const svn::Revision&r1,const QSt { extraOptions.append("-w"); } - QByteArray ex; + TQByteArray ex; KTempDir tdir; tdir.setAutoDelete(true); kdDebug()<<"Non recourse diff"<<endl; - QString tn = QString("%1/%2").arg(tdir.name()).arg("/svndiff"); + TQString tn = TQString("%1/%2").tqarg(tdir.name()).tqarg("/svndiff"); bool ignore_content = Kdesvnsettings::diff_ignore_content(); try { StopDlg sdlg(m_Data->m_SvnContextListener,_p?_p:m_Data->m_ParentList->realWidget(),0,"Diffing","Diffing - hit cancel for abort"); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); ex = m_Data->m_Svnclient->diff(svn::Path(tn), svn::Path(p1),svn::Path(p2),svn::Path(), r1, r2, @@ -1318,22 +1318,22 @@ void SvnActions::makeNorecDiff(const QString&p1,const svn::Revision&r1,const QSt dispDiff(ex); } -void SvnActions::dispDiff(const QByteArray&ex) +void SvnActions::dispDiff(const TQByteArray&ex) { - QString what = Kdesvnsettings::external_diff_display(); + TQString what = Kdesvnsettings::external_diff_display(); int r = KProcess::Stdin|KProcess::Stderr; - if (Kdesvnsettings::use_external_diff() && (what.find("%1")==-1 || what.find("%2")==-1)) { - QStringList wlist = QStringList::split(" ",what); + if (Kdesvnsettings::use_external_diff() && (what.tqfind("%1")==-1 || what.tqfind("%2")==-1)) { + TQStringList wlist = TQStringList::split(" ",what); KProcess*proc = new KProcess(); bool fname_used = false; KTempFile tfile; tfile.setAutoDelete(false); - for ( QStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { + for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { if (*it=="%f") { fname_used = true; - QDataStream*ds = tfile.dataStream(); + TQDataStream*ds = tfile.dataStream(); ds->writeRawBytes(ex,ex.size()); tfile.close(); *proc<<tfile.name(); @@ -1342,10 +1342,10 @@ void SvnActions::dispDiff(const QByteArray&ex) } } - connect(proc,SIGNAL(processExited(KProcess*)),this,SLOT(procClosed(KProcess*))); - connect(proc,SIGNAL(receivedStderr(KProcess*,char*,int)),this,SLOT(receivedStderr(KProcess*,char*,int))); + connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*))); + connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int))); if (!fname_used) { - connect(proc,SIGNAL(wroteStdin(KProcess*)),this,SLOT(wroteStdin(KProcess*))); + connect(proc,TQT_SIGNAL(wroteStdin(KProcess*)),this,TQT_SLOT(wroteStdin(KProcess*))); } if (proc->start(KProcess::NotifyOnExit,fname_used?KProcess::Stderr:(KProcess::Communication)r)) { if (!fname_used) proc->writeStdin(ex,ex.size()); @@ -1356,24 +1356,24 @@ void SvnActions::dispDiff(const QByteArray&ex) } delete proc; } - bool need_modal = m_Data->runblocked||KApplication::activeModalWidget()!=0; + bool need_modal = m_Data->runblocked||TQT_TQWIDGET(KApplication::activeModalWidget())!=0; if (need_modal||!m_Data->m_DiffBrowserPtr||!m_Data->m_DiffDialog) { DiffBrowser*ptr; if (!need_modal && m_Data->m_DiffBrowserPtr) { delete m_Data->m_DiffBrowserPtr; } - KDialogBase*dlg = createDialog(&ptr,QString(i18n("Diff display")),false, + KDialogBase*dlg = createDialog(&ptr,TQString(i18n("Diff display")),false, "diff_display",false,need_modal, KStdGuiItem::saveAs()); if (dlg) { - QWidget*wd = dlg->mainWidget(); + TQWidget*wd = dlg->mainWidget(); if (wd) { EncodingSelector_impl * ls = new EncodingSelector_impl("",wd); - QObject::connect(ls,SIGNAL(TextCodecChanged(const QString&)), - ptr,SLOT(slotTextCodecChanged(const QString&))); + TQObject::connect(ls,TQT_SIGNAL(TextCodecChanged(const TQString&)), + ptr,TQT_SLOT(slotTextCodecChanged(const TQString&))); } - QObject::connect(dlg,SIGNAL(user1Clicked()),ptr,SLOT(saveDiff())); + TQObject::connect(dlg,TQT_SIGNAL(user1Clicked()),ptr,TQT_SLOT(saveDiff())); ptr->setText(ex); if (need_modal) { ptr->setFocus(); @@ -1398,18 +1398,18 @@ void SvnActions::dispDiff(const QByteArray&ex) /*! - \fn SvnActions::makeUpdate(const QString&what,const svn::Revision&rev,bool recurse) + \fn SvnActions::makeUpdate(const TQString&what,const svn::Revision&rev,bool recurse) */ -void SvnActions::makeUpdate(const QStringList&what,const svn::Revision&rev,bool recurse) +void SvnActions::makeUpdate(const TQStringList&what,const svn::Revision&rev,bool recurse) { if (!m_Data->m_CurrentContext) return; - QString ex; + TQString ex; svn::Revisions ret; stopCheckUpdateThread(); try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,"Making update", i18n("Making update - hit cancel for abort")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); svn::Targets pathes(what); ret = m_Data->m_Svnclient->update(pathes,rev, recurse?svn::DepthInfinity:svn::DepthFiles,false,false,true); } catch (const svn::Exception&e) { @@ -1439,7 +1439,7 @@ void SvnActions::prepareUpdate(bool ask) SvnItemList k; m_Data->m_ParentList->SelectionList(&k); - QStringList what; + TQStringList what; if (k.count()==0) { what.append(m_Data->m_ParentList->baseUri()); } else { @@ -1453,20 +1453,20 @@ void SvnActions::prepareUpdate(bool ask) svn::Revision r(svn::Revision::HEAD); if (ask) { Rangeinput_impl*rdlg; - KDialog*dlg = createDialog(&rdlg,QString(i18n("Revisions")),true); + KDialog*dlg = createDialog(&rdlg,TQString(i18n("Revisions")),true); if (!dlg) { return; } rdlg->setStartOnly(true); - /* just here cause layout has changed meanwhile */ - dlg->resize( QSize(120,60).expandedTo(dlg->minimumSizeHint()) ); + /* just here cause tqlayout has changed meanwhile */ + dlg->resize( TQSize(120,60).expandedTo(dlg->tqminimumSizeHint()) ); int result; - if ((result=dlg->exec())==QDialog::Accepted) { + if ((result=dlg->exec())==TQDialog::Accepted) { Rangeinput_impl::revision_range range = rdlg->getRange(); r=range.first; } delete dlg; - if (result!=QDialog::Accepted) return; + if (result!=TQDialog::Accepted) return; } makeUpdate(what,r,true); } @@ -1498,20 +1498,20 @@ void SvnActions::makeAdd(bool rec) { if (!m_Data->m_CurrentContext) return; if (!m_Data->m_ParentList) return; - QPtrList<SvnItem> lst; + TQPtrList<SvnItem> lst; m_Data->m_ParentList->SelectionList(&lst); if (lst.count()==0) { KMessageBox::error(m_Data->m_ParentList->realWidget(),i18n("Which files or directories should I add?")); return; } - QValueList<svn::Path> items; + TQValueList<svn::Path> items; SvnItemListIterator liter(lst); SvnItem*cur; while ((cur=liter.current())!=0){ ++liter; if (cur->isVersioned()) { KMessageBox::error(m_Data->m_ParentList->realWidget(),i18n("<center>The entry<br>%1<br>is versioned - break.</center>") - .arg(cur->fullName())); + .tqarg(cur->fullName())); return; } items.push_back(svn::Path(cur->fullName())); @@ -1521,29 +1521,29 @@ void SvnActions::makeAdd(bool rec) #if 0 while ((cur=liter.current())!=0){ ++liter; - //cur->refreshStatus(); + //cur->refreshtqStatus(); - //emit sigRefreshCurrent(static_cast<FileListViewItem*>(cur->parent())); + //emit sigRefreshCurrent(static_cast<FileListViewItem*>(cur->tqparent())); } #else emit sigRefreshCurrent(0); #endif } -bool SvnActions::addItems(const QStringList&w,svn::Depth depth) +bool SvnActions::addItems(const TQStringList&w,svn::Depth depth) { - QValueList<svn::Path> items; + TQValueList<svn::Path> items; for (unsigned int i = 0; i<w.count();++i) { items.push_back(w[i]); } return addItems(items,depth); } -bool SvnActions::addItems(const QValueList<svn::Path> &items,svn::Depth depth) +bool SvnActions::addItems(const TQValueList<svn::Path> &items,svn::Depth depth) { - QString ex; + TQString ex; try { - QValueList<svn::Path>::const_iterator piter; + TQValueList<svn::Path>::const_iterator piter; for (piter=items.begin();piter!=items.end();++piter) { m_Data->m_Svnclient->add((*piter),depth); } @@ -1554,7 +1554,7 @@ bool SvnActions::addItems(const QValueList<svn::Path> &items,svn::Depth depth) return true; } -bool SvnActions::makeDelete(const QStringList&w) +bool SvnActions::makeDelete(const TQStringList&w) { int answer = KMessageBox::questionYesNoList(0,i18n("Really delete these entries?"),w,i18n("Delete from repository")); if (answer!=KMessageBox::Yes) { @@ -1573,7 +1573,7 @@ bool SvnActions::makeDelete(const QStringList&w) bool SvnActions::makeDelete(const svn::Pathes&items) { if (!m_Data->m_CurrentContext) return false; - QString ex; + TQString ex; try { svn::Targets target(items); m_Data->m_Svnclient->remove(target,false); @@ -1610,7 +1610,7 @@ void SvnActions::CheckoutExport(bool _exp) CheckoutInfo_impl*ptr; KDialogBase * dlg = createDialog(&ptr,(_exp?i18n("Export repository"):i18n("Checkout a repository")),true,"checkout_export_dialog"); if (dlg) { - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { svn::Revision r = ptr->toRevision(); bool openit = ptr->openAfterJob(); bool ignoreExternal=ptr->ignoreExternals(); @@ -1626,7 +1626,7 @@ void SvnActions::CheckoutExport(bool _exp) } } -void SvnActions::CheckoutExport(const QString&what,bool _exp,bool urlisTarget) +void SvnActions::CheckoutExport(const TQString&what,bool _exp,bool urlisTarget) { CheckoutInfo_impl*ptr; KDialog * dlg = createDialog(&ptr,_exp?i18n("Export a repository"):i18n("Checkout a repository"),true); @@ -1636,7 +1636,7 @@ void SvnActions::CheckoutExport(const QString&what,bool _exp,bool urlisTarget) } else { ptr->setTargetUrl(what); } - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { svn::Revision r = ptr->toRevision(); bool openIt = ptr->openAfterJob(); bool ignoreExternal = ptr->ignoreExternals(); @@ -1654,7 +1654,7 @@ void SvnActions::CheckoutExportCurrent(bool _exp) KMessageBox::error(m_Data->m_ParentList->realWidget(),_exp?i18n("Exporting a file?"):i18n("Checking out a file?")); return; } - QString what; + TQString what; if (!k) { what = m_Data->m_ParentList->baseUri(); } else { @@ -1663,7 +1663,7 @@ void SvnActions::CheckoutExportCurrent(bool _exp) CheckoutExport(what,_exp); } -bool SvnActions::makeCheckout(const QString&rUrl,const QString&tPath,const svn::Revision&r,const svn::Revision&_peg, +bool SvnActions::makeCheckout(const TQString&rUrl,const TQString&tPath,const svn::Revision&r,const svn::Revision&_peg, svn::Depth depth, // kind of operation bool _exp, @@ -1673,11 +1673,11 @@ bool SvnActions::makeCheckout(const QString&rUrl,const QString&tPath,const svn:: bool ignoreExternal, // overwrite/force not versioned items bool overwrite, - QWidget*_p + TQWidget*_p ) { - QString fUrl = rUrl; - QString ex; + TQString fUrl = rUrl; + TQString ex; while (fUrl.endsWith("/")) { fUrl.truncate(fUrl.length()-1); } @@ -1689,10 +1689,10 @@ bool SvnActions::makeCheckout(const QString&rUrl,const QString&tPath,const svn:: if (!_exp||!m_Data->m_CurrentContext) reInitClient(); try { StopDlg sdlg(m_Data->m_SvnContextListener,_p?_p:m_Data->m_ParentList->realWidget(),0,_exp?i18n("Export"):i18n("Checkout"),_exp?i18n("Exporting"):i18n("Checking out")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); if (_exp) { /// @todo setup parameter for export operation - m_Data->m_Svnclient->doExport(svn::Path(fUrl),p,r,peg,overwrite,QString::null,ignoreExternal,depth); + m_Data->m_Svnclient->doExport(svn::Path(fUrl),p,r,peg,overwrite,TQString(),ignoreExternal,depth); } else { m_Data->m_Svnclient->checkout(fUrl,p,r,peg,depth,ignoreExternal,overwrite); } @@ -1712,16 +1712,16 @@ bool SvnActions::makeCheckout(const QString&rUrl,const QString&tPath,const svn:: void SvnActions::slotRevert() { if (!m_Data->m_ParentList||!m_Data->m_ParentList->isWorkingCopy()) return; - QPtrList<SvnItem> lst; + TQPtrList<SvnItem> lst; m_Data->m_ParentList->SelectionList(&lst); - QStringList displist; + TQStringList displist; SvnItemListIterator liter(lst); SvnItem*cur; if (lst.count()>0) { while ((cur=liter.current())!=0){ if (!cur->isVersioned()) { KMessageBox::error(m_Data->m_ParentList->realWidget(),i18n("<center>The entry<br>%1<br>is not versioned - break.</center>") - .arg(cur->fullName())); + .tqarg(cur->fullName())); return; } displist.append(cur->fullName()); @@ -1734,7 +1734,7 @@ void SvnActions::slotRevert() EMIT_REFRESH; } -void SvnActions::slotRevertItems(const QStringList&displist) +void SvnActions::slotRevertItems(const TQStringList&displist) { if (!m_Data->m_CurrentContext) return; if (displist.count()==0) { @@ -1748,21 +1748,21 @@ void SvnActions::slotRevertItems(const QStringList&displist) return; } ptr->setDispList(displist); - if (dlg->exec()!=QDialog::Accepted) { + if (dlg->exec()!=TQDialog::Accepted) { delete dlg; return; } depth = ptr->getDepth(); - QValueList<svn::Path> items; + TQValueList<svn::Path> items; for (unsigned j = 0; j<displist.count();++j) { items.push_back(svn::Path((*(displist.at(j))))); } - QString ex; + TQString ex; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Revert"),i18n("Reverting items")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); svn::Targets target(items); m_Data->m_Svnclient->revert(target,depth); } catch (const svn::Exception&e) { @@ -1777,18 +1777,18 @@ void SvnActions::slotRevertItems(const QStringList&displist) EMIT_FINISHED; } -bool SvnActions::makeSwitch(const QString&rUrl,const QString&tPath,const svn::Revision&r,svn::Depth depth,const svn::Revision&peg,bool stickydepth,bool ignore_externals,bool allow_unversioned) +bool SvnActions::makeSwitch(const TQString&rUrl,const TQString&tPath,const svn::Revision&r,svn::Depth depth,const svn::Revision&peg,bool stickydepth,bool ignore_externals,bool allow_unversioned) { if (!m_Data->m_CurrentContext) return false; - QString fUrl = rUrl; - QString ex; + TQString fUrl = rUrl; + TQString ex; while (fUrl.endsWith("/")) { fUrl.truncate(fUrl.length()-1); } svn::Path p(tPath); try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Switch url"),i18n("Switching url")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->doSwitch(p,fUrl,r,depth,peg,stickydepth,ignore_externals,allow_unversioned); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -1798,12 +1798,12 @@ bool SvnActions::makeSwitch(const QString&rUrl,const QString&tPath,const svn::Re return true; } -bool SvnActions::makeRelocate(const QString&fUrl,const QString&tUrl,const QString&path,bool rec) +bool SvnActions::makeRelocate(const TQString&fUrl,const TQString&tUrl,const TQString&path,bool rec) { if (!m_Data->m_CurrentContext) return false; - QString _f = fUrl; - QString _t = tUrl; - QString ex; + TQString _f = fUrl; + TQString _t = tUrl; + TQString ex; while (_f.endsWith("/")) { _f.truncate(_f.length()-1); } @@ -1813,7 +1813,7 @@ bool SvnActions::makeRelocate(const QString&fUrl,const QString&tUrl,const QStrin svn::Path p(path); try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Relocate url"),i18n("Relocate repository to new URL")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->relocate(p,_f,_t,rec); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -1828,7 +1828,7 @@ void SvnActions::slotSwitch() if (!m_Data->m_CurrentContext) return; if (!m_Data->m_ParentList||!m_Data->m_ParentList->isWorkingCopy()) return; - QPtrList<SvnItem> lst; + TQPtrList<SvnItem> lst; m_Data->m_ParentList->SelectionList(&lst); if (lst.count()>1) { @@ -1842,7 +1842,7 @@ void SvnActions::slotSwitch() KMessageBox::error(0,i18n("Error getting entry to switch")); return; } - QString path,what; + TQString path,what; path = k->fullName(); what = k->Url(); if (makeSwitch(path,what)) { @@ -1850,7 +1850,7 @@ void SvnActions::slotSwitch() } } -bool SvnActions::makeSwitch(const QString&path,const QString&what) +bool SvnActions::makeSwitch(const TQString&path,const TQString&what) { CheckoutInfo_impl*ptr; KDialogBase * dlg = createDialog(&ptr,i18n("Switch url"),true,"switch_url_dlg"); @@ -1860,7 +1860,7 @@ bool SvnActions::makeSwitch(const QString&path,const QString&what) ptr->disableAppend(true); ptr->disableTargetDir(true); ptr->disableOpen(true); - if (dlg->exec()==QDialog::Accepted) { + if (dlg->exec()==TQDialog::Accepted) { svn::Revision r = ptr->toRevision(); done = makeSwitch(ptr->reposURL(),path,r,ptr->getDepth(),r,true,ptr->ignoreExternals(),ptr->overwrite()); } @@ -1870,12 +1870,12 @@ bool SvnActions::makeSwitch(const QString&path,const QString&what) return done; } -bool SvnActions::makeCleanup(const QString&path) +bool SvnActions::makeCleanup(const TQString&path) { if (!m_Data->m_CurrentContext) return false; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Cleanup"),i18n("Cleaning up folder")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->cleanup(svn::Path(path)); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -1884,12 +1884,12 @@ bool SvnActions::makeCleanup(const QString&path) return true; } -void SvnActions::slotResolved(const QString&path) +void SvnActions::slotResolved(const TQString&path) { if (!m_Data->m_CurrentContext) return; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Resolve"),i18n("Marking resolved")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->resolve(svn::Path(path),svn::DepthEmpty); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -1898,11 +1898,11 @@ void SvnActions::slotResolved(const QString&path) m_Data->m_conflictCache.deleteKey(path,false); } -void SvnActions::slotResolve(const QString&p) +void SvnActions::slotResolve(const TQString&p) { if (!m_Data->m_CurrentContext) return; - QString eresolv = Kdesvnsettings::conflict_resolver(); - QStringList wlist = QStringList::split(" ",eresolv); + TQString eresolv = Kdesvnsettings::conflict_resolver(); + TQStringList wlist = TQStringList::split(" ",eresolv); if (wlist.size()==0) { return; } @@ -1911,8 +1911,8 @@ void SvnActions::slotResolve(const QString&p) if (!singleInfo(p,svn::Revision::UNDEFINED,i1)) { return; } - QFileInfo fi(p); - QString base = fi.dirPath(true); + TQFileInfo fi(p); + TQString base = fi.dirPath(true); kdDebug()<<i1.conflictNew()<<" " <<i1.conflictOld()<<" " <<i1.conflictWrk()<<" " @@ -1925,7 +1925,7 @@ void SvnActions::slotResolve(const QString&p) } KProcess*proc = new KProcess(); - for ( QStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { + for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { if (*it=="%o"||*it=="%l") { *proc<<(base+"/"+i1.conflictOld()); } else if (*it=="%m" || *it=="%w") { @@ -1938,9 +1938,9 @@ void SvnActions::slotResolve(const QString&p) *proc << *it; } } - connect(proc,SIGNAL(processExited(KProcess*)),this,SLOT(procClosed(KProcess*))); - connect(proc,SIGNAL(receivedStderr(KProcess*,char*,int)),this,SLOT(receivedStderr(KProcess*,char*,int))); - connect(proc,SIGNAL(receivedStdout(KProcess*,char*,int)),this,SLOT(receivedStderr(KProcess*,char*,int))); + connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*))); + connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int))); + connect(proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int))); if (proc->start(m_Data->runblocked?KProcess::Block:KProcess::NotifyOnExit,KProcess::All)) { return; } else { @@ -1950,13 +1950,13 @@ void SvnActions::slotResolve(const QString&p) return; } -void SvnActions::slotImport(const QString&path,const QString&target,const QString&message,svn::Depth depth, +void SvnActions::slotImport(const TQString&path,const TQString&target,const TQString&message,svn::Depth depth, bool noIgnore,bool noUnknown) { if (!m_Data->m_CurrentContext) return; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Import"),i18n("Importing items")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->import(svn::Path(path),target,message,depth,noIgnore,noUnknown); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -1964,14 +1964,14 @@ void SvnActions::slotImport(const QString&path,const QString&target,const QStrin } } -void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, const QString&_target, +void SvnActions::slotMergeExternal(const TQString&_src1,const TQString&_src2, const TQString&_target, const svn::Revision&rev1,const svn::Revision&rev2,const svn::Revision&_peg,bool rec) { KTempDir tdir1; tdir1.setAutoDelete(true); - QString src1 = _src1; - QString src2 = _src2; - QString target = _target; + TQString src1 = _src1; + TQString src2 = _src2; + TQString target = _target; bool singleMerge = false; if (rev1 == rev2 && (src2.isEmpty() || src1==src2) ) { @@ -1992,8 +1992,8 @@ void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, cons return; } - QFileInfo f1(src1); - QFileInfo f2(src2); + TQFileInfo f1(src1); + TQFileInfo f2(src2); bool isDir = true; svn::InfoEntry i1,i2; @@ -2012,16 +2012,16 @@ void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, cons } } - QFileInfo ti(target); + TQFileInfo ti(target); if (ti.isDir()!=isDir) { emit clientException(i18n("Target for merge must same type like sources!")); return; } - QString s1 = f1.fileName()+"-"+rev1.toString(); - QString s2 = f2.fileName()+"-"+rev2.toString(); - QString first,second,out; + TQString s1 = f1.fileName()+"-"+rev1.toString(); + TQString s2 = f2.fileName()+"-"+rev2.toString(); + TQString first,second,out; if (rev1 != svn::Revision::WORKING) { first = tdir1.name()+"/"+s1; } else { @@ -2035,7 +2035,7 @@ void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, cons } } else { // only two-way merge - second = QString::null; + second = TQString(); } if (second == first) { KMessageBox::error(m_Data->m_ParentList->realWidget(),i18n("Both entries seems to be the same, won't do a merge.")); @@ -2074,10 +2074,10 @@ void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, cons } } } - QString edisp = Kdesvnsettings::external_merge_program(); - QStringList wlist = QStringList::split(" ",edisp); + TQString edisp = Kdesvnsettings::external_merge_program(); + TQStringList wlist = TQStringList::split(" ",edisp); KProcess*proc = new KProcess(); - for ( QStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { + for ( TQStringList::Iterator it = wlist.begin();it!=wlist.end();++it) { if (*it=="%s1") { *proc<<first; } else if (*it=="%s2") { @@ -2088,8 +2088,8 @@ void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, cons *proc << *it; } } - connect(proc,SIGNAL(processExited(KProcess*)),this,SLOT(procClosed(KProcess*))); - connect(proc,SIGNAL(receivedStderr(KProcess*,char*,int)),this,SLOT(receivedStderr(KProcess*,char*,int))); + connect(proc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(procClosed(KProcess*))); + connect(proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),this,TQT_SLOT(receivedStderr(KProcess*,char*,int))); if (proc->start(m_Data->runblocked?KProcess::Block:KProcess::NotifyOnExit,KProcess::Stderr)) { if (!m_Data->runblocked) { tdir1.setAutoDelete(false); @@ -2102,19 +2102,19 @@ void SvnActions::slotMergeExternal(const QString&_src1,const QString&_src2, cons delete proc; } -void SvnActions::slotMergeWcRevisions(const QString&_entry,const svn::Revision&rev1, +void SvnActions::slotMergeWcRevisions(const TQString&_entry,const svn::Revision&rev1, const svn::Revision&rev2, bool rec,bool ancestry,bool forceIt,bool dry) { slotMerge(_entry,_entry,_entry,rev1,rev2,svn::Revision::UNDEFINED,rec,ancestry,forceIt,dry); } -void SvnActions::slotMerge(const QString&src1,const QString&src2, const QString&target, +void SvnActions::slotMerge(const TQString&src1,const TQString&src2, const TQString&target, const svn::Revision&rev1,const svn::Revision&rev2,const svn::Revision&_peg, bool rec,bool ancestry,bool forceIt,bool dry) { if (!m_Data->m_CurrentContext) return; - QString s2; + TQString s2; svn::Revision peg = svn::Revision::HEAD; svn::Revision tpeg; @@ -2147,7 +2147,7 @@ void SvnActions::slotMerge(const QString&src1,const QString&src2, const QString& } try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Merge"),i18n("Merging items")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); if (pegged_merge) { m_Data->m_Svnclient->merge_peg(p1,ranges,svn::Revision::HEAD,svn::Path(target),rec?svn::DepthUnknown:svn::DepthFiles, ancestry,dry,forceIt,false); @@ -2163,33 +2163,33 @@ void SvnActions::slotMerge(const QString&src1,const QString&src2, const QString& } /*! - \fn SvnActions::slotCopyMove(bool,const QString&,const QString&) + \fn SvnActions::slotCopyMove(bool,const TQString&,const TQString&) */ -bool SvnActions::makeMove(const QString&Old,const QString&New,bool force) +bool SvnActions::makeMove(const TQString&Old,const TQString&New,bool force) { if (!m_Data->m_CurrentContext) return false; svn::Revision nnum; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Move"),i18n("Moving/Rename item ")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); nnum = m_Data->m_Svnclient->move(svn::Path(Old),svn::Path(New),force); } catch (const svn::Exception&e) { emit clientException(e.msg()); return false; } if (nnum != svn::Revision::UNDEFINED) { - emit sendNotify(i18n("Committed revision %1.").arg(nnum.toString())); + emit sendNotify(i18n("Committed revision %1.").tqarg(nnum.toString())); } EMIT_REFRESH; return true; } -bool SvnActions::makeMove(const KURL::List&Old,const QString&New,bool force) +bool SvnActions::makeMove(const KURL::List&Old,const TQString&New,bool force) { svn::Revision nnum; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Move"),i18n("Moving entries")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); KURL::List::ConstIterator it = Old.begin(); bool local = false; @@ -2211,12 +2211,12 @@ bool SvnActions::makeMove(const KURL::List&Old,const QString&New,bool force) return true; } -bool SvnActions::makeCopy(const QString&Old,const QString&New,const svn::Revision&rev) +bool SvnActions::makeCopy(const TQString&Old,const TQString&New,const svn::Revision&rev) { if (!m_Data->m_CurrentContext) return false; try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Copy / Move"),i18n("Copy or Moving entries")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); m_Data->m_Svnclient->copy(svn::Path(Old),rev,svn::Path(New)); } catch (const svn::Exception&e) { emit clientException(e.msg()); @@ -2226,7 +2226,7 @@ bool SvnActions::makeCopy(const QString&Old,const QString&New,const svn::Revisio return true; } -bool SvnActions::makeCopy(const KURL::List&Old,const QString&New,const svn::Revision&rev) +bool SvnActions::makeCopy(const KURL::List&Old,const TQString&New,const svn::Revision&rev) { KURL::List::ConstIterator it = Old.begin(); svn::Pathes p; @@ -2241,7 +2241,7 @@ bool SvnActions::makeCopy(const KURL::List&Old,const QString&New,const svn::Revi try { StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Copy / Move"),i18n("Copy or Moving entries")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); KURL::List::ConstIterator it = Old.begin(); m_Data->m_Svnclient->copy(t,rev,rev,svn::Path(New),true); } catch (const svn::Exception&e) { @@ -2252,11 +2252,11 @@ bool SvnActions::makeCopy(const KURL::List&Old,const QString&New,const svn::Revi } /*! - \fn SvnActions::makeLock(const QStringList&) + \fn SvnActions::makeLock(const TQStringList&) */ -void SvnActions::makeLock(const QStringList&what,const QString&_msg,bool breakit) +void SvnActions::makeLock(const TQStringList&what,const TQString&_msg,bool breakit) { - QValueList<svn::Path> targets; + TQValueList<svn::Path> targets; for (unsigned int i = 0; i<what.count();++i) { targets.push_back(svn::Path((*(what.at(i))))); } @@ -2271,11 +2271,11 @@ void SvnActions::makeLock(const QStringList&what,const QString&_msg,bool breakit /*! - \fn SvnActions::makeUnlock(const QStringList&) + \fn SvnActions::makeUnlock(const TQStringList&) */ -void SvnActions::makeUnlock(const QStringList&what,bool breakit) +void SvnActions::makeUnlock(const TQStringList&what,bool breakit) { - QValueList<svn::Path> targets; + TQValueList<svn::Path> targets; if (!m_Data->m_CurrentContext) return; for (unsigned int i = 0; i<what.count();++i) { targets.push_back(svn::Path((*(what.at(i))))); @@ -2295,22 +2295,22 @@ void SvnActions::makeUnlock(const QStringList&what,bool breakit) /*! - \fn SvnActions::makeStatus(const QString&what, svn::StatusEntries&dlist) + \fn SvnActions::maketqStatus(const TQString&what, svn::StatusEntries&dlist) */ -bool SvnActions::makeStatus(const QString&what, svn::StatusEntries&dlist, svn::Revision&where,bool rec,bool all) +bool SvnActions::maketqStatus(const TQString&what, svn::StatusEntries&dlist, svn::Revision&where,bool rec,bool all) { bool display_ignores = Kdesvnsettings::display_ignored_files(); - return makeStatus(what,dlist,where,rec,all,display_ignores); + return maketqStatus(what,dlist,where,rec,all,display_ignores); } -bool SvnActions::makeStatus(const QString&what, svn::StatusEntries&dlist, svn::Revision&where,bool rec,bool all,bool display_ignores,bool updates) +bool SvnActions::maketqStatus(const TQString&what, svn::StatusEntries&dlist, svn::Revision&where,bool rec,bool all,bool display_ignores,bool updates) { bool disp_remote_details = Kdesvnsettings::details_on_remote_listing(); - QString ex; + TQString ex; svn::Depth _d=rec?svn::DepthInfinity:svn::DepthImmediates; try { - StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("Status / List"),i18n("Creating list / check status")); - connect(this,SIGNAL(sigExtraLogMsg(const QString&)),&sdlg,SLOT(slotExtraMessage(const QString&))); + StopDlg sdlg(m_Data->m_SvnContextListener,m_Data->m_ParentList->realWidget(),0,i18n("tqStatus / List"),i18n("Creating list / check status")); + connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&))); // rec all up noign dlist = m_Data->m_Svnclient->status(what,_d,all,updates,display_ignores,where,disp_remote_details,false); } catch (const svn::Exception&e) { @@ -2320,13 +2320,13 @@ bool SvnActions::makeStatus(const QString&what, svn::StatusEntries&dlist, svn::R return true; } -void SvnActions::checkAddItems(const QString&path,bool print_error_box) +void SvnActions::checkAddItems(const TQString&path,bool print_error_box) { svn::StatusEntries dlist; svn::StatusEntries rlist; - QStringList displist; + TQStringList displist; svn::Revision where = svn::Revision::HEAD; - if (!makeStatus(path,dlist,where,true,true,false,false)) { + if (!maketqStatus(path,dlist,where,true,true,false,false)) { return; } for (unsigned int i = 0; i<dlist.size();++i) { @@ -2342,14 +2342,14 @@ void SvnActions::checkAddItems(const QString&path,bool print_error_box) KDialogBase * dlg = createDialog(&ptr,i18n("Add unversioned items"),true,"add_items_dlg"); ptr->addColumn("Item"); for (unsigned j = 0; j<displist.size();++j) { - QCheckListItem * n = new QCheckListItem(ptr,displist[j],QCheckListItem::CheckBox); + TQCheckListItem * n = new TQCheckListItem(ptr,displist[j],TQCheckListItem::CheckBox); n->setOn(true); } - if (dlg->exec()==QDialog::Accepted) { - QListViewItemIterator it(ptr); + if (dlg->exec()==TQDialog::Accepted) { + TQListViewItemIterator it(ptr); displist.clear(); while(it.current()) { - QCheckListItem*t = (QCheckListItem*)it.current(); + TQCheckListItem*t = (TQCheckListItem*)it.current(); if (t->isOn()) { displist.append(t->text()); } @@ -2402,7 +2402,7 @@ void SvnActions::stopFillCache() } delete m_FCThread; m_FCThread = 0; - emit sigCacheStatus(-1,-1); + emit sigCachetqStatus(-1,-1); } } @@ -2423,7 +2423,7 @@ void SvnActions::killallThreads() stopFillCache(); } -bool SvnActions::createModifiedCache(const QString&what) +bool SvnActions::createModifiedCache(const TQString&what) { stopCheckModThread(); m_Data->m_Cache.clear(); @@ -2446,14 +2446,14 @@ void SvnActions::checkModthread() for (unsigned int i = 0; i < m_CThread->getList().count();++i) { svn::StatusPtr ptr = m_CThread->getList()[i]; if (m_CThread->getList()[i]->isRealVersioned()&& ( - m_CThread->getList()[i]->textStatus()==svn_wc_status_modified|| - m_CThread->getList()[i]->textStatus()==svn_wc_status_added|| - m_CThread->getList()[i]->textStatus()==svn_wc_status_deleted|| - m_CThread->getList()[i]->textStatus()==svn_wc_status_replaced|| - m_CThread->getList()[i]->propStatus()==svn_wc_status_modified + m_CThread->getList()[i]->texttqStatus()==svn_wc_status_modified|| + m_CThread->getList()[i]->texttqStatus()==svn_wc_status_added|| + m_CThread->getList()[i]->texttqStatus()==svn_wc_status_deleted|| + m_CThread->getList()[i]->texttqStatus()==svn_wc_status_replaced|| + m_CThread->getList()[i]->proptqStatus()==svn_wc_status_modified ) ) { m_Data->m_Cache.insertKey(ptr,ptr->path()); - } else if (m_CThread->getList()[i]->textStatus()==svn_wc_status_conflicted) { + } else if (m_CThread->getList()[i]->texttqStatus()==svn_wc_status_conflicted) { m_Data->m_conflictCache.insertKey(ptr,ptr->path()); } } @@ -2478,11 +2478,11 @@ void SvnActions::checkUpdateThread() bool newer=false; for (unsigned int i = 0; i < m_UThread->getList().count();++i) { svn::StatusPtr ptr = m_UThread->getList()[i]; - if (ptr->validReposStatus()) { + if (ptr->validRepostqStatus()) { m_Data->m_UpdateCache.insertKey(ptr,ptr->path()); - ptr->textStatus(); - ptr->propStatus(); - if (!(ptr->validLocalStatus())) { + ptr->texttqStatus(); + ptr->proptqStatus(); + if (!(ptr->validLocaltqStatus())) { newer = true; } } @@ -2500,7 +2500,7 @@ void SvnActions::checkUpdateThread() m_UThread = 0; } -void SvnActions::getaddedItems(const QString&path,svn::StatusEntries&target) +void SvnActions::getaddedItems(const TQString&path,svn::StatusEntries&target) { helpers::ValidRemoteOnly vro; m_Data->m_UpdateCache.listsubs_if(path,vro); @@ -2514,7 +2514,7 @@ bool SvnActions::checkUpdatesRunning() void SvnActions::addModifiedCache(const svn::StatusPtr&what) { - if (what->textStatus()==svn_wc_status_conflicted) { + if (what->texttqStatus()==svn_wc_status_conflicted) { m_Data->m_conflictCache.insertKey(what,what->path()); } else { m_Data->m_Cache.insertKey(what,what->path()); @@ -2522,35 +2522,35 @@ void SvnActions::addModifiedCache(const svn::StatusPtr&what) } } -void SvnActions::deleteFromModifiedCache(const QString&what) +void SvnActions::deleteFromModifiedCache(const TQString&what) { m_Data->m_Cache.deleteKey(what,true); m_Data->m_conflictCache.deleteKey(what,true); //m_Data->m_Cache.dump_tree(); } -bool SvnActions::checkModifiedCache(const QString&path) +bool SvnActions::checkModifiedCache(const TQString&path) { return m_Data->m_Cache.find(path); } -bool SvnActions::checkReposLockCache(const QString&path) +bool SvnActions::checkReposLockCache(const TQString&path) { return m_Data->m_repoLockCache.findSingleValid(path,false); } -bool SvnActions::checkReposLockCache(const QString&path,svn::SharedPointer<svn::Status>&t) +bool SvnActions::checkReposLockCache(const TQString&path,svn::SharedPointer<svn::tqStatus>&t) { - /// @todo create a method where svn::Status* will be a parameter so no copy is needed but just reading content + /// @todo create a method where svn::tqStatus* will be a parameter so no copy is needed but just reading content return m_Data->m_repoLockCache.findSingleValid(path,t); } -bool SvnActions::checkConflictedCache(const QString&path) +bool SvnActions::checkConflictedCache(const TQString&path) { return m_Data->m_conflictCache.find(path); } -void SvnActions::startFillCache(const QString&path) +void SvnActions::startFillCache(const TQString&path) { stopFillCache(); svn::InfoEntry e; @@ -2590,7 +2590,7 @@ bool SvnActions::doNetworking() return !is_url; } -void SvnActions::customEvent(QCustomEvent * e) +void SvnActions::customEvent(TQCustomEvent * e) { if (e->type()==EVENT_LOGCACHE_FINISHED) { emit sendNotify(i18n("Filling log cache in background finished.")); @@ -2599,14 +2599,14 @@ void SvnActions::customEvent(QCustomEvent * e) return; } else if (e&&e->type()==EVENT_LOGCACHE_STATUS && m_FCThread && m_FCThread->running()) { FillCacheStatusEvent*fev=(FillCacheStatusEvent*)e; - emit sigCacheStatus(fev->current(),fev->max()); + emit sigCachetqStatus(fev->current(),fev->max()); } } /*! - \fn SvnActions::createUpdateCache(const QString&what) + \fn SvnActions::createUpdateCache(const TQString&what) */ -bool SvnActions::createUpdateCache(const QString&what) +bool SvnActions::createUpdateCache(const TQString&what) { clearUpdateCache(); m_Data->m_repoLockCache.clear(); @@ -2624,25 +2624,25 @@ bool SvnActions::createUpdateCache(const QString&what) return true; } -bool SvnActions::checkUpdateCache(const QString&path)const +bool SvnActions::checkUpdateCache(const TQString&path)const { return m_Data->m_UpdateCache.find(path); } -void SvnActions::removeFromUpdateCache(const QStringList&what,bool exact_only) +void SvnActions::removeFromUpdateCache(const TQStringList&what,bool exact_only) { for (unsigned int i = 0; i < what.count(); ++i) { m_Data->m_UpdateCache.deleteKey(what[i],exact_only); } } -bool SvnActions::isUpdated(const QString&path)const +bool SvnActions::isUpdated(const TQString&path)const { - svn::SharedPointer<svn::Status> d; + svn::SharedPointer<svn::tqStatus> d; return m_Data->m_UpdateCache.findSingleValid(path,d); } -bool SvnActions::getUpdated(const QString&path,svn::SharedPointer<svn::Status>&d)const +bool SvnActions::getUpdated(const TQString&path,svn::SharedPointer<svn::tqStatus>&d)const { return m_Data->m_UpdateCache.findSingleValid(path,d); } @@ -2653,19 +2653,19 @@ void SvnActions::clearUpdateCache() } /*! - \fn SvnActions::makeIgnoreEntry(const QString&which) + \fn SvnActions::makeIgnoreEntry(const TQString&which) */ bool SvnActions::makeIgnoreEntry(SvnItem*which,bool unignore) { if (!which) return false; - QString parentName = which->getParentDir(); - if (parentName.isEmpty()) return false; - QString name = which->shortName(); - QString ex; - svn::Path p(parentName); + TQString tqparentName = which->getParentDir(); + if (tqparentName.isEmpty()) return false; + TQString name = which->shortName(); + TQString ex; + svn::Path p(tqparentName); svn::Revision r(svn_opt_revision_unspecified); - QPair<QLONG,svn::PathPropertiesMapList> pmp; + TQPair<TQLONG,svn::PathPropertiesMapList> pmp; try { pmp = m_Data->m_Svnclient->propget("svn:ignore",p,r,r); } catch (const svn::Exception&e) { @@ -2673,14 +2673,14 @@ bool SvnActions::makeIgnoreEntry(SvnItem*which,bool unignore) return false; } svn::PathPropertiesMapList pm = pmp.second; - QString data = ""; + TQString data = ""; if (pm.size()>0) { svn::PropertiesMap&mp = pm[0].second; data = mp["svn:ignore"]; } bool result = false; - QStringList lst = QStringList::split("\n",data); - QStringList::iterator it = lst.find(name); + TQStringList lst = TQStringList::split("\n",data); + TQStringList::iterator it = lst.tqfind(name); if (it != lst.end()) { if (unignore) { lst.erase(it); @@ -2704,12 +2704,12 @@ bool SvnActions::makeIgnoreEntry(SvnItem*which,bool unignore) return result; } -svn::PathPropertiesMapListPtr SvnActions::propList(const QString&which,const svn::Revision&where,bool cacheOnly) +svn::PathPropertiesMapListPtr SvnActions::propList(const TQString&which,const svn::Revision&where,bool cacheOnly) { svn::PathPropertiesMapListPtr pm; if (!which.isEmpty()) { - QString fk=where.toString()+"/"+which; - QString ex; + TQString fk=where.toString()+"/"+which; + TQString ex; svn::Path p(which); if (where != svn::Revision::WORKING) @@ -2738,10 +2738,10 @@ svn::PathPropertiesMapListPtr SvnActions::propList(const QString&which,const svn bool SvnActions::isLockNeeded(SvnItem*which,const svn::Revision&where) { if (!which) return false; - QString ex; + TQString ex; svn::Path p(which->fullName()); - QPair<QLONG,svn::PathPropertiesMapList> pmp; + TQPair<TQLONG,svn::PathPropertiesMapList> pmp; try { pmp = m_Data->m_Svnclient->propget("svn:needs-lock",p,where,where); } catch (const svn::Exception&e) { @@ -2752,30 +2752,30 @@ bool SvnActions::isLockNeeded(SvnItem*which,const svn::Revision&where) svn::PathPropertiesMapList pm = pmp.second; if (pm.size()>0) { svn::PropertiesMap&mp = pm[0].second; - if (mp.find("svn:needs-lock")!=mp.end()) { + if (mp.tqfind("svn:needs-lock")!=mp.end()) { return true; } } return false; } -QString SvnActions::searchProperty(QString&Store, const QString&property, const QString&start,const svn::Revision&where,bool up) +TQString SvnActions::searchProperty(TQString&Store, const TQString&property, const TQString&start,const svn::Revision&where,bool up) { svn::Path pa(start); kdDebug()<<"Url? "<<pa.isUrl()<<endl; svn::InfoEntry inf; if (!singleInfo(start,where,inf)) { - return QString::null; + return TQString(); } while(pa.length()>0) { svn::PathPropertiesMapListPtr pm = propList(pa,where,false); if (!pm) { - return QString::null; + return TQString(); } if (pm->size()>0) { svn::PropertiesMap&mp = (*pm)[0].second; - if (mp.find(property)!=mp.end()) { + if (mp.tqfind(property)!=mp.end()) { Store=mp[property]; return pa; } @@ -2792,13 +2792,13 @@ QString SvnActions::searchProperty(QString&Store, const QString&property, const break; } } - return QString::null; + return TQString(); } -bool SvnActions::makeList(const QString&url,svn::DirEntries&dlist,svn::Revision&where,bool rec) +bool SvnActions::makeList(const TQString&url,svn::DirEntries&dlist,svn::Revision&where,bool rec) { if (!m_Data->m_CurrentContext) return false; - QString ex; + TQString ex; try { dlist = m_Data->m_Svnclient->list(url,where,where,rec?svn::DepthInfinity:svn::DepthEmpty,false); } catch (const svn::Exception&e) { @@ -2811,10 +2811,10 @@ bool SvnActions::makeList(const QString&url,svn::DirEntries&dlist,svn::Revision& /*! \fn SvnActions::isLocalWorkingCopy(const KURL&url) */ -bool SvnActions::isLocalWorkingCopy(const KURL&url,QString&_baseUri) +bool SvnActions::isLocalWorkingCopy(const KURL&url,TQString&_baseUri) { if (url.isEmpty()||!url.isLocalFile()) return false; - QString cleanpath = url.path(); + TQString cleanpath = url.path(); while (cleanpath.endsWith("/")) { cleanpath.truncate(cleanpath.length()-1); } @@ -2836,7 +2836,7 @@ bool SvnActions::isLocalWorkingCopy(const KURL&url,QString&_baseUri) return true; } -void SvnActions::slotExtraLogMsg(const QString&msg) +void SvnActions::slotExtraLogMsg(const TQString&msg) { emit sigExtraLogMsg(msg); } @@ -2847,10 +2847,10 @@ void SvnActions::slotCancel(bool how) m_Data->m_SvnContextListener->setCanceled(how); } -void SvnActions::setContextData(const QString&aKey,const QString&aValue) +void SvnActions::setContextData(const TQString&aKey,const TQString&aValue) { if (aValue.isNull()) { - QMap<QString,QString>::iterator it = m_Data->m_contextData.find(aKey); + TQMap<TQString,TQString>::iterator it = m_Data->m_contextData.tqfind(aKey); if (it!=m_Data->m_contextData.end()) { m_Data->m_contextData.remove(it); } @@ -2864,12 +2864,12 @@ void SvnActions::clearContextData() m_Data->m_contextData.clear(); } -QString SvnActions::getContextData(const QString&aKey)const +TQString SvnActions::getContextData(const TQString&aKey)const { - if (m_Data->m_contextData.find(aKey)!=m_Data->m_contextData.end()) { + if (m_Data->m_contextData.tqfind(aKey)!=m_Data->m_contextData.end()) { return m_Data->m_contextData[aKey]; } - return QString::null; + return TQString(); } bool SvnActions::threadRunning(ThreadType which) diff --git a/src/svnfrontend/svnactions.h b/src/svnfrontend/svnactions.h index 96a2b5e..783d36a 100644 --- a/src/svnfrontend/svnactions.h +++ b/src/svnfrontend/svnactions.h @@ -31,15 +31,15 @@ #include <kurl.h> #include <kguiitem.h> -#include <qobject.h> -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqdatetime.h> +#include <tqstringlist.h> class ItemDisplay; class SvnItem; class KDialog; class KDialogBase; -class QDialog; +class TQDialog; class CContextListener; class KProcess; class SvnActionsData; @@ -60,9 +60,10 @@ namespace KIO { /** @author Rajko Albrecht */ -class SvnActions : public QObject,public SimpleLogCb +class SvnActions : public TQObject,public SimpleLogCb { Q_OBJECT + TQ_OBJECT public: enum ThreadType { checkupdatethread, @@ -70,48 +71,48 @@ public: checkmodifiedthread }; - SvnActions(ItemDisplay *parent, const char *name = 0,bool processes_blocked=false); + SvnActions(ItemDisplay *tqparent, const char *name = 0,bool processes_blocked=false); ~SvnActions(); void reInitClient(); //svn::Client&svnClient(){return m_Svnclient;} svn::Client* svnclient(); void prepareUpdate(bool ask); - template<class T> KDialogBase* createDialog(T**ptr,const QString&_head,bool OkCance=false, + template<class T> KDialogBase* createDialog(T**ptr,const TQString&_head,bool OkCance=false, const char*name="standard_dialog", bool showHelp=false,bool modal=true, const KGuiItem&u1 = KGuiItem()); - bool makeGet(const svn::Revision&start, const QString&what,const QString&target, - const svn::Revision&peg=svn::Revision::UNDEFINED,QWidget*dlgparent=0); + bool makeGet(const svn::Revision&start, const TQString&what,const TQString&target, + const svn::Revision&peg=svn::Revision::UNDEFINED,TQWidget*dlgtqparent=0); - bool addItems(const QValueList<svn::Path> &items,svn::Depth depth=svn::DepthEmpty); - bool addItems(const QStringList&w,svn::Depth depth=svn::DepthEmpty); - void checkAddItems(const QString&path,bool print_error_box=true); + bool addItems(const TQValueList<svn::Path> &items,svn::Depth depth=svn::DepthEmpty); + bool addItems(const TQStringList&w,svn::Depth depth=svn::DepthEmpty); + void checkAddItems(const TQString&path,bool print_error_box=true); bool makeDelete(const svn::Pathes&); - bool makeDelete(const QStringList&); - void makeLock(const QStringList&,const QString&,bool); - void makeUnlock(const QStringList&,bool); - - bool makeStatus(const QString&what, svn::StatusEntries&dlist, svn::Revision&where, bool rec=false,bool all=true); - bool makeStatus(const QString&what, svn::StatusEntries&dlist, svn::Revision&where, bool rec,bool all,bool display_ignored,bool updates=false); - bool makeList(const QString&url,svn::DirEntries&dlist,svn::Revision&where,bool rec=false); - - bool createModifiedCache(const QString&base); - bool checkModifiedCache(const QString&path); - bool checkConflictedCache(const QString&path); - bool checkReposLockCache(const QString&path); - bool checkReposLockCache(const QString&path,svn::SharedPointer<svn::Status>&t); + bool makeDelete(const TQStringList&); + void makeLock(const TQStringList&,const TQString&,bool); + void makeUnlock(const TQStringList&,bool); + + bool maketqStatus(const TQString&what, svn::StatusEntries&dlist, svn::Revision&where, bool rec=false,bool all=true); + bool maketqStatus(const TQString&what, svn::StatusEntries&dlist, svn::Revision&where, bool rec,bool all,bool display_ignored,bool updates=false); + bool makeList(const TQString&url,svn::DirEntries&dlist,svn::Revision&where,bool rec=false); + + bool createModifiedCache(const TQString&base); + bool checkModifiedCache(const TQString&path); + bool checkConflictedCache(const TQString&path); + bool checkReposLockCache(const TQString&path); + bool checkReposLockCache(const TQString&path,svn::SharedPointer<svn::tqStatus>&t); void addModifiedCache(const svn::StatusPtr&what); - void deleteFromModifiedCache(const QString&what); + void deleteFromModifiedCache(const TQString&what); bool makeIgnoreEntry(SvnItem*which,bool unignore); bool isLockNeeded(SvnItem*which,const svn::Revision&where); - QString searchProperty(QString&store, const QString&property, const QString&start,const svn::Revision&where,bool up=false); - svn::PathPropertiesMapListPtr propList(const QString&which,const svn::Revision&where,bool cacheOnly); + TQString searchProperty(TQString&store, const TQString&property, const TQString&start,const svn::Revision&where,bool up=false); + svn::PathPropertiesMapListPtr propList(const TQString&which,const svn::Revision&where,bool cacheOnly); - bool changeProperties(const svn::PropertiesMap&setList,const QValueList<QString>&,const QString&path); + bool changeProperties(const svn::PropertiesMap&setList,const TQValueList<TQString>&,const TQString&path); //! generate and displays a revision tree /*! @@ -122,66 +123,66 @@ public: * \param startr startrevision for log * \param endr endrevision for log */ - void makeTree(const QString&what,const svn::Revision&rev, + void makeTree(const TQString&what,const svn::Revision&rev, const svn::Revision&startr=svn::Revision(1), const svn::Revision&endr=svn::Revision::HEAD); void makeLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,SvnItem*k,bool list_files=false,int limit = 0); - void makeLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,const QString&,bool list_files=false, int limit=0); - svn::SharedPointer<svn::LogEntriesMap> getLog(const svn::Revision&start,const svn::Revision& end,const svn::Revision&peg,const QString&,bool list_files, int limit,QWidget*parent=0); - virtual bool getSingleLog(svn::LogEntry&,const svn::Revision&,const QString&,const svn::Revision&,QString&root); + void makeLog(const svn::Revision&start,const svn::Revision&end,const svn::Revision&peg,const TQString&,bool list_files=false, int limit=0); + svn::SharedPointer<svn::LogEntriesMap> getLog(const svn::Revision&start,const svn::Revision& end,const svn::Revision&peg,const TQString&,bool list_files, int limit,TQWidget*tqparent=0); + virtual bool getSingleLog(svn::LogEntry&,const svn::Revision&,const TQString&,const svn::Revision&,TQString&root); void makeBlame(const svn::Revision&start, const svn::Revision&end, SvnItem*k); - void makeBlame(const svn::Revision&start, const svn::Revision&end, const QString&,QWidget*parent=0,const svn::Revision&peg=svn::Revision::UNDEFINED,SimpleLogCb*_acb=0); - void makeUpdate(const QStringList&what,const svn::Revision&rev,bool recurse); - bool makeSwitch(const QString&rUrl,const QString&tPath,const svn::Revision&r,svn::Depth depth,const svn::Revision&peg,bool stickydepth,bool ignore_externals,bool allow_unversioned); - bool makeSwitch(const QString&path,const QString&what); - bool makeRelocate(const QString&fUrl,const QString&tUrl,const QString&path,bool rec = true); - bool makeCheckout(const QString&,const QString&,const svn::Revision&,const svn::Revision&,svn::Depth,bool isExport,bool openit,bool ignore_externals,bool overwrite,QWidget*p); - void makeInfo(QPtrList<SvnItem> lst,const svn::Revision&,const svn::Revision&,bool recursive = true); - void makeInfo(const QStringList&lst,const svn::Revision&,const svn::Revision&,bool recursive = true); + void makeBlame(const svn::Revision&start, const svn::Revision&end, const TQString&,TQWidget*tqparent=0,const svn::Revision&peg=svn::Revision::UNDEFINED,SimpleLogCb*_acb=0); + void makeUpdate(const TQStringList&what,const svn::Revision&rev,bool recurse); + bool makeSwitch(const TQString&rUrl,const TQString&tPath,const svn::Revision&r,svn::Depth depth,const svn::Revision&peg,bool stickydepth,bool ignore_externals,bool allow_unversioned); + bool makeSwitch(const TQString&path,const TQString&what); + bool makeRelocate(const TQString&fUrl,const TQString&tUrl,const TQString&path,bool rec = true); + bool makeCheckout(const TQString&,const TQString&,const svn::Revision&,const svn::Revision&,svn::Depth,bool isExport,bool openit,bool ignore_externals,bool overwrite,TQWidget*p); + void makeInfo(TQPtrList<SvnItem> lst,const svn::Revision&,const svn::Revision&,bool recursive = true); + void makeInfo(const TQStringList&lst,const svn::Revision&,const svn::Revision&,bool recursive = true); bool makeCommit(const svn::Targets&); - void CheckoutExport(const QString&what,bool _exp,bool urlisTarget=false); - - QString getInfo(QPtrList<SvnItem> lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all=true); - QString getInfo(const QString&_what,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all=true); - - QString makeMkdir(const QString&); - bool makeMkdir(const QStringList&,const QString&); - bool isLocalWorkingCopy(const KURL&url,QString&_baseUri); - bool createUpdateCache(const QString&what); - bool checkUpdateCache(const QString&path)const; - bool isUpdated(const QString&path)const; - bool getUpdated(const QString&path,svn::SharedPointer<svn::Status>&d)const; + void CheckoutExport(const TQString&what,bool _exp,bool urlisTarget=false); + + TQString getInfo(TQPtrList<SvnItem> lst,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all=true); + TQString getInfo(const TQString&_what,const svn::Revision&rev,const svn::Revision&peg,bool recursive,bool all=true); + + TQString makeMkdir(const TQString&); + bool makeMkdir(const TQStringList&,const TQString&); + bool isLocalWorkingCopy(const KURL&url,TQString&_baseUri); + bool createUpdateCache(const TQString&what); + bool checkUpdateCache(const TQString&path)const; + bool isUpdated(const TQString&path)const; + bool getUpdated(const TQString&path,svn::SharedPointer<svn::tqStatus>&d)const; void clearUpdateCache(); - void removeFromUpdateCache(const QStringList&what,bool exact_only); + void removeFromUpdateCache(const TQStringList&what,bool exact_only); void stopCheckModThread(); void stopCheckUpdateThread(); - void startFillCache(const QString&path); + void startFillCache(const TQString&path); void stopFillCache(); void stopMain(); void killallThreads(); bool checkUpdatesRunning(); - void getaddedItems(const QString&path,svn::StatusEntries&target); + void getaddedItems(const TQString&path,svn::StatusEntries&target); - bool makeCopy(const QString&,const QString&,const svn::Revision&rev); - bool makeCopy(const KURL::List&,const QString&,const svn::Revision&rev); + bool makeCopy(const TQString&,const TQString&,const svn::Revision&rev); + bool makeCopy(const KURL::List&,const TQString&,const svn::Revision&rev); - bool makeMove(const QString&,const QString&,bool); - bool makeMove(const KURL::List&,const QString&,bool); + bool makeMove(const TQString&,const TQString&,bool); + bool makeMove(const KURL::List&,const TQString&,bool); - virtual bool makeCleanup(const QString&); + virtual bool makeCleanup(const TQString&); - bool get(const QString&what,const QString& to,const svn::Revision&rev,const svn::Revision&peg,QWidget*p); - bool singleInfo(const QString&what,const svn::Revision&rev,svn::InfoEntry&target,const svn::Revision&_peg=svn::Revision::UNDEFINED); + bool get(const TQString&what,const TQString& to,const svn::Revision&rev,const svn::Revision&peg,TQWidget*p); + bool singleInfo(const TQString&what,const svn::Revision&rev,svn::InfoEntry&target,const svn::Revision&_peg=svn::Revision::UNDEFINED); - void setContextData(const QString&,const QString&); + void setContextData(const TQString&,const TQString&); void clearContextData(); - QString getContextData(const QString&)const; + TQString getContextData(const TQString&)const; bool threadRunning(ThreadType which); - virtual void customEvent ( QCustomEvent * e ); + virtual void customEvent ( TQCustomEvent * e ); bool doNetworking(); @@ -193,13 +194,13 @@ protected: void makeAdd(bool rec); CheckModifiedThread*m_CThread,*m_UThread; FillCacheThread*m_FCThread; - void makeDiffinternal(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*,const svn::Revision&peg=svn::Revision::UNDEFINED); - void makeDiffExternal(const QString&p1,const svn::Revision&start,const QString&p2,const svn::Revision&end,const svn::Revision&_peg,bool isDir,QWidget*p,bool rec=true); + void makeDiffinternal(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*,const svn::Revision&peg=svn::Revision::UNDEFINED); + void makeDiffExternal(const TQString&p1,const svn::Revision&start,const TQString&p2,const svn::Revision&end,const svn::Revision&_peg,bool isDir,TQWidget*p,bool rec=true); public slots: - virtual void dispDiff(const QByteArray&); + virtual void dispDiff(const TQByteArray&); virtual void slotProperties(); - virtual void slotNotifyMessage(const QString&); + virtual void slotNotifyMessage(const TQString&); virtual void slotCommit(); virtual void slotUpdateHeadRec(); virtual void slotUpdateTo(); @@ -210,38 +211,38 @@ public slots: virtual void slotCheckout(); virtual void slotExport(); virtual void slotRevert(); - virtual void slotRevertItems(const QStringList&); + virtual void slotRevertItems(const TQStringList&); virtual void slotSwitch(); - virtual void slotResolved(const QString&); - virtual void slotResolve(const QString&); - virtual void makeDiff(const QString&,const svn::Revision&,const svn::Revision&,const svn::Revision&_peg,bool isDir); - virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&); - virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,const svn::Revision&,bool,QWidget*p); - virtual void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); - virtual void makeNorecDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); - virtual void slotImport(const QString&,const QString&,const QString&,svn::Depth,bool noIgnore,bool noUnknown); - virtual void slotMergeWcRevisions(const QString&,const svn::Revision&,const svn::Revision&,bool,bool,bool,bool); - virtual void slotMerge(const QString&,const QString&, const QString&, + virtual void slotResolved(const TQString&); + virtual void slotResolve(const TQString&); + virtual void makeDiff(const TQString&,const svn::Revision&,const svn::Revision&,const svn::Revision&_peg,bool isDir); + virtual void makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&); + virtual void makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,const svn::Revision&,bool,TQWidget*p); + virtual void makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); + virtual void makeNorecDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); + virtual void slotImport(const TQString&,const TQString&,const TQString&,svn::Depth,bool noIgnore,bool noUnknown); + virtual void slotMergeWcRevisions(const TQString&,const svn::Revision&,const svn::Revision&,bool,bool,bool,bool); + virtual void slotMerge(const TQString&,const TQString&, const TQString&, const svn::Revision&,const svn::Revision&,const svn::Revision&, bool,bool,bool,bool); - virtual void slotMergeExternal(const QString&src1,const QString&src2, const QString&target, + virtual void slotMergeExternal(const TQString&src1,const TQString&src2, const TQString&target, const svn::Revision&rev1,const svn::Revision&rev2,const svn::Revision&_peg,bool); - virtual void slotExtraLogMsg(const QString&); - virtual void slotMakeCat(const svn::Revision&start, const QString&what,const QString&disp,const svn::Revision&peg,QWidget*dlgparent); + virtual void slotExtraLogMsg(const TQString&); + virtual void slotMakeCat(const svn::Revision&start, const TQString&what,const TQString&disp,const svn::Revision&peg,TQWidget*dlgtqparent); virtual void slotCancel(bool); signals: - void clientException(const QString&); - void sendNotify(const QString&); + void clientException(const TQString&); + void sendNotify(const TQString&); void reinitItem(SvnItem*); void sigRefreshAll(); void sigThreadsChanged(); void sigRefreshCurrent(SvnItem*); void sigRefreshIcons(bool); - void sigExtraLogMsg(const QString&); - void sigGotourl(const QString&); - void sigCacheStatus(Q_LONG,Q_LONG); + void sigExtraLogMsg(const TQString&); + void sigGotourl(const TQString&); + void sigCachetqStatus(TQ_LONG,TQ_LONG); protected slots: virtual void wroteStdin(KProcess*); diff --git a/src/svnfrontend/svnfiletip.cpp b/src/svnfrontend/svnfiletip.cpp index 2021169..c7388d3 100644 --- a/src/svnfrontend/svnfiletip.cpp +++ b/src/svnfrontend/svnfiletip.cpp @@ -26,38 +26,38 @@ #include <kapplication.h> #include <kdebug.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qscrollview.h> -#include <qtimer.h> - -SvnFileTip::SvnFileTip(QScrollView*parent) - : QFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM ), +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqscrollview.h> +#include <tqtimer.h> + +SvnFileTip::SvnFileTip(TQScrollView*tqparent) + : TQFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM ), m_on( false ), m_preview( false ), m_filter( false ), m_corner( 0 ), m_num( 0 ), - m_view( parent ), + m_view( tqparent ), m_svnitem( 0 ), m_previewJob( 0 ) { - m_iconLabel = new QLabel(this); - m_textLabel = new QLabel(this); - m_textLabel->setAlignment(Qt::AlignAuto | Qt::AlignTop); + m_iconLabel = new TQLabel(this); + m_textLabel = new TQLabel(this); + m_textLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignTop); - QGridLayout* layout = new QGridLayout(this, 1, 2, 8, 0); - layout->addWidget(m_iconLabel, 0, 0); - layout->addWidget(m_textLabel, 0, 1); - layout->setResizeMode(QLayout::Fixed); + TQGridLayout* tqlayout = new TQGridLayout(this, 1, 2, 8, 0); + tqlayout->addWidget(m_iconLabel, 0, 0); + tqlayout->addWidget(m_textLabel, 0, 1); + tqlayout->setResizeMode(TQLayout::Fixed); - setPalette( QToolTip::palette() ); + setPalette( TQToolTip::palette() ); setMargin( 1 ); - setFrameStyle( QFrame::Plain | QFrame::Box ); + setFrameStyle( TQFrame::Plain | TQFrame::Box ); - m_timer = new QTimer(this); + m_timer = new TQTimer(this); hide(); } @@ -87,7 +87,7 @@ void SvnFileTip::setOptions( bool on, bool preview, int num ) m_num = num; } -void SvnFileTip::setItem(SvnItem*item, const QRect &rect, const QPixmap *pixmap ) +void SvnFileTip::setItem(SvnItem*item, const TQRect &rect, const TQPixmap *pixmap ) { hideTip(); @@ -107,13 +107,13 @@ void SvnFileTip::setItem(SvnItem*item, const QRect &rect, const QPixmap *pixmap if ( pixmap ) m_iconLabel->setPixmap( *pixmap ); else - m_iconLabel->setPixmap( QPixmap() ); + m_iconLabel->setPixmap( TQPixmap() ); } // Don't start immediately, because the user could move the mouse over another item // This avoids a quick sequence of started preview-jobs m_timer->disconnect( this ); - connect(m_timer, SIGNAL(timeout()), this, SLOT(startDelayed())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(startDelayed())); m_timer->start( 300, true ); } else { m_timer->stop(); @@ -124,11 +124,11 @@ void SvnFileTip::reposition() { if ( m_rect.isEmpty() || !m_view || !m_view->viewport() ) return; - QRect rect = m_rect; - QPoint off = m_view->viewport()->mapToGlobal( m_view->contentsToViewport( rect.topRight() ) ); + TQRect rect = m_rect; + TQPoint off = m_view->viewport()->mapToGlobal( m_view->contentsToViewport( rect.topRight() ) ); rect.moveTopRight( off ); - QPoint pos = rect.center(); + TQPoint pos = rect.center(); // m_corner: // 0: upperleft // 1: upperright @@ -137,7 +137,7 @@ void SvnFileTip::reposition() // 4+: none m_corner = 0; // should the tooltip be shown to the left or to the right of the ivi ? - QRect desk = KGlobalSettings::desktopGeometry(rect.center()); + TQRect desk = KGlobalSettings::desktopGeometry(rect.center()); if (rect.center().x() + width() > desk.right()) { // to the left @@ -162,7 +162,7 @@ void SvnFileTip::reposition() update(); } -void SvnFileTip::gotPreview( const KFileItem* item, const QPixmap& pixmap ) +void SvnFileTip::gotPreview( const KFileItem* item, const TQPixmap& pixmap ) { m_previewJob = 0; if (!m_svnitem || item != m_svnitem->fileItem()) return; @@ -175,7 +175,7 @@ void SvnFileTip::gotPreviewResult() m_previewJob = 0; } -void SvnFileTip::drawContents( QPainter *p ) +void SvnFileTip::drawContents( TQPainter *p ) { static const char * const names[] = { "arrow_topleft", @@ -185,14 +185,14 @@ void SvnFileTip::drawContents( QPainter *p ) }; if (m_corner >= 4) { // 4 is empty, so don't draw anything - QFrame::drawContents( p ); + TQFrame::drawContents( p ); return; } if ( m_corners[m_corner].isNull()) - m_corners[m_corner].load( locate( "data", QString::fromLatin1( "konqueror/pics/%1.png" ).arg( names[m_corner] ) ) ); + m_corners[m_corner].load( locate( "data", TQString::tqfromLatin1( "konqueror/pics/%1.png" ).tqarg( names[m_corner] ) ) ); - QPixmap &pix = m_corners[m_corner]; + TQPixmap &pix = m_corners[m_corner]; switch ( m_corner ) { @@ -210,7 +210,7 @@ void SvnFileTip::drawContents( QPainter *p ) break; } - QFrame::drawContents( p ); + TQFrame::drawContents( p ); } void SvnFileTip::setFilter( bool enable ) @@ -219,10 +219,10 @@ void SvnFileTip::setFilter( bool enable ) if ( enable ) { kapp->installEventFilter( this ); - QApplication::setGlobalMouseTracking( true ); + TQApplication::setGlobalMouseTracking( true ); } else { - QApplication::setGlobalMouseTracking( false ); + TQApplication::setGlobalMouseTracking( false ); kapp->removeEventFilter( this ); } m_filter = enable; @@ -234,12 +234,12 @@ void SvnFileTip::showTip() hide(); return; } - QString text = m_svnitem->getToolTipText(); + TQString text = m_svnitem->getToolTipText(); if ( text.isEmpty() ) return; m_timer->disconnect( this ); - connect(m_timer, SIGNAL(timeout()), this, SLOT(hideTip())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hideTip())); m_timer->start( 15000, true ); m_textLabel->setText( text ); @@ -269,35 +269,35 @@ void SvnFileTip::startDelayed() oneItem.append( m_svnitem->fileItem() ); m_previewJob = KIO::filePreview( oneItem, 256, 256, 64, 70, true, true, 0); - connect( m_previewJob, SIGNAL( gotPreview( const KFileItem *, const QPixmap & ) ), - this, SLOT( gotPreview( const KFileItem *, const QPixmap & ) ) ); - connect( m_previewJob, SIGNAL( result( KIO::Job * ) ), - this, SLOT( gotPreviewResult() ) ); + connect( m_previewJob, TQT_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ), + this, TQT_SLOT( gotPreview( const KFileItem *, const TQPixmap & ) ) ); + connect( m_previewJob, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( gotPreviewResult() ) ); } m_timer->disconnect( this ); - connect(m_timer, SIGNAL(timeout()), this, SLOT(showTip())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(showTip())); m_timer->start( 400, true ); } -void SvnFileTip::resizeEvent( QResizeEvent* event ) +void SvnFileTip::resizeEvent( TQResizeEvent* event ) { - QFrame::resizeEvent(event); + TQFrame::resizeEvent(event); reposition(); } -bool SvnFileTip::eventFilter( QObject *, QEvent *e ) +bool SvnFileTip::eventFilter( TQObject *, TQEvent *e ) { switch ( e->type() ) { - case QEvent::Leave: - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - case QEvent::KeyPress: - case QEvent::KeyRelease: - case QEvent::FocusIn: - case QEvent::FocusOut: - case QEvent::Wheel: + case TQEvent::Leave: + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + case TQEvent::FocusIn: + case TQEvent::FocusOut: + case TQEvent::Wheel: hideTip(); default: break; } diff --git a/src/svnfrontend/svnfiletip.h b/src/svnfrontend/svnfiletip.h index d63cf97..e275d2d 100644 --- a/src/svnfrontend/svnfiletip.h +++ b/src/svnfrontend/svnfiletip.h @@ -24,24 +24,25 @@ #ifndef SVNFILETIP_H #define SVNFILETIP_H -#include <qframe.h> -#include <qpixmap.h> +#include <tqframe.h> +#include <tqpixmap.h> #include <kio/previewjob.h> class KFileItem; -class QLabel; -class QScrollView; -class QTimer; +class TQLabel; +class TQScrollView; +class TQTimer; class SvnItem; /** @author Rajko Albrecht */ -class SvnFileTip : public QFrame +class SvnFileTip : public TQFrame { Q_OBJECT + TQ_OBJECT public: - SvnFileTip(QScrollView*parent); + SvnFileTip(TQScrollView*tqparent); virtual ~SvnFileTip(); void setPreview(bool on); @@ -57,17 +58,17 @@ public: @param rect the rectangle around which the tip will be shown @param pixmap the pixmap to be shown. If 0, no pixmap is shown */ - void setItem(SvnItem*item, const QRect &rect = QRect(), - const QPixmap *pixmap = 0 ); + void setItem(SvnItem*item, const TQRect &rect = TQRect(), + const TQPixmap *pixmap = 0 ); - virtual bool eventFilter( QObject *, QEvent *e ); + virtual bool eventFilter( TQObject *, TQEvent *e ); protected: - virtual void drawContents( QPainter *p ); - virtual void resizeEvent( QResizeEvent * ); + virtual void drawContents( TQPainter *p ); + virtual void resizeEvent( TQResizeEvent * ); private slots: - void gotPreview( const KFileItem*, const QPixmap& ); + void gotPreview( const KFileItem*, const TQPixmap& ); void gotPreviewResult(); void startDelayed(); @@ -79,19 +80,19 @@ public: void reposition(); - QLabel* m_iconLabel; - QLabel* m_textLabel; + TQLabel* m_iconLabel; + TQLabel* m_textLabel; bool m_on : 1; bool m_preview : 1; // shall the preview icon be shown bool m_filter : 1; - QPixmap m_corners[4]; + TQPixmap m_corners[4]; int m_corner; int m_num; - QScrollView* m_view; + TQScrollView* m_view; SvnItem* m_svnitem; KIO::PreviewJob* m_previewJob; - QRect m_rect; - QTimer* m_timer; + TQRect m_rect; + TQTimer* m_timer; }; #endif diff --git a/src/svnfrontend/svnitem.cpp b/src/svnfrontend/svnitem.cpp index 20133d5..83c6aba 100644 --- a/src/svnfrontend/svnitem.cpp +++ b/src/svnfrontend/svnitem.cpp @@ -36,12 +36,12 @@ #include <kfileitem.h> #include <kdebug.h> -#include <qstring.h> -#include <qfileinfo.h> -#include <qimage.h> -#include <qptrlist.h> -#include <qpainter.h> -#include <qbitmap.h> +#include <tqstring.h> +#include <tqfileinfo.h> +#include <tqimage.h> +#include <tqptrlist.h> +#include <tqpainter.h> +#include <tqbitmap.h> class SvnItem_p:public svn::ref_count { @@ -57,10 +57,10 @@ public: protected: svn::StatusPtr m_Stat; void init(); - QString m_url,m_full,m_short; + TQString m_url,m_full,m_short; KURL m_kdename; - QDateTime m_fullDate; - QString m_infoText; + TQDateTime m_fullDate; + TQString m_infoText; KFileItem*m_fitem; bool isWc; svn::Revision lRev; @@ -68,7 +68,7 @@ protected: }; SvnItem_p::SvnItem_p() - :ref_count(),m_Stat(new svn::Status()) + :ref_count(),m_Stat(new svn::tqStatus()) { init(); } @@ -94,7 +94,7 @@ void SvnItem_p::init() /* dir name possible */ m_full.truncate(m_full.length()-1); } - int p = m_full.findRev("/"); + int p = m_full.tqfindRev("/"); if (p>-1) { ++p; m_short = m_full.right(m_full.length()-p); @@ -103,7 +103,7 @@ void SvnItem_p::init() } m_url = m_Stat->entry().url(); m_fullDate = svn::DateTime(m_Stat->entry().cmtDate()); - m_infoText = QString::null; + m_infoText = TQString(); m_fitem = 0; } @@ -125,15 +125,15 @@ KMimeType::Ptr SvnItem_p::mimeType(bool dir) const KURL& SvnItem_p::kdeName(const svn::Revision&r) { isWc = !svn::Url::isValid(m_Stat->path()); - QString name; + TQString name; if (!(r==lRev)||m_kdename.isEmpty()) { lRev=r; if (!isWc) { m_kdename = m_Stat->entry().url(); - QString proto; + TQString proto; proto = helpers::KTranslateUrl::makeKdeUrl(m_kdename.protocol()); m_kdename.setProtocol(proto); - QString revstr= lRev.toString(); + TQString revstr= lRev.toString(); if (revstr.length()>0) { m_kdename.setQuery("?rev="+revstr); } @@ -176,17 +176,17 @@ void SvnItem::setStat(const svn::StatusPtr&aStat) p_Item = new SvnItem_p(aStat); } -const QString&SvnItem::fullName()const +const TQString&SvnItem::fullName()const { return (p_Item->m_full); } -const QString&SvnItem::shortName()const +const TQString&SvnItem::shortName()const { return (p_Item->m_short); } -const QString&SvnItem::Url()const +const TQString&SvnItem::Url()const { return (p_Item->m_url); } @@ -197,31 +197,31 @@ bool SvnItem::isDir()const return p_Item->m_Stat->entry().kind()==svn_node_dir; } /* must be a local file */ - QFileInfo f(fullName()); + TQFileInfo f(fullName()); return f.isDir(); } -const QDateTime&SvnItem::fullDate()const +const TQDateTime&SvnItem::fullDate()const { return (p_Item->m_fullDate); } -QPixmap SvnItem::internalTransform(const QPixmap&first,int size) +TQPixmap SvnItem::internalTransform(const TQPixmap&first,int size) { - QPixmap result(size,size); + TQPixmap result(size,size); if (result.isNull()) { return result; } - const QBitmap * b = first.mask(); - result.fill(Qt::white); + const TQBitmap * b = first.tqmask(); + result.fill(TQt::white); if (b) { result.setMask(*b); } else { - QBitmap m(size,size,true); - m.fill(Qt::white); + TQBitmap m(size,size,true); + m.fill(TQt::white); result.setMask(m); } - QPainter pa; + TQPainter pa; pa.begin(&result); int w = first.width()>size?size:first.width(); int h = first.height()>size?size:first.height(); @@ -230,19 +230,19 @@ QPixmap SvnItem::internalTransform(const QPixmap&first,int size) return result; } -QPixmap SvnItem::getPixmap(const QPixmap&_p,int size,bool overlay) +TQPixmap SvnItem::getPixmap(const TQPixmap&_p,int size,bool overlay) { if (!isVersioned()) { m_bgColor = NOTVERSIONED; } else if (isRealVersioned()) { SvnActions*wrap = getWrapper(); bool mod = false; - QPixmap p2 = QPixmap(); - if (p_Item->m_Stat->textStatus()==svn_wc_status_conflicted) { + TQPixmap p2 = TQPixmap(); + if (p_Item->m_Stat->texttqStatus()==svn_wc_status_conflicted) { m_bgColor = CONFLICT; if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvnconflicted",KIcon::Desktop,size); - } else if (p_Item->m_Stat->textStatus ()==svn_wc_status_missing) { + } else if (p_Item->m_Stat->texttqStatus ()==svn_wc_status_missing) { m_bgColor = MISSING; } else if (isLocked()||wrap->checkReposLockCache(fullName())) { if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvnlocked",KIcon::Desktop,size); @@ -253,10 +253,10 @@ QPixmap SvnItem::getPixmap(const QPixmap&_p,int size,bool overlay) } else if (wrap->isUpdated(p_Item->m_Stat->path())) { if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvnupdates",KIcon::Desktop,size); m_bgColor = UPDATES; - } else if (p_Item->m_Stat->textStatus()==svn_wc_status_deleted) { + } else if (p_Item->m_Stat->texttqStatus()==svn_wc_status_deleted) { if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvndeleted",KIcon::Desktop,size); m_bgColor = DELETED; - } else if (p_Item->m_Stat->textStatus()==svn_wc_status_added ) { + } else if (p_Item->m_Stat->texttqStatus()==svn_wc_status_added ) { if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvnadded",KIcon::Desktop,size); m_bgColor = ADDED; } else if (isModified()) { @@ -280,15 +280,15 @@ QPixmap SvnItem::getPixmap(const QPixmap&_p,int size,bool overlay) if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvnmodified",KIcon::Desktop,size); } if (!p2.isNull()) { - QPixmap p; + TQPixmap p; if (_p.width()!=size || _p.height()!=size) { p = internalTransform(_p,size); } else { p = _p; } m_overlaycolor = true; - QImage i1; i1 = p; - QImage i2;i2 = p2; + TQImage i1; i1 = p; + TQImage i2;i2 = p2; KIconEffect::overlay(i1,i2); p = i1; @@ -298,9 +298,9 @@ QPixmap SvnItem::getPixmap(const QPixmap&_p,int size,bool overlay) return _p; } -QPixmap SvnItem::getPixmap(int size,bool overlay) +TQPixmap SvnItem::getPixmap(int size,bool overlay) { - QPixmap p; + TQPixmap p; m_overlaycolor = false; m_bgColor = NONE; /* yes - different way to "isDir" above 'cause here we try to use the @@ -311,11 +311,11 @@ QPixmap SvnItem::getPixmap(int size,bool overlay) p = p_Item->mimeType(isDir())->pixmap(KIcon::Desktop,size,KIcon::DefaultState); if (isLocked()) { m_bgColor = LOCKED; - QPixmap p2; + TQPixmap p2; if (overlay) p2 = kdesvnPartFactory::instance()->iconLoader()->loadIcon("kdesvnlocked",KIcon::Desktop,size); if (!p2.isNull()) { - QImage i1; i1 = p; - QImage i2; i2 = p2; + TQImage i1; i1 = p; + TQImage i2; i2 = p2; KIconEffect::overlay(i1,i2); p = i1; } @@ -347,7 +347,7 @@ bool SvnItem::isValid()const if (isVersioned()) { return true; } - QFileInfo f(fullName()); + TQFileInfo f(fullName()); return f.exists(); } @@ -358,26 +358,26 @@ bool SvnItem::isRealVersioned()const bool SvnItem::isIgnored()const { - return p_Item->m_Stat->textStatus()==svn_wc_status_ignored; + return p_Item->m_Stat->texttqStatus()==svn_wc_status_ignored; } bool SvnItem::isRemoteAdded()const { return getWrapper()->isUpdated(p_Item->m_Stat->path()) && - p_Item->m_Stat->validReposStatus()&&!p_Item->m_Stat->validLocalStatus(); + p_Item->m_Stat->validRepostqStatus()&&!p_Item->m_Stat->validLocaltqStatus(); } -QString SvnItem::infoText()const +TQString SvnItem::infoText()const { - QString info_text = ""; + TQString info_text = ""; if (getWrapper()->isUpdated(p_Item->m_Stat->path())) { - if (p_Item->m_Stat->validReposStatus()&&!p_Item->m_Stat->validLocalStatus()) { + if (p_Item->m_Stat->validRepostqStatus()&&!p_Item->m_Stat->validLocaltqStatus()) { info_text = i18n("Added in repository"); } else { info_text = i18n("Needs update"); } } else { - switch(p_Item->m_Stat->textStatus ()) { + switch(p_Item->m_Stat->texttqStatus ()) { case svn_wc_status_modified: info_text = i18n("Locally modified"); break; @@ -412,7 +412,7 @@ QString SvnItem::infoText()const break; } if (info_text.isEmpty()) { - switch (p_Item->m_Stat->propStatus ()) { + switch (p_Item->m_Stat->proptqStatus ()) { case svn_wc_status_modified: info_text = i18n("Property modified"); break; @@ -424,7 +424,7 @@ QString SvnItem::infoText()const return info_text; } -QString SvnItem::cmtAuthor()const +TQString SvnItem::cmtAuthor()const { return p_Item->m_Stat->entry().cmtAuthor(); } @@ -439,12 +439,12 @@ bool SvnItem::isLocked()const return p_Item->m_Stat->entry().lockEntry().Locked(); } -QString SvnItem::lockOwner()const +TQString SvnItem::lockOwner()const { if (p_Item->m_Stat->entry().lockEntry().Locked()) { return p_Item->m_Stat->entry().lockEntry().Owner(); } - svn::SharedPointer<svn::Status> tmp; + svn::SharedPointer<svn::tqStatus> tmp; if (getWrapper()->checkReposLockCache(fullName(),tmp) && tmp) { return tmp->lockEntry().Owner(); } @@ -457,8 +457,8 @@ QString SvnItem::lockOwner()const */ bool SvnItem::isModified()const { - return p_Item->m_Stat->textStatus ()==svn_wc_status_modified||p_Item->m_Stat->propStatus()==svn_wc_status_modified - ||p_Item->m_Stat->textStatus ()==svn_wc_status_replaced; + return p_Item->m_Stat->texttqStatus ()==svn_wc_status_modified||p_Item->m_Stat->proptqStatus()==svn_wc_status_modified + ||p_Item->m_Stat->texttqStatus ()==svn_wc_status_replaced; } const svn::StatusPtr& SvnItem::stat()const @@ -472,28 +472,28 @@ const svn::StatusPtr& SvnItem::stat()const */ bool SvnItem::isNormal()const { - return p_Item->m_Stat->textStatus()==svn_wc_status_normal; + return p_Item->m_Stat->texttqStatus()==svn_wc_status_normal; } bool SvnItem::isMissing()const { - return p_Item->m_Stat->textStatus()==svn_wc_status_missing; + return p_Item->m_Stat->texttqStatus()==svn_wc_status_missing; } bool SvnItem::isDeleted()const { - return p_Item->m_Stat->textStatus()==svn_wc_status_deleted; + return p_Item->m_Stat->texttqStatus()==svn_wc_status_deleted; } bool SvnItem::isConflicted()const { - return p_Item->m_Stat->textStatus()==svn_wc_status_conflicted; + return p_Item->m_Stat->texttqStatus()==svn_wc_status_conflicted; } /*! \fn SvnItem::getToolTipText() */ -const QString& SvnItem::getToolTipText() +const TQString& SvnItem::getToolTipText() { if (p_Item->m_infoText.isNull()) { if (isRealVersioned() && !p_Item->m_Stat->entry().url().isEmpty()) { @@ -508,7 +508,7 @@ const QString& SvnItem::getToolTipText() /* local */ } if (wrap) { - QPtrList<SvnItem> lst; lst.append(this); + TQPtrList<SvnItem> lst; lst.append(this); p_Item->m_infoText = wrap->getInfo(lst,rev,peg,false,false); if (p_Item->m_fitem) p_Item->m_infoText+=p_Item->m_fitem->getToolTipText(0); } diff --git a/src/svnfrontend/svnitem.h b/src/svnfrontend/svnitem.h index ac90172..68dd328 100644 --- a/src/svnfrontend/svnitem.h +++ b/src/svnfrontend/svnitem.h @@ -24,10 +24,10 @@ #include "src/svnqt/smart_pointer.hpp" #include "src/svnqt/svnqttypes.hpp" #include <kmimetype.h> -#include <qstring.h> -#include <qdatetime.h> -#include <qpixmap.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqpixmap.h> +#include <tqptrlist.h> class FileListViewItem; class SvnItem_p; @@ -47,12 +47,12 @@ public: SvnItem(const svn::StatusPtr&); virtual ~SvnItem(); - virtual const QString&fullName()const; - virtual const QString&shortName()const; - virtual const QString&Url()const; + virtual const TQString&fullName()const; + virtual const TQString&shortName()const; + virtual const TQString&Url()const; virtual const KURL&kdeName(const svn::Revision&); virtual KMimeType::Ptr mimeType(); - virtual const QDateTime&fullDate()const; + virtual const TQDateTime&fullDate()const; virtual bool isDir()const; virtual bool isVersioned()const; virtual bool isConflicted()const; @@ -60,18 +60,18 @@ public: virtual bool isRealVersioned()const; virtual bool isIgnored()const; virtual bool isRemoteAdded()const; - virtual QString infoText()const; - virtual QString cmtAuthor()const; + virtual TQString infoText()const; + virtual TQString cmtAuthor()const; virtual long int cmtRev()const; virtual bool isLocked()const; - virtual QString lockOwner()const; - virtual QString getParentDir()const=0; + virtual TQString lockOwner()const; + virtual TQString getParentDir()const=0; virtual SvnItem* getParentItem()const=0; virtual const svn::Revision&correctPeg()const=0; - virtual void refreshStatus(bool childs=false,QPtrList<SvnItem> *exclude = 0,bool depsonly=false)=0; + virtual void refreshtqStatus(bool childs=false,TQPtrList<SvnItem> *exclude = 0,bool depsonly=false)=0; - QPixmap getPixmap(int size,bool overlay=true); - QPixmap getPixmap(const QPixmap&,int size,bool overlay=true); + TQPixmap getPixmap(int size,bool overlay=true); + TQPixmap getPixmap(const TQPixmap&,int size,bool overlay=true); virtual FileListViewItem*fItem(){return 0;} virtual void setStat(const svn::StatusPtr&); @@ -80,7 +80,7 @@ public: bool isNormal()const; bool isMissing()const; bool isDeleted()const; - const QString& getToolTipText(); + const TQString& getToolTipText(); KFileItem*fileItem(); protected: @@ -101,11 +101,11 @@ protected: svn::smart_pointer<SvnItem_p> p_Item; virtual SvnActions*getWrapper()const = 0; - static QPixmap internalTransform(const QPixmap&,int size); + static TQPixmap internalTransform(const TQPixmap&,int size); }; -typedef QPtrList<SvnItem> SvnItemList; -typedef QPtrListIterator<SvnItem> SvnItemListIterator; +typedef TQPtrList<SvnItem> SvnItemList; +typedef TQPtrListIterator<SvnItem> SvnItemListIterator; #endif diff --git a/src/svnfrontend/svnlogdlg.ui b/src/svnfrontend/svnlogdlg.ui index 85038e2..37d2819 100644 --- a/src/svnfrontend/svnlogdlg.ui +++ b/src/svnfrontend/svnlogdlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SvnLogDialogData</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>LogDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> @@ -48,7 +48,7 @@ <cstring>m_endRevButton</cstring> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>endLabel</cstring> </property> @@ -56,7 +56,7 @@ <string>End revision</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>startLabel</cstring> </property> @@ -81,7 +81,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>107</width> <height>20</height> @@ -90,7 +90,7 @@ </spacer> </hbox> </widget> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>m_centralSplitter</cstring> </property> @@ -186,7 +186,7 @@ <string>Select in first column revisions for diff</string> </property> </widget> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>m_rightSplitter</cstring> </property> @@ -244,9 +244,9 @@ </widget> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -321,7 +321,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>42</width> <height>20</height> @@ -383,15 +383,15 @@ </connection> <connection> <sender>m_LogView</sender> - <signal>selectionChanged(QListViewItem*)</signal> + <signal>selectionChanged(TQListViewItem*)</signal> <receiver>LogDialog</receiver> - <slot>slotSelectionChanged(QListViewItem*)</slot> + <slot>slotSelectionChanged(TQListViewItem*)</slot> </connection> <connection> <sender>m_LogView</sender> - <signal>mouseButtonClicked(int,QListViewItem*,const QPoint&,int)</signal> + <signal>mouseButtonClicked(int,TQListViewItem*,const QPoint&,int)</signal> <receiver>LogDialog</receiver> - <slot>slotItemClicked(int,QListViewItem*,const QPoint&,int)</slot> + <slot>slotItemClicked(int,TQListViewItem*,const QPoint&,int)</slot> </connection> <connection> <sender>m_DispSpecDiff</sender> @@ -419,15 +419,15 @@ </connection> <connection> <sender>m_ChangedList</sender> - <signal>contextMenuRequested(QListViewItem*,const QPoint&,int)</signal> + <signal>contextMenuRequested(TQListViewItem*,const QPoint&,int)</signal> <receiver>LogDialog</receiver> - <slot>slotSingleContext(QListViewItem*,const QPoint&,int)</slot> + <slot>slotSingleContext(TQListViewItem*,const QPoint&,int)</slot> </connection> <connection> <sender>m_ChangedList</sender> - <signal>doubleClicked(QListViewItem*)</signal> + <signal>doubleClicked(TQListViewItem*)</signal> <receiver>LogDialog</receiver> - <slot>slotSingleDoubleClicked(QListViewItem*)</slot> + <slot>slotSingleDoubleClicked(TQListViewItem*)</slot> </connection> <connection> <sender>m_startRevButton</sender> @@ -448,21 +448,21 @@ <slot>slotGetLogs()</slot> </connection> </connections> -<slots> - <slot access="protected">slotSelectionChanged(QListViewItem*)</slot> - <slot access="protected">slotItemChanged(QListViewItem*)</slot> +<Q_SLOTS> + <slot access="protected">slotSelectionChanged(TQListViewItem*)</slot> + <slot access="protected">slotItemChanged(TQListViewItem*)</slot> <slot access="protected">slotDispPrevious()</slot> - <slot access="protected">slotItemClicked(int,QListViewItem*,const QPoint &,int)</slot> + <slot access="protected">slotItemClicked(int,TQListViewItem*,const QPoint &,int)</slot> <slot access="protected">slotDispSelected()</slot> <slot access="protected">slotListEntries()</slot> <slot access="protected">slotBlameItem()</slot> <slot access="protected">slotEntriesSelectionChanged()</slot> - <slot access="protected">slotSingleContext(QListViewItem*, const QPoint &, int)</slot> - <slot access="protected">slotSingleDoubleClicked(QListViewItem*)</slot> + <slot access="protected">slotSingleContext(TQListViewItem*, const QPoint &, int)</slot> + <slot access="protected">slotSingleDoubleClicked(TQListViewItem*)</slot> <slot access="protected">slotRevisionSelected()</slot> <slot access="protected">slotGetLogs()</slot> -</slots> -<layoutdefaults spacing="2" margin="2"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="2" margin="2"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>revisionbuttonimpl.h</includehint> diff --git a/src/svnfrontend/svnlogdlgimp.cpp b/src/svnfrontend/svnlogdlgimp.cpp index 9919ab7..6bc1a23 100644 --- a/src/svnfrontend/svnlogdlgimp.cpp +++ b/src/svnfrontend/svnlogdlgimp.cpp @@ -35,11 +35,11 @@ #include <ktabwidget.h> #include <kdebug.h> -#include <qdatetime.h> -#include <qheader.h> -#include <qsplitter.h> -#include <qtextstream.h> -#include <qpopupmenu.h> +#include <tqdatetime.h> +#include <tqheader.h> +#include <tqsplitter.h> +#include <tqtextstream.h> +#include <tqpopupmenu.h> #include <list> @@ -49,26 +49,26 @@ const char* SvnLogDlgImp::groupName = "log_dialog_size"; class LogListViewItem:public KListViewItem { public: - LogListViewItem (KListView *parent,const svn::LogEntry&); - virtual int compare( QListViewItem* i, int col, bool ascending ) const; + LogListViewItem (KListView *tqparent,const svn::LogEntry&); + virtual int compare( TQListViewItem* i, int col, bool ascending ) const; static const int COL_MARKER,COL_REV,COL_AUTHOR,COL_DATE,COL_MSG; - const QString&message()const; + const TQString&message()const; svn_revnum_t rev()const{return _revision;} void showChangedEntries(KListView*); unsigned int numChangedEntries(){return changedPaths.count();} void setChangedEntries(const svn::LogEntry&); - void setRealName(const QString&_n){_realName=_n;} - const QString&realName()const{return _realName;} + void setRealName(const TQString&_n){_realName=_n;} + const TQString&realName()const{return _realName;} - bool copiedFrom(QString&_n,long&rev)const; - static bool isParent(const QString&_par,const QString&tar); + bool copiedFrom(TQString&_n,long&rev)const; + static bool isParent(const TQString&_par,const TQString&tar); protected: svn_revnum_t _revision; - QDateTime fullDate; - QString _message,_realName; - QValueList<svn::LogChangePathEntry> changedPaths; + TQDateTime fullDate; + TQString _message,_realName; + TQValueList<svn::LogChangePathEntry> changedPaths; }; const int LogListViewItem::COL_MARKER = 0; @@ -80,31 +80,31 @@ const int LogListViewItem::COL_MSG = 4; class LogChangePathItem:public KListViewItem { public: - LogChangePathItem(KListView*parent,const svn::LogChangePathEntry&); + LogChangePathItem(KListView*tqparent,const svn::LogChangePathEntry&); virtual ~LogChangePathItem(){} - QChar action() const{return _action;} - const QString& path() const{return _path;} - const QString& source() const{return _source;} + TQChar action() const{return _action;} + const TQString& path() const{return _path;} + const TQString& source() const{return _source;} svn_revnum_t revision() const{ return _revision;} protected: - QString _path,_source; - QChar _action; + TQString _path,_source; + TQChar _action; svn_revnum_t _revision; }; -LogListViewItem::LogListViewItem(KListView*_parent,const svn::LogEntry&_entry) - : KListViewItem(_parent),_realName(QString::null) +LogListViewItem::LogListViewItem(KListView*_tqparent,const svn::LogEntry&_entry) + : KListViewItem(_tqparent),_realName(TQString()) { setMultiLinesEnabled(false); _revision=_entry.revision; fullDate=svn::DateTime(_entry.date); - setText(COL_REV,QString("%1").arg(_revision)); + setText(COL_REV,TQString("%1").tqarg(_revision)); setText(COL_AUTHOR,_entry.author); setText(COL_DATE,helpers::sub2qt::apr_time2qtString(_entry.date)); _message = _entry.message; - QStringList sp = QStringList::split("\n",_message); + TQStringList sp = TQStringList::split("\n",_message); if (sp.count()==0) { setText(COL_MSG,_message); } else { @@ -114,12 +114,12 @@ LogListViewItem::LogListViewItem(KListView*_parent,const svn::LogEntry&_entry) //setText(COL_MSG,_entry.message.c_str()); } -const QString&LogListViewItem::message()const +const TQString&LogListViewItem::message()const { return _message; } -int LogListViewItem::compare( QListViewItem* item, int col, bool ) const +int LogListViewItem::compare( TQListViewItem* item, int col, bool ) const { LogListViewItem* k = static_cast<LogListViewItem*>( item ); if (col==COL_REV) { @@ -143,10 +143,10 @@ void LogListViewItem::showChangedEntries(KListView*where) } } -LogChangePathItem::LogChangePathItem(KListView*parent,const svn::LogChangePathEntry&e) - :KListViewItem(parent) +LogChangePathItem::LogChangePathItem(KListView*tqparent,const svn::LogChangePathEntry&e) + :KListViewItem(tqparent) { - _action = QChar(e.action); + _action = TQChar(e.action); setText(0,_action); _path = e.path; setText(1,e.path); @@ -154,7 +154,7 @@ LogChangePathItem::LogChangePathItem(KListView*parent,const svn::LogChangePathEn _source = e.copyFromPath; if (e.copyFromRevision>-1) { - setText(2,i18n("%1 at revision %2").arg(e.copyFromPath).arg(e.copyFromRevision)); + setText(2,i18n("%1 at revision %2").tqarg(e.copyFromPath).tqarg(e.copyFromRevision)); } } @@ -163,15 +163,15 @@ void LogListViewItem::setChangedEntries(const svn::LogEntry&_entry) changedPaths = _entry.changedPaths; } -bool LogListViewItem::copiedFrom(QString&_n,long&_rev)const +bool LogListViewItem::copiedFrom(TQString&_n,long&_rev)const { for (unsigned i = 0; i < changedPaths.count();++i) { if (changedPaths[i].action=='A' && !changedPaths[i].copyFromPath.isEmpty() && isParent(changedPaths[i].path,_realName)) { kdDebug()<<_realName<< " - " << changedPaths[i].path << endl; - QString tmpPath = _realName; - QString r = _realName.mid(changedPaths[i].path.length()); + TQString tmpPath = _realName; + TQString r = _realName.mid(changedPaths[i].path.length()); _n=changedPaths[i].copyFromPath; _n+=r; _rev = changedPaths[i].copyFromRevision; @@ -183,18 +183,18 @@ bool LogListViewItem::copiedFrom(QString&_n,long&_rev)const return false; } -bool LogListViewItem::isParent(const QString&_par,const QString&tar) +bool LogListViewItem::isParent(const TQString&_par,const TQString&tar) { if (_par==tar) return true; - QString par = _par+(_par.endsWith("/")?"":"/"); + TQString par = _par+(_par.endsWith("/")?"":"/"); return tar.startsWith(par); } -SvnLogDlgImp::SvnLogDlgImp(SvnActions*ac,QWidget *parent, const char *name,bool modal) - :SvnLogDialogData(parent, name,modal),_name("") +SvnLogDlgImp::SvnLogDlgImp(SvnActions*ac,TQWidget *tqparent, const char *name,bool modal) + :SvnLogDialogData(tqparent, name,modal),_name("") { m_LogView->setSorting(LogListViewItem::COL_REV); - m_LogView->setSortOrder(Qt::Descending); + m_LogView->setSortOrder(TQt::Descending); resize(dialogSize()); m_ControlKeyDown = false; m_first = 0; @@ -207,15 +207,15 @@ SvnLogDlgImp::SvnLogDlgImp(SvnActions*ac,QWidget *parent, const char *name,bool } m_Actions = ac; KConfigGroup cs(Kdesvnsettings::self()->config(), groupName); - QString t1 = cs.readEntry("logsplitter",QString::null); + TQString t1 = cs.readEntry("logsplitter",TQString()); if (!t1.isEmpty()) { - QTextStream st2(&t1,IO_ReadOnly); + TQTextStream st2(&t1,IO_ReadOnly); st2 >> *m_centralSplitter; } - t1 = cs.readEntry("right_logsplitter",QString::null); + t1 = cs.readEntry("right_logsplitter",TQString()); if (!t1.isEmpty()) { if (cs.readBoolEntry("laststate",false)==m_ChangedList->isHidden()) { - QTextStream st2(&t1,IO_ReadOnly); + TQTextStream st2(&t1,IO_ReadOnly); st2 >> *m_rightSplitter; } } @@ -223,10 +223,10 @@ SvnLogDlgImp::SvnLogDlgImp(SvnActions*ac,QWidget *parent, const char *name,bool SvnLogDlgImp::~SvnLogDlgImp() { - QString t1,t2; - QTextStream st1(&t1,IO_WriteOnly); + TQString t1,t2; + TQTextStream st1(&t1,IO_WriteOnly); st1 << *m_rightSplitter; - QTextStream st2(&t2,IO_WriteOnly); + TQTextStream st2(&t2,IO_WriteOnly); st2 << *m_centralSplitter; KConfigGroup cs(Kdesvnsettings::self()->config(), groupName); cs.writeEntry("right_logsplitter",t1); @@ -234,7 +234,7 @@ SvnLogDlgImp::~SvnLogDlgImp() cs.writeEntry("laststate",m_ChangedList->isHidden()); } -void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log,const QString & what,const QString&root,const svn::Revision&peg,const QString&pegUrl) +void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log,const TQString & what,const TQString&root,const svn::Revision&peg,const TQString&pegUrl) { m_peg = peg; m_PegUrl = pegUrl; @@ -242,12 +242,12 @@ void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log,con m_startRevButton->setNoWorking(m_PegUrl.isUrl()); m_endRevButton->setNoWorking(m_PegUrl.isUrl()); if (!m_PegUrl.isUrl() || Kdesvnsettings::remote_special_properties()) { - QString s = m_Actions->searchProperty(_bugurl,"bugtraq:url",pegUrl,peg,true); + TQString s = m_Actions->searchProperty(_bugurl,"bugtraq:url",pegUrl,peg,true); if (!s.isEmpty() ){ - QString reg; + TQString reg; s = m_Actions->searchProperty(reg,"bugtraq:logregex",pegUrl,peg,true); if (!s.isNull() && !reg.isEmpty()) { - QStringList s1 = QStringList::split("\n",reg); + TQStringList s1 = TQStringList::split("\n",reg); if (s1.size()>0) { _r1.setPattern(s1[0]); if (s1.size()>1) { @@ -262,7 +262,7 @@ void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log,con m_Entries = _log; kdDebug()<<"What: "<<what << endl; if (!what.isEmpty()){ - setCaption(i18n("SVN Log of %1").arg(what)); + setCaption(i18n("SVN Log of %1").tqarg(what)); } else { setCaption(i18n("SVN Log")); } @@ -280,8 +280,8 @@ void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log) } svn::LogEntriesMap::const_iterator lit; LogListViewItem * item; - QMap<long int,QString> namesMap; - QMap<long int,LogListViewItem*> itemMap; + TQMap<long int,TQString> namesMap; + TQMap<long int,LogListViewItem*> itemMap; long min,max; min = max = -1; for (lit=_log->begin();lit!=_log->end();++lit) { @@ -296,12 +296,12 @@ void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log) m_startRevButton->setRevision(max); m_endRevButton->setRevision(min); m_LogView->setSelected(m_LogView->firstChild(),true); - QString bef = _name; + TQString bef = _name; long rev; // YES! I'd checked it: this is much faster than getting list of keys // and iterating over that list! for (long c=max;c>-1;--c) { - if (!itemMap.contains(c)) { + if (!itemMap.tqcontains(c)) { continue; } if (itemMap[c]->realName().isEmpty()) { @@ -311,15 +311,15 @@ void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log) } } -QString SvnLogDlgImp::genReplace(const QString&r1match) +TQString SvnLogDlgImp::genReplace(const TQString&r1match) { - static QString anf("<a href=\""); - static QString mid("\">"); - static QString end("</a>"); - QString res(""); + static TQString anf("<a href=\""); + static TQString mid("\">"); + static TQString end("</a>"); + TQString res(""); if (_r2.pattern().length()<1) { res = _bugurl; - res.replace("%BUGID%",_r1.cap(1)); + res.tqreplace("%BUGID%",_r1.cap(1)); res = anf+res+mid+r1match+end; return res; } @@ -327,32 +327,32 @@ QString SvnLogDlgImp::genReplace(const QString&r1match) int count=0; int oldpos; - kdDebug()<<"Search second pattern: "<<_r2.pattern()<<" in "<<r1match<<endl; + kdDebug()<<"Search second pattern: "<<TQString(_r2.pattern())<<" in "<<r1match<<endl; while (pos > -1) { oldpos = pos+count; - pos = r1match.find(_r2,pos+count); + pos = r1match.tqfind(_r2,pos+count); if (pos==-1) { break; } count = _r2.matchedLength(); res+=r1match.mid(oldpos,pos-oldpos); - QString sub = r1match.mid(pos,count); - QString _url = _bugurl; - _url.replace("%BUGID%",sub); + TQString sub = r1match.mid(pos,count); + TQString _url = _bugurl; + _url.tqreplace("%BUGID%",sub); res+=anf+_url+mid+sub+end; } res+=r1match.mid(oldpos); return res; } -void SvnLogDlgImp::replaceBugids(QString&msg) +void SvnLogDlgImp::replaceBugids(TQString&msg) { - msg = QStyleSheet::convertFromPlainText(msg); + msg = TQStyleSheet::convertFromPlainText(msg); if (!_r1.isValid() || _r1.pattern().length()<1 || _bugurl.isEmpty()) { return; } - kdDebug()<<"Try match "<< _r1.pattern() << endl; + kdDebug()<<"Try match "<< TQString(_r1.pattern()) << endl; int pos = 0; int count = 0; @@ -360,13 +360,13 @@ void SvnLogDlgImp::replaceBugids(QString&msg) count = _r1.matchedLength(); while (pos>-1) { - kdDebug()<<"Found at "<<pos << " length "<<count << " with " << _r1.pattern()<< endl; - QString s1 = msg.mid(pos,count); + kdDebug()<<"Found at "<<pos << " length "<<count << " with " << TQString(_r1.pattern())<< endl; + TQString s1 = msg.mid(pos,count); kdDebug()<<"Sub: "<<s1 << endl; - kdDebug()<<_r1.cap(1) << endl; - QString rep = genReplace(s1); + kdDebug()<<TQString(_r1.cap(1)) << endl; + TQString rep = genReplace(s1); kdDebug()<<"Replace with "<<rep << endl; - msg = msg.replace(pos,count,rep); + msg = msg.tqreplace(pos,count,rep); pos = _r1.search(msg,pos+rep.length()); count = _r1.matchedLength(); @@ -374,9 +374,9 @@ void SvnLogDlgImp::replaceBugids(QString&msg) } /*! - \fn SvnLogDlgImp::slotItemClicked(QListViewItem*) + \fn SvnLogDlgImp::slotItemClicked(TQListViewItem*) */ -void SvnLogDlgImp::slotSelectionChanged(QListViewItem*_it) +void SvnLogDlgImp::slotSelectionChanged(TQListViewItem*_it) { if (!_it) { m_DispPrevButton->setEnabled(false); @@ -397,7 +397,7 @@ void SvnLogDlgImp::slotSelectionChanged(QListViewItem*_it) m_ChangedList->show(); } } - QString msg = k->message(); + TQString msg = k->message(); replaceBugids(msg); m_LogDisplay->setText(msg); @@ -428,7 +428,7 @@ void SvnLogDlgImp::slotDispPrevious() m_DispPrevButton->setEnabled(false); return; } - QString s,e; + TQString s,e; s = _base+k->realName(); e = _base+p->realName(); emit makeDiff(e,p->rev(),s,k->rev(),this); @@ -440,30 +440,30 @@ void SvnLogDlgImp::slotDispPrevious() */ void SvnLogDlgImp::saveSize() { - int scnum = QApplication::desktop()->screenNumber(parentWidget()); - QRect desk = QApplication::desktop()->screenGeometry(scnum); + int scnum = TQApplication::desktop()->screenNumber(tqparentWidget()); + TQRect desk = TQApplication::desktop()->screenGeometry(scnum); KConfigGroupSaver cs(Kdesvnsettings::self()->config(), groupName); - QSize sizeToSave = size(); - Kdesvnsettings::self()->config()->writeEntry( QString::fromLatin1("Width %1").arg( desk.width()), - QString::number( sizeToSave.width()), true, false); - Kdesvnsettings::self()->config()->writeEntry( QString::fromLatin1("Height %1").arg( desk.height()), - QString::number( sizeToSave.height()), true, false); + TQSize sizeToSave = size(); + Kdesvnsettings::self()->config()->writeEntry( TQString::tqfromLatin1("Width %1").tqarg( desk.width()), + TQString::number( sizeToSave.width()), true, false); + Kdesvnsettings::self()->config()->writeEntry( TQString::tqfromLatin1("Height %1").tqarg( desk.height()), + TQString::number( sizeToSave.height()), true, false); } -QSize SvnLogDlgImp::dialogSize() +TQSize SvnLogDlgImp::dialogSize() { int w, h; - int scnum = QApplication::desktop()->screenNumber(parentWidget()); - QRect desk = QApplication::desktop()->screenGeometry(scnum); - w = sizeHint().width(); - h = sizeHint().height(); + int scnum = TQApplication::desktop()->screenNumber(tqparentWidget()); + TQRect desk = TQApplication::desktop()->screenGeometry(scnum); + w = tqsizeHint().width(); + h = tqsizeHint().height(); KConfigGroupSaver cs(Kdesvnsettings::self()->config(), groupName); - w = Kdesvnsettings::self()->config()->readNumEntry( QString::fromLatin1("Width %1").arg( desk.width()), w ); - h = Kdesvnsettings::self()->config()->readNumEntry( QString::fromLatin1("Height %1").arg( desk.height()), h ); - return( QSize( w, h ) ); + w = Kdesvnsettings::self()->config()->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg( desk.width()), w ); + h = Kdesvnsettings::self()->config()->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg( desk.height()), h ); + return( TQSize( w, h ) ); } -void SvnLogDlgImp::slotItemClicked(int button,QListViewItem*item,const QPoint &,int) +void SvnLogDlgImp::slotItemClicked(int button,TQListViewItem*item,const TQPoint &,int) { if (!item) { m_ChangedList->clear(); @@ -513,10 +513,10 @@ void SvnLogDlgImp::slotDispSelected() emit makeDiff(_base+m_first->realName(),m_first->rev(),_base+m_second->realName(),m_second->rev(),this); } -bool SvnLogDlgImp::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const QString&what,const svn::Revision&peg,QString&root) +bool SvnLogDlgImp::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQString&what,const svn::Revision&peg,TQString&root) { root = _base; - if (m_Entries->find(r.revnum()) == m_Entries->end()) + if (m_Entries->tqfind(r.revnum()) == m_Entries->end()) { return m_Actions->getSingleLog(t,r,what,peg,root); } @@ -554,7 +554,7 @@ void SvnLogDlgImp::slotListEntries() buttonListFiles->setEnabled(false); } -void SvnLogDlgImp::keyPressEvent (QKeyEvent * e) +void SvnLogDlgImp::keyPressEvent (TQKeyEvent * e) { if (!e) return; if (e->text().isEmpty()&&e->key()==Key_Control) { @@ -563,10 +563,10 @@ void SvnLogDlgImp::keyPressEvent (QKeyEvent * e) SvnLogDialogData::keyPressEvent(e); } -void SvnLogDlgImp::keyReleaseEvent (QKeyEvent * e) +void SvnLogDlgImp::keyReleaseEvent (TQKeyEvent * e) { if (!e) return; - if (e->text().isEmpty()&&e->key()==Qt::Key_Control) { + if (e->text().isEmpty()&&e->key()==TQt::Key_Control) { m_ControlKeyDown = false; } SvnLogDialogData::keyReleaseEvent(e); @@ -580,14 +580,14 @@ void SvnLogDlgImp::slotBlameItem() return; } svn::Revision start(svn::Revision::START); - m_Actions->makeBlame(start,k->rev(),_base+k->realName(),kapp->activeModalWidget(),k->rev(),this); + m_Actions->makeBlame(start,k->rev(),_base+k->realName(),TQT_TQWIDGET(kapp->activeModalWidget()),k->rev(),this); } void SvnLogDlgImp::slotEntriesSelectionChanged() { } -void SvnLogDlgImp::slotSingleContext(QListViewItem*_item, const QPoint & e, int) +void SvnLogDlgImp::slotSingleContext(TQListViewItem*_item, const TQPoint & e, int) { if (!_item) { @@ -600,10 +600,10 @@ void SvnLogDlgImp::slotSingleContext(QListViewItem*_item, const QPoint & e, int) kdDebug()<<"????"<<endl; return; } - QPopupMenu popup; - QString name = item->path(); - QString action = item->action(); - QString source =item->revision()>-1?item->source():item->path(); + TQPopupMenu popup; + TQString name = item->path(); + TQString action = item->action(); + TQString source =item->revision()>-1?item->source():item->path(); svn_revnum_t prev = item->revision()>0?item->revision():k->rev()-1; if (action != "D") { popup.insertItem(i18n("Annotate"),101); @@ -618,7 +618,7 @@ void SvnLogDlgImp::slotSingleContext(QListViewItem*_item, const QPoint & e, int) { case 101: { - m_Actions->makeBlame(start,k->rev(),_base+name,kapp->activeModalWidget(),k->rev(),this); + m_Actions->makeBlame(start,k->rev(),_base+name,TQT_TQWIDGET(kapp->activeModalWidget()),k->rev(),this); break; } case 102: @@ -628,14 +628,14 @@ void SvnLogDlgImp::slotSingleContext(QListViewItem*_item, const QPoint & e, int) } case 103: { - emit makeCat(k->rev(),_base+source,source,k->rev(),kapp->activeModalWidget()); + emit makeCat(k->rev(),_base+source,source,k->rev(),TQT_TQWIDGET(kapp->activeModalWidget())); } default: break; } } -void SvnLogDlgImp::slotSingleDoubleClicked(QListViewItem*_item) +void SvnLogDlgImp::slotSingleDoubleClicked(TQListViewItem*_item) { if (!_item) { @@ -648,13 +648,13 @@ void SvnLogDlgImp::slotSingleDoubleClicked(QListViewItem*_item) kdDebug()<<"????"<<endl; return; } - QString name = item->path(); - QString action = item->action(); - QString source =item->revision()>-1?item->source():item->path(); + TQString name = item->path(); + TQString action = item->action(); + TQString source =item->revision()>-1?item->source():item->path(); //svn_revnum_t prev = item->revision()>0?item->revision():k->rev()-1; svn::Revision start(svn::Revision::START); if (action != "D") { - m_Actions->makeBlame(start,k->rev(),_base+name,kapp->activeModalWidget(),k->rev(),this); + m_Actions->makeBlame(start,k->rev(),_base+name,TQT_TQWIDGET(kapp->activeModalWidget()),k->rev(),this); } } diff --git a/src/svnfrontend/svnlogdlgimp.h b/src/svnfrontend/svnlogdlgimp.h index 620f894..e467aa3 100644 --- a/src/svnfrontend/svnlogdlgimp.h +++ b/src/svnfrontend/svnlogdlgimp.h @@ -26,8 +26,8 @@ #include "src/svnqt/client.hpp" #include "src/svnqt/shared_pointer.hpp" -#include <qsize.h> -#include <qregexp.h> +#include <tqsize.h> +#include <tqregexp.h> class LogListViewItem; class SvnActions; @@ -35,53 +35,54 @@ class SvnActions; class SvnLogDlgImp: public SvnLogDialogData,public SimpleLogCb { Q_OBJECT + TQ_OBJECT public: - SvnLogDlgImp(SvnActions*,QWidget *parent = 0, const char *name = 0,bool modal=true); + SvnLogDlgImp(SvnActions*,TQWidget *tqparent = 0, const char *name = 0,bool modal=true); virtual ~SvnLogDlgImp(); - void dispLog(const svn::SharedPointer<svn::LogEntriesMap>&,const QString&,const QString&,const svn::Revision&peg,const QString&pegUrl); + void dispLog(const svn::SharedPointer<svn::LogEntriesMap>&,const TQString&,const TQString&,const svn::Revision&peg,const TQString&pegUrl); void saveSize(); - QSize dialogSize(); + TQSize dialogSize(); - virtual bool getSingleLog(svn::LogEntry&t,const svn::Revision&r,const QString&what,const svn::Revision&peg,QString&root); + virtual bool getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQString&what,const svn::Revision&peg,TQString&root); signals: - void makeDiff(const QString&,const svn::Revision&,const QString&,const svn::Revision&,QWidget*); - void makeCat(const svn::Revision&,const QString&,const QString&,const svn::Revision&,QWidget*); + void makeDiff(const TQString&,const svn::Revision&,const TQString&,const svn::Revision&,TQWidget*); + void makeCat(const svn::Revision&,const TQString&,const TQString&,const svn::Revision&,TQWidget*); protected slots: - virtual void slotSelectionChanged(QListViewItem*); + virtual void slotSelectionChanged(TQListViewItem*); protected slots: virtual void slotDispPrevious(); virtual void slotDispSelected(); - virtual void slotItemClicked(int,QListViewItem*,const QPoint &,int); + virtual void slotItemClicked(int,TQListViewItem*,const TQPoint &,int); virtual void slotRevisionSelected(); protected: - QString _name; - QString _base; + TQString _name; + TQString _base; static const char* groupName; LogListViewItem *m_first,*m_second; SvnActions*m_Actions; bool m_ControlKeyDown; - virtual void keyPressEvent (QKeyEvent * e); - virtual void keyReleaseEvent (QKeyEvent * e); + virtual void keyPressEvent (TQKeyEvent * e); + virtual void keyReleaseEvent (TQKeyEvent * e); virtual void slotBlameItem(); svn::SharedPointer<svn::LogEntriesMap> m_Entries; - QString _bugurl; + TQString _bugurl; void dispLog(const svn::SharedPointer<svn::LogEntriesMap>&); - QRegExp _r1,_r2; + TQRegExp _r1,_r2; protected slots: virtual void slotListEntries(); virtual void slotEntriesSelectionChanged(); - virtual void slotSingleContext(QListViewItem*, const QPoint &, int); - virtual void slotSingleDoubleClicked(QListViewItem*); + virtual void slotSingleContext(TQListViewItem*, const TQPoint &, int); + virtual void slotSingleDoubleClicked(TQListViewItem*); virtual void slotGetLogs(); protected: - void replaceBugids(QString&msg); - QString genReplace(const QString&); + void replaceBugids(TQString&msg); + TQString genReplace(const TQString&); svn::Revision m_peg; svn::Path m_PegUrl; }; diff --git a/src/svnfrontend/tcontextlistener.cpp b/src/svnfrontend/tcontextlistener.cpp index 0d90de2..ffa0e4e 100644 --- a/src/svnfrontend/tcontextlistener.cpp +++ b/src/svnfrontend/tcontextlistener.cpp @@ -30,8 +30,8 @@ #include <kdebug.h> #include <klocale.h> -ThreadContextListener::ThreadContextListener(QObject* parent, const char* name) - : CContextListener(parent, name) +ThreadContextListener::ThreadContextListener(TQObject* tqparent, const char* name) + : CContextListener(tqparent, name) { m_Data = new ThreadContextListenerData; } @@ -41,15 +41,15 @@ ThreadContextListener::~ThreadContextListener() delete m_Data; } -QMutex*ThreadContextListener::callbackMutex() +TQMutex*ThreadContextListener::callbackMutex() { - static QMutex s_CallbackMutex; + static TQMutex s_CallbackMutex; return &s_CallbackMutex; } -bool ThreadContextListener::contextGetLogin(const QString& realm, QString& username, QString& password, bool& maySave) +bool ThreadContextListener::contextGetLogin(const TQString& realm, TQString& username, TQString& password, bool& maySave) { - QMutexLocker lock(callbackMutex()); + TQMutexLocker lock(callbackMutex()); m_WaitMutex.lock(); ThreadContextListenerData::slogin_data _data; _data.realm=realm; @@ -58,7 +58,7 @@ bool ThreadContextListener::contextGetLogin(const QString& realm, QString& usern _data.maysave=maySave; _data.ok=false; - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_LOGIN_PROMPT); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_LOGIN_PROMPT); void*t = (void*)&_data; ev->setData(t); kapp->postEvent(this,ev); @@ -70,9 +70,9 @@ bool ThreadContextListener::contextGetLogin(const QString& realm, QString& usern return _data.ok; } -bool ThreadContextListener::contextGetSavedLogin(const QString & realm,QString & username,QString & password) +bool ThreadContextListener::contextGetSavedLogin(const TQString & realm,TQString & username,TQString & password) { - QMutexLocker lock(callbackMutex()); + TQMutexLocker lock(callbackMutex()); m_WaitMutex.lock(); ThreadContextListenerData::slogin_data _data; _data.realm=realm; @@ -81,7 +81,7 @@ bool ThreadContextListener::contextGetSavedLogin(const QString & realm,QString & _data.maysave=false; _data.ok=false; - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_LOGIN_SAVED); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_LOGIN_SAVED); void*t = (void*)&_data; ev->setData(t); kapp->postEvent(this,ev); @@ -92,15 +92,15 @@ bool ThreadContextListener::contextGetSavedLogin(const QString & realm,QString & return _data.ok; } -bool ThreadContextListener::contextGetLogMessage(QString& msg,const svn::CommitItemList&_items) +bool ThreadContextListener::contextGetLogMessage(TQString& msg,const svn::CommitItemList&_items) { - QMutexLocker lock(callbackMutex()); + TQMutexLocker lock(callbackMutex()); m_WaitMutex.lock(); ThreadContextListenerData::slog_message log; log.ok = false; log.msg = ""; log._items = &_items; - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_LOGMSG_PROMPT); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_LOGMSG_PROMPT); void*t = (void*)&log; ev->setData(t); kapp->postEvent(this,ev); @@ -110,15 +110,15 @@ bool ThreadContextListener::contextGetLogMessage(QString& msg,const svn::CommitI return log.ok; } -bool ThreadContextListener::contextSslClientCertPrompt(QString& certFile) +bool ThreadContextListener::contextSslClientCertPrompt(TQString& certFile) { - QMutexLocker lock(callbackMutex()); + TQMutexLocker lock(callbackMutex()); m_WaitMutex.lock(); ThreadContextListenerData::scert_file scertf; scertf.ok = false; scertf.certfile=""; - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_CERT_SELECT_PROMPT); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_CERT_SELECT_PROMPT); ev->setData((void*)&scertf); kapp->postEvent(this,ev); m_Data->m_trustpromptWait.wait(&m_WaitMutex); @@ -127,16 +127,16 @@ bool ThreadContextListener::contextSslClientCertPrompt(QString& certFile) return scertf.ok; } -bool ThreadContextListener::contextSslClientCertPwPrompt(QString& password, const QString& realm, bool& maySave) +bool ThreadContextListener::contextSslClientCertPwPrompt(TQString& password, const TQString& realm, bool& maySave) { - QMutexLocker lock(callbackMutex()); + TQMutexLocker lock(callbackMutex()); m_WaitMutex.lock(); ThreadContextListenerData::scert_pw scert_data; scert_data.ok=false; scert_data.maysave=false; scert_data.password=""; scert_data.realm=realm; - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_CERT_PW_PROMPT); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_CERT_PW_PROMPT); ev->setData((void*)&scert_data); kapp->postEvent(this,ev); m_Data->m_trustpromptWait.wait(&m_WaitMutex); @@ -148,9 +148,9 @@ bool ThreadContextListener::contextSslClientCertPwPrompt(QString& password, cons svn::ContextListener::SslServerTrustAnswer ThreadContextListener::contextSslServerTrustPrompt(const SslServerTrustData& data, apr_uint32_t&/* acceptedFailures*/) { - QMutexLocker lock(callbackMutex()); + TQMutexLocker lock(callbackMutex()); m_WaitMutex.lock(); - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_SSL_TRUST_PROMPT); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_SSL_TRUST_PROMPT); ThreadContextListenerData::strust_answer trust_answer; trust_answer.m_SslTrustAnswer=DONT_ACCEPT; trust_answer.m_Trustdata = &data; @@ -161,10 +161,10 @@ svn::ContextListener::SslServerTrustAnswer ThreadContextListener::contextSslServ return trust_answer.m_SslTrustAnswer; } -void ThreadContextListener::contextNotify(const QString&aMsg) +void ThreadContextListener::contextNotify(const TQString&aMsg) { - QMutexLocker lock(callbackMutex()); - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_NOTIFY); + TQMutexLocker lock(callbackMutex()); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_NOTIFY); // receiver must delete data! ThreadContextListenerData::snotify* _notify = new ThreadContextListenerData::snotify(); _notify->msg = aMsg; @@ -180,17 +180,17 @@ void ThreadContextListener::contextProgress(long long int current, long long int if (m_Data->noProgress||current==0) { return; } - QMutexLocker lock(callbackMutex()); - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_NOTIFY); + TQMutexLocker lock(callbackMutex()); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_NOTIFY); // receiver must delete data! ThreadContextListenerData::snotify* _notify = new ThreadContextListenerData::snotify(); - QString msg; - QString s1 = helpers::ByteToString()(current); + TQString msg; + TQString s1 = helpers::ByteToString()(current); if (max>-1) { - QString s2 = helpers::ByteToString()(max); - msg = i18n("%1 of %2 transferred.").arg(s1).arg(s2); + TQString s2 = helpers::ByteToString()(max); + msg = i18n("%1 of %2 transferred.").tqarg(s1).tqarg(s2); } else { - msg = i18n("%1 transferred.").arg(s1); + msg = i18n("%1 transferred.").tqarg(s1); } _notify->msg = msg; ev->setData((void*)_notify); @@ -199,8 +199,8 @@ void ThreadContextListener::contextProgress(long long int current, long long int void ThreadContextListener::sendTick() { - QMutexLocker lock(callbackMutex()); - QCustomEvent*ev = new QCustomEvent(EVENT_THREAD_NOTIFY); + TQMutexLocker lock(callbackMutex()); + TQCustomEvent*ev = new TQCustomEvent(EVENT_THREAD_NOTIFY); // receiver must delete data! ThreadContextListenerData::snotify* _notify = new ThreadContextListenerData::snotify(); _notify->msg = ""; @@ -211,7 +211,7 @@ void ThreadContextListener::sendTick() /* methods below may only called from mainthread! (via event) */ void ThreadContextListener::event_contextGetLogin(void*data) { - QMutexLocker lock(&m_WaitMutex); + TQMutexLocker lock(&m_WaitMutex); if (!data) { m_Data->m_trustpromptWait.wakeAll(); return; @@ -224,7 +224,7 @@ void ThreadContextListener::event_contextGetLogin(void*data) void ThreadContextListener::event_contextGetSavedLogin(void*data) { - QMutexLocker lock(&m_WaitMutex); + TQMutexLocker lock(&m_WaitMutex); if (!data) { m_Data->m_trustpromptWait.wakeAll(); return; @@ -236,7 +236,7 @@ void ThreadContextListener::event_contextGetSavedLogin(void*data) void ThreadContextListener::event_contextGetLogMessage(void * data) { - QMutexLocker lock(&m_WaitMutex); + TQMutexLocker lock(&m_WaitMutex); if (!data) { m_Data->m_trustpromptWait.wakeAll(); return; @@ -249,7 +249,7 @@ void ThreadContextListener::event_contextGetLogMessage(void * data) void ThreadContextListener::event_contextSslClientCertPrompt(void*data) { - QMutexLocker lock(&m_WaitMutex); + TQMutexLocker lock(&m_WaitMutex); if (!data) { m_Data->m_trustpromptWait.wakeAll(); return; @@ -261,7 +261,7 @@ void ThreadContextListener::event_contextSslClientCertPrompt(void*data) void ThreadContextListener::event_contextSslClientCertPwPrompt(void*data) { - QMutexLocker lock(&m_WaitMutex); + TQMutexLocker lock(&m_WaitMutex); if (!data) { m_Data->m_trustpromptWait.wakeAll(); return; @@ -273,7 +273,7 @@ void ThreadContextListener::event_contextSslClientCertPwPrompt(void*data) void ThreadContextListener::event_contextSslServerTrustPrompt(void*data) { - QMutexLocker lock(&m_WaitMutex); + TQMutexLocker lock(&m_WaitMutex); /* * m_SslTrustAnswer is made threadsafe due the m_trustpromptWait - the calling thread waits until wakeAll is called! */ @@ -297,7 +297,7 @@ void ThreadContextListener::event_contextNotify(void*data) delete _notify; } -void ThreadContextListener::customEvent(QCustomEvent*ev) +void ThreadContextListener::customEvent(TQCustomEvent*ev) { if (ev->type()==EVENT_THREAD_SSL_TRUST_PROMPT) { event_contextSslServerTrustPrompt(ev->data()); diff --git a/src/svnfrontend/tcontextlistener.h b/src/svnfrontend/tcontextlistener.h index 92d69b4..df01d20 100644 --- a/src/svnfrontend/tcontextlistener.h +++ b/src/svnfrontend/tcontextlistener.h @@ -24,9 +24,9 @@ #include "ccontextlistener.h" -#include <qevent.h> -#include <qmutex.h> -#include <qwaitcondition.h> +#include <tqevent.h> +#include <tqmutex.h> +#include <tqwaitcondition.h> class ThreadContextListenerData; @@ -36,23 +36,24 @@ class ThreadContextListenerData; class ThreadContextListener : public CContextListener { Q_OBJECT + TQ_OBJECT public: - ThreadContextListener(QObject* parent, const char* name=0); + ThreadContextListener(TQObject* tqparent, const char* name=0); virtual ~ThreadContextListener(); - virtual bool contextGetLogin(const QString& realm, QString& username, QString& password, bool& maySave); - virtual bool contextGetSavedLogin(const QString & realm,QString & username,QString & password); + virtual bool contextGetLogin(const TQString& realm, TQString& username, TQString& password, bool& maySave); + virtual bool contextGetSavedLogin(const TQString & realm,TQString & username,TQString & password); - virtual bool contextGetLogMessage(QString& msg,const svn::CommitItemList&); - virtual bool contextSslClientCertPrompt(QString& certFile); - virtual bool contextSslClientCertPwPrompt(QString& password, const QString& realm, bool& maySave); + virtual bool contextGetLogMessage(TQString& msg,const svn::CommitItemList&); + virtual bool contextSslClientCertPrompt(TQString& certFile); + virtual bool contextSslClientCertPwPrompt(TQString& password, const TQString& realm, bool& maySave); virtual svn::ContextListener::SslServerTrustAnswer contextSslServerTrustPrompt(const SslServerTrustData& data, apr_uint32_t& acceptedFailures); - virtual void contextNotify(const QString&aMsg); + virtual void contextNotify(const TQString&aMsg); virtual void sendTick(); virtual void contextProgress(long long int current, long long int max); - static QMutex*callbackMutex(); + static TQMutex*callbackMutex(); protected: virtual void event_contextGetLogin(void*_data); @@ -62,10 +63,10 @@ protected: virtual void event_contextSslClientCertPwPrompt(void*data); virtual void event_contextSslServerTrustPrompt(void* data); virtual void event_contextNotify(void*data); - virtual void customEvent(QCustomEvent*); + virtual void customEvent(TQCustomEvent*); /* stores all internals */ - QMutex m_WaitMutex; + TQMutex m_WaitMutex; ThreadContextListenerData*m_Data; }; diff --git a/src/svnfrontend/threadcontextlistenerdata.h b/src/svnfrontend/threadcontextlistenerdata.h index b225161..82726a7 100644 --- a/src/svnfrontend/threadcontextlistenerdata.h +++ b/src/svnfrontend/threadcontextlistenerdata.h @@ -22,8 +22,8 @@ #include "src/svnqt/context_listener.hpp" -#include <qthread.h> -#include <qstring.h> +#include <tqthread.h> +#include <tqstring.h> /** @author Rajko Albrecht @@ -38,7 +38,7 @@ public: bool noProgress; /* only one callback at time */ - QWaitCondition m_trustpromptWait; + TQWaitCondition m_trustpromptWait; /* safed due condition above */ /* this variables are for the event handling across threads */ @@ -52,13 +52,13 @@ public: /* login into server */ struct slogin_data { - QString user,password,realm; + TQString user,password,realm; bool maysave,ok; }; struct slog_message { - QString msg; + TQString msg; bool ok; const svn::CommitItemList*_items; slog_message(){_items = 0;} @@ -66,19 +66,19 @@ public: struct scert_pw { - QString password,realm; + TQString password,realm; bool ok,maysave; }; struct scert_file { - QString certfile; + TQString certfile; bool ok; }; struct snotify { - QString msg; + TQString msg; }; }; 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 ©FromPath_, + const TQString ©FromPath_, 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 ©FromPath_, + const TQString ©FromPath_, const svn_revnum_t copyFromRevision_, - const QString ©ToPath_, + const TQString ©ToPath_, 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 ©FromPath_, + const TQString ©FromPath_, const svn_revnum_t copyFromRevision_); - LogChangePathEntry (const QString &path_, + LogChangePathEntry (const TQString &path_, char action_, - const QString ©FromPath_, + const TQString ©FromPath_, const svn_revnum_t copyFromRevision_, - const QString ©ToPath_, + const TQString ©ToPath_, 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 ); }; } diff --git a/src/urldlg.cpp b/src/urldlg.cpp index 49293f2..3507983 100644 --- a/src/urldlg.cpp +++ b/src/urldlg.cpp @@ -20,7 +20,7 @@ #include "urldlg.h" #include <kcombobox.h> #include <kurlrequester.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kconfig.h> #include <klocale.h> #include <kglobal.h> @@ -28,10 +28,10 @@ #include <kurl.h> #include <kdebug.h> -#include <qlabel.h> +#include <tqlabel.h> -UrlDlg::UrlDlg(QWidget *parent, const char *name) - : KDialogBase(Plain, QString::null, Ok|Cancel|User1, Ok, parent, name, +UrlDlg::UrlDlg(TQWidget *tqparent, const char *name) + : KDialogBase(Plain, TQString(), Ok|Cancel|User1, Ok, tqparent, name, true,true, KStdGuiItem::clear()) { init_dlg(); @@ -48,17 +48,17 @@ UrlDlg::~UrlDlg() */ void UrlDlg::init_dlg() { - QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0, spacingHint()); - QLabel * label = new QLabel(i18n("Open repository or working copy") , plainPage()); + TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint()); + TQLabel * label = new TQLabel(i18n("Open repository or working copy") , plainPage()); topLayout->addWidget(label); KHistoryCombo * combo = new KHistoryCombo(0,"history_combo"); combo->setDuplicatesEnabled(false); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, QString::fromLatin1("Open-repository settings") ); - int max = kc->readNumEntry( QString::fromLatin1("Maximum history"), 15 ); + KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-repository settings") ); + int max = kc->readNumEntry( TQString::tqfromLatin1("Maximum history"), 15 ); combo->setMaxCount( max ); - QStringList list = kc->readListEntry( QString::fromLatin1("History") ); + TQStringList list = kc->readListEntry( TQString::tqfromLatin1("History") ); combo->setHistoryItems(list); combo->setMinimumWidth(100); combo->adjustSize(); @@ -71,12 +71,12 @@ void UrlDlg::init_dlg() urlRequester_->setFocus(); KFile::Mode mode = static_cast<KFile::Mode>(KFile::ExistingOnly|KFile::Directory); urlRequester_->setMode(mode); - connect(urlRequester_->comboBox(),SIGNAL(textChanged(const QString&)),SLOT(slotTextChanged(const QString&))); + connect(urlRequester_->comboBox(),TQT_SIGNAL(textChanged(const TQString&)),TQT_SLOT(slotTextChanged(const TQString&))); enableButtonOK( false ); enableButton( KDialogBase::User1, false ); - connect( this, SIGNAL(user1Clicked()), SLOT(slotClear())); + connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotClear())); urlRequester_->adjustSize(); - resize(QSize(400,sizeHint().height())); + resize(TQSize(400,tqsizeHint().height())); } /*! @@ -88,8 +88,8 @@ void UrlDlg::accept() if (combo) { combo->addToHistory(urlRequester_->url()); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks(kc, QString::fromLatin1("Open-repository settings")); - kc->writeEntry(QString::fromLatin1("History"), combo->historyItems()); + KConfigGroupSaver ks(kc, TQString::tqfromLatin1("Open-repository settings")); + kc->writeEntry(TQString::tqfromLatin1("History"), combo->historyItems()); kc->sync(); } KDialogBase::accept(); @@ -97,9 +97,9 @@ void UrlDlg::accept() /*! - \fn UrlDlg::slotTextChanged(const QString&) + \fn UrlDlg::slotTextChanged(const TQString&) */ -void UrlDlg::slotTextChanged(const QString&text) +void UrlDlg::slotTextChanged(const TQString&text) { bool state = !text.stripWhiteSpace().isEmpty(); enableButtonOK( state ); @@ -121,7 +121,7 @@ void UrlDlg::slotClear() */ KURL UrlDlg::selectedURL() { - if ( result() == QDialog::Accepted ) { + if ( result() == TQDialog::Accepted ) { KURL uri = urlRequester_->url(); return uri; //return KURL::fromPathOrURL( urlRequester_->url() ); @@ -132,11 +132,11 @@ KURL UrlDlg::selectedURL() /*! - \fn UrlDlg::getURL(QWidget*parent) + \fn UrlDlg::getURL(TQWidget*tqparent) */ -KURL UrlDlg::getURL(QWidget*parent) +KURL UrlDlg::getURL(TQWidget*tqparent) { - UrlDlg dlg(parent); + UrlDlg dlg(tqparent); dlg.setCaption(i18n("Open")); dlg.exec(); const KURL& url = dlg.selectedURL(); diff --git a/src/urldlg.h b/src/urldlg.h index 137c47f..caff0eb 100644 --- a/src/urldlg.h +++ b/src/urldlg.h @@ -31,17 +31,18 @@ class KURLRequester; class UrlDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - UrlDlg(QWidget *parent = 0, const char *name = 0); + UrlDlg(TQWidget *tqparent = 0, const char *name = 0); ~UrlDlg(); KURL selectedURL(); - static KURL getURL(QWidget*parent=0); + static KURL getURL(TQWidget*tqparent=0); protected: virtual void init_dlg(); KURLRequester*urlRequester_; protected slots: virtual void accept(); - virtual void slotTextChanged(const QString&); + virtual void slotTextChanged(const TQString&); virtual void slotClear(); }; |