[BeFree CVS] tracker/src propdialog.cpp,1.5,1.6
Status: Planning
Brought to you by:
plfiorini
|
From: Pier L. F. <plf...@us...> - 2005-01-06 09:16:09
|
Update of /cvsroot/befree/tracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14928 Modified Files: propdialog.cpp Log Message: Some fixes Index: propdialog.cpp =================================================================== RCS file: /cvsroot/befree/tracker/src/propdialog.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- propdialog.cpp 29 Dec 2004 12:53:05 -0000 1.5 +++ propdialog.cpp 6 Jan 2005 09:15:58 -0000 1.6 @@ -351,14 +351,14 @@ // the first item which is "" currentItem++; + // Don't set permissions if selected empty item + if (currentItem == 0) + return; + for (int i = 0; i < fInfos.size(); ++i) { - // Don't set permissions if selected empty item - if (currentItem == 0) - continue; - QFile::Permissions perms = fInfos.at(i).permissions(); - perms ^= (QFile::ReadUser | QFile::WriteUser); + perms &= ~(QFile::ReadUser | QFile::WriteUser); switch (currentItem) { @@ -386,7 +386,7 @@ if (state == QCheckBox::On) perms |= QFile::ExeUser; else - perms ^= QFile::ExeUser; + perms &= ~QFile::ExeUser; (void)QFile::setPermissions(fInfos.at(i).absoluteFilePath(), perms); } @@ -409,7 +409,7 @@ continue; QFile::Permissions perms = fInfos.at(i).permissions(); - perms ^= (QFile::ReadGroup | QFile::WriteGroup); + perms &= ~(QFile::ReadGroup | QFile::WriteGroup); switch (currentItem) { @@ -437,7 +437,7 @@ if (state == QCheckBox::On) perms |= QFile::ExeGroup; else - perms ^= QFile::ExeGroup; + perms &= ~QFile::ExeGroup; (void)QFile::setPermissions(fInfos.at(i).absoluteFilePath(), perms); } @@ -460,7 +460,7 @@ continue; QFile::Permissions perms = fInfos.at(i).permissions(); - perms ^= (QFile::ReadOther | QFile::WriteOther); + perms &= ~(QFile::ReadOther | QFile::WriteOther); switch (currentItem) { @@ -488,7 +488,7 @@ if (state == QCheckBox::On) perms |= QFile::ExeOther; else - perms ^= QFile::ExeOther; + perms &= ~QFile::ExeOther; (void)QFile::setPermissions(fInfos.at(i).absoluteFilePath(), perms); } |