mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
systemsettings: remove redundant BaseData::configGroup() method
BaseMode::config() already provides access to KConfigGroup object Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d20b058f4b
commit
2bfdb90ae0
4 changed files with 7 additions and 18 deletions
|
@ -62,9 +62,4 @@ void BaseData::setMenuItem( MenuItem * item )
|
|||
rootMenu = item;
|
||||
}
|
||||
|
||||
KConfigGroup BaseData::configGroup( const QString& pluginName )
|
||||
{
|
||||
return KGlobal::config()->group( pluginName );
|
||||
}
|
||||
|
||||
#include "moc_BaseData.cpp"
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
#ifndef BASEDATA_H
|
||||
#define BASEDATA_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include "systemsettingsview_export.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
|
||||
class MenuItem;
|
||||
class KConfigGroup;
|
||||
|
||||
|
@ -72,14 +73,6 @@ public:
|
|||
*/
|
||||
void setMenuItem( MenuItem * item );
|
||||
|
||||
/**
|
||||
* Returns the configuration group by the name provided in the current applications configuration file.
|
||||
*
|
||||
* @param pluginName the name of the group that is required.
|
||||
* @returns The configuration group that is required.
|
||||
*/
|
||||
KConfigGroup configGroup( const QString& pluginName );
|
||||
|
||||
private:
|
||||
MenuItem * rootMenu;
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ void BaseMode::init( const KService::Ptr modeService )
|
|||
{
|
||||
d->rootItem = BaseData::instance()->menuItem();
|
||||
d->service = modeService;
|
||||
d->config = BaseData::instance()->configGroup( modeService->library() );
|
||||
d->config = KGlobal::config()->group( modeService->library() );
|
||||
initEvent();
|
||||
connect( moduleView(), SIGNAL(moduleChanged(bool)), this, SIGNAL(viewChanged(bool)) );
|
||||
}
|
||||
|
|
|
@ -20,17 +20,18 @@
|
|||
#ifndef BASEMODE_H
|
||||
#define BASEMODE_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include "systemsettingsview_export.h"
|
||||
|
||||
#include <KService>
|
||||
|
||||
#include <QObject>
|
||||
#include <QAction>
|
||||
#include <QAbstractItemView>
|
||||
#include <QList>
|
||||
|
||||
class MenuItem;
|
||||
class ModuleView;
|
||||
class KConfigDialog;
|
||||
#include <QAbstractItemView>
|
||||
#include <QList>
|
||||
|
||||
/**
|
||||
* @brief Provides a interface for System Settings views
|
||||
|
|
Loading…
Add table
Reference in a new issue