You need a class like this: class bla : public QObject { Q_OBJECT signals: void bar(int x); }; The cpp file should #include the moc file. If you now go and change the "int x" to e.g. "double x" KDevelop offers to update the signature. This doesn't make any sense for a signal even if it would be technically possible to change the moc file. Side note: it also often triggers bug 306695 for me, at least on one system. Reproducible: Always
Created attachment 77370 [details] Proposed fix (only compile-tested)
Hi Rolf, can you post the patch in a reviewboard? It will be easier to comment on it there
https://git.reviewboard.kde.org/r/109197/
That's only triggered in case KDevelop is able to actually parse the included moc file. E.g. doing an #include "foo.moc" won't work because of the file suffix. Reproduced the bug on current master.
Git commit 3fb98a757308f615ffc6a13c678c7a87ca3fa79d by Milian Wolff. Committed on 24/05/2013 at 14:21. Pushed by mwolff into branch 'master'. Do not offer signature assistant for changes in Qt signals. Based on the work of Rolf Eike Beer minus the regression of not showing the assistant for non-Qt function declarations. Sorry for taking so long for this :-/ REVIEW: 109197 M +18 -1 languages/cpp/codegen/signatureassistant.cpp http://commits.kde.org/kdevelop/3fb98a757308f615ffc6a13c678c7a87ca3fa79d
Git commit 1700655993676f1e3cf8f71c02dbf5d3c1cffa49 by Milian Wolff. Committed on 24/05/2013 at 14:21. Pushed by mwolff into branch '4.5'. backport: Do not offer signature assistant for changes in Qt signals. Based on the work of Rolf Eike Beer minus the regression of not showing the assistant for non-Qt function declarations. Sorry for taking so long for this :-/ REVIEW: 109197 Backport of commit 3fb98a757308f615ffc6a13c678c7a87ca3fa79d in master. M +19 -2 languages/cpp/codegen/signatureassistant.cpp http://commits.kde.org/kdevelop/1700655993676f1e3cf8f71c02dbf5d3c1cffa49