Commit 36e86814 authored by David Faure's avatar David Faure

Add warning in case an invalid mimetype is requested here.

This is never supposed to happen, but a bug of mine in QMimeDatabase
alias resolving, in qtbase dev, actually led to this.

Test Plan: the warning now appears for text/directory with qtbase dev. Yes I'll fix that Qt bug ;)

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision:
parent b7461b5c
......@@ -310,6 +310,7 @@ private:
const QMimeDatabase mimeDb;
const QMimeType mimeType = mimeDb.mimeTypeForName(type);
if (!mimeType.isValid()) {
qCWarning(AKONADICORE_LOG) << "Invalid mimetype requested:" << type;
return mDefaultPlugin.plugin();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment