[kmail2] [Bug 328816] New Function: Bitmaps in Editor as visible Picture

Laurent Montel montel at kde.org
Sat Jan 25 10:51:50 GMT 2014


https://bugs.kde.org/show_bug.cgi?id=328816

--- Comment #4 from Laurent Montel <montel at kde.org> ---
  // If this is a PNG image, either add it as an attachment or as an inline
image
    qDebug()<<" source->format()"<<source->formats();
  if ( source->hasImage() && source->hasFormat( QLatin1String("image/png") ) )
{
    // Get the image data before showing the dialog, since that processes
events which can delete
    // the QMimeData object behind our back
    const QByteArray imageData = source->data( QLatin1String("image/png") );
    if ( imageData.isEmpty() ) {
       return true;
    }
    if ( !forceAttachment ) {
      if ( mComposerBase->editor()->textMode() == KRichTextEdit::Rich &&
mComposerBase->editor()->isEnableImageActions() ) {
        QImage image = qvariant_cast<QImage>( source->imageData() );
        QFileInfo fi( source->text() );

We have a code in kmail but any program send QMimeData as png or other.
They send as url.
So kmail can but I don't know a program which send as image.
a dnd is just a url not a data.

when you make 'copy' on a image in firefox for example you can paste and menu
will ask you if you want to insert image
but dnd can't .

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list