summaryrefslogtreecommitdiffstats
path: root/src/ksvnwidgets/pwstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ksvnwidgets/pwstorage.cpp')
-rw-r--r--src/ksvnwidgets/pwstorage.cpp54
1 files changed, 27 insertions, 27 deletions
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;