Commit 21c17866 authored by Matthias Kretz's avatar Matthias Kretz

ported to KComponentData

svn path=/branches/work/kinstance-redesign/kdesdk/cervisia/; revision=628012
parent 29f1ddef
......@@ -33,6 +33,7 @@
#include <klineedit.h>
#include <klocale.h>
#include <knuminput.h>
#include <kconfiggroup.h>
AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo,
......
......@@ -23,6 +23,7 @@
#include "annotateview.h"
#include <kconfig.h>
#include <kconfiggroup.h>
AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name)
......
......@@ -23,6 +23,7 @@
#include <qpainter.h>
#include <kconfig.h>
#include <kglobalsettings.h>
#include <kconfiggroup.h>
#include "loginfo.h"
#include "tooltip.h"
......
......@@ -33,7 +33,7 @@
#include <kapplication.h>
#include <kfiledialog.h>
#include <kinputdialog.h>
#include <kinstance.h>
#include <kcomponentdata.h>
#include <klocale.h>
#include <knotification.h>
#include <kprocess.h>
......@@ -113,7 +113,7 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget,
{
KGlobal::locale()->insertCatalog("cervisia");
setInstance( CervisiaFactory::instance() );
setComponentData( CervisiaFactory::componentData() );
m_browserExt = new CervisiaBrowserExtension( this );
// start the cvs D-Bus service
......@@ -185,7 +185,9 @@ CervisiaPart::~CervisiaPart()
KConfig *CervisiaPart::config()
{
return CervisiaFactory::instance()->config();
KSharedConfigPtr tmp = CervisiaFactory::componentData().config();
return tmp.data(); // the pointer won't get invalid even if the temporary tmp object is
// destroyed
}
bool CervisiaPart::openUrl( const KUrl &u )
......@@ -1882,7 +1884,7 @@ void CervisiaPart::setFilter()
void CervisiaPart::readSettings()
{
KConfig* config = CervisiaFactory::instance()->config();
KConfig* config = this->config();
config->setGroup("Session");
recent->loadEntries( config );
......@@ -1946,7 +1948,7 @@ void CervisiaPart::readSettings()
void CervisiaPart::writeSettings()
{
KConfig* config = CervisiaFactory::instance()->config();
KConfig* config = this->config();
config->setGroup("Session");
recent->saveEntries( config );
......
......@@ -119,7 +119,7 @@ void CervisiaShell::setupActions()
action->setWhatsThis( hint );
setHelpMenuEnabled(false);
(void) new KHelpMenu(this, instance()->aboutData(), false, actionCollection());
(void) new KHelpMenu(this, componentData().aboutData(), false, actionCollection());
action = actionCollection()->action("help_contents");
hint = i18n("Invokes the KDE help system with the Cervisia documentation");
......@@ -168,7 +168,7 @@ void CervisiaShell::slotConfigureKeys()
void CervisiaShell::slotConfigureToolBars()
{
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
saveMainWindowSettings( KGlobal::config().data(), autoSaveGroup() );
KEditToolbar dlg( factory() );
connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
dlg.exec();
......@@ -176,7 +176,7 @@ void CervisiaShell::slotConfigureToolBars()
void CervisiaShell::slotNewToolbarConfig()
{
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
applyMainWindowSettings( KGlobal::config().data(), autoSaveGroup() );
}
bool CervisiaShell::queryExit()
......@@ -212,19 +212,19 @@ void CervisiaShell::saveProperties(KConfig* config)
void CervisiaShell::readSettings()
{
KConfig* config = KGlobal::config();
KSharedConfig::Ptr config = KGlobal::config();
config->setGroup("Session");
readProperties(config);
readProperties(config.data());
}
void CervisiaShell::writeSettings()
{
KConfig* config = KGlobal::config();
KSharedConfig::Ptr config = KGlobal::config();
config->setGroup("Session");
saveProperties(config);
saveProperties(config.data());
}
......
......@@ -30,6 +30,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <ktextedit.h>
#include <kconfiggroup.h>
#include "misc.h"
......
......@@ -38,6 +38,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kurlcompletion.h>
#include <kconfiggroup.h>
#include "progressdlg.h"
#include "repositories.h"
......
......@@ -34,6 +34,7 @@
#include <QVBoxLayout>
#include <kconfig.h>
#include <klocale.h>
#include <kconfiggroup.h>
#include "cvsserviceinterface.h"
#include "logmessageedit.h"
......
......@@ -37,6 +37,7 @@
#include "sshagent.h"
#include "cvsserviceadaptor.h"
#include <cvsjobadaptor.h>
#include <kconfiggroup.h>
static const char SINGLE_JOB_ID[] = "NonConcurrentJob";
static const char REDIRECT_STDERR[] = "2>&1";
......@@ -83,7 +84,7 @@ CvsService::CvsService()
d->cvsJobs.setAutoDelete(true);
d->loginJobs.setAutoDelete(true);
KConfig* config = KGlobal::config();
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup cs(config, "General");
if( cs.readEntry("UseSshAgent", false) )
{
......
......@@ -34,6 +34,7 @@
#include "sshagent.h"
#include <QDBusConnection>
#include <repositoryadaptor.h>
#include <kconfiggroup.h>
struct Repository::Private
{
Private() : compressionLevel(0) {}
......@@ -215,7 +216,7 @@ void Repository::Private::readGeneralConfig()
void Repository::Private::readConfig()
{
KConfig* config = KGlobal::config();
KSharedConfig::Ptr config = KGlobal::config();
// Sometimes the location can be unequal to the entry in the CVS/Root.
//
......
......@@ -40,6 +40,7 @@
#include <kmessagebox.h>
#include <ktemporaryfile.h>
#include <kprocess.h>
#include <kconfiggroup.h>
#include "cvsserviceinterface.h"
#include "misc.h"
#include "progressdlg.h"
......
......@@ -32,6 +32,7 @@
#include <k3listview.h>
#include <klocale.h>
#include <krfcdate.h>
#include <kconfiggroup.h>
#include "misc.h"
#include "cvsserviceinterface.h"
......
......@@ -44,6 +44,7 @@
#include <krfcdate.h>
#include <krun.h>
#include <kurl.h>
#include <kconfiggroup.h>
#include "cvsserviceinterface.h"
#include "annotatedlg.h"
......
......@@ -32,6 +32,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <kconfiggroup.h>
#include "addrepositorydlg.h"
#include "cvsserviceinterface.h"
......
......@@ -39,6 +39,7 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <qregexp.h>
#include <kconfiggroup.h>
#include "misc.h"
#include "resolvedlg_p.h"
using Cervisia::ResolveEditorDialog;
......
......@@ -20,6 +20,7 @@
#include <kconfig.h>
#include <ktextedit.h>
#include <kconfiggroup.h>
using namespace Cervisia;
......
......@@ -43,7 +43,7 @@
#include <klocale.h>
#include <knuminput.h>
#include <kurlrequester.h>
#include <kinstance.h>
#include <kcomponentdata.h>
#include <kvbox.h>
#include "misc.h"
#include "cervisiasettings.h"
......
......@@ -29,6 +29,7 @@
#include <Q3PtrList>
#include <kconfig.h>
#include <klocale.h>
#include <kconfiggroup.h>
#include "cervisiasettings.h"
#include "entry.h"
......
......@@ -27,6 +27,7 @@
#include <kconfig.h>
#include <klineedit.h>
#include <klocale.h>
#include <kconfiggroup.h>
#include "misc.h"
#include "cvsserviceinterface.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment