[kde-workspace/f17] upstream ksysguard patches

Rex Dieter rdieter at fedoraproject.org
Thu Jun 7 20:20:23 UTC 2012


commit e1ae255c7718b3721a49bcbe81c6ee072319ffbc
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Thu Jun 7 15:23:13 2012 -0500

    upstream ksysguard patches

 kde-workspace-4.8.5-ksysguard-1.patch |  230 +++++++++++++++++++++++++++++++++
 kde-workspace-4.8.5-ksysguard-2.patch |   29 ++++
 kde-workspace.spec                    |   12 ++-
 3 files changed, 270 insertions(+), 1 deletions(-)
---
diff --git a/kde-workspace-4.8.5-ksysguard-1.patch b/kde-workspace-4.8.5-ksysguard-1.patch
new file mode 100644
index 0000000..090e173
--- /dev/null
+++ b/kde-workspace-4.8.5-ksysguard-1.patch
@@ -0,0 +1,230 @@
+commit b6fa43be9d86a577dd103dc4fa727770725e2d85
+Author: John Tapsell <johnflux at gmail.com>
+Date:   Wed Jun 6 20:18:39 2012 +0100
+
+    Remove second invisible ProcessTable widget that was making the process table tab unclickable
+    
+    BUG: 270402
+
+diff --git a/ksysguard/gui/ProcessTable.h b/ksysguard/gui/ProcessTable.h
+deleted file mode 100644
+index 97df235..0000000
+--- a/ksysguard/gui/ProcessTable.h
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/*
+-    KSysGuard, the KDE System Guard
+-   
+-    Copyright (c) 2009 - John Tapsell <tapsell at kde.org>
+-    
+-    This program is free software; you can redistribute it and/or
+-    modify it under the terms of the GNU General Public
+-    License version 2 or at your option version 3 as published by
+-    the Free Software Foundation.
+-
+-    This program is distributed in the hope that it will be useful,
+-    but WITHOUT ANY WARRANTY; without even the implied warranty of
+-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-    GNU General Public License for more details.
+-
+-    You should have received a copy of the GNU General Public License
+-    along with this program; if not, write to the Free Software
+-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+-
+-*/
+-
+-#ifndef PROCESS_TABLE_H_VARS__
+-#define PROCESS_TABLE_H_VARS__
+-
+-class ProcessController;
+-
+-/* This is the process list widget */
+-extern ProcessController *sLocalProcessController;
+-
+-#endif
+diff --git a/ksysguard/gui/WorkSheet.cpp b/ksysguard/gui/WorkSheet.cpp
+index 04391fe..a50019a 100644
+--- a/ksysguard/gui/WorkSheet.cpp
++++ b/ksysguard/gui/WorkSheet.cpp
+@@ -41,11 +41,11 @@
+ #include "DancingBars.h"
+ #include "DummyDisplay.h"
+ #include "FancyPlotter.h"
++#include "ksysguard.h"
+ #include "ListView.h"
+ #include "LogFile.h"
+ #include "MultiMeter.h"
+ #include "ProcessController.h"
+-#include "ProcessTable.h"
+ #include "SensorLogger.h"
+ #include "WorkSheet.h"
+ #include "WorkSheetSettings.h"
+@@ -337,13 +337,12 @@ KSGRD::SensorDisplay* WorkSheet::insertDisplay( DisplayType displayType, QString
+             break;
+         case DisplayProcessControllerRemote:
+             newDisplay = new ProcessController(this, &mSharedSettings);
++            newDisplay->setObjectName("remote process controller");
+             break;
+         case DisplayProcessControllerLocal:
+-            Q_ASSERT(sLocalProcessController);
+-            if (!sLocalProcessController->parentWidget())
+-                newDisplay = sLocalProcessController;
+-            else
+-                newDisplay = new ProcessController(this, &mSharedSettings);
++            newDisplay = new ProcessController(this, &mSharedSettings);
++            if (!Toplevel->localProcessController())
++                Toplevel->setLocalProcessController(static_cast<ProcessController *>(newDisplay));
+             break;
+         default:
+             Q_ASSERT(false);
+@@ -595,7 +594,7 @@ void WorkSheet::replaceDisplay( int index, KSGRD::SensorDisplay* newDisplay )
+         mDisplayList.append(newDisplay);
+     } else {
+         // remove the old display && sensor frame at this location
+-        if( mDisplayList[ index ] && mDisplayList[ index ] != sLocalProcessController )
++        if( mDisplayList[ index ] && mDisplayList[ index ] != Toplevel->localProcessController() )
+             delete mDisplayList[ index ];
+         mDisplayList[index] = newDisplay;
+     }
+diff --git a/ksysguard/gui/ksysguard.cpp b/ksysguard/gui/ksysguard.cpp
+index 5e9fddf..2ad34f2 100644
+--- a/ksysguard/gui/ksysguard.cpp
++++ b/ksysguard/gui/ksysguard.cpp
+@@ -60,25 +60,22 @@
+ #include "StyleEngine.h"
+ #include "HostConnector.h"
+ #include "ProcessController.h"
+-#include "ProcessTable.h"
+ #include "processui/ksysguardprocesslist.h"
+ 
+ #include "ksysguard.h"
+ 
+-
+-ProcessController *sLocalProcessController = NULL;
+-
+ //Comment out to stop ksysguard from forking.  Good for debugging
+ //#define FORK_KSYSGUARD
+ 
+ static const char Description[] = I18N_NOOP( "KDE System Monitor" );
+-TopLevel* topLevel;
++TopLevel* Toplevel;
+ 
+ TopLevel::TopLevel()
+   : KXmlGuiWindow( NULL, Qt::WindowFlags(KDE_DEFAULT_WINDOWFLAGS) | Qt::WindowContextHelpButtonHint)
+ {
+   QDBusConnection::sessionBus().registerObject("/", this, QDBusConnection::ExportScriptableSlots);
+   mTimerId = -1;
++  mLocalProcessController = NULL;
+ 
+   mSplitter = new QSplitter( this );
+   mSplitter->setOrientation( Qt::Horizontal );
+@@ -93,9 +90,6 @@ TopLevel::TopLevel()
+   connect( mWorkSpace, SIGNAL(currentChanged(int)),
+            SLOT(currentTabChanged(int)) );
+ 
+-  sLocalProcessController = new ProcessController( this, NULL);
+-  connect( sLocalProcessController, SIGNAL(processListChanged()), this, SLOT(updateProcessCount()));
+-
+   /* Create the status bar. It displays some information about the
+    * number of processes and the memory consumption of the local
+    * host. */
+@@ -149,6 +143,16 @@ TopLevel::TopLevel()
+   retranslateUi();
+ }
+ 
++void TopLevel::setLocalProcessController(ProcessController * localProcessController)
++{
++  Q_ASSERT(!mLocalProcessController);
++  mLocalProcessController = localProcessController;
++  connect( mLocalProcessController, SIGNAL(processListChanged()), this, SLOT(updateProcessCount()));
++  for(int i = 0; i < mLocalProcessController->actions().size(); i++) {
++    actionCollection()->addAction("processAction" + QString::number(i), mLocalProcessController->actions().at(i));
++  }
++}
++
+ void TopLevel::retranslateUi()
+ {
+   setPlainCaption( i18n( "System Monitor" ) );
+@@ -356,7 +360,7 @@ void TopLevel::timerEvent( QTimerEvent* )
+ }
+ 
+ void TopLevel::updateProcessCount()  {
+-    const QString s = i18np( "1 process" "\xc2\x9c" "1", "%1 processes" "\xc2\x9c" "%1", sLocalProcessController->processList()->visibleProcessesCount() );
++    const QString s = i18np( "1 process" "\xc2\x9c" "1", "%1 processes" "\xc2\x9c" "%1", mLocalProcessController->processList()->visibleProcessesCount() );
+     sbProcessCount->setText( s );
+ }
+ void TopLevel::changeEvent( QEvent * event )
+@@ -402,11 +406,6 @@ void TopLevel::readProperties( const KConfigGroup& cfg )
+   KSGRD::Style->readProperties( cfg );
+ 
+   mWorkSpace->readProperties( cfg );
+-
+-  QList<WorkSheet *> workSheets = mWorkSpace->getWorkSheets();
+-  for(int i = 0; i < sLocalProcessController->actions().size(); i++) {
+-    actionCollection()->addAction("processAction" + QString::number(i), sLocalProcessController->actions().at(i));
+-  }
+ }
+ 
+ void TopLevel::saveProperties( KConfigGroup& cfg )
+@@ -561,22 +560,22 @@ extern "C" KDE_EXPORT int kdemain( int argc, char** argv )
+   write( initpipe[ 1 ], &c, 1 );
+   close( initpipe[ 1 ] );
+ #endif
+-  topLevel = new TopLevel();
++  Toplevel = new TopLevel();
+ 
+ 
+   // create top-level widget
+-  topLevel->readProperties( KConfigGroup( KGlobal::config(), "MainWindow" ) );
++  Toplevel->readProperties( KConfigGroup( KGlobal::config(), "MainWindow" ) );
+   // setup the statusbar, toolbar etc.
+   // Note that this comes after creating the top-level widgets whcih also 
+   // sets up the various QActions that the user may have added to the toolbar
+-  topLevel->initStatusBar();
++  Toplevel->initStatusBar();
+ 
+   //There seems to be some serious bugs with the session restore code.  Disabling
+ //  if ( app->isSessionRestored() )
+-//    topLevel->restore( 1 );
++//    Toplevel->restore( 1 );
+ 
+-  topLevel->show();
+-  KSGRD::SensorMgr->setBroadcaster( topLevel );  // SensorMgr uses a QPointer for toplevel, so it is okay if topLevel is deleted first
++  Toplevel->show();
++  KSGRD::SensorMgr->setBroadcaster( Toplevel );  // SensorMgr uses a QPointer for toplevel, so it is okay if Toplevel is deleted first
+ 
+   // run the application
+   int result = app->exec();
+diff --git a/ksysguard/gui/ksysguard.h b/ksysguard/gui/ksysguard.h
+index b597a0a..bc9dc9c 100644
+--- a/ksysguard/gui/ksysguard.h
++++ b/ksysguard/gui/ksysguard.h
+@@ -30,8 +30,11 @@
+ #include <ksgrd/SensorClient.h>
+ 
+ class QSplitter;
++class QAction;
++class KAction;
+ class SensorBrowserWidget;
+ class Workspace;
++class ProcessController;
+ 
+ 
+ class TopLevel : public KXmlGuiWindow, public KSGRD::SensorClient
+@@ -48,6 +51,8 @@ class TopLevel : public KXmlGuiWindow, public KSGRD::SensorClient
+     virtual void answerReceived( int id, const QList<QByteArray> & );
+ 
+     void initStatusBar();
++    void setLocalProcessController(ProcessController * localProcessController);
++    ProcessController *localProcessController() const { return mLocalProcessController; }
+ 
+   public Q_SLOTS:
+     Q_SCRIPTABLE Q_NOREPLY void showOnCurrentDesktop();
+@@ -99,6 +104,7 @@ class TopLevel : public KXmlGuiWindow, public KSGRD::SensorClient
+     QLabel *sbCpuStat;
+     QLabel *sbMemTotal;
+     QLabel *sbSwapTotal;
++    ProcessController *mLocalProcessController;
+ 
+     QList<int> mSplitterSize;
+ };
diff --git a/kde-workspace-4.8.5-ksysguard-2.patch b/kde-workspace-4.8.5-ksysguard-2.patch
new file mode 100644
index 0000000..ce100a3
--- /dev/null
+++ b/kde-workspace-4.8.5-ksysguard-2.patch
@@ -0,0 +1,29 @@
+commit 4ccec1a6623426ad7b3672ce85424ad9201e5b73
+Author: John Tapsell <johnflux at gmail.com>
+Date:   Wed Jun 6 23:00:36 2012 +0100
+
+    Fix regression that you couldn't add new beams to custom plots
+    
+    Thanks to Simon Kaczor for the patch
+    BUG: 290504
+
+diff --git a/ksysguard/gui/WorkSheet.cpp b/ksysguard/gui/WorkSheet.cpp
+index a50019a..b20f077 100644
+--- a/ksysguard/gui/WorkSheet.cpp
++++ b/ksysguard/gui/WorkSheet.cpp
+@@ -407,13 +407,11 @@ KSGRD::SensorDisplay *WorkSheet::addDisplay( const QString &hostName,
+             return 0;
+         }
+         display = insertDisplay(displayType, sensorDescr, index);
+-	if (!display->addSensor( hostName, sensorName, sensorType, sensorDescr )) {
++    }
++    if (!display->addSensor( hostName, sensorName, sensorType, sensorDescr )) {
+             // Failed to add sensor, so we need to remove the display that we just added
+             removeDisplay(display);
+             return 0;
+-	}
+-
+-
+     }
+ 
+     return display;
diff --git a/kde-workspace.spec b/kde-workspace.spec
index 660827f..f46a120 100644
--- a/kde-workspace.spec
+++ b/kde-workspace.spec
@@ -11,7 +11,7 @@
 Summary: KDE Workspace
 Name:    kde-workspace
 Version: 4.8.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2
 URL:     https://projects.kde.org/projects/kde/kde-workspace
