Warnings concerning private slots with Qt Jambi
Hello,
I get a warning from the java compiler if there is a private function, whose only invocations go the signal-slot way, like this:
Code:
public Mainwindow() {
...
m_ui.actionHinzuf_gen_2.triggered.connect(this, "addCategory()");
...
}
private void addCategory() {
AddCategoryWidget acw=new AddCategoryWidget(this);
m_layoutManager.showWidget(acw);
}
Quote:
The method addCategory() from the type Mainwindow is never used locally
Is there another possibility to getting rid of this warning than to disable all warnings of this type or to making the function protected?
best regards,
kiker99
Re: Warnings concerning private slots with Qt Jambi
You can throw a
@SuppressWarnings("unused")
annotation on the unused private function. That should kill your warning.