[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KConfig
From:       Albert Chin-A-Young <china () thewrittenword ! com>
Date:       2000-10-21 16:42:46
[Download RAW message or body]

On Sat, Oct 21, 2000 at 10:26:34AM +0200, Stephan Kulow wrote:
> Albert Chin-A-Young wrote:
> > 
> > I'm trying to set up the rPaths entry for the kview config file. kview
> > uses kimageio to load the image files depending on the type of graphic
> > being loaded. kimageio.cpp has the following function:
> > 
> > KImageIOFormat::KImageIOFormat( const QString &path)
> >   : KSycocaEntry(path)
> > {
> >    bLibLoaded = false;
> >    mReadFunc = 0;
> >    mWriteFunc = 0;
> >    KConfig config(path, true, false);
> > 
> >    config.setGroup("Image Format");
> >    mType = config.readEntry("Type");
> >    mHeader = KURL::decode_string(config.readEntry("Header"));
> >    mFlags = config.readEntry("Flags");
> >    bRead = config.readBoolEntry("Read");
> >    bWrite = config.readBoolEntry("Write");
> >    mSuffices = config.readListEntry("Suffices");
> >    mPattern = config.readEntry("Name");
> >    mMimetype = config.readEntry("Mimetype");
> >    mLib = config.readEntry("Library");
> >    rPaths = config.readListEntry("rPaths");
> > }
> > 
> > Does this mean I have an entry in ~/.kde/share/config/kviewrc like so:
> >   [Image Format]
> >   rPaths=/opt/TWWfsw/kde20/lib
> > 
> > Also, can I set a global configuration file where I can set rPaths for
> > all programs?
> > 
> Yes, KConfig merges kdeglobals in it, so you can just add the rPaths
> entry there

Ok, here's what I did. By adding some debug statements to
kconfigbase.cpp, running kview causes [kde
prefix]/share/services/tiff.kimgio to be read. If I add:
  rPaths=[kde prefix]/lib
to this file under the section '[Image Format]', then the rPaths
variable above gets the value '[kde prefix]/lib' which is then passed
to lt_dladdsearchdir.

However, if I add the same rPaths entry to
~/.kde/share/config/kdeglobals:
  [Image Format]
  rPaths=[kde prefix]/lib
then the rPaths variable above does not have a value. So, it seems
KConfig is not merging in my ~/.kde/share/config/kdeglobals. What am I
doing wrong?

Note that I remove ~/.kde/share/config/ksycoca to force the config
files to be rebuilt.

-- 
albert chin (china@thewrittenword.com)
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic