From: Olivier Goffart Date: Tue, 22 Nov 2016 16:25:42 +0000 (+0100) Subject: Propagator: don't use dynamic_cast for QObject X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1000^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d22d0e7e302fc61f55b9a14551bb9a873876f934;p=nextcloud-desktop.git Propagator: don't use dynamic_cast for QObject qobject_cast is better. (no need to use RTTI when we have QMetaObject --- diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 213896abe..f31aa1676 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -314,7 +314,7 @@ void OwncloudPropagator::start(const SyncFileItemVector& items) if (!removedDirectory.isEmpty() && item->_file.startsWith(removedDirectory)) { // this is an item in a directory which is going to be removed. - PropagateDirectory *delDirJob = dynamic_cast(directoriesToRemove.first()); + PropagateDirectory *delDirJob = qobject_cast(directoriesToRemove.first()); if (item->_instruction == CSYNC_INSTRUCTION_REMOVE) { // already taken care of. (by the removal of the parent directory)