summaryrefslogtreecommitdiffstats
path: root/kuser/kgroupldap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kuser/kgroupldap.cpp')
-rw-r--r--kuser/kgroupldap.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kuser/kgroupldap.cpp b/kuser/kgroupldap.cpp
index 1a84148..2f66b27 100644
--- a/kuser/kgroupldap.cpp
+++ b/kuser/kgroupldap.cpp
@@ -16,8 +16,8 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -70,13 +70,13 @@ KGroupLDAP::~KGroupLDAP()
mGroups.clear();
}
-QString KGroupLDAP::getRDN( KU::KGroup *group )
+TQString KGroupLDAP::getRDN( KU::KGroup *group )
{
switch ( mCfg->ldapgrouprdn() ) {
case KUserPrefsBase::EnumLdapgrouprdn::cn:
return "cn=" + group->getName();
case KUserPrefsBase::EnumLdapgrouprdn::gidNumber:
- return "gidNumber=" + QString::number( group->getGID() );
+ return "gidNumber=" + TQString::number( group->getGID() );
default:
return "";
}
@@ -87,12 +87,12 @@ void KGroupLDAP::result( KIO::Job *job )
delete mProg;
mCancel = false;
if ( job->error() ) {
- QString errstr = job->errorString();
+ TQString errstr = job->errorString();
if ( !errstr.isEmpty() ) {
if ( ldif.isEmpty() )
KMessageBox::error( 0, errstr );
else
- KMessageBox::detailedError( 0, errstr, QString::fromUtf8( ldif, ldif.size()-1 ) );
+ KMessageBox::detailedError( 0, errstr, TQString::fromUtf8( ldif, ldif.size()-1 ) );
}
mOk = false;
} else {
@@ -100,7 +100,7 @@ void KGroupLDAP::result( KIO::Job *job )
}
}
-void KGroupLDAP::data( KIO::Job*, const QByteArray& data )
+void KGroupLDAP::data( KIO::Job*, const TQByteArray& data )
{
if ( data.size() ) {
mParser.setLDIF( data );
@@ -109,15 +109,15 @@ void KGroupLDAP::data( KIO::Job*, const QByteArray& data )
}
KABC::LDIF::ParseVal ret;
- QString name, val;
- QByteArray value;
+ TQString name, val;
+ TQByteArray value;
do {
ret = mParser.nextItem();
switch ( ret ) {
case KABC::LDIF::Item:
name = mParser.attr().lower();
value = mParser.val();
- val = QString::fromUtf8( value, value.size() );
+ val = TQString::fromUtf8( value, value.size() );
if ( name == "objectclass" ) {
if ( val.lower() == "sambagroupmapping" )
mGroup->setCaps( KU::KGroup::Cap_Samba );
@@ -170,10 +170,10 @@ bool KGroupLDAP::reload()
ldif = "";
KIO::Job *job = KIO::get( mUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
mProg->exec();
if ( mCancel ) job->kill();
@@ -193,15 +193,15 @@ bool KGroupLDAP::dbcommit()
mProg = new KProgressDialog( 0, "", i18n("LDAP Operation"), "", true );
KIO::Job *job = KIO::put( mUrl, -1, false, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( putData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( putData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
mProg->exec();
return( mOk );
}
-void KGroupLDAP::putData( KIO::Job*, QByteArray& data )
+void KGroupLDAP::putData( KIO::Job*, TQByteArray& data )
{
ModIt mit = mMod.begin();
@@ -243,7 +243,7 @@ void KGroupLDAP::addData( KU::KGroup *group )
ldif +=
KABC::LDIF::assembleLine( "cn", group->getName() ) + "\n" +
- KABC::LDIF::assembleLine( "gidnumber", QString::number(group->getGID()) ) + "\n" +
+ KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + "\n" +
KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + "\n";
for ( uint i=0; i < group->count(); i++ ) {
ldif += KABC::LDIF::assembleLine( "memberuid", group->user(i) ) + "\n";
@@ -253,7 +253,7 @@ void KGroupLDAP::addData( KU::KGroup *group )
KABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + "\n" +
KABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + "\n" +
KABC::LDIF::assembleLine( "description", group->getDesc() ) + "\n" +
- KABC::LDIF::assembleLine( "sambagrouptype", QString::number( group->getType() ) ) + "\n";
+ KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n";
}
ldif += "\n\n";
kdDebug() << "ldif: " << ldif << endl;
@@ -268,8 +268,8 @@ void KGroupLDAP::delData( KU::KGroup *group )
void KGroupLDAP::modData( KU::KGroup *group )
{
- QString oldrdn = getRDN( mGroup );
- QString newrdn = getRDN( group );
+ TQString oldrdn = getRDN( mGroup );
+ TQString newrdn = getRDN( group );
ldif = "";
if ( oldrdn != newrdn ) {
@@ -290,7 +290,7 @@ void KGroupLDAP::modData( KU::KGroup *group )
"-\nreplace: cn\n" +
KABC::LDIF::assembleLine( "cn", group->getName() ) +
"\n-\nreplace: gidnumber\n" +
- KABC::LDIF::assembleLine( "gidnumber", QString::number(group->getGID()) ) +
+ KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) +
"\n-\nreplace: userpassword\n" +
KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) +
"\n-\nreplace: memberuid\n";
@@ -307,7 +307,7 @@ void KGroupLDAP::modData( KU::KGroup *group )
"\n-\nreplace: description\n" +
KABC::LDIF::assembleLine( "description", group->getDesc() ) +
"\n-\nreplace: sambagrouptype\n" +
- KABC::LDIF::assembleLine( "sambagrouptype", QString::number( group->getType() ) ) + "\n";
+ KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n";
} else {
ldif += "-\nreplace: sambasid\n";
ldif += "-\nreplace: displayname\n";