diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp')
-rw-r--r-- | filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp index af763729..83ea5180 100644 --- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp +++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp @@ -23,8 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * * ******************************************************************************/ -#include <qregexp.h> -#include <qstringlist.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include <kmessagebox.h> #include <klocale.h> @@ -34,7 +34,7 @@ #include "sambashare.h" #include "linuxpermissionchecker.h" -LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent = 0L) +LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,TQWidget* parent = 0L) { m_sambaShare = share; m_parent = parent; @@ -44,7 +44,7 @@ LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent return; } - m_fi = QFileInfo(share->getValue("path")); + m_fi = TQFileInfo(share->getValue("path")); if ( ! m_fi.exists()) { kdDebug(5009) << "LinuxPermissionChecker: path does not exists !" << endl; @@ -80,17 +80,17 @@ bool LinuxPermissionChecker::checkAllUserPermissions() { if ( ! m_fi.exists()) return true; - QStringList readList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("read list")); + TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("read list")); - for ( QStringList::Iterator it = readList.begin(); it != readList.end(); ++it ) + for ( TQStringList::Iterator it = readList.begin(); it != readList.end(); ++it ) { if (!checkUserReadPermissions(*it)) return false; } - QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("write list")); + TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("write list")); - for ( QStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it ) + for ( TQStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it ) { if (!checkUserWritePermissions(*it)) return false; @@ -107,7 +107,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() { if (!isPublic) return true; - QString guestAccount = m_sambaShare->getValue("guest account"); + TQString guestAccount = m_sambaShare->getValue("guest account"); if ( ! checkUserReadPermissions(guestAccount,false)) { @@ -139,7 +139,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() { return true; } -bool LinuxPermissionChecker::checkUserPermissions(const QString & user) { +bool LinuxPermissionChecker::checkUserPermissions(const TQString & user) { if ( ! checkUserReadPermissions(user)) return false; @@ -149,14 +149,14 @@ bool LinuxPermissionChecker::checkUserPermissions(const QString & user) { return true; } -bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, bool showMessageBox) { +bool LinuxPermissionChecker::checkUserWritePermissions(const TQString & user, bool showMessageBox) { // If no write permissions are given, we don't need to check them. if (m_sambaShare->getBoolValue("read only")) return true; - if (! ((m_fi.permission(QFileInfo::WriteOther)) || - (m_fi.permission(QFileInfo::WriteUser) && user == m_fi.owner()) || - (m_fi.permission(QFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group()))) + if (! ((m_fi.permission(TQFileInfo::WriteOther)) || + (m_fi.permission(TQFileInfo::WriteUser) && user == m_fi.owner()) || + (m_fi.permission(TQFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group()))) ) { if (!showMessageBox) @@ -176,10 +176,10 @@ bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, boo return true; } -bool LinuxPermissionChecker::checkUserReadPermissions(const QString & user, bool showMessageBox) { - if (! ((m_fi.permission(QFileInfo::ReadOther)) || - (m_fi.permission(QFileInfo::ReadUser) && user == m_fi.owner()) || - (m_fi.permission(QFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group()))) +bool LinuxPermissionChecker::checkUserReadPermissions(const TQString & user, bool showMessageBox) { + if (! ((m_fi.permission(TQFileInfo::ReadOther)) || + (m_fi.permission(TQFileInfo::ReadUser) && user == m_fi.owner()) || + (m_fi.permission(TQFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group()))) ) { if (!showMessageBox) |