[Kde-pim] Signal/Slot errors

Tobias Koenig tokoe at kde.org
Mon May 31 06:15:01 BST 2010


Hej,

attached is a list with errors of QObject::connect calls in kdepim.
This time I removed all false positives, so the remaining issues are
real bugs as far as I can see (if not, please tell me!).

If somebody is interested in the overall statistics, the tool has reported
394 errors/warnings, 35 has been real bugs, the rest false positives.
Most of the false positives occur when passing a pointer of a base class to
a QObject::connect() statement but using the signals/slots of the derived class.
Common usages are for example:

  KIO::Job *job = KIO::get( someUrl );
  connect( job, SIGNAL( data(KIO::Job*, QByteArray) ), SLOT(...) );

Of course KIO::Job doesn't provide a data() signal, only KIO::TransferJob does,
which is actually returned by KIO::get(). So to make static code analysis easier
it would be nice if you can try to use explicit types whenever possible, in the
above case

  KIO::TransferJob *job = KIO::get( someUrl );

would do the trick. Of course there are cases where you have to use the pointer to
the base class because you want to apply the strategy pattern or something else, however
while skimming over the false positives, only a minority of the reported false positives
belong to this category.

Ciao,
Tobias
-------------- next part --------------
# thomas
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kmail/configuredialog.cpp:[3242:101] class SecurityPageSMimeTab has no slot 'load()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kmail/kmsystemtray.cpp:[74:11] class KMSystemTray has no slot 'updateNewMessages()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kmail/snippetwidget.cpp:[72:13] class KMeditor has no signal 'insertSnippet()'

ERRO: /mnt/archive/src/kde-trunk/src/kdepim/examples/mailreader/mailreaderview.cpp:[34:13] class Viewer has no signal 'urlClicked(KUrl,Qt::MouseButton)'

ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/attachmentcontrollerbase.cpp:[366:64] class AttachmentControllerBase has no slot 'attachMyPublicKey()'

ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[39:40] class KMeditor has no slot 'slotTextBold(bool)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[44:41] class KMeditor has no slot 'slotTextItalic(bool)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[49:41] class KMeditor has no slot 'slotTextUnder(bool)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[53:36] class KMeditor has no slot 'slotTextColor()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[57:36] class KMeditor has no slot 'slotAlignLeft()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[61:36] class KMeditor has no slot 'slotAlignRight()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/messagecomposer/tests/testkmeditorwin.cpp:[65:36] class KMeditor has no slot 'slotAlignCenter()'

# ervin
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/runtime/resources/imap/subscriptiondialog.cpp:[388:28] class SubscriptionDialog has no slot 'processItems()'

# bertjan
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/incidenceeditors/incidenceeditor-ng/incidencegeneraleditor.cpp:[102:11] class IncidenceGeneralEditor has no signal 'openCategoryDialog()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/incidenceeditors/incidenceeditor-ng/incidencegeneraleditor.cpp:[104:11] class IncidenceGeneralEditor has no signal 'updateCategoryConfig()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/incidenceeditors/incidenceeditor-ng/incidenceattachmenteditor.cpp:[439:17] class IncidenceAttachmentEditor has no slot 'downloadComplete(KJob*)'

# krake
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/runtime/kresources/shared/resourceprivatebase.cpp:[204:11] class ResourcePrivateBase has no slot 'savingResult(KJob*)'

# sergio
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/korganizer/actionmanager.cpp:[2007:11] class ImportDialog has no signal 'newWindow(KUrl)'

# ?!?
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/ktimetracker/ktimetrackerpart.cpp:[105:11] class ktimetrackerpart has no slot 'updateTime(long,long)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/ktimetracker/ktimetrackerpart.cpp:[110:13] class ktimetrackerpart has no slot 'quit()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/ktimetracker/ktimetrackerpart.cpp:[110:13] class TrayIcon has no signal 'quitSelected()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/ktimetracker/timetrackerwidget.cpp:[185:11] class TimetrackerWidget has no slot 'updateTabs()'

ERRO: /mnt/archive/src/kde-trunk/src/kdepim/libkpgp/kpgpui.cpp:[994:13] class QTreeWidget has no signal 'selectionChanged()', did you mean signal 'itemSelectionChanged()'?

# steveire
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kjots/KJotsMain.cpp:[92:12] class KJotsWidget has no signal 'activeAnchorChanged(QString,QString)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kjots/kjotswidget.cpp:[495:11] class KJotsWidget has no slot 'bookshelfEditItemFinished(QWidget*,QAbstractItemDelegate::EndEditHint)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kjots/kjotswidget.cpp:[498:11] class KJotsWidget has no slot 'currentCharFormatChanged(QTextCharFormat)'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kjots/kjotswidget.cpp:[619:11] class KJotsWidget has no slot 'updateConfiguration()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kjots/kjotspart.cpp:[90:12] class KJotsWidget has no signal 'activeAnchorChanged(QString,QString)'

# frank
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kontact/plugins/akregator/akregator_plugin.cpp:[100:11] class ReadOnlyPart has no signal 'showPart()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/akregator/src/mainwidget.cpp:[142:12] class SubscriptionListView has no signal 'signalDropped(KUrl::List&,Akregator::TreeNode*,Akregator::Folder*)'

# tokoe
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kaddressbook/xxport/vcard/vcard_xxport.cpp:[433:41] class VCardViewerDialog has no slot 'slotYes()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kaddressbook/xxport/vcard/vcard_xxport.cpp:[434:40] class VCardViewerDialog has no slot 'slotNo()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kaddressbook/xxport/vcard/vcard_xxport.cpp:[435:43] class VCardViewerDialog has no slot 'slotApply()'
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kaddressbook/xxport/vcard/vcard_xxport.cpp:[436:44] class VCardViewerDialog has no slot 'slotCancel()'

# marc
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/libkleo/backends/qgpgme/qgpgmerefreshkeysjob.cpp:[110:11] class QGpgMERefreshKeysJob has no slot 'slotStdout()', did you mean slot 'slotStderr()'?
ERRO: /mnt/archive/src/kde-trunk/src/kdepim/kleopatra/tests/test_verificationresultdialog.cpp:[99:22] class VerifyDetachedJob has no signal 'result(GpgME::VerificationResult,std::vector<GpgME::Key>)', did you mean signal 'result(GpgME::VerificationResult,QString,GpgME::Error)'?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100531/a34d57b1/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list