Commit e488559b authored by Michal Humpula's avatar Michal Humpula

migrate from KGlobal::config() to KSharedConfig::openConfig()

parent 05d0d39d
......@@ -36,7 +36,6 @@
#include "katedebug.h"
#include <KMessageBox>
#include <KLocale>
#include <KGlobal>
#include <KStartupInfo>
#include <QFileInfo>
......@@ -399,7 +398,7 @@ bool KateApp::openInput (const QString &text)
KateMainWindow *KateApp::newMainWindow (KConfig *sconfig_, const QString &sgroup_)
{
KConfig *sconfig = sconfig_ ? sconfig_ : KGlobal::config().data();
KConfig *sconfig = sconfig_ ? sconfig_ : KSharedConfig::openConfig().data();
QString sgroup = !sgroup_.isEmpty() ? sgroup_ : "MainWindow0";
KateMainWindow *mainWindow = new KateMainWindow (sconfig, sgroup);
......
......@@ -33,7 +33,6 @@
#include <KTextEditor/ConfigPage>
#include "katedebug.h"
#include <KGlobal>
#include <KIconLoader>
#include <KLocale>
#include <KConfig>
......@@ -62,7 +61,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
setObjectName( "configdialog" );
// FIXME KF5 setHelp( QString(), KGlobal::mainComponent().componentName() );
KSharedConfig::Ptr config = KGlobal::config();
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup cgGeneral = KConfigGroup( config, "General" );
// FIXME KF5 enableButton( Apply, false );
......@@ -312,7 +311,7 @@ void KateConfigDialog::slotOk()
void KateConfigDialog::slotApply()
{
KSharedConfig::Ptr config = KGlobal::config();
KSharedConfig::Ptr config = KSharedConfig::openConfig();
// if data changed apply the kate app stuff
if( m_dataChanged )
......
......@@ -79,7 +79,7 @@ KateDocManager::KateDocManager (QObject *parent)
}
// read in editor config
m_editor->readConfig(KGlobal::config().data());
m_editor->readConfig(KSharedConfig::openConfig().data());
m_documentManager = new Kate::DocumentManager (this);
......@@ -91,7 +91,7 @@ KateDocManager::KateDocManager (QObject *parent)
KateDocManager::~KateDocManager ()
{
// write editor config
m_editor->writeConfig(KGlobal::config().data());
m_editor->writeConfig(KSharedConfig::openConfig().data());
// write metainfos?
if (m_saveMetaInfos)
......@@ -136,8 +136,7 @@ KTextEditor::Document *KateDocManager::createDoc (const KateDocumentInfo& docInf
KTextEditor::Document *doc = (KTextEditor::Document *) m_editor->createDocument(this);
// turn of the editorpart's own modification dialog, we have our own one, too!
KSharedConfig::Ptr config = KGlobal::config();
const KConfigGroup generalGroup(config, "General");
const KConfigGroup generalGroup(KSharedConfig::openConfig(), "General");
bool ownModNotification = generalGroup.readEntry("Modified Notification", false);
if (qobject_cast<KTextEditor::ModificationInterface *>(doc))
qobject_cast<KTextEditor::ModificationInterface *>(doc)->setModifiedOnDiskWarning (!ownModNotification);
......
......@@ -40,7 +40,6 @@
#include <KAboutApplicationDialog>
#include <KEditToolBar>
#include <KGlobal>
#include <KShortcutsDialog>
#include <KLocale>
#include <KMessageBox>
......@@ -68,6 +67,7 @@
#include <QDropEvent>
#include <QList>
#include <QDesktopWidget>
#include <QMimeData>
#include <QMimeDatabase>
#include <kio/job.h>
......@@ -142,7 +142,7 @@ KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup)
else // now fallback to hard defaults ;)
{
// first try global app config
KConfigGroup cg( KGlobal::config(), "MainWindow" );
KConfigGroup cg( KSharedConfig::openConfig(), "MainWindow" );
size.setWidth (cg.readEntry( QString::fromLatin1("Width %1").arg(desk.width()), 0 ));
size.setHeight (cg.readEntry( QString::fromLatin1("Height %1").arg(desk.height()), 0 ));
......@@ -207,7 +207,8 @@ KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup)
KateMainWindow::~KateMainWindow()
{
// first, save our fallback window size ;)
// FIXME KF5 saveWindowSize (KConfigGroup(KGlobal::config(), "MainWindow"));
KConfigGroup cfg(KSharedConfig::openConfig(), "MainWindow");
saveWindowSize(cfg);
// save other options ;=)
saveOptions();
......@@ -499,7 +500,9 @@ void KateMainWindow::newWindow ()
void KateMainWindow::slotEditToolbars()
{
// FIXME KF5 saveMainWindowSettings(KConfigGroup(KGlobal::config(), "MainWindow"));
KConfigGroup cfg(KSharedConfig::openConfig(), "MainWindow");
saveMainWindowSettings(cfg);
KEditToolBar dlg( factory() );
connect( &dlg, SIGNAL(newToolBarConfig()), this, SLOT(slotNewToolbarConfig()) );
......@@ -508,7 +511,7 @@ void KateMainWindow::slotEditToolbars()
void KateMainWindow::slotNewToolbarConfig()
{
applyMainWindowSettings(KConfigGroup(KGlobal::config(), "MainWindow"));
applyMainWindowSettings(KConfigGroup(KSharedConfig::openConfig(), "MainWindow"));
}
void KateMainWindow::slotFileQuit()
......@@ -531,7 +534,7 @@ void KateMainWindow::slotOpenDocument(QUrl url)
void KateMainWindow::readOptions ()
{
KSharedConfig::Ptr config = KGlobal::config();
KSharedConfig::Ptr config = KSharedConfig::openConfig();
const KConfigGroup generalGroup(config, "General");
modNotification = generalGroup.readEntry("Modified Notification", false);
......@@ -547,7 +550,7 @@ void KateMainWindow::readOptions ()
void KateMainWindow::saveOptions ()
{
KSharedConfig::Ptr config = KGlobal::config();
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup generalGroup(config, "General");
......
......@@ -30,7 +30,6 @@
#include <kconfig.h>
#include <kconfiggroup.h>
#include "katedebug.h"
#include <kglobal.h>
#include <kglobalsettings.h>
#include <khbox.h>
#include <kiconloader.h>
......@@ -159,7 +158,7 @@ namespace KateMDI
// try to read the action shortcut
QList<QKeySequence> shortcuts;
KSharedConfig::Ptr cfg = KGlobal::config();
KSharedConfigPtr cfg = KSharedConfig::openConfig();
QString shortcutString = cfg->group("Shortcuts").readEntry(aname, QString());
foreach (const QString &shortcut, shortcutString.split(";")) {
......
......@@ -42,7 +42,7 @@
#include <KIO/CopyJob>
#include <KStringHandler>
#include <klocalizedstring.h>
#include <kglobal.h>
#include <ksharedconfig.h>
#include <QDir>
#include <QLabel>
......@@ -173,7 +173,7 @@ bool KateSession::rename (const QString &name)
KConfig *KateSession::configRead ()
{
if (m_sessionFileRel.isEmpty())
return KGlobal::config().data();
return KSharedConfig::openConfig().data();
if (m_readConfig)
return m_readConfig;
......@@ -184,7 +184,7 @@ KConfig *KateSession::configRead ()
KConfig *KateSession::configWrite ()
{
if (m_sessionFileRel.isEmpty())
return KGlobal::config().data();
return KSharedConfig::openConfig().data();
if (m_writeConfig)
return m_writeConfig;
......@@ -311,12 +311,13 @@ bool KateSessionManager::activateSession (KateSession::Ptr session,
{
// open the new session
KConfig *sc = activeSession()->configRead();
const bool loadDocs = (sc != KGlobal::config().data()); // do not load docs for new sessions
KSharedConfigPtr sharedConfig = KSharedConfig::openConfig();
const bool loadDocs = (sc != sharedConfig.data()); // do not load docs for new sessions
// if we have no session config object, try to load the default
// (anonymous/unnamed sessions)
if ( !sc )
sc = KGlobal::config().data();
sc = sharedConfig.data();
// load plugin config + plugins
KatePluginManager::self()->loadConfig (sc);
......@@ -324,13 +325,13 @@ bool KateSessionManager::activateSession (KateSession::Ptr session,
KateApp::self()->documentManager()->restoreDocumentList (sc);
// window config
KConfigGroup c(KGlobal::config(), "General");
KConfigGroup c(sharedConfig, "General");
if (c.readEntry("Restore Window Configuration", true))
{
// a new, named session, read settings of the default session.
if ( ! sc->hasGroup("Open MainWindows") )
sc = KGlobal::config().data();
sc = sharedConfig.data();
int wCount = sc->group("Open MainWindows").readEntry("Count", 1);
......@@ -391,7 +392,7 @@ static void saveSessionTo(KConfig *sc)
sc->group("Open MainWindows").writeEntry ("Count", KateApp::self()->mainWindows ());
// save config for all windows around ;)
bool saveWindowConfig = KConfigGroup(KGlobal::config(), "General").readEntry("Restore Window Configuration", true);
bool saveWindowConfig = KConfigGroup(KSharedConfig::openConfig(), "General").readEntry("Restore Window Configuration", true);
for (int i = 0; i < KateApp::self()->mainWindows (); ++i )
{
KConfigGroup cg(sc, QString ("MainWindow%1").arg(i) );
......@@ -432,7 +433,7 @@ bool KateSessionManager::saveActiveSession (bool rememberAsLast)
if (rememberAsLast)
{
KSharedConfig::Ptr c = KGlobal::config();
KSharedConfigPtr c = KSharedConfig::openConfig();
c->group("General").writeEntry ("Last Session", activeSession()->sessionFileRelative());
c->sync ();
}
......@@ -444,7 +445,7 @@ bool KateSessionManager::chooseSession ()
bool success = true;
// app config
KConfigGroup c(KGlobal::config(), "General");
KConfigGroup c(KSharedConfig::openConfig(), "General");
// get last used session, default to default session
QString lastSession (c.readEntry ("Last Session", QString()));
......@@ -529,7 +530,7 @@ bool KateSessionManager::chooseSession ()
// write back our nice boolean :)
if (success && chooser->reopenLastSession ())
{
KConfigGroup generalConfig(KGlobal::config(), "General");
KConfigGroup generalConfig(KSharedConfig::openConfig(), "General");
if (res == KateSessionChooser::resultOpen)
generalConfig.writeEntry ("Startup Session", "last");
......
......@@ -115,7 +115,7 @@ class KateSession : public QSharedData
* return 0 if we have no file to read config from atm
* @return config to read from
* @note never delete configRead(), because the return value might be
* KGlobal::config(). Only delete the member variables directly.
* KSharedConfig::openConfig(). Only delete the member variables directly.
*/
KConfig *configRead ();
......@@ -125,7 +125,7 @@ class KateSession : public QSharedData
* return 0 if we have no file to write config to atm
* @return config to write from
* @note never delete configWrite(), because the return value might be
* KGlobal::config(). Only delete the member variables directly.
* KSharedConfig::openConfig(). Only delete the member variables directly.
*/
KConfig *configWrite ();
......
......@@ -229,7 +229,6 @@ void KateFileTree::slotFixOpenWithMenu()
// get a list of appropriate services.
QMimeDatabase db;
QMimeType mime = db.mimeTypeForName( doc->mimeType() );
//kDebug(13001) << "mime type: " << mime.name();
QAction *a = 0;
KService::List offers = KMimeTypeTrader::self()->query(mime.name(), "Application");
......
......@@ -24,7 +24,7 @@
Config stuff plan:
-----------------
main default config is stored in KGlobal::config()+":filetree"
main default config is stored in KSharedConfig::openConfig()+":filetree"
when main config is set, it needs to tell view's to delete
existing customized settings, and use the global ones (somehow)
(maybe some kind of "customized" flag?)
......
......@@ -17,13 +17,12 @@
*/
#include "katefiletreepluginsettings.h"
#include <KGlobal>
#include <KColorScheme>
#include <KColorUtils>
#include "katefiletreedebug.h"
KateFileTreePluginSettings::KateFileTreePluginSettings()
: m_group(KGlobal::config(), "filetree")
: m_group(KSharedConfig::openConfig(), "filetree")
{
KColorScheme colors(QPalette::Active);
QColor bg = colors.background().color();
......
......@@ -21,16 +21,13 @@ Boston, MA 02110-1301, USA.
#include <ktexteditor/editor.h>
#include <kcmdlineargs.h>
#include <kmessagebox.h>
#include <ksharedconfig.h>
#include <QFileInfo>
#include <QTextCodec>
#include <KDebug>
#include <KGlobal>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(LOG_KWRITE)
Q_DECLARE_LOGGING_CATEGORY(LOG_KWRITE)
Q_LOGGING_CATEGORY(LOG_KWRITE, "kwrite")
KWriteApp *KWriteApp::s_self = 0;
......@@ -50,7 +47,7 @@ KWriteApp::KWriteApp(const QCommandLineParser &args)
}
// read from global config once
m_editor->readConfig(KGlobal::config().data());
m_editor->readConfig(KSharedConfig::openConfig().data());
KTextEditor::ContainerInterface *iface =
qobject_cast<KTextEditor::ContainerInterface*>(m_editor);
......
......@@ -42,7 +42,6 @@
#include <klocale.h>
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <kglobal.h>
#include <krecentfilesaction.h>
#include <kshortcutsdialog.h>
#include <kstatusbar.h>
......@@ -50,6 +49,8 @@
#include <ksqueezedtextlabel.h>
#include <kstringhandler.h>
#include <kxmlguifactory.h>
#include <ksharedconfig.h>
#include <QCommandLineParser>
#include <QLoggingCategory>
......@@ -59,6 +60,7 @@
#include <QtCore/QTimer>
#include <QtCore/QTextCodec>
#include <QtCore/QMimeData>
QList<KTextEditor::Document*> KWrite::docList;
QList<KWrite*> KWrite::winList;
......@@ -114,6 +116,9 @@ KWrite::KWrite (KTextEditor::Document *doc)
resize( QSize(700, 480).expandedTo(minimumSizeHint()));
*/
// FIXME: make sure the config dir exists, any idea how to do it more cleanly?
QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).mkpath(".");
// call it as last thing, must be sure everything is already set up ;)
setAutoSaveSettings ();
......@@ -143,7 +148,7 @@ KWrite::~KWrite()
delete doc;
}
KGlobal::config()->sync ();
KSharedConfig::openConfig()->sync();
}
void KWrite::setupActions()
......@@ -333,7 +338,8 @@ void KWrite::editKeys()
void KWrite::editToolbars()
{
// FIXME KF5 saveMainWindowSettings( KGlobal::config()->group( "MainWindow" ) );
KConfigGroup cfg = KSharedConfig::openConfig()->group( "MainWindow" );
saveMainWindowSettings(cfg);
KEditToolBar dlg(guiFactory(), this);
connect( &dlg, SIGNAL(newToolBarConfig()), this, SLOT(slotNewToolbarConfig()) );
......@@ -342,7 +348,7 @@ void KWrite::editToolbars()
void KWrite::slotNewToolbarConfig()
{
applyMainWindowSettings( KGlobal::config()->group( "MainWindow" ) );
applyMainWindowSettings( KSharedConfig::openConfig()->group( "MainWindow" ) );
}
void KWrite::dragEnterEvent( QDragEnterEvent *event )
......@@ -391,10 +397,10 @@ void KWrite::readConfig(KSharedConfigPtr config)
m_recentFiles->loadEntries( config->group( "Recent Files" ));
// editor config already read from KGlobal::config() in KWriteApp constructor.
// editor config already read from KSharedConfig::openConfig() in KWriteApp constructor.
// so only load, if the config is a different one (this is only the case on
// session restore)
if (config != KGlobal::config()) {
if (config != KSharedConfig::openConfig()) {
m_view->document()->editor()->readConfig(config.data());
}
......@@ -422,12 +428,12 @@ void KWrite::writeConfig(KSharedConfigPtr config)
//config file
void KWrite::readConfig()
{
readConfig(KGlobal::config());
readConfig(KSharedConfig::openConfig());
}
void KWrite::writeConfig()
{
writeConfig(KGlobal::config());
writeConfig(KSharedConfig::openConfig());
}
// session management
......
......@@ -29,7 +29,6 @@
#include <kiconloader.h>
#include <ktextedit.h>
#include "kcolorutils.h"
#include <kdebug.h>
#include "expandingdelegate.h"
#include "katepartdebug.h"
......
......@@ -23,7 +23,7 @@
#include <QtWidgets/QTreeWidget>
#include <kicon.h>
#include <kglobal.h>
#include <ksharedconfig.h>
#include "katecompletionmodel.h"
......@@ -146,7 +146,7 @@ KateCompletionConfig::KateCompletionConfig(KateCompletionModel* model, QWidget*
}
// init with defaults from config or really hardcoded ones
KConfigGroup config( KGlobal::config(), "Kate Code Completion Defaults");
KConfigGroup config( KSharedConfig::openConfig(), "Kate Code Completion Defaults");
readConfig (config);
}
......@@ -287,7 +287,7 @@ void KateCompletionConfig::apply( )
{
applyInternal();
KConfigGroup config( KGlobal::config(), "Kate Code Completion Defaults");
KConfigGroup config( KSharedConfig::openConfig(), "Kate Code Completion Defaults");
writeConfig (config);
}
......
......@@ -88,7 +88,7 @@ KateGlobalConfig::KateGlobalConfig ()
s_global = this;
// init with defaults from config or really hardcoded ones
KConfigGroup cg( KGlobal::config(), "Kate Part Defaults");
KConfigGroup cg( KSharedConfig::openConfig(), "Kate Part Defaults");
readConfig (cg);
}
......@@ -202,7 +202,7 @@ KateDocumentConfig::KateDocumentConfig ()
s_global = this;
// init with defaults from config or really hardcoded ones
KConfigGroup cg( KGlobal::config(), "Kate Document Defaults");
KConfigGroup cg( KSharedConfig::openConfig(), "Kate Document Defaults");
readConfig (cg);
}
......@@ -1057,7 +1057,7 @@ bool KateDocumentConfig::onTheFlySpellCheck() const
if(isGlobal()) {
// WARNING: this is slightly hackish, but it's currently the only way to
// do it, see also the KTextEdit class
KConfigGroup configGroup(KGlobal::config(), "Spelling");
KConfigGroup configGroup(KSharedConfig::openConfig(), "Spelling");
return configGroup.readEntry("checkerEnabledByDefault", false);
}
if (m_onTheFlySpellCheckSet) {
......@@ -1141,7 +1141,7 @@ KateViewConfig::KateViewConfig ()
s_global = this;
// init with defaults from config or really hardcoded ones
KConfigGroup config( KGlobal::config(), "Kate View Defaults");
KConfigGroup config( KSharedConfig::openConfig(), "Kate View Defaults");
readConfig (config);
}
......@@ -1979,7 +1979,7 @@ KateRendererConfig::KateRendererConfig ()
s_global = this;
// init with defaults from config or really hardcoded ones
KConfigGroup config(KGlobal::config(), "Kate Renderer Defaults");
KConfigGroup config(KSharedConfig::openConfig(), "Kate Renderer Defaults");
readConfig (config);
}
......
......@@ -49,7 +49,7 @@
#include <kpagedialog.h>
#include <kpagewidgetmodel.h>
#include <kiconloader.h>
#include <kglobal.h>
#include <KGlobal>
#include <KGlobalSettings>
#include <QtCore/QPointer>
......@@ -73,7 +73,7 @@ KateGlobal::KateGlobal ()
i18n( "Embeddable editor component" ), KAboutData::License_LGPL_V2,
i18n( "(c) 2000-2013 The Kate Authors" ), QString(), QString ("http://www.kate-editor.org"))
, m_snippetGlobal (0) // lazy constructed
, m_sessionConfig (KGlobal::config())
, m_sessionConfig (KSharedConfig::openConfig())
{
// set s_self
s_self = this;
......@@ -263,7 +263,7 @@ KateSnippetGlobal *KateGlobal::snippetGlobal()
void KateGlobal::readConfig(KConfig *config)
{
if( !config )
config = KGlobal::config().data();
config = KSharedConfig::openConfig().data();
KateGlobalConfig::global()->readConfig (KConfigGroup(config, "Kate Part Defaults"));
......@@ -279,7 +279,7 @@ void KateGlobal::readConfig(KConfig *config)
void KateGlobal::writeConfig(KConfig *config)
{
if( !config )
config = KGlobal::config().data();
config = KSharedConfig::openConfig().data();
KConfigGroup cgGlobal(config, "Kate Part Defaults");
KateGlobalConfig::global()->writeConfig (cgGlobal);
......
......@@ -88,14 +88,14 @@ class KATEPART_TESTS_EXPORT KateGlobal : public KTextEditor::Editor, public KTex
/**
* property to tell the editor to use a given session config for session related
* configuration instead of KGlobal::config().
* configuration instead of KSharedConfig::openConfig().
* MUST be set directly after first creation of the editor as otherwise
* some parts might not pick this up.
*/
Q_PROPERTY (KSharedConfig::Ptr sessionConfig READ sessionConfig WRITE setSessionConfig)
/**
* Get session config, defaults to KGlobal::config()
* Get session config, defaults to KSharedConfig::openConfig()
* @return session config
*/
KSharedConfig::Ptr sessionConfig ()
......
......@@ -70,7 +70,7 @@ void KatePrinter::readSettings(QPrinter& printer)
// later, the WRONG margins are displayed. The correct ones are still used.
// This is a critical bug in Qt.
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup group(config, "Kate Print Settings");
KConfigGroup margins(&group, "Margins");
......@@ -87,7 +87,7 @@ void KatePrinter::readSettings(QPrinter& printer)
void KatePrinter::writeSettings(QPrinter& printer)
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup group(config, "Kate Print Settings");
KConfigGroup margins(&group, "Margins");
......@@ -719,7 +719,7 @@ bool KatePrintTextSettings::printGuide()
void KatePrintTextSettings::readSettings()
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup printGroup( config, "Kate Print Settings" );
KConfigGroup textGroup( &printGroup, "Text" );
......@@ -732,7 +732,7 @@ void KatePrintTextSettings::readSettings()
void KatePrintTextSettings::writeSettings()
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup printGroup( config, "Kate Print Settings" );
KConfigGroup textGroup( &printGroup, "Text" );
......@@ -1017,7 +1017,7 @@ void KatePrintHeaderFooter::showContextMenu(const QPoint& pos)
void KatePrintHeaderFooter::readSettings()
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup printGroup( config, "Kate Print Settings" );
// Header
......@@ -1073,7 +1073,7 @@ void KatePrintHeaderFooter::readSettings()
void KatePrintHeaderFooter::writeSettings()
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup printGroup( config, "Kate Print Settings" );
// Header
......@@ -1226,7 +1226,7 @@ QColor KatePrintLayout::boxColor()
void KatePrintLayout::readSettings()
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup printGroup(config, "Kate Print Settings");
KConfigGroup layoutGroup(&printGroup, "Layout");
......@@ -1255,7 +1255,7 @@ void KatePrintLayout::readSettings()
void KatePrintLayout::writeSettings()
{
KSharedConfigPtr config = KGlobal::config();
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup printGroup(config, "Kate Print Settings");
KConfigGroup layoutGroup(&printGroup, "Layout");
......
......@@ -71,7 +71,6 @@
#include <kcursor.h>
#include <kicon.h>
#include <klocale.h>
#include <kglobal.h>
#include <kcharsets.h>
#include <kmessagebox.h>
#include <kstandardaction.h>
......@@ -710,7 +709,7 @@ void KateView::slotConfigDialog ()
// write config to global settings, else simple programs don't get config saved ever
// like Konqueror, Dolphin, ...
KateGlobal::self ()->writeConfig (KGlobal::config().data());
KateGlobal::self()->writeConfig(KSharedConfig::openConfig().data());
}
void KateView::setupEditActions()
......
......@@ -2104,7 +2104,7 @@ void KateIconBorder::showMarkMenu( uint line, const QPoint& pos )
{
KateViewConfig::global()->setDefaultMarkType (vec[result-100]);
// flush config, otherwise it isn't necessarily done
KConfigGroup cg(KGlobal::config(), "Kate View Defaults");
KConfigGroup cg(KSharedConfig::openConfig(), "Kate View Defaults");
KateViewConfig::global()->writeConfig(cg);
}
else
......
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