popup->addAction(renameAction);
// insert 'Move to Trash' and (optionally) 'Delete'
- KConfigGroup kdeConfig(KGlobal::config(), "KDE");
- bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
+ KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals);
+ KConfigGroup configGroup(globalConfig, "KDE");
+ bool showDeleteCommand = configGroup.readEntry("ShowDeleteCommand", false);
+
const KUrl& url = m_mainWindow->activeViewContainer()->url();
if (url.isLocalFile()) {
QAction* moveToTrashAction = collection->action("move_to_trash");
addDel = true;
}
else {
- KConfigGroup configGroup( KGlobal::config(), "KDE" );
- if ( configGroup.readEntry( "ShowDeleteCommand", false) )
+ KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals);
+ KConfigGroup configGroup(globalConfig, "KDE");
+ if ( configGroup.readEntry("ShowDeleteCommand", false) )
addDel = true;
}
}
confirmationGroup.writeEntry("ConfirmDelete", m_confirmDelete->isChecked());
confirmationGroup.sync();
- KConfigGroup kdeConfig(KGlobal::config(), "KDE");
- kdeConfig.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked());
- kdeConfig.sync();
+ KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
+ KConfigGroup configGroup(globalConfig, "KDE");
+ configGroup.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked());
+ configGroup.sync();
settings->setShowCopyMoveMenu(m_showCopyMoveMenu->isChecked());
settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked());
m_confirmMoveToTrash->setChecked(confirmationGroup.readEntry("ConfirmTrash", false));
m_confirmDelete->setChecked(confirmationGroup.readEntry("ConfirmDelete", true));
- const KConfigGroup kdeConfig(KGlobal::config(), "KDE");
- m_showDeleteCommand->setChecked(kdeConfig.readEntry("ShowDeleteCommand", false));
-
+ KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals);
+ KConfigGroup configGroup(globalConfig, "KDE");
+ m_showDeleteCommand->setChecked(configGroup.readEntry("ShowDeleteCommand", false));
+
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
m_showCopyMoveMenu->setChecked(settings->showCopyMoveMenu());
m_browseThroughArchives->setChecked(settings->browseThroughArchives());
popup->addAction(renameAction);
// insert 'Move to Trash' and (optionally) 'Delete'
- KConfigGroup kdeConfig(KGlobal::config(), "KDE");
- bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
+ KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals);
+ KConfigGroup configGroup(globalConfig, "KDE");
+ bool showDeleteCommand = configGroup.readEntry("ShowDeleteCommand", false);
+
const KUrl& url = m_fileInfo.url();
if (url.isLocalFile()) {
QAction* moveToTrashAction = new QAction(KIcon("user-trash"),