Version: unspecified (using Devel) OS: Windows CE version: svn-1204839 Reproducible: Didn't try Steps to Reproduce: 1. Open Mail Settings 2. Enter a testline in the New Mail template. 3. Clicked on How template works. Actual Results: Crash. Expected Results: Shouldn't crash
I'm getting out of memory here: Data Abort: Thread=8a319718 Proc=80462730 'kmail-mobile.exe' AKY=08000001 PC=79442fdc(qtgui4.dll+0x00092fdc) RA=79442fdc(qtgui4.dll+0x00092fdc) BVA=38000010 FSR=00000007 Unhandled exception at 0x79442fdc in kmail-mobile.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00000010. That is with a release with debug build but strange anyway since it's just some text.
This should have been fixed by using dlmalloc for gettext. But i can still confirm the validity of this bug with a version from 1.1.2011
You see the text from the label coming up btw. but then after a second or so -> crash
When setting the label to show by default it crashed imediatly after opening the configuration dialog so the label show action is not the problem.
A mobile/mail/docs/en/templateshelp.html [License: Trivialfile.] A mobile/mail/docs/CMakeLists.txt [License: Trivialfile.] commit 3651a1e9b5e7565e1a192f4f3f4cec4f3c7b7a07 Author: Tobias Koenig <tokoe@kde.org> Date: Fri Jan 14 12:08:46 2011 +0100 Show templates info in external viewer On WinCE we can't put a large HTML document into a QLabel, this will crash the application. So we take the general approach of opening the HTML document in an external viewer. CCBUG: 259724 diff --git a/mobile/lib/kdeclarativemainview.cpp b/mobile/lib/kdeclarativemainview.cpp index 053d403..15f4bad 100644 --- a/mobile/lib/kdeclarativemainview.cpp +++ b/mobile/lib/kdeclarativemainview.cpp @@ -699,13 +699,24 @@ void KDeclarativeMainView::openManual() i18n( "Manual not found" ) ); return; } -#ifdef Q_WS_MAEMO_5 - // opening the browser with a website via desktop file is defect on maemo5 - // try to call the bowser directly - KProcess::startDetached( QLatin1String("/usr/bin/browser"), QStringList() << QLatin1String("--url") << path ); -#else - openAttachment( path, QLatin1String( "text/html" ) ); -#endif + + d->openHtml( path ); +} + +void KDeclarativeMainView::openDocumentation( const QString &relativePath ) +{ + const QString path = lookupDocumentation( relativePath ); + const KUrl url = path; + const bool isValid = url.isValid(); + + if ( !isValid ) { + KMessageBox::error( this, + i18n( "The documentation could not be found on your system." ), + i18n( "Documentation not found" ) ); + return; + } + + d->openHtml( path ); } void KDeclarativeMainView::openLicenses() diff --git a/mobile/lib/kdeclarativemainview.h b/mobile/lib/kdeclarativemainview.h index 152a846..7f8bd34 100644 --- a/mobile/lib/kdeclarativemainview.h +++ b/mobile/lib/kdeclarativemainview.h @@ -171,6 +171,11 @@ class MOBILEUI_EXPORT KDeclarativeMainView : public KDeclarativeFullScreenView */ void openManual(); + /** + * Opens the HTML based documentation located at the given relative @p path. + */ + void openDocumentation( const QString &path ); + void openAttachment( const QString &url, const QString &mimeType ); void saveAttachment( const QString &url, const QString &defaultFileName = QString() ); diff --git a/mobile/lib/kdeclarativemainview_p.cpp b/mobile/lib/kdeclarativemainview_p.cpp index 6d937d4..38bb2a6 100644 --- a/mobile/lib/kdeclarativemainview_p.cpp +++ b/mobile/lib/kdeclarativemainview_p.cpp @@ -132,3 +132,15 @@ void KDeclarativeMainViewPrivate::guiStateChanged( int oldState, int newState ) } } } + +void KDeclarativeMainViewPrivate::openHtml( const QString &path ) +{ +#ifdef Q_WS_MAEMO_5 + // opening the browser with a website via desktop file is defect on maemo5 + // try to call the bowser directly + KProcess::startDetached( QLatin1String("/usr/bin/browser"), QStringList() << QLatin1String("--url") << path ); +#else + q->openAttachment( path, QLatin1String( "text/html" ) ); +#endif +} + diff --git a/mobile/lib/kdeclarativemainview_p.h b/mobile/lib/kdeclarativemainview_p.h index 023107a..c50c71c 100644 --- a/mobile/lib/kdeclarativemainview_p.h +++ b/mobile/lib/kdeclarativemainview_p.h @@ -72,6 +72,8 @@ public: /// members public: /// Methods KDeclarativeMainViewPrivate( KDeclarativeMainView* ); + void openHtml( const QString &path ); + public slots: void saveState(); void restoreState(); diff --git a/mobile/mail/CMakeLists.txt b/mobile/mail/CMakeLists.txt index 9d7451d..b6d8597 100644 --- a/mobile/mail/CMakeLists.txt +++ b/mobile/mail/CMakeLists.txt @@ -2,6 +2,7 @@ project( kmail-mobile ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" ) +add_subdirectory(docs) add_subdirectory(tests) include_directories( @@ -133,3 +134,4 @@ install(FILES ) kde4_install_icons( ${ICON_INSTALL_DIR} ) + diff --git a/mobile/mail/configwidget.cpp b/mobile/mail/configwidget.cpp index c739fac..a309843 100644 --- a/mobile/mail/configwidget.cpp +++ b/mobile/mail/configwidget.cpp @@ -54,323 +54,9 @@ ConfigWidget::ConfigWidget( QWidget *parent ) ui.howDoesThisWorkLabel->setText( i18n( "<a href=\"help\">How does this work?</a>" ) ); connect( ui.howDoesThisWorkLabel, SIGNAL( linkActivated( const QString& ) ), - this, SLOT( showTemplatesHelpClicked() ) ); + this, SIGNAL( showTemplatesHelp() ) ); - mHelpLabel = ui.helpLabel; - mHelpLabel->setVisible( false ); - - QString helpText; - helpText += i18n( "<p>Here you can create and manage templates to use when<br/>" - "composing new messages, replies or forwarded messages.</p>" - "<p>The message templates support substitution commands,<br/>" - "which can be used together with custom text inside the above text fields.</p>" ); - - helpText += "<br/>"; - helpText += "<table>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\">" + i18n( "Original Message" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\">" + i18n( "Command" ) + "</th>"; - helpText += " <th align=\"left\">" + i18n( "Description" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%QUOTE</td>"; - helpText += " <td>" + i18n( "Quoted Message Text" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TEXT</td>"; - helpText += " <td>" + i18n( "Message Text as Is" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OMSGID</td>"; - helpText += " <td>" + i18n( "Message Id" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%ODATE</td>"; - helpText += " <td>" + i18n( "Date" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%ODATESHORT</td>"; - helpText += " <td>" + i18n( "Date in Short Format" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%ODATEEN</td>"; - helpText += " <td>" + i18n( "Date in C Locale" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%ODOW</td>"; - helpText += " <td>" + i18n( "Day of Week" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTIME</td>"; - helpText += " <td>" + i18n( "Time" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTIMELONG</td>"; - helpText += " <td>" + i18n( "Time in Long Format" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTIMELONGEN</td>"; - helpText += " <td>" + i18n( "Time in C Locale" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTOADDR</td>"; - helpText += " <td>" + i18n( "To Field Address" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTONAME</td>"; - helpText += " <td>" + i18n( "To Field Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTOFNAME</td>"; - helpText += " <td>" + i18n( "To Field First Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OTOLNAME</td>"; - helpText += " <td>" + i18n( "To Field Last Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OCCADDR</td>"; - helpText += " <td>" + i18n( "CC Field Address" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OCCNAME</td>"; - helpText += " <td>" + i18n( "CC Field Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OCCFNAME</td>"; - helpText += " <td>" + i18n( "CC Field First Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OCCLNAME</td>"; - helpText += " <td>" + i18n( "CC Field Last Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OFROMADDR</td>"; - helpText += " <td>" + i18n( "From Field Address" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OFROMNAME</td>"; - helpText += " <td>" + i18n( "From Field Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OFROMFNAME</td>"; - helpText += " <td>" + i18n( "From Field First Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OFROMLNAME</td>"; - helpText += " <td>" + i18n( "From Field Last Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OADDRESSEESADDR</td>"; - helpText += " <td>" + i18n( "Addresses of all recipients" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OFULLSUBJECT</td>"; - helpText += " <td>" + i18n( "Subject" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%QHEADERS</td>"; - helpText += " <td>" + i18n( "Quoted Headers" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%HEADERS</td>"; - helpText += " <td>" + i18n( "Headers as Is" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%OHEADER=\"<i>header-name</i>\"</td>"; - helpText += " <td>" + i18n( "Header Content" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\">" + i18n( "Current Message" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\">" + i18n( "Command" ) + "</th>"; - helpText += " <th align=\"left\">" + i18n( "Description" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%MSGID</td>"; - helpText += " <td>" + i18n( "Message Id" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%DATE</td>"; - helpText += " <td>" + i18n( "Date" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%DATESHORT</td>"; - helpText += " <td>" + i18n( "Date in Short Format" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%DATEEN</td>"; - helpText += " <td>" + i18n( "Date in C Locale" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%DOW</td>"; - helpText += " <td>" + i18n( "Day of Week" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TIME</td>"; - helpText += " <td>" + i18n( "Time" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TIMELONG</td>"; - helpText += " <td>" + i18n( "Time in Long Format" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TIMELONGEN</td>"; - helpText += " <td>" + i18n( "Time in C Locale" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TOADDR</td>"; - helpText += " <td>" + i18n( "To Field Address" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TONAME</td>"; - helpText += " <td>" + i18n( "To Field Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TOFNAME</td>"; - helpText += " <td>" + i18n( "To Field First Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TOLNAME</td>"; - helpText += " <td>" + i18n( "To Field Last Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%CCADDR</td>"; - helpText += " <td>" + i18n( "CC Field Address" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%CCNAME</td>"; - helpText += " <td>" + i18n( "CC Field Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%CCFNAME</td>"; - helpText += " <td>" + i18n( "CC Field First Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%CCLNAME</td>"; - helpText += " <td>" + i18n( "CC Field Last Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%FROMADDR</td>"; - helpText += " <td>" + i18n( "From Field Address" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%FROMNAME</td>"; - helpText += " <td>" + i18n( "From Field Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%FROMFNAME</td>"; - helpText += " <td>" + i18n( "From Field First Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%FROMLNAME</td>"; - helpText += " <td>" + i18n( "From Field Last Name" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%FULLSUBJECT</td>"; - helpText += " <td>" + i18n( "Subject" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%HEADER=\"<i>header-name</i>\"</td>"; - helpText += " <td>" + i18n( "Header Content" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\">" + i18n( "Process with External Program" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\">" + i18n( "Command" ) + "</th>"; - helpText += " <th align=\"left\">" + i18n( "Description" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%SYSTEM=\"<i>command</i>\"</td>"; - helpText += " <td>" + i18n( "Arbitrary Command" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%QUOTEPIPE=\"<i>command</i>\"</td>"; - helpText += " <td>" + i18n( "Pipe Original Message Body and Insert Result as Quoted Text" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%TEXTPIPE=\"<i>command</i>\"</td>"; - helpText += " <td>" + i18n( "Pipe Original Message Body and Insert Result as Is" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%MSGPIPE=\"<i>command</i>\"</td>"; - helpText += " <td>" + i18n( "Pipe Original Message with Headers and Insert Result as Is" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%BODYPIPE=\"<i>command</i>\"</td>"; - helpText += " <td>" + i18n( "Pipe Current Message Body and Insert Result as Is" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%CLEARPIPE=\"<i>command</i>\"</td>"; - helpText += " <td>" + i18n( "Pipe Current Message Body and Replace with Result" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\">" + i18n( "Miscellaneous" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\" colspan=\"2\"></th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <th align=\"left\">" + i18n( "Command" ) + "</th>"; - helpText += " <th align=\"left\">" + i18n( "Description" ) + "</th>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%SIGNATURE</td>"; - helpText += " <td>" + i18n( "Signature" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%INSERT=\"<i>file name</i>\"</td>"; - helpText += " <td>" + i18n( "Insert File Content" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%-</td>"; - helpText += " <td>" + i18n( "Discard to Next Line" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%REM=\"<i>comment</i>\"</td>"; - helpText += " <td>" + i18n( "Template Comment" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%NOP</td>"; - helpText += " <td>" + i18n( "No Operation" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%CLEAR</td>"; - helpText += " <td>" + i18n( "Clear Generated Message" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%DEBUG</td>"; - helpText += " <td>" + i18n( "Turn Debug On" ) + "</td>"; - helpText += " </tr>"; - helpText += " <tr>"; - helpText += " <td>%DEBUGOFF</td>"; - helpText += " <td>" + i18n( "Turn Debug Off" ) + "</td>"; - helpText += " </tr>"; - helpText += "</table>"; - - mHelpLabel->setText( helpText ); + ui.helpLabel->setVisible( false ); } void ConfigWidget::load() @@ -406,11 +92,6 @@ void ConfigWidget::editRecentAddresses() } } -void ConfigWidget::showTemplatesHelpClicked() -{ - mHelpLabel->setVisible( !mHelpLabel->isVisible() ); -} - void ConfigWidget::loadFromExternalSettings() { // Appearance diff --git a/mobile/mail/configwidget.h b/mobile/mail/configwidget.h index 0a4c1d1..7e6a2f6 100644 --- a/mobile/mail/configwidget.h +++ b/mobile/mail/configwidget.h @@ -42,17 +42,16 @@ class ConfigWidget : public QWidget private Q_SLOTS: void configureCompletionOrder(); void editRecentAddresses(); - void showTemplatesHelpClicked(); Q_SIGNALS: void configChanged(); + void showTemplatesHelp(); private: void loadFromExternalSettings(); void saveToExternalSettings(); KConfigDialogManager *mManager; - QLabel *mHelpLabel; }; class DeclarativeConfigWidget : diff --git a/mobile/mail/docs/CMakeLists.txt b/mobile/mail/docs/CMakeLists.txt new file mode 100644 index 0000000..ff81fb0 --- /dev/null +++ b/mobile/mail/docs/CMakeLists.txt @@ -0,0 +1 @@ +install(FILES en/templateshelp.html DESTINATION ${DATA_INSTALL_DIR}/kontact-touch/en/mail/) diff --git a/mobile/mail/docs/en/templateshelp.html b/mobile/mail/docs/en/templateshelp.html new file mode 100644 index 0000000..a55fb33 --- /dev/null +++ b/mobile/mail/docs/en/templateshelp.html @@ -0,0 +1,313 @@ +<html> + <body> + <p>Here you can create and manage templates to use when<br/> + composing new messages, replies or forwarded messages.</p> + <p>The message templates support substitution commands,<br/> + which can be used together with custom text inside the above text fields.</p> + + <br/> + <table> + <tr> + <th align="left" colspan="2">Original Message</th> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left">Command</th> + <th align="left">Description</th> + </tr> + <tr> + <td>%QUOTE</td> + <td>Quoted Message Text</td> + </tr> + <tr> + <td>%TEXT</td> + <td>Message Text as Is</td> + </tr> + <tr> + <td>%OMSGID</td> + <td>Message Id</td> + </tr> + <tr> + <td>%ODATE</td> + <td>Date</td> + </tr> + <tr> + <td>%ODATESHORT</td> + <td>Date in Short Format</td> + </tr> + <tr> + <td>%ODATEEN</td> + <td>Date in C Locale</td> + </tr> + <tr> + <td>%ODOW</td> + <td>Day of Week</td> + </tr> + <tr> + <td>%OTIME</td> + <td>Time</td> + </tr> + <tr> + <td>%OTIMELONG</td> + <td>Time in Long Format</td> + </tr> + <tr> + <td>%OTIMELONGEN</td> + <td>Time in C Locale</td> + </tr> + <tr> + <td>%OTOADDR</td> + <td>To Field Address</td> + </tr> + <tr> + <td>%OTONAME</td> + <td>To Field Name</td> + </tr> + <tr> + <td>%OTOFNAME</td> + <td>To Field First Name</td> + </tr> + <tr> + <td>%OTOLNAME</td> + <td>To Field Last Name</td> + </tr> + <tr> + <td>%OCCADDR</td> + <td>CC Field Address</td> + </tr> + <tr> + <td>%OCCNAME</td> + <td>CC Field Name</td> + </tr> + <tr> + <td>%OCCFNAME</td> + <td>CC Field First Name</td> + </tr> + <tr> + <td>%OCCLNAME</td> + <td>CC Field Last Name</td> + </tr> + <tr> + <td>%OFROMADDR</td> + <td>From Field Address</td> + </tr> + <tr> + <td>%OFROMNAME</td> + <td>From Field Name</td> + </tr> + <tr> + <td>%OFROMFNAME</td> + <td>From Field First Name</td> + </tr> + <tr> + <td>%OFROMLNAME</td> + <td>From Field Last Name</td> + </tr> + <tr> + <td>%OADDRESSEESADDR</td> + <td>Addresses of all recipients</td> + </tr> + <tr> + <td>%OFULLSUBJECT</td> + <td>Subject</td> + </tr> + <tr> + <td>%QHEADERS</td> + <td>Quoted Headers</td> + </tr> + <tr> + <td>%HEADERS</td> + <td>Headers as Is</td> + </tr> + <tr> + <td>%OHEADER=<i>header-name</i></td> + <td>Header Content</td> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left" colspan="2">Current Message</th> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left">Command</th> + <th align="left">Description</th> + </tr> + <tr> + <td>%MSGID</td> + <td>Message Id</td> + </tr> + <tr> + <td>%DATE</td> + <td>Date</td> + </tr> + <tr> + <td>%DATESHORT</td> + <td>Date in Short Format</td> + </tr> + <tr> + <td>%DATEEN</td> + <td>Date in C Locale</td> + </tr> + <tr> + <td>%DOW</td> + <td>Day of Week</td> + </tr> + <tr> + <td>%TIME</td> + <td>Time</td> + </tr> + <tr> + <td>%TIMELONG</td> + <td>Time in Long Format</td> + </tr> + <tr> + <td>%TIMELONGEN</td> + <td>Time in C Locale</td> + </tr> + <tr> + <td>%TOADDR</td> + <td>To Field Address</td> + </tr> + <tr> + <td>%TONAME</td> + <td>To Field Name</td> + </tr> + <tr> + <td>%TOFNAME</td> + <td>To Field First Name</td> + </tr> + <tr> + <td>%TOLNAME</td> + <td>To Field Last Name</td> + </tr> + <tr> + <td>%CCADDR</td> + <td>CC Field Address</td> + </tr> + <tr> + <td>%CCNAME</td> + <td>CC Field Name</td> + </tr> + <tr> + <td>%CCFNAME</td> + <td>CC Field First Name</td> + </tr> + <tr> + <td>%CCLNAME</td> + <td>CC Field Last Name</td> + </tr> + <tr> + <td>%FROMADDR</td> + <td>From Field Address</td> + </tr> + <tr> + <td>%FROMNAME</td> + <td>From Field Name</td> + </tr> + <tr> + <td>%FROMFNAME</td> + <td>From Field First Name</td> + </tr> + <tr> + <td>%FROMLNAME</td> + <td>From Field Last Name</td> + </tr> + <tr> + <td>%FULLSUBJECT</td> + <td>Subject</td> + </tr> + <tr> + <td>%HEADER=<i>header-name</i></td> + <td>Header Content</td> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left" colspan="2">Process with External Program</th> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left">Command</th> + <th align="left">Description</th> + </tr> + <tr> + <td>%SYSTEM=<i>command</i></td> + <td>Arbitrary Command</td> + </tr> + <tr> + <td>%QUOTEPIPE=<i>command</i></td> + <td>Pipe Original Message Body and Insert Result as Quoted Text</td> + </tr> + <tr> + <td>%TEXTPIPE=<i>command</i></td> + <td>Pipe Original Message Body and Insert Result as Is</td> + </tr> + <tr> + <td>%MSGPIPE=<i>command</i></td> + <td>Pipe Original Message with Headers and Insert Result as Is</td> + </tr> + <tr> + <td>%BODYPIPE=<i>command</i></td> + <td>Pipe Current Message Body and Insert Result as Is</td> + </tr> + <tr> + <td>%CLEARPIPE=<i>command</i></td> + <td>Pipe Current Message Body and Replace with Result</td> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left" colspan="2">Miscellaneous</th> + </tr> + <tr> + <th align="left" colspan="2"></th> + </tr> + <tr> + <th align="left">Command</th> + <th align="left">Description</th> + </tr> + <tr> + <td>%SIGNATURE</td> + <td>Signature</td> + </tr> + <tr> + <td>%INSERT=<i>file name</i></td> + <td>Insert File Content</td> + </tr> + <tr> + <td>%-</td> + <td>Discard to Next Line</td> + </tr> + <tr> + <td>%REM=<i>comment</i></td> + <td>Template Comment</td> + </tr> + <tr> + <td>%NOP</td> + <td>No Operation</td> + </tr> + <tr> + <td>%CLEAR</td> + <td>Clear Generated Message</td> + </tr> + <tr> + <td>%DEBUG</td> + <td>Turn Debug On</td> + </tr> + <tr> + <td>%DEBUGOFF</td> + <td>Turn Debug Off</td> + </tr> + </table> + </body> +</html> diff --git a/mobile/mail/mainview.cpp b/mobile/mail/mainview.cpp index b7e93d8..ed865b9 100644 --- a/mobile/mail/mainview.cpp +++ b/mobile/mail/mainview.cpp @@ -183,6 +183,7 @@ void MainView::setConfigWidget( ConfigWidget *configWidget ) { Q_ASSERT( configWidget ); connect( configWidget, SIGNAL( configChanged() ), this, SLOT( updateConfig() ) ); + connect( configWidget, SIGNAL( showTemplatesHelp() ), this, SLOT( showTemplatesHelp() ) ); } bool MainView::collectionIsSentMail() const @@ -1752,6 +1753,11 @@ void MainView::selectNextUnreadMessage() } } +void MainView::showTemplatesHelp() +{ + openDocumentation( QLatin1String( "mail/templateshelp.html" ) ); +} + void MainView::showMessageSource() { MessageViewer::MessageViewItem *item = messageViewerItem(); diff --git a/mobile/mail/mainview.h b/mobile/mail/mainview.h index b4b4d2f..dacbe65 100644 --- a/mobile/mail/mainview.h +++ b/mobile/mail/mainview.h @@ -188,6 +188,7 @@ class MainView : public KDeclarativeMainView void toggleShowExtendedHeaders( bool ); void messageListSettingsChanged( const MessageListSettings& ); bool selectNextUnreadMessageInCurrentFolder(); + void showTemplatesHelp(); private: void reply( quint64 id, MessageComposer::ReplyStrategy replyStrategy, bool quoteOriginal = true );
retested in git-3bcdde2 and it works now. It opens a browser to show a html file.
test windows CE 2011-01-16 git-4d1bc61 Clicking on "How do templates work?" no longer crashs. It opens a browser with the text. Closed.