summaryrefslogtreecommitdiffstats
path: root/src/svnfrontend/tcontextlistener.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-04 19:54:24 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-04 19:54:24 +0000
commitd7633c195a464e4d344ada9eea61afd10110598a (patch)
tree1f2da0b135f3ed84955e340cae823f00c4ce7284 /src/svnfrontend/tcontextlistener.cpp
parent3fa7eb804f67b2789f128075cc2522f398640250 (diff)
downloadtdesvn-d7633c195a464e4d344ada9eea61afd10110598a.tar.gz
tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.zip
Port kdesvn to TQt4
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/svnfrontend/tcontextlistener.cpp')
-rw-r--r--src/svnfrontend/tcontextlistener.cpp80
1 files changed, 40 insertions, 40 deletions
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());