KIO-powered runner?
Shaun Reich
sreich at kde.org
Sat Feb 25 13:42:15 UTC 2012
Okay, it works with just a plain signal. awesome.
However, if I try to do a Q_SIGNALS: void
matchMade(Plasma::RunnerContext &context);
then a private slots: startYouTubeJob(Plasma::RunnerContext &context);
and at the bottom a Q_DECLARE_METATYPE(Plasma::RunnerContext;
Trying to do Q_ASSERT(connect(this,
SIGNAL(matchMade(Plasma::RunnerContext&)), this,
SLOT(startYouTubeJob(Plasma::RunnerContext&))));
with qRegisterMetaType<Plasma::RunnerContext>(); in the ctor, it
fails with this:
/usr/include/QtCore/qmetatype.h: In function 'void*
qMetaTypeConstructHelper(const T*) [with T = Plasma::RunnerContext]':
/usr/include/QtCore/qmetatype.h:196:25: instantiated from 'int
qRegisterMetaType(const char*, T*) [with T = Plasma::RunnerContext]'
/home/sreich/devel/kde/src/plasma/kdeplasma-addons/runners/youtube/youtube.h:54:1:
instantiated from here
/usr/include/QtCore/qmetatype.h:142:43: error: no matching function
for call to 'Plasma::RunnerContext::RunnerContext(const
Plasma::RunnerContext&)'
/usr/include/QtCore/qmetatype.h:142:43: note: candidates are:
/home/sreich/devel/kde/install/kde/include/plasma/runnercontext.h:70:9:
note: Plasma::RunnerContext::RunnerContext(Plasma::RunnerContext&,
QObject*)
/home/sreich/devel/kde/install/kde/include/plasma/runnercontext.h:70:9:
note: no known conversion for argument 1 from 'const
Plasma::RunnerContext' to 'Plasma::RunnerContext&'
/home/sreich/devel/kde/install/kde/include/plasma/runnercontext.h:65:18:
note: Plasma::RunnerContext::RunnerContext(QObject*)
/home/sreich/devel/kde/install/kde/include/plasma/runnercontext.h:65:18:
note: no known conversion for argument 1 from 'const
Plasma::RunnerContext' to 'QObject*'
make[2]: *** [runners/youtube/CMakeFiles/krunner_youtube.dir/youtube.o] Error 1
make[2]: Leaving directory `/home/sreich/devel/kde/bld/plasma/kdeplasma-addons'
make[1]: *** [runners/youtube/CMakeFiles/krunner_youtube.dir/all] Error 2
--
Shaun Reich,
KDE Software Developer (kde.org)
More information about the Plasma-devel
mailing list