[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kresources
From: Allen Winter <winter () kde ! org>
Date: 2006-07-31 23:28:25
Message-ID: 1154388505.714776.719.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 568385 by winterz:
passbyvalue fixes.
M +15 -12 managerimpl.cpp
M +10 -7 managerimpl.h
--- trunk/KDE/kdepimlibs/kresources/managerimpl.cpp #568384:568385
@@ -1,6 +1,6 @@
/*
This file is part of libkresources.
-
+
Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
@@ -139,7 +139,7 @@
mConfig->setGroup( "General" );
mConfig->writeEntry( "ResourceKeys", activeKeys );
mConfig->writeEntry( "PassiveResourceKeys", passiveKeys );
- if ( mStandard )
+ if ( mStandard )
mConfig->writeEntry( "Standard", mStandard->identifier() );
else
mConfig->writeEntry( "Standard", "" );
@@ -192,19 +192,20 @@
}
}
-Resource *ManagerImpl::standardResource()
+Resource *ManagerImpl::standardResource()
{
return mStandard;
}
-void ManagerImpl::setStandardResource( Resource *resource )
+void ManagerImpl::setStandardResource( Resource *resource )
{
mStandard = resource;
}
// DCOP asynchronous functions
-void ManagerImpl::dcopKResourceAdded( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceAdded( const QString& managerId,
+ const QString& resourceId )
{
if ( managerId == mId ) {
kDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -223,12 +224,13 @@
if ( resource ) {
mNotifier->notifyResourceAdded( resource );
- } else
+ } else
kError() << "Received DCOP: resource added for unknown resource "
<< resourceId << endl;
}
-void ManagerImpl::dcopKResourceModified( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceModified( const QString& managerId,
+ const QString& resourceId )
{
if ( managerId == mId ) {
kDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -239,12 +241,13 @@
Resource *resource = getResource( resourceId );
if ( resource ) {
mNotifier->notifyResourceModified( resource );
- } else
+ } else
kError() << "Received DCOP: resource modified for unknown resource "
<< resourceId << endl;
}
-void ManagerImpl::dcopKResourceDeleted( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceDeleted( const QString& managerId,
+ const QString& resourceId )
{
if ( managerId == mId ) {
kDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -295,7 +298,7 @@
if( mResources.at(i)->isActive() == active) {
result.append( mResources.at(i) );
}
- }
+ }
return result;
}
@@ -356,7 +359,7 @@
mConfig->writeEntry( "Standard", resource->identifier() );
else if ( resource != mStandard && standardKey == key )
mConfig->writeEntry( "Standard", "" );
-
+
if ( checkActive ) {
QStringList activeKeys = mConfig->readEntry( "ResourceKeys", QStringList() );
QStringList passiveKeys = mConfig->readEntry( "PassiveResourceKeys", QStringList() );
@@ -389,7 +392,7 @@
QString key = resource->identifier();
if ( !mConfig ) createStandardConfig();
-
+
mConfig->setGroup( "General" );
QStringList activeKeys = mConfig->readEntry( "ResourceKeys", QStringList() );
if ( activeKeys.contains( key ) ) {
--- trunk/KDE/kdepimlibs/kresources/managerimpl.h #568384:568385
@@ -25,7 +25,7 @@
#include <QString>
-#include "kresources/resource.h"
+#include "resource.h"
class KConfig;
@@ -71,15 +71,18 @@
static QString defaultConfigFile( const QString &family );
Q_SIGNALS:
- void signalKResourceAdded(QString managerId, QString resourceId);
- void signalKResourceModified(QString managerId, QString resourceId);
- void signalKResourceDeleted(QString managerId, QString resourceId);
+ void signalKResourceAdded( QString managerId, QString resourceId );
+ void signalKResourceModified( QString managerId, QString resourceId );
+ void signalKResourceDeleted( QString managerId, QString resourceId );
private Q_SLOTS:
// dcop calls
- void dcopKResourceAdded( QString managerId, QString resourceId );
- void dcopKResourceModified( QString managerId, QString resourceId );
- void dcopKResourceDeleted( QString managerId, QString resourceId );
+ void dcopKResourceAdded( const QString& managerId,
+ const QString& resourceId );
+ void dcopKResourceModified( const QString& managerId,
+ const QString& resourceId );
+ void dcopKResourceDeleted( const QString& managerId,
+ const QString& resourceId );
private:
void createStandardConfig();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic