[bt-devel] (no subject)

Michael Andrew Kamrath mikekamrath at ncplus.net
Tue Jul 13 22:46:50 MST 2004


Joachim:

Version of Qt3 - not sure

rpm -qa | grep 'qt'
libqt3-3.1.2-14mdk
qt3-common-3.1.2-14mdk
libqt3-devel-3.1.2-14mdk

The errors are a little different with Sword 1.5.8:

cswordbackend.cpp: In member function `const QString
CSwordBackend::booknameLanguage(const QString&)':
cswordbackend.cpp:500: error: cannot call member function `virtual void
sword::LocaleMgr::setDefaultLocaleName(const char*)' without object
cswordbackend.cpp:502: error: cannot call member function `virtual const
char* sword::LocaleMgr::getDefaultLocaleName()' without object
cswordbackend.cpp: In member function `const QStringList
CSwordBackend::swordDirList()':
cswordbackend.cpp:537: error: `constBegin' undeclared (first use this
function)
cswordbackend.cpp:537: error: (Each undeclared identifier is reported only
once for each function it appears in.)
cswordbackend.cpp:537: error: `constEnd' undeclared (first use this function)

I need to read up on virtual functions. I thought you can not use a
"virtual" function directly, but must create a subclass where the function
is declared non-virtual. In Java the analogy is an "abstract" method.
Seems like you have to create a LocaleMgr object and then call
getDefaultLocaleName() on that object. Because getDefaultLocaleName() is a
member function, not a static function. (Not a C++ expert, but I'd like to
learn) So, how do I create such an object? There is a warning in the
default constructor not to call it directly, but use a static variable of
type LocaleMgr, called 'defaultLocaleMgr' (or something), but I could not
call any methods on that when I modified sword 1.5.7 yesterday. Probably
because static objects don't like set() methods :)

-Mike

-- 
"He that hath the Son hath life: and he that hath not the Son of God hath
not life." (I John 5:12)
http://www.answersingenesis.org


More information about the bt-devel mailing list