[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/libkonq
From:       Albert R. Valiev <darkstar () altlinux ! ru>
Date:       2005-09-06 13:36:55
Message-ID: 1126013815.230889.12632.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 457760 by darkstar:

Port to new KAuthorized class


 M  +3 -2      konq_operations.cc  
 M  +2 -1      konq_popupmenu.cc  


--- trunk/KDE/kdebase/libkonq/konq_operations.cc #457759:457760
@@ -42,6 +42,7 @@
 #include <qdir.h>//first
 #include <assert.h>
 #include <kapplication.h>
+#include <kauthorized>
 #include <kipc.h>
 #include <kdebug.h>
 #include <kfileitem.h>
@@ -506,7 +507,7 @@
     }
 
     bool linkOnly = false;
-    if (isDesktopFile && !kapp->authorize("run_desktop_files") &&
+    if (isDesktopFile && kapp && KAuthorized::self()->authorize("run_desktop_files") &&
         (m_destURL.path(1) == KGlobalSettings::desktopPath()) )
     {
        linkOnly = true;
@@ -514,7 +515,7 @@
 
     if ( !mlst.isEmpty() && m_destURL.protocol() == "trash" )
     {
-        if ( itemIsOnDesktop && !kapp->authorize("editable_desktop_icons") )
+        if ( itemIsOnDesktop && kapp && KAuthorized::self()->authorize("editable_desktop_icons") )
         {
             delete this;
             return;
--- trunk/KDE/kdebase/libkonq/konq_popupmenu.cc #457759:457760
@@ -25,6 +25,7 @@
 
 #include <klocale.h>
 #include <kapplication.h>
+#include <kauthorized.h>
 #include <kbookmarkmanager.h>
 #include <kdebug.h>
 #include <krun.h>
@@ -317,7 +318,7 @@
             it != list.end();
             ++it)
         {
-            if (!kapp->authorize((*it).stripWhiteSpace()))
+            if (kapp && KAuthorized::self()->authorize((*it).stripWhiteSpace()))
             {
                 return false;
             }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic