- const KUrl source = urls.first();
- const KUrl sourceDir = KUrl(source.directory());
-
- if ((urls.count() == 1) && (source == destination)) {
- emit errorMessage(i18nc("@info:status", "A folder cannot dropped on to itself"));
- } else if (sourceDir == destination) {
- const QString msg = i18ncp("@info:status",
- "The dropped item <filename>%2</filename> is already inside the folder <filename>%3</filename>",
- "The dropped items are already inside the folder <filename>%3</filename>",
- urls.count(), source.fileName(), destination.fileName());
- emit errorMessage(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"));