summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Feck <[email protected]>2014-10-01 19:40:12 +0200
committerChristoph Feck <[email protected]>2014-10-01 19:40:12 +0200
commitae442195235ae7d250ccf8b0161c03271c142be1 (patch)
tree10252cc6d98d9c46e3878bdbde2f4fd30e0af270
parentae614c1de40f4a485870f0177a3fa8091cadabb6 (diff)
KGlobal::config -> KSharedConfig::openConfig
-rw-r--r--commands/kpCommandHistoryBase.cpp4
-rw-r--r--dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp4
-rw-r--r--document/kpDocumentSaveOptions.cpp2
-rw-r--r--mainWindow/kpMainWindow.cpp8
-rw-r--r--mainWindow/kpMainWindow_File.cpp18
-rw-r--r--mainWindow/kpMainWindow_Image.cpp2
-rw-r--r--mainWindow/kpMainWindow_Settings.cpp2
-rw-r--r--mainWindow/kpMainWindow_Text.cpp14
-rw-r--r--mainWindow/kpMainWindow_Tools.cpp4
-rw-r--r--mainWindow/kpMainWindow_View.cpp2
-rw-r--r--mainWindow/kpMainWindow_View_Thumbnail.cpp8
-rw-r--r--widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp4
-rw-r--r--widgets/imagelib/effects/kpEffectFlattenWidget.cpp4
-rw-r--r--widgets/kpDocumentSaveOptionsWidget.cpp6
-rw-r--r--widgets/toolbars/options/kpToolWidgetBase.cpp4
15 files changed, 43 insertions, 43 deletions
diff --git a/commands/kpCommandHistoryBase.cpp b/commands/kpCommandHistoryBase.cpp
index 5b70257..4e7f7d2 100644
--- a/commands/kpCommandHistoryBase.cpp
+++ b/commands/kpCommandHistoryBase.cpp
@@ -232,7 +232,7 @@ void kpCommandHistoryBase::readConfig ()
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::readConfig()";
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupUndoRedo);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupUndoRedo);
setUndoMinLimit (cfg.readEntry (kpSettingUndoMinLimit, undoMinLimit ()));
setUndoMaxLimit (cfg.readEntry (kpSettingUndoMaxLimit, undoMaxLimit ()));
@@ -249,7 +249,7 @@ void kpCommandHistoryBase::writeConfig ()
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpCommandHistoryBase::writeConfig()";
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupUndoRedo);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupUndoRedo);
cfg.writeEntry (kpSettingUndoMinLimit, undoMinLimit ());
cfg.writeEntry (kpSettingUndoMaxLimit, undoMaxLimit ());
diff --git a/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp b/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
index 19e29f3..b45de20 100644
--- a/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
+++ b/dialogs/imagelib/transforms/kpTransformResizeScaleDialog.cpp
@@ -108,7 +108,7 @@ kpTransformResizeScaleDialog::kpTransformResizeScaleDialog (
baseLayout->addWidget(operationGroupBox);
baseLayout->addWidget(dimensionsGroupBox);
- KConfigGroup cfg(KGlobal::config(), kpSettingsGroupGeneral);
+ KConfigGroup cfg(KSharedConfig::openConfig(), kpSettingsGroupGeneral);
setKeepAspectRatio(cfg.readEntry(kpSettingResizeScaleLastKeepAspect, false));
m_lastType = static_cast<kpTransformResizeScaleCommand::Type>
(cfg.readEntry(kpSettingResizeScaleScaleType,
@@ -805,7 +805,7 @@ void kpTransformResizeScaleDialog::accept ()
}
// store settings
- KConfigGroup cfg(KGlobal::config(), kpSettingsGroupGeneral);
+ KConfigGroup cfg(KSharedConfig::openConfig(), kpSettingsGroupGeneral);
cfg.writeEntry(kpSettingResizeScaleLastKeepAspect, m_keepAspectRatioCheckBox->isChecked());
cfg.writeEntry(kpSettingResizeScaleScaleType, static_cast<int>(m_lastType));
diff --git a/document/kpDocumentSaveOptions.cpp b/document/kpDocumentSaveOptions.cpp
index ac58955..9af3dd4 100644
--- a/document/kpDocumentSaveOptions.cpp
+++ b/document/kpDocumentSaveOptions.cpp
@@ -419,7 +419,7 @@ static QStringList mimeTypesSupportingProperty (const QString &property,
{
QStringList mimeTypeList;
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupMimeTypeProperties);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupMimeTypeProperties);
if (cfg.hasKey (property))
{
diff --git a/mainWindow/kpMainWindow.cpp b/mainWindow/kpMainWindow.cpp
index 135fa22..8387b4a 100644
--- a/mainWindow/kpMainWindow.cpp
+++ b/mainWindow/kpMainWindow.cpp
@@ -109,7 +109,7 @@ void kpMainWindow::readGeneralSettings ()
kDebug () << "\tkpMainWindow(" << objectName () << ")::readGeneralSettings()";
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
d->configFirstTime = cfg.readEntry (kpSettingFirstTime, true);
d->configShowGrid = cfg.readEntry (kpSettingShowGrid, false);
@@ -157,7 +157,7 @@ void kpMainWindow::readThumbnailSettings ()
kDebug () << "\tkpMainWindow(" << objectName () << ")::readThumbnailSettings()";
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupThumbnail);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupThumbnail);
d->configThumbnailShown = cfg.readEntry (kpSettingThumbnailShown, false);
d->configThumbnailGeometry = cfg.readEntry (kpSettingThumbnailGeometry, QRect ());
@@ -213,7 +213,7 @@ void kpMainWindow::init ()
// KConfig::readEntry() does not actually reread from disk, hence doesn't
// realize what other processes have done e.g. Settings / Show Path
- KGlobal::config ()->reparseConfiguration ();
+ KSharedConfig::openConfig ()->reparseConfiguration ();
readGeneralSettings ();
readThumbnailSettings ();
@@ -272,7 +272,7 @@ void kpMainWindow::init ()
{
d->toolToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
- KConfigGroup cfg(KGlobal::config(), kpSettingsGroupGeneral);
+ KConfigGroup cfg(KSharedConfig::openConfig(), kpSettingsGroupGeneral);
cfg.writeEntry(kpSettingFirstTime, d->configFirstTime = false);
cfg.sync();
diff --git a/mainWindow/kpMainWindow_File.cpp b/mainWindow/kpMainWindow_File.cpp
index 75e320f..4c88de6 100644
--- a/mainWindow/kpMainWindow_File.cpp
+++ b/mainWindow/kpMainWindow_File.cpp
@@ -91,7 +91,7 @@ void kpMainWindow::setupFileMenuActions ()
d->actionOpen = KStandardAction::open (this, SLOT (slotOpen ()), ac);
d->actionOpenRecent = KStandardAction::openRecent (this, SLOT (slotOpenRecent (const QUrl &)), ac);
- d->actionOpenRecent->loadEntries (KGlobal::config ()->group (kpSettingsGroupRecentFiles));
+ d->actionOpenRecent->loadEntries (KSharedConfig::openConfig ()->group (kpSettingsGroupRecentFiles));
#if DEBUG_KP_MAIN_WINDOW
kDebug () << "\trecent URLs=" << d->actionOpenRecent->items ();
#endif
@@ -193,7 +193,7 @@ void kpMainWindow::addRecentURL (const QUrl &url_)
return;
- KSharedConfig::Ptr cfg = KGlobal::config();
+ KSharedConfig::Ptr cfg = KSharedConfig::openConfig();
// KConfig::readEntry() does not actually reread from disk, hence doesn't
// realize what other processes have done e.g. Settings / Show Path
@@ -284,9 +284,9 @@ QSize kpMainWindow::defaultDocSize () const
{
// KConfig::readEntry() does not actually reread from disk, hence doesn't
// realize what other processes have done e.g. Settings / Show Path
- KGlobal::config ()->reparseConfiguration ();
+ KSharedConfig::openConfig ()->reparseConfiguration ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
QSize docSize = cfg.readEntry (kpSettingLastDocSize, QSize ());
@@ -314,7 +314,7 @@ void kpMainWindow::saveDefaultDocSize (const QSize &size)
kDebug () << "\tCONFIG: saving Last Doc Size = " << size;
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
cfg.writeEntry (kpSettingLastDocSize, size);
cfg.sync ();
@@ -778,11 +778,11 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
#define SETUP_READ_CFG() \
if (!reparsedConfiguration) \
{ \
- KGlobal::config ()->reparseConfiguration (); \
+ KSharedConfig::openConfig ()->reparseConfiguration (); \
reparsedConfiguration = true; \
} \
\
- KConfigGroup cfg (KGlobal::config (), forcedSaveOptionsGroup); \
+ KConfigGroup cfg (KSharedConfig::openConfig (), forcedSaveOptionsGroup);
if (chosenSaveOptions)
@@ -883,7 +883,7 @@ QUrl kpMainWindow::askForSaveURL (const QString &caption,
newSaveOptions.printDebug ("\tnewSaveOptions");
#endif
- KConfigGroup cfg (KGlobal::config (), forcedSaveOptionsGroup);
+ KConfigGroup cfg (KSharedConfig::openConfig (), forcedSaveOptionsGroup);
// Save options user forced - probably want to use them in future
kpDocumentSaveOptions::saveDefaultDifferences (cfg,
@@ -1317,7 +1317,7 @@ void kpMainWindow::sendImageToPrinter (QPrinter *printer,
// Save config option even if the dialog was cancelled.
d->configPrintImageCenteredOnPage = optionsPage->printImageCenteredOnPage ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
cfg.writeEntry (kpSettingPrintImageCenteredOnPage,
d->configPrintImageCenteredOnPage);
cfg.sync ();
diff --git a/mainWindow/kpMainWindow_Image.cpp b/mainWindow/kpMainWindow_Image.cpp
index 664e06c..ab8a04b 100644
--- a/mainWindow/kpMainWindow_Image.cpp
+++ b/mainWindow/kpMainWindow_Image.cpp
@@ -586,7 +586,7 @@ void kpMainWindow::slotMoreEffects ()
{
d->moreEffectsDialogLastEffect = dialog.selectedEffect ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
cfg.writeEntry (kpSettingMoreEffectsLastEffect,
d->moreEffectsDialogLastEffect);
diff --git a/mainWindow/kpMainWindow_Settings.cpp b/mainWindow/kpMainWindow_Settings.cpp
index 889306f..a53a718 100644
--- a/mainWindow/kpMainWindow_Settings.cpp
+++ b/mainWindow/kpMainWindow_Settings.cpp
@@ -121,7 +121,7 @@ void kpMainWindow::slotShowPathToggled ()
slotUpdateCaption ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
cfg.writeEntry (kpSettingShowPath, d->configShowPath);
cfg.sync ();
diff --git a/mainWindow/kpMainWindow_Text.cpp b/mainWindow/kpMainWindow_Text.cpp
index e1be119..fab576c 100644
--- a/mainWindow/kpMainWindow_Text.cpp
+++ b/mainWindow/kpMainWindow_Text.cpp
@@ -99,7 +99,7 @@ void kpMainWindow::setupTextToolBarActions ()
// private
void kpMainWindow::readAndApplyTextSettings ()
{
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
const QString font (cfg.readEntry (kpSettingFontFamily, QString::fromLatin1 ("Times")));
d->actionTextFontFamily->setFont (font);
@@ -173,7 +173,7 @@ void kpMainWindow::slotTextFontFamilyChanged ()
if (d->mainView)
d->mainView->setFocus ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
cfg.writeEntry (kpSettingFontFamily, d->actionTextFontFamily->font ());
cfg.sync ();
@@ -206,7 +206,7 @@ void kpMainWindow::slotTextFontSizeChanged ()
if (d->mainView)
d->mainView->setFocus ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
cfg.writeEntry (kpSettingFontSize, d->actionTextFontSize->fontSize ());
cfg.sync ();
@@ -233,7 +233,7 @@ void kpMainWindow::slotTextBoldChanged ()
d->toolText->slotBoldChanged (d->actionTextBold->isChecked ());
}
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
cfg.writeEntry (kpSettingBold, d->actionTextBold->isChecked ());
cfg.sync ();
}
@@ -258,7 +258,7 @@ void kpMainWindow::slotTextItalicChanged ()
d->toolText->slotItalicChanged (d->actionTextItalic->isChecked ());
}
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
cfg.writeEntry (kpSettingItalic, d->actionTextItalic->isChecked ());
cfg.sync ();
}
@@ -283,7 +283,7 @@ void kpMainWindow::slotTextUnderlineChanged ()
d->toolText->slotUnderlineChanged (d->actionTextUnderline->isChecked ());
}
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
cfg.writeEntry (kpSettingUnderline, d->actionTextUnderline->isChecked ());
cfg.sync ();
}
@@ -308,7 +308,7 @@ void kpMainWindow::slotTextStrikeThruChanged ()
d->toolText->slotStrikeThruChanged (d->actionTextStrikeThru->isChecked ());
}
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupText);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupText);
cfg.writeEntry (kpSettingStrikeThru, d->actionTextStrikeThru->isChecked ());
cfg.sync ();
}
diff --git a/mainWindow/kpMainWindow_Tools.cpp b/mainWindow/kpMainWindow_Tools.cpp
index 109da78..9813698 100644
--- a/mainWindow/kpMainWindow_Tools.cpp
+++ b/mainWindow/kpMainWindow_Tools.cpp
@@ -492,7 +492,7 @@ void kpMainWindow::slotToolSelected (kpTool *tool)
// private
void kpMainWindow::readLastTool ()
{
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupTools);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupTools);
d->lastToolNumber = cfg.readEntry (kpSettingLastTool, -1);
}
@@ -526,7 +526,7 @@ void kpMainWindow::saveLastTool ()
return;
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupTools);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupTools);
cfg.writeEntry (kpSettingLastTool, number);
cfg.sync ();
diff --git a/mainWindow/kpMainWindow_View.cpp b/mainWindow/kpMainWindow_View.cpp
index 6b5f4c9..727fad9 100644
--- a/mainWindow/kpMainWindow_View.cpp
+++ b/mainWindow/kpMainWindow_View.cpp
@@ -132,7 +132,7 @@ void kpMainWindow::slotShowGridToggled ()
updateMainViewGrid ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
cfg.writeEntry (kpSettingShowGrid, d->configShowGrid = d->actionShowGrid->isChecked ());
cfg.sync ();
diff --git a/mainWindow/kpMainWindow_View_Thumbnail.cpp b/mainWindow/kpMainWindow_View_Thumbnail.cpp
index 3f34154..548ed48 100644
--- a/mainWindow/kpMainWindow_View_Thumbnail.cpp
+++ b/mainWindow/kpMainWindow_View_Thumbnail.cpp
@@ -177,7 +177,7 @@ void kpMainWindow::slotSaveThumbnailGeometry ()
<< endl;
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupThumbnail);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupThumbnail);
cfg.writeEntry (kpSettingThumbnailGeometry, d->configThumbnailGeometry);
cfg.sync ();
@@ -192,7 +192,7 @@ void kpMainWindow::slotShowThumbnailToggled ()
d->configThumbnailShown = d->actionShowThumbnail->isChecked ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupThumbnail);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupThumbnail);
cfg.writeEntry (kpSettingThumbnailShown, d->configThumbnailShown);
cfg.sync ();
@@ -226,7 +226,7 @@ void kpMainWindow::slotZoomedThumbnailToggled ()
d->configZoomedThumbnail = d->actionZoomedThumbnail->isChecked ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupThumbnail);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupThumbnail);
cfg.writeEntry (kpSettingThumbnailZoomed, d->configZoomedThumbnail);
cfg.sync ();
@@ -244,7 +244,7 @@ void kpMainWindow::slotThumbnailShowRectangleToggled ()
d->configThumbnailShowRectangle = d->actionShowThumbnailRectangle->isChecked ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupThumbnail);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupThumbnail);
cfg.writeEntry (kpSettingThumbnailShowRectangle, d->configThumbnailShowRectangle);
cfg.sync ();
diff --git a/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp b/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
index 19dc688..77a577e 100644
--- a/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
+++ b/widgets/colorSimilarity/kpColorSimilarityToolBarItem.cpp
@@ -61,7 +61,7 @@ kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (QWidget *parent)
connect (this, SIGNAL (clicked ()), SLOT (openDialog ()));
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
setColorSimilarityInternal (cfg.readEntry (kpSettingColorSimilarity, 0.0),
false/*don't write config*/);
@@ -100,7 +100,7 @@ void kpColorSimilarityToolBarItem::setColorSimilarityInternal (double similarity
if (writeConfig)
{
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupGeneral);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupGeneral);
cfg.writeEntry (kpSettingColorSimilarity, colorSimilarity ());
cfg.sync ();
}
diff --git a/widgets/imagelib/effects/kpEffectFlattenWidget.cpp b/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
index a97aef1..c4e00fe 100644
--- a/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
+++ b/widgets/imagelib/effects/kpEffectFlattenWidget.cpp
@@ -58,7 +58,7 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
{
if (!s_lastColor1.isValid () || !s_lastColor2.isValid ())
{
- KConfigGroup cfgGroupSaver (KGlobal::config (), kpSettingsGroupFlattenEffect);
+ KConfigGroup cfgGroupSaver (KSharedConfig::openConfig (), kpSettingsGroupFlattenEffect);
s_lastColor1 = cfgGroupSaver.readEntry (kpSettingFlattenEffectColor1, QColor ());
if (!s_lastColor1.isValid ())
@@ -105,7 +105,7 @@ kpEffectFlattenWidget::~kpEffectFlattenWidget ()
s_lastColor2 = color2 ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupFlattenEffect);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupFlattenEffect);
cfg.writeEntry (kpSettingFlattenEffectColor1, s_lastColor1);
cfg.writeEntry (kpSettingFlattenEffectColor2, s_lastColor2);
diff --git a/widgets/kpDocumentSaveOptionsWidget.cpp b/widgets/kpDocumentSaveOptionsWidget.cpp
index 3a1e280..6a27e44 100644
--- a/widgets/kpDocumentSaveOptionsWidget.cpp
+++ b/widgets/kpDocumentSaveOptionsWidget.cpp
@@ -542,7 +542,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
this, SLOT (hidePreview ()));
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupPreviewSave);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupPreviewSave);
if (cfg.hasKey (kpSettingPreviewSaveUpdateDelay))
{
@@ -568,7 +568,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kDebug () << "\tread cfg preview dialog last rel geometry";
#endif
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupPreviewSave);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupPreviewSave);
m_previewDialogLastRelativeGeometry = cfg.readEntry (
kpSettingPreviewSaveGeometry, QRect ());
@@ -643,7 +643,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
{
m_updatePreviewDialogLastRelativeGeometryTimer->stop ();
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupPreviewSave);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupPreviewSave);
cfg.writeEntry (kpSettingPreviewSaveGeometry, m_previewDialogLastRelativeGeometry);
cfg.sync ();
diff --git a/widgets/toolbars/options/kpToolWidgetBase.cpp b/widgets/toolbars/options/kpToolWidgetBase.cpp
index f2ae24a..a1934d1 100644
--- a/widgets/toolbars/options/kpToolWidgetBase.cpp
+++ b/widgets/toolbars/options/kpToolWidgetBase.cpp
@@ -204,7 +204,7 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
if (!objectName ().isEmpty ())
{
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupTools);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupTools);
row = cfg.readEntry (objectName () + QLatin1String (" Row"), -1);
col = cfg.readEntry (objectName () + QLatin1String (" Col"), -1);
@@ -250,7 +250,7 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
if (objectName ().isEmpty ())
return;
- KConfigGroup cfg (KGlobal::config (), kpSettingsGroupTools);
+ KConfigGroup cfg (KSharedConfig::openConfig (), kpSettingsGroupTools);
cfg.writeEntry (objectName () + QLatin1String (" Row"), m_selectedRow);
cfg.writeEntry (objectName () + QLatin1String (" Col"), m_selectedCol);