Missing emit keyword on signal call
Unsolved
General and Desktop
-
I want emit signal by macros (define). Why I get warning "Missing emit keyword on signal call Rial::finished"? This is my code
#define EmitSignal() emit finished() void Rial::SlotEmiter(){ qDebug() << "start EmitSignal"; EmitSignal(); //Missing emit keyword on signal call Rial::finished }
P.S. But in fact my code works...
Full code here.
-
@DungeonLords
emit
is also a macro, which expands to nothing. I guess this is part of the reason.The warning you get probably comes from
clazy
, a tool which helps finding questionable things in use of Qt. It is not the compiler issuing the warning, so compilation will work fine. -
@DungeonLords said in Missing emit keyword on signal call:
#define EmitSignal() emit finished()
But why would you replace one specific signal (
finished
with a genericEmitSignal
)?
Dont get the sense of this one? :)