packages: kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch - u...

shadzik shadzik at pld-linux.org
Fri Jul 30 20:28:24 CEST 2010


Author: shadzik                      Date: Fri Jul 30 18:28:24 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated for 4.5.0

---- Files affected:
packages/kde4-kdebase-workspace:
   kde4-kdebase-workspace-rootprivs.patch (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: packages/kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch
diff -u packages/kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch:1.5 packages/kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch:1.6
--- packages/kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch:1.5	Thu Feb 18 00:36:40 2010
+++ packages/kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch	Fri Jul 30 20:28:19 2010
@@ -1,7 +1,7 @@
-diff -ur kdebase-workspace-4.3.73svn1040395/systemsettings/core/ModuleView.cpp kdebase-workspace-4.3.73svn1040395.new/systemsettings/core/ModuleView.cpp
---- kdebase-workspace-4.3.73svn1040395/systemsettings/core/ModuleView.cpp	2009-10-26 10:14:41.000000000 +0100
-+++ kdebase-workspace-4.3.73svn1040395.new/systemsettings/core/ModuleView.cpp	2009-10-29 12:38:25.153353926 +0100
-@@ -40,6 +40,7 @@
+diff -ur kdebase-workspace-4.4.90/systemsettings/core/ModuleView.cpp kdebase-workspace-4.4.90-rootprivs/systemsettings/core/ModuleView.cpp
+--- kdebase-workspace-4.4.90/systemsettings/core/ModuleView.cpp	2010-06-24 18:28:10.000000000 +0200
++++ kdebase-workspace-4.4.90-rootprivs/systemsettings/core/ModuleView.cpp	2010-06-26 00:47:30.000000000 +0200
+@@ -41,6 +41,7 @@
  #include <KCModuleProxy>
  #include <KStandardGuiItem>
  #include <KDialogButtonBox>
@@ -9,38 +9,39 @@
  #include <kauthaction.h>
  
  #include "MenuItem.h"
-@@ -124,6 +125,33 @@
+@@ -131,6 +132,35 @@
          return;
      }
  
-+    if ( menuItem->service()->property( "X-KDE-RootOnly", QVariant::Bool ).toBool() ) {
-+        QString kdesu = KStandardDirs::findExe( "kdesu" );
-+        QString cmd = menuItem->service()->exec().trimmed();
-+
-+        /* Prepare the process to run the kcmshell */
-+        if ( cmd.left(5) == "kdesu" )
-+        {
-+            cmd = cmd.remove(0,5).trimmed();
-+
-+            /* Remove all kdesu switches */
-+            while ( cmd.length() > 1 && cmd[ 0 ] == '-' )
-+                cmd = cmd.remove( 0, cmd.indexOf( ' ' ) ).trimmed();
-+        }
-+
-+        if ( cmd.left(9) == "kcmshell4" )
-+            cmd = cmd.remove(0,9).trimmed();
++    {
++        MenuItem *menuItemPtr = menuItem.data( Qt::UserRole ).value<MenuItem*>();
++        if ( menuItemPtr->service()->property( "X-KDE-RootOnly", QVariant::Bool ).toBool() ) {
++            QString kdesu = KStandardDirs::findExe( "kdesu" );
++            QString cmd = menuItemPtr->service()->exec().trimmed();
++
++            /* Prepare the process to run the kcmshell */
++            if ( cmd.left(5) == "kdesu" )
++            {
++                cmd = cmd.remove(0,5).trimmed();
++
++                /* Remove all kdesu switches */
++                while ( cmd.length() > 1 && cmd[ 0 ] == '-' )
++                    cmd = cmd.remove( 0, cmd.indexOf( ' ' ) ).trimmed();
++            }
++
++            if ( cmd.left(9) == "kcmshell4" )
++                cmd = cmd.remove(0,9).trimmed();
 +
-+        QStringList args;
-+        args << "-i" << QString( menuItem->service()->icon() ) << "-c" << QString( "%1 %2 --lang %3" ).arg( KStandardDirs::locate("exe", "kcmshell4") ).arg( cmd ).arg( KGlobal::locale()->language() );
++            QStringList args;
++            args << "-i" << QString( menuItemPtr->service()->icon() ) << "-c" << QString( "%1 %2 --lang %3" ).arg( KStandardDirs::locate("exe", "kcmshell4") ).arg( cmd ).arg( KGlobal::locale()->language() );
 +
-+        kDebug() << "Starting root module: " << args;
-+        QProcess::startDetached( kdesu, args );
++            kDebug() << "Starting root module: " << args;
++            QProcess::startDetached( kdesu, args );
 +
-+        return;
++            return;
++        }
 +    }
 +
-+
-     QList<KCModuleInfo*> modules;
-     if ( menuItem->children().empty() ) {
-         modules << &menuItem->item();
-Tylko w kdebase-workspace-4.3.73svn1040395.new/systemsettings/core: ModuleView.cpp~
+     QList<QModelIndex> indexes;
+     for ( int done = 0; menuItem.model()->rowCount( menuItem ) > done; done = 1 + done ) {
+         indexes << menuItem.model()->index( done, 0, menuItem );
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kde4-kdebase-workspace/kde4-kdebase-workspace-rootprivs.patch?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list