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

List:       kde-devel
Subject:    kconfigxt singleton problem?
From:       Robert Hogan <robert () roberthogan ! net>
Date:       2006-06-06 21:38:57
Message-ID: 200606062238.57352.robert () roberthogan ! net
[Download RAW message or body]


I'm using kconfigxt to manage my configuration options. There are lots of them 
and I want to iterate through them in a particular way. I figured the best 
way of achieving this was to set up a struct array containg all the bits I 
need to use the config option as well as a function pointer to the config 
option itself.

However, it seems that because I am using kconfigxt as a singleton (like most 
people I think), this does something screwy when trying to assign the 
function pointers. So the following (instead of working, like for 
non-singleton classes) 

mykconfigxt.h:
    static
    bool defaultMaxMinOptions()
    {
      return self()->mDefaultMaxMinOptions;
    }


my.cpp:

bool (MyKConfigxt::*pt2Member)() = NULL;
pt2Member = &MyKConfigxt::defaultMaxMinOptions;


gives 

error: cannot convert `bool (*)()' to `bool (MyKConfigxt::*)()' in assignment

I've tried  a number of different ways of referencing it but to no avail - and 
google doesn't seem to have anything to say on the matter. Any ideas anyone?

 
>> Visit http://mail.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