From 4d20f15de93981cc99b2c54931476bc735e68b18 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 16 Dec 2011 16:08:30 +0100 Subject: [PATCH] fixed code to hadle mime type like 'images/png;......' --- src/board/UBBoardController.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index d18b53ac..2ca0fe6d 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -777,6 +777,12 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString { QString mimeType = pContentTypeHeader; + // In some cases "image/jpeg;charset=" is retourned by the drag-n-drop. That is + // why we will check if an ; exists and take the first part (the standard allows this kind of mimetype) + int position=mimeType.indexOf(";"); + if(position != -1) + mimeType=mimeType.left(position); + if (!pSuccess) { UBApplication::showMessage(tr("Downloading content %1 failed").arg(sourceUrl.toString()));