@@ -101,6 +101,11 @@ Patch57: kde-workspace-4.8.0-bug796969.patch
 Patch58: kde-workspace-4.8.0-systemd-shutdown.patch
 
 ## upstream patches
+# ksysguard fixes
+# https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/b6fa43be9d86a577dd103dc4fa727770725e2d85
+Patch100: kde-workspace-4.8.5-ksysguard-1.patch
+# https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/4ccec1a6623426ad7b3672ce85424ad9201e5b73
+Patch101: kde-workspace-4.8.5-ksysguard-2.patch
 
 ## plasma active patches
 # adapted version of wac-html-widgets.patch
@@ -428,6 +433,8 @@ Requires: akonadi
 %patch58 -p1 -b .systemd-shutdown
 
 # upstream patches
+%patch100 -p1 -b .ksysguard-1
+%patch101 -p1 -b .ksysguard-2
 
 # plasma-active
 %patch153 -p1 -b .wac-html-widgets
@@ -975,6 +982,9 @@ fi
 
 
 %changelog
+* Thu Jun 07 2012 Rex Dieter <rdieter at fedoraproject.org> 4.8.4-2
+- upstream ksysguard patches
+
 * Mon Jun 04 2012 Than Ngo <than at redhat.com> - 4.8.4-1
 - 4.8.4
 


More information about the scm-commits mailing list