Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are

needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdebase/workspace/; revision=721704
This commit is contained in:
Andreas Pakulat 2007-10-05 22:21:25 +00:00
parent 6e2967b573
commit 39e322fc83
31 changed files with 65 additions and 39 deletions

View file

@ -27,6 +27,8 @@
#include <QResizeEvent>
#include <QMouseEvent>
#include <QPainter>
#include <QUrl>
#include <QTextStream>
#include <kicontheme.h>
#include <kiconeffect.h>
//#include <kdrawutil.h>
@ -37,6 +39,8 @@
#include <X11/Xlib.h>
#include <QX11Info>
#include <KUrl>
#include <KConfigGroup>
#include <KDebug>
namespace B2 {

View file

@ -10,7 +10,7 @@
#include "config.h"
#include <kglobal.h>
#include <kconfiggroup.h>
//Added by qt3to4:
#include <QLabel>

View file

@ -15,7 +15,7 @@
#include "kde2.h"
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>

View file

@ -20,7 +20,7 @@
* Boston, MA 02110-1301, USA.
*/
#include <kconfig.h>
#include <kconfiggroup.h>
#include <klocale.h>
#include <kiconeffect.h>

View file

@ -74,87 +74,87 @@ int main(int argc, char **argv)
if(!tmpStr.isEmpty()){
copy(srcStr+tmpStr, localDirStr+tmpStr);
}
output->writeEntry("wm_top", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_top", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapBottom");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_bottom", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_bottom", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapLeft");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_left", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_left", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapRight");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_right", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_right", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapTopLeft");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_topleft", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_topleft", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapTopRight");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_topright", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_topright", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapBottomLeft");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_bottomleft", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_bottomleft", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("shapePixmapBottomRight");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("wm_bottomright", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("wm_bottomright", tmpStr, KConfig::Normal|KConfig::Global);
input.setGroup("Window Titlebar");
output->writeEntry("TitleAlignment", input.readEntry("TitleAlignment"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("PixmapUnderTitleText", input.readEntry("PixmapUnderTitleText"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("TitleFrameShaded", input.readEntry("TitleFrameShaded"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("TitleAlignment", input.readEntry("TitleAlignment"), KConfig::Normal|KConfig::Global);
output->writeEntry("PixmapUnderTitleText", input.readEntry("PixmapUnderTitleText"), KConfig::Normal|KConfig::Global);
output->writeEntry("TitleFrameShaded", input.readEntry("TitleFrameShaded"), KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("MenuButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("menu", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("menu", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("PinUpButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("pinup", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("pinup", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("PinDownButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("pindown", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("pindown", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("CloseButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("close", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("close", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("MaximizeButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("maximize", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("maximize", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("MaximizeDownButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("maximizedown", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("maximizedown", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("MinimizeButton");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("iconify", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("iconify", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("TitlebarPixmapActive");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("TitlebarPixmapActive", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("TitlebarPixmapActive", tmpStr, KConfig::Normal|KConfig::Global);
tmpStr = input.readEntry("TitlebarPixmapInactive");
if(!tmpStr.isEmpty())
copy(srcStr+tmpStr, localDirStr+tmpStr);
output->writeEntry("TitlebarPixmapInactive", tmpStr, KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("TitlebarPixmapInactive", tmpStr, KConfig::Normal|KConfig::Global);
input.setGroup("Window Button Layout");
output->setGroup("Buttons");
output->writeEntry("ButtonA", input.readEntry("ButtonA"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("ButtonB", input.readEntry("ButtonB"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("ButtonC", input.readEntry("ButtonC"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("ButtonD", input.readEntry("ButtonD"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("ButtonE", input.readEntry("ButtonE"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("ButtonF", input.readEntry("ButtonF"), KConfigBase::Normal|KConfigBase::Global);
output->writeEntry("ButtonA", input.readEntry("ButtonA"), KConfig::Normal|KConfig::Global);
output->writeEntry("ButtonB", input.readEntry("ButtonB"), KConfig::Normal|KConfig::Global);
output->writeEntry("ButtonC", input.readEntry("ButtonC"), KConfig::Normal|KConfig::Global);
output->writeEntry("ButtonD", input.readEntry("ButtonD"), KConfig::Normal|KConfig::Global);
output->writeEntry("ButtonE", input.readEntry("ButtonE"), KConfig::Normal|KConfig::Global);
output->writeEntry("ButtonF", input.readEntry("ButtonF"), KConfig::Normal|KConfig::Global);
output->sync();

View file

@ -20,7 +20,7 @@
// Daniel M. DULEY <mosfet@kde.org> original work
// Melchior FRANZ <a8603365@unet.univie.ac.at> configuration options
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <klocale.h>
#include <QLayout>

View file

@ -26,6 +26,8 @@
#include "oxygenclient.h"
#include "oxygen.h"
#include <kconfiggroup.h>
extern "C"
{
KDE_EXPORT KDecorationFactory* create_factory()

View file

@ -30,6 +30,7 @@
#include <QBitmap>
#include <kdecoration.h>
#include <kglobal.h>
#include "oxygenclient.h"
#include "oxygenbutton.h"

View file

@ -24,7 +24,7 @@
#include <QPainter>
#include <QImage>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <QPixmap>
#include "misc.h"
@ -33,6 +33,7 @@
#include "plastikclient.h"
#include "plastikbutton.h"
#include <QApplication>
#include <kconfig.h>
namespace KWinPlastik
{

View file

@ -9,7 +9,7 @@
#include "config.h"
#include <kglobal.h>
#include <kconfiggroup.h>
#include <klocale.h>
#include <kvbox.h>

View file

@ -16,7 +16,7 @@
* Copyright (C) 1999 Daniel M. Duley <mosfet@kde.org>
*/
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <klocale.h>
#include <QBitmap>

View file

@ -24,7 +24,7 @@
//Added by qt3to4:
#include <QPaintEvent>
#include <kconfig.h>
#include <kconfiggroup.h>
#include "Web.h"
#include "WebButton.h"

View file

@ -28,6 +28,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <config-X11.h>
#include "utils.h"
#include <QTextStream>
#include "workspace.h"
#include "client.h"
#include "unmanaged.h"

View file

@ -11,6 +11,7 @@ License. See the file "COPYING" for the exact licensing terms.
// read additional window rules and add them to kwinrulesrc
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <kcomponentdata.h>
#include <kstandarddirs.h>

View file

@ -12,6 +12,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <netwm_def.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kcomponentdata.h>
#include <QRect>
#include <QByteArray>

View file

@ -15,6 +15,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kaction.h>
#include <kactioncollection.h>
#include <klocale.h>
#include <kconfiggroup.h>
#include <netwm_def.h>
#include <qevent.h>

View file

@ -18,6 +18,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kaction.h>
#include <KShortcutsEditor>
#include <KGlobalAccel>
#include <kconfiggroup.h>
#include <QVBoxLayout>
#include <QCheckBox>

View file

@ -15,6 +15,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kaction.h>
#include <klocale.h>
#include <kcolorscheme.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <QMouseEvent>
#include <qpainter.h>

View file

@ -14,6 +14,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <klocale.h>
#include <kdebug.h>
#include <kconfiggroup.h>
#include <KActionCollection>
#include <kaction.h>
#include <KShortcutsEditor>

View file

@ -14,6 +14,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <klocale.h>
#include <kdebug.h>
#include <kconfiggroup.h>
#include <QWidget>
#include <QGridLayout>

View file

@ -12,7 +12,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <config-X11.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <ksharedconfig.h>
#ifdef HAVE_OPENGL

View file

@ -18,7 +18,7 @@ License. See the file "COPYING" for the exact licensing terms.
//#define QT_CLEAN_NAMESPACE
#include "group.h"
#include <QTextStream>
#include "workspace.h"
#include "client.h"
#include "effects.h"

View file

@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE.
#include "kdecoration_p.h"
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobalsettings.h>
#include <QPalette>
#include <QApplication>

View file

@ -21,6 +21,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kdebug.h>
#include <ksharedconfig.h>
#include <kconfiggroup.h>
#include <assert.h>
@ -281,7 +282,7 @@ void EffectsHandler::sendReloadMessage( const QString& effectname )
KConfigGroup EffectsHandler::effectConfig( const QString& effectname )
{
KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig( "kwinrc", KConfig::NoGlobals );
KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig( "kwinrc", KConfig::CascadeConfig );
return kwinconfig->group( "Effect-" + effectname );
}

View file

@ -30,6 +30,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kdialog.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <QLabel>
#include <QComboBox>
#include <QVBoxLayout>

View file

@ -85,7 +85,7 @@ unsigned long Options::updateSettings()
if( !focusPolicyIsReasonable()) // #48786, comments #7 and later
focusStealingPreventionLevel = 0;
KConfig *gc = new KConfig("kdeglobals", KConfig::NoGlobals);
KConfig *gc = new KConfig("kdeglobals", KConfig::CascadeConfig);
bool isVirtual = KApplication::desktop()->isVirtualDesktop();
KConfigGroup gWindowsConfig(gc, "Windows");
xineramaEnabled = gWindowsConfig.readEntry ("XineramaEnabled", isVirtual) &&

View file

@ -15,6 +15,8 @@ License. See the file "COPYING" for the exact licensing terms.
#include <QRect>
#include <assert.h>
#include <QTextStream>
#ifndef KCMRULES
#include "workspace.h"
#include "client.h"

View file

@ -12,6 +12,7 @@ License. See the file "COPYING" for the exact licensing terms.
//#define QT_CLEAN_NAMESPACE
#include "popupinfo.h"
#include <QTextStream>
#include "workspace.h"
#include "client.h"
#include <QPainter>

View file

@ -74,7 +74,7 @@ Rules::Rules( const QString& str, bool temporary )
file.write( s.data(), s.length());
}
file.flush();
KConfig cfg( file.fileName(), KConfig::OnlyLocal);
KConfig cfg( file.fileName(), KConfig::SimpleConfig);
readFromCfg( cfg.group( QString() ) );
if( description.isEmpty())
description = "temporary";

View file

@ -11,6 +11,7 @@ License. See the file "COPYING" for the exact licensing terms.
//#define QT_CLEAN_NAMESPACE
#include "tabbox.h"
#include <QTextStream>
#include "workspace.h"
#include "effects.h"
#include "client.h"

View file

@ -16,6 +16,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <assert.h>
#include <qobject.h>
#include <kdecoration.h>
#include <kdebug.h>
#include "utils.h"
#include "workspace.h"