- const KUrl sourceDir = KUrl(urls.first().directory());
- if (sourceDir == destination) {
- const QString msg = i18ncp("@info:status",
- "The dropped item is already inside the folder %2",
- "The dropped items are already inside the folder %2",
- urls.count(), destination.fileName());
- emit informationMessage(msg);
+ const int urlsCount = urls.count();
+ if (urlsCount == 0) {
+ // TODO: handle dropping of other data
+ } else if ((urlsCount == 1) && (urls.first() == destination)) {
+ emit errorMessage(i18nc("@info:status", "A folder cannot be dropped into itself"));