summaryrefslogtreecommitdiff
path: root/kimap/acl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimap/acl.cpp')
-rw-r--r--kimap/acl.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/kimap/acl.cpp b/kimap/acl.cpp
index d0bf3e2..980538b 100644
--- a/kimap/acl.cpp
+++ b/kimap/acl.cpp
@@ -21,7 +21,7 @@
#include <QtCore/QByteArray>
#include <QtCore/QMap>
-#include <KDE/KGlobal>
+#include <kglobal.h>
namespace KIMAP {
namespace Acl {
@@ -29,7 +29,8 @@ namespace Acl {
class RightsMap
{
public:
- RightsMap() {
+ RightsMap()
+ {
map['l'] = Lookup;
map['r'] = Read;
map['s'] = KeepSeen;
@@ -59,7 +60,7 @@ class RightsMap
QMap<char, Right> map;
};
-K_GLOBAL_STATIC( RightsMap, globalRights )
+Q_GLOBAL_STATIC(RightsMap, globalRights)
}
}
@@ -68,18 +69,17 @@ KIMAP::Acl::Rights KIMAP::Acl::rightsFromString( const QByteArray &string )
{
Rights result;
- if ( string.isEmpty() ) {
+ if ( string.isEmpty() )
return result;
- }
int pos = 0;
- if ( string[0] == '+' || string[0] == '-' ) { // Skip modifier if any
+ if ( string[0] == '+' || string[0]== '-') { // Skip modifier if any
pos++;
}
for ( int i = pos; i < string.size(); i++ ) {
- if ( globalRights->map.contains( string[i] ) ) {
- result|= globalRights->map[string[i]];
+ if ( globalRights()->map.contains( string[i] ) ) {
+ result|= globalRights()->map[string[i]];
}
}
@@ -90,9 +90,9 @@ QByteArray KIMAP::Acl::rightsToString( Rights rights )
{
QByteArray result;
- for ( int right = Lookup; right <= Custom9; right <<= 1 ) {
+ for ( int right = Lookup; right<=Custom9; right<<=1 ) {
if ( rights & right ) {
- result += globalRights->map.key( (Right)right );
+ result+= globalRights()->map.key( (Right)right );
}
}
@@ -125,5 +125,3 @@ KIMAP::Acl::Rights KIMAP::Acl::denormalizedRights( KIMAP::Acl::Rights rights )
return denormalized;
}
-#include "acl.moc"
-