[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/kofficecore
From: David Faure <faure () kde ! org>
Date: 2007-03-19 21:07:31
Message-ID: 1174338451.287947.11524.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 644381 by dfaure:
setGroup -> KConfigGroup
M +2 -4 KoGlobal.cpp
M +2 -6 KoRecentDocumentsPane.cpp
--- trunk/koffice/libs/kofficecore/KoGlobal.cpp #644380:644381
@@ -124,8 +124,7 @@
itall != langlist.end(); ++itall )
{
const QString tag = *itall;
- config.setGroup( tag );
- const QString name = config.readEntry("Name", tag);
+ const QString name = config.group(tag).readEntry("Name", tag);
// e.g. name is "French" and tag is "fr"
// The QMap does the sorting on the display-name, so that
@@ -153,9 +152,8 @@
if ( seenLanguages.find( tag ) == seenLanguages.end() ) {
KConfig entry(*it, KConfig::OnlyLocal);
- entry.setGroup("KCM Locale");
- const QString name = entry.readEntry("Name", tag);
+ const QString name = entry.group("KCM Locale").readEntry("Name", tag);
// e.g. name is "US English" and tag is "en_US"
m_langMap.insert( name, tag );
--- trunk/koffice/libs/kofficecore/KoRecentDocumentsPane.cpp #644380:644381
@@ -105,9 +105,7 @@
model()->setSortRole(0); // Disable sorting
- QString oldGroup = componentData().config()->group();
- KSharedConfigPtr config = componentData().config();
- config->setGroup("RecentFiles");
+ KConfigGroup config( componentData().config(), "RecentFiles" );
int i = 0;
QString value;
@@ -116,7 +114,7 @@
do {
QString key = QString("File%1").arg(i);
- value = config->readPathEntry(key);
+ value = config.readPathEntry(key);
if(!value.isEmpty()) {
QString path = value;
@@ -153,8 +151,6 @@
} while ( !value.isEmpty() || i<=10 );
- config->setGroup( oldGroup );
-
//Select the first file
QModelIndex firstIndex = model()->indexFromItem(model()->item(0));
m_documentList->selectionModel()->select(firstIndex, QItemSelectionModel::Select);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic