From kde-commits Fri Jun 30 23:48:37 2006 From: Andy Rysin Date: Fri, 30 Jun 2006 23:48:37 +0000 To: kde-commits Subject: KDE/kdebase/workspace/kcontrol/kxkb Message-Id: <1151711317.147162.17131.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=115171132629047 SVN commit 556633 by rysin: more port to qt4/kde4 M +2 -2 kcmlayout.h M +14 -11 kxkbconfig.cpp M +4 -4 kxkbconfig.h M +2 -2 layoutmap.h M +5 -6 pixmap.cpp M +5 -5 rules.cpp M +7 -7 x11helper.cpp M +2 -2 x11helper.h --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/kcmlayout.h #556632:556633 @@ -4,8 +4,8 @@ #include -#include -#include +#include +#include #include #include "kxkbconfig.h" --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/kxkbconfig.cpp #556632:556633 @@ -11,9 +11,9 @@ // #include -#include -#include -#include +#include +#include +#include #include #include @@ -65,11 +65,11 @@ QStringList layoutList; if( config->hasKey("LayoutList") ) { - layoutList = config->readListEntry("LayoutList"); + config->readEntry("LayoutList", layoutList); } else { // old config QString mainLayout = config->readEntry("Layout", DEFAULT_LAYOUT_UNIT.toPair()); - layoutList = config->readListEntry("Additional"); + config->readEntry("Additional", layoutList); layoutList.prepend(mainLayout); } if( layoutList.count() == 0 ) @@ -83,7 +83,8 @@ kDebug() << "Found " << m_layouts.count() << " layouts, default is " << getDefaultLayout().toPair() << endl; - QStringList displayNamesList = config->readListEntry("DisplayNames", ','); + QStringList displayNamesList; + config->readEntry("DisplayNames", displayNamesList, ','); for(QStringList::ConstIterator it = displayNamesList.begin(); it != displayNamesList.end() ; ++it) { QStringList displayNamePair = (*it).split(':'); if( displayNamePair.count() == 2 ) { @@ -97,9 +98,10 @@ // m_includes.clear(); if( X11Helper::areSingleGroupsSupported() ) { if( config->hasKey("IncludeGroups") ) { - QStringList includeList = config->readListEntry("IncludeGroups", ','); + QStringList includeList; + config->readEntry("IncludeGroups", includeList, ','); for(QStringList::ConstIterator it = includeList.begin(); it != includeList.end() ; ++it) { - QStringList includePair = QStringList::split(':', *it ); + QStringList includePair = (*it).split(':'); if( includePair.count() == 2 ) { LayoutUnit layoutUnit( includePair[0] ); if( m_layouts.contains( layoutUnit ) ) { @@ -111,7 +113,8 @@ } else { //old includes format kDebug() << "Old includes..." << endl; - QStringList includeList = config->readListEntry("Includes"); + QStringList includeList; + config->readEntry("Includes", includeList); for(QStringList::ConstIterator it = includeList.begin(); it != includeList.end() ; ++it) { QString layoutName = LayoutUnit::parseLayout( *it ); LayoutUnit layoutUnit( layoutName, "" ); @@ -312,7 +315,7 @@ static const char* LAYOUT_PATTERN = "[a-zA-Z0-9_/-]*"; QString varLine = layvar.trimmed(); QRegExp rx(LAYOUT_PATTERN); - int pos = rx.search(varLine, 0); + int pos = rx.indexIn(varLine, 0); int len = rx.matchedLength(); // check for errors if( pos < 0 || len < 2 ) @@ -331,7 +334,7 @@ static const char* VARIANT_PATTERN = "\\([a-zA-Z0-9_-]*\\)"; QString varLine = layvar.trimmed(); QRegExp rx(VARIANT_PATTERN); - int pos = rx.search(varLine, 0); + int pos = rx.indexIn(varLine, 0); int len = rx.matchedLength(); // check for errors if( pos < 2 || len < 2 ) --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/kxkbconfig.h #556632:556633 @@ -12,10 +12,10 @@ #ifndef KXKBCONFIG_H #define KXKBCONFIG_H -#include -#include -#include -#include +#include +#include +#include +#include /* Utility classes for per-window/per-application layout implementation --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/layoutmap.h #556632:556633 @@ -15,8 +15,8 @@ #include -#include -#include +#include +#include #include #include --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/pixmap.cpp #556632:556633 @@ -1,9 +1,8 @@ -#include -//#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/rules.cpp #556632:556633 @@ -1,10 +1,10 @@ #include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include +#include #include #include --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/x11helper.cpp #556632:556633 @@ -1,11 +1,11 @@ -#include -#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include --- trunk/KDE/kdebase/workspace/kcontrol/kxkb/x11helper.h #556632:556633 @@ -1,8 +1,8 @@ #ifndef X11HELPER_H_ #define X11HELPER_H_ -#include -#include +#include +#include #include