diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /filesharing/advanced/kcm_sambaconf/sambafile.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filesharing/advanced/kcm_sambaconf/sambafile.cpp')
-rw-r--r-- | filesharing/advanced/kcm_sambaconf/sambafile.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.cpp b/filesharing/advanced/kcm_sambaconf/sambafile.cpp index 25392514..63795a12 100644 --- a/filesharing/advanced/kcm_sambaconf/sambafile.cpp +++ b/filesharing/advanced/kcm_sambaconf/sambafile.cpp @@ -115,7 +115,7 @@ TQString SambaFile::findShareByPath(const TQString & path) const { SambaShare* share = it.current(); - TQString *s = share->find("path"); + TQString *s = share->tqfind("path"); if (s) { KURL curUrl(*s); curUrl.adjustPath(-1); @@ -127,7 +127,7 @@ TQString SambaFile::findShareByPath(const TQString & path) const } } - return TQString::null; + return TQString(); } bool SambaFile::save() { @@ -174,14 +174,14 @@ bool SambaFile::slotApply() kdDebug(5009) << "SambaFile::slotApply: is local file!" << endl; TQString suCommand=TQString("cp %1 %2; rm %3") - .arg(_tempFile->name()) - .arg(path) - .arg(_tempFile->name()); + .tqarg(_tempFile->name()) + .tqarg(path) + .tqarg(_tempFile->name()); proc << "kdesu" << "-d" << suCommand; if (! proc.start(KProcess::Block)) { kdDebug(5009) << "SambaFile::slotApply: saving to " << path << " failed!" << endl; - //KMessageBox::sorry(0,i18n("Saving the results to %1 failed.").arg(path)); + //KMessageBox::sorry(0,i18n("Saving the results to %1 failed.").tqarg(path)); delete _tempFile; _tempFile = 0; return false; @@ -215,14 +215,14 @@ TQString SambaFile::getUnusedName(const TQString alreadyUsedName) const { TQString init = i18n("Unnamed"); - if (alreadyUsedName != TQString::null) + if (alreadyUsedName != TQString()) init = alreadyUsedName; TQString s = init; int i = 2; - while (_sambaConfig->find(s)) + while (_sambaConfig->tqfind(s)) { s = init+TQString::number(i); i++; @@ -235,7 +235,7 @@ TQString SambaFile::getUnusedName(const TQString alreadyUsedName) const SambaShare* SambaFile::newShare(const TQString & name) { - if (_sambaConfig->find(name)) + if (_sambaConfig->tqfind(name)) return 0L; SambaShare* share = new SambaShare(name,_sambaConfig); @@ -293,7 +293,7 @@ void SambaFile::removeShareByPath(const TQString & path) { /** No descriptions */ SambaShare* SambaFile::getShare(const TQString & share) const { - SambaShare *s = _sambaConfig->find(share); + SambaShare *s = _sambaConfig->tqfind(share); return s; } @@ -353,7 +353,7 @@ int SambaFile::getSambaVersion() { if (testParam.start(KProcess::Block,KProcess::Stdout)) { - if (_parmOutput.find("3") > -1) + if (_parmOutput.tqfind("3") > -1) _sambaVersion = 3; } @@ -394,7 +394,7 @@ SambaShare* SambaFile::getTestParmValues(bool reload) void SambaFile::testParmStdOutReceived(KProcess *, char *buffer, int buflen) { - _parmOutput+=TQString::fromLatin1(buffer,buflen); + _parmOutput+=TQString::tqfromLatin1(buffer,buflen); } void SambaFile::parseParmStdOutput() @@ -434,7 +434,7 @@ void SambaFile::parseParmStdOutput() // parameter // parameter - int i = line.find('='); + int i = line.tqfind('='); if (i>-1) { TQString name = line.left(i).stripWhiteSpace(); @@ -452,7 +452,7 @@ void SambaFile::parseParmStdOutput() * Try to find the samba config file position * First tries the config file, then checks * several common positions -* If nothing is found returns TQString::null +* If nothing is found returns TQString() **/ TQString SambaFile::findSambaConf() { @@ -506,7 +506,7 @@ bool SambaFile::openFile() { TQFile f(localPath); if (!f.open(IO_ReadOnly)) { - //throw SambaFileLoadException(TQString("<qt>Could not open file <em>%1</em> for reading.</qt>").arg(path)); + //throw SambaFileLoadException(TQString("<qt>Could not open file <em>%1</em> for reading.</qt>").tqarg(path)); return false; } @@ -564,7 +564,7 @@ bool SambaFile::openFile() { } // parameter - int i = completeLine.find('='); + int i = completeLine.tqfind('='); if (i>-1) { @@ -604,7 +604,7 @@ bool SambaFile::saveTo(const TQString & path) for ( TQStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it ) { - SambaShare* share = _sambaConfig->find(*it); + SambaShare* share = _sambaConfig->tqfind(*it); // First add all comments of the share to the file TQStringList comments = share->getComments(); @@ -637,7 +637,7 @@ bool SambaFile::saveTo(const TQString & path) } // Add the option - s << *optionIt << " = " << *share->find(*optionIt) << endl; + s << *optionIt << " = " << *share->tqfind(*optionIt) << endl; } |