Bug 328816 - New Function: Bitmaps in Editor as visible Picture
Summary: New Function: Bitmaps in Editor as visible Picture
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.11.2
Platform: unspecified Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2013-12-14 22:30 UTC by Martin Brugger
Modified: 2014-01-25 10:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Brugger 2013-12-14 22:30:18 UTC
Its a wish! 
I want to insert Bitmaps into the Emaileditor. Not as Attachment!

Reproducible: Always
Comment 1 Laurent Montel 2013-12-15 06:12:16 UTC
Html mode -> insert image -> bmp ?
Comment 2 Martin Brugger 2013-12-24 15:12:59 UTC
Thanks I found it.
A wish from me is:
If i do with drag and drop a Picture into Emaileditor that i become a menu with a third option that do the same funktion as Html mode -> insert image -> bmp.

Best Regards
Comment 3 Laurent Montel 2014-01-25 10:13:59 UTC
Ok just in html mode.
Will investigate it.
It's a good idea.
Comment 4 Laurent Montel 2014-01-25 10:51:50 UTC
  // 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 .