[kde-edu]: more problems with KNewStuff

Jason Harris kstars at 30doradus.org
Wed Jun 2 09:55:01 CEST 2004


Hello,

I have subclassed my own KNewStuff (named KSNewStuff), and with the help 
of others, I have gotten to the point where I can actually retrieve a 
tarball and have it installed under KDEHOME.  

The next step is to incorporate the new data into the program.  There 
are several different data files that can be downloaded, and the 
program must behave differently in each case.  To handle this, I wanted 
to use the 'created(QString)' signal of a KDirWatch object, monitoring 
the .../share/apps/kstars/ dir.  This is connected to a Slot in 
KSNewStuff that does the various installation steps, based on the 
filename of the newly created file.  

That's the idea, but I am having trouble implementing it.  KNewStuff is 
not a QObject, so I am having trouble making a slot in KSNewStuff.  I 
am defining KSNewStuff like this:

class KSNewStuff : public KNewStuff, public QObject

but when compiling, I get really weird errors in ksnewstuff.moc (which 
are appended below).  I don't know what these mean, but my guess is 
that KSNewStuff is still not a QObject somehow, despite its 
inheritance.  Is that close to the right answer?  Before you ask: yes, 
I do have "Q_OBJECT" in the definition of KSNewStuff, and I have 
'#include "ksnewstuff.moc" ' at the end of ksnewstuff.cpp.

Is there an easier way to do what I need (i.e., determine which file was 
downloaded prior to incorporating the new data)?

thanks,
Jason

-------stderr dump follows----------------

ksnewstuff.moc: In static member function `static QMetaObject*
   KSNewStuff::staticMetaObject()':
ksnewstuff.moc:54: error: 'class KNewStuff' has no member named '
   staticMetaObject'
ksnewstuff.moc: In member function `virtual void* 
KSNewStuff::qt_cast(const
   char*)':
ksnewstuff.moc:81: error: 'class KNewStuff' has no member named 
'qt_cast'
In file included from ksnewstuff.cpp:79:
ksnewstuff.moc: In member function `virtual bool 
KSNewStuff::qt_invoke(int,
   QUObject*)':
ksnewstuff.moc:89: error: 'class KNewStuff' has no member named 
'qt_invoke'
In file included from ksnewstuff.cpp:79:
ksnewstuff.moc: In member function `virtual bool 
KSNewStuff::qt_emit(int,
   QUObject*)':
ksnewstuff.moc:96: error: 'class KNewStuff' has no member named 
'qt_emit'
ksnewstuff.moc: In member function `virtual bool 
KSNewStuff::qt_property(int,
   int, QVariant*)':
ksnewstuff.moc:102: error: 'class KNewStuff' has no member named 
'qt_property'

-- 
KStars: A KDE Planetarium
http://edu.kde.org/kstars


More information about the kde-edu mailing list