Propagator: don't use dynamic_cast for QObject

qobject_cast is better. (no need to use RTTI when we have QMetaObject
This commit is contained in:
Olivier Goffart 2016-11-22 17:25:42 +01:00
parent 4998303c42
commit d22d0e7e30

View file

@ -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<PropagateDirectory*>(directoriesToRemove.first());
PropagateDirectory *delDirJob = qobject_cast<PropagateDirectory*>(directoriesToRemove.first());
if (item->_instruction == CSYNC_INSTRUCTION_REMOVE) {
// already taken care of. (by the removal of the parent directory)