[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeutils/khexedit
From: David Faure <faure () kde ! org>
Date: 2007-03-19 21:12:30
Message-ID: 1174338750.864579.12356.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 644384 by dfaure:
setGroup -> KConfigGroup, to fix compilation (KSharedConfig::group() seems gone)
fromPathOrUrl removed
M +7 -15 toplevel.cc
--- trunk/KDE/kdeutils/khexedit/toplevel.cc #644383:644384
@@ -441,21 +441,16 @@
{
// Code modified from kdelibs/kdeui/kactionclasses.cpp KRecentFilesAction::loadEntries
- KSharedConfig::Ptr config = KGlobal::config();
+ KConfigGroup config( KGlobal::config(), "RecentFiles" );
- const QString oldGroup = config->group();
-
- const QString groupname = "RecentFiles";
- config->setGroup( groupname );
-
- // read file list
+ // read file list
unsigned int maxItems = mAction.openRecent->maxItems();
if ( editor()->openFile() == SDisplayMisc::mostRecent )
maxItems = 1;
for( unsigned int i = 1 ; i <= maxItems ; i++ )
{
const QString key = QString( "File%1" ).arg( i );
- const QString value = config->readPathEntry( key );
+ const QString value = config.readPathEntry( key );
if (!value.isEmpty())
{
@@ -463,9 +458,6 @@
mStartupOffsetList.append( "0" ); // ### TODO find a way to still have kept offsets
}
}
-
- config->setGroup( oldGroup );
-
}
//
@@ -547,7 +539,7 @@
return;
}
- const KUrl url( KUrl::fromPathOrUrl( fileName ) );
+ const KUrl url( fileName );
kDebug(1501) << k_funcinfo << " adding recent " << fileName << " => " << url.prettyUrl() << endl;
mAction.openRecent->addUrl( url );
@@ -566,7 +558,7 @@
return;
}
- const KUrl url( KUrl::fromPathOrUrl( fileName ) );
+ const KUrl url( fileName );
mAction.openRecent->removeUrl( url );
}
@@ -580,8 +572,8 @@
}
else
{
- mAction.openRecent->removeUrl( KUrl::fromPathOrUrl( curName ) );
- mAction.openRecent->addUrl( KUrl::fromPathOrUrl( newName ) );
+ mAction.openRecent->removeUrl( curName );
+ mAction.openRecent->addUrl( newName );
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic