opening plain text emails in email application

Review Request #100123 - Created Oct. 31, 2010 and discarded

Information
Panagiotis Papadopoulos
rekonq
master
Reviewers
rekonq
This adds support for opening a plain text email address in an appropriate email application.

I need someone that can help me with the TODO part… Currently when you execute the action to send an email, rekonq will open up a new tab first (due to the usage of the openLinkInNewTab slot). IMHO this is not necessary…

(note: I am no developer, my programming skills are *very* low :-D This is mostly a “copy, paste and modify” job :-))
worked here a week ago, but due to some weird problem on my installation (kmailservice failing to be started) it does not work today… weird 
Andrea Diamantini
Things to check:
1) does KDE have some classes to check if a text is a valid email address (instead of parsing it everytime with a regexp)?
2) does not the created url need a scheme? (eg: mailto:pano@rekonq.org)?
  1. to 1) 
    Searching for “email” on the KDE API website, the only usable thing I found was: http://api.kde.org/4.x-api/kdepimlibs-apidocs/kpimutils/html/group__emailvalidation.html#gadf2a1bc99ab8a016c1c782ac574a58de
    I do not think that adding a dependency to kdepimlibs just for such a tiny feature is a good idea though^^
    
    to 2) 
    due to rohans previous work on the protocol handling, it seems to not be needed…
Andrea Diamantini
If your testing against this patch work, I'm ok on merging.
  1. yeah it does work here.
  2. Ok. Can you please merge this patch and sign this as "closed --> submitted"?
    Thanks :)
Pierre Rossi
Hope it's not too late for some comments...
src/webview.cpp (Diff revision 1)
 
 
Style: trailing whitespace
src/webview.cpp (Diff revision 1)
 
 
Try to avoid magic numbers, same as here:
http://git.reviewboard.kde.org/r/100205/

and same comment for truncatedURL -> truncatedUrl applies too.
src/webview.cpp (Diff revision 1)
 
 
Creating a new action could make this more readable.
const KAction * const sendEmailAction = ...
src/webview.cpp (Diff revision 1)
 
 
style again.
  1. uhm... Pano, what about this?
  2. I’m waiting, because Furkan’s URL-like detection code already detects e-mails…
    We need to decide what to do here: http://techbase.kde.org/Projects/rekonq/Meeting/Agenda#Open_selected_URL_in_Tab_feature
Andrea Diamantini
I cannot remember why this has not be merged/closed/submitted. Feel free to reopen if needed.
Loading...