diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-06-10 11:24:00 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-06-10 11:24:00 (GMT) |
commit | 3ffd60631a3716c3b38de86df3af9deca1196c76 (patch) | |
tree | e5fc4693f2c79d3b99f5bb2c1233c6e62d300521 /src | |
parent | abff7b88fed5d2cb555972d3db11a8d2f3745bf9 (diff) | |
parent | 47746f46920e4d09d4524fc2466b25626b2454bf (diff) | |
download | Qt-3ffd60631a3716c3b38de86df3af9deca1196c76.zip Qt-3ffd60631a3716c3b38de86df3af9deca1196c76.tar.gz Qt-3ffd60631a3716c3b38de86df3af9deca1196c76.tar.bz2 |
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 5 | ||||
-rw-r--r-- | src/gui/util/qdesktopservices_s60.cpp | 54 | ||||
-rw-r--r-- | src/gui/util/util.pri | 5 |
3 files changed, 28 insertions, 36 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 180937f..6ee63e6 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2342,6 +2342,11 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple sliderlen = (qint64(scrollbarOption->pageStep) * maxlen) / (range + scrollbarOption->pageStep); int slidermin = pixelMetric(PM_ScrollBarSliderMin, scrollbarOption, widget); + if (isHorizontal && slidermin < scrollBarRect.height()) + slidermin = scrollBarRect.height(); + else if (!isHorizontal && slidermin < scrollBarRect.width()) + slidermin = scrollBarRect.width(); + if (sliderlen < slidermin || range > (INT_MAX>>1)) sliderlen = slidermin; if (sliderlen > maxlen) diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index a30e2ed..d53c046 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -54,8 +54,8 @@ #include <eikenv.h> // CEikonEnv #include <apgcli.h> // RApaLsSession #include <apgtask.h> // TApaTaskList, TApaTask -#include <sendui.h> // CSendUi -#include <cmessagedata.h> // CMessageData +#include <rsendas.h> // RSendAs +#include <rsendasmessage.h> // RSendAsMessage #include <pathinfo.h> // PathInfo #ifdef USE_DOCUMENTHANDLER #include <documenthandler.h> // CDocumentHandler @@ -85,52 +85,44 @@ static void handleMailtoSchemeL(const QUrl &url) QStringList bccs = bcc.split(","); - CSendUi* sendUi = CSendUi::NewLC(); + RSendAs sendAs; + User::LeaveIfError(sendAs.Connect()); + CleanupClosePushL(sendAs); + + RSendAsMessage sendAsMessage; + sendAsMessage.CreateL(sendAs, KUidMsgTypeSMTP); + CleanupClosePushL(sendAsMessage); - // Construct symbian sendUI data holder - CMessageData* messageData = CMessageData::NewLC(); // Subject - TPtrC subj( qt_QString2TPtrC(subject) ); - messageData->SetSubjectL( &subj ); + sendAsMessage.SetSubjectL(qt_QString2TPtrC(subject)); // Body - CParaFormatLayer* paraFormat = CParaFormatLayer::NewL(); - CleanupStack::PushL( paraFormat ); - CCharFormatLayer* charFormat = CCharFormatLayer::NewL(); - CleanupStack::PushL( charFormat ); - CRichText* bodyRichText = CRichText::NewL( paraFormat, charFormat ); - CleanupStack::PushL( bodyRichText ); - - TPtrC bodyPtr( qt_QString2TPtrC(body) ); - if( bodyPtr.Length() ) - { - bodyRichText->InsertL( 0, bodyPtr ); - } - else - { - bodyRichText->InsertL( 0, KNullDesC ); - } - - messageData->SetBodyTextL( bodyRichText ); + sendAsMessage.SetBodyTextL(qt_QString2TPtrC(body)); // To foreach(QString item, recipients) - messageData->AppendToAddressL(qt_QString2TPtrC(item)); + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); foreach(QString item, tos) - messageData->AppendToAddressL(qt_QString2TPtrC(item)); + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); // Cc foreach(QString item, ccs) - messageData->AppendCcAddressL(qt_QString2TPtrC(item)); + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientCc ); // Bcc foreach(QString item, bccs) - messageData->AppendBccAddressL(qt_QString2TPtrC(item)); + sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientBcc ); + + // send the message + sendAsMessage.LaunchEditorAndCloseL(); + + // sendAsMessage (already closed) + CleanupStack::Pop(); - sendUi->CreateAndSendMessageL( KUidMsgTypeSMTP, messageData ); - CleanupStack::PopAndDestroy( 5 ); // bodyRichText, charFormat, paraFormat, messageData, sendUi + // sendAs + CleanupStack::PopAndDestroy(); } static bool handleMailtoScheme(const QUrl &url) diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri index 69c53ae..e628229 100644 --- a/src/gui/util/util.pri +++ b/src/gui/util/util.pri @@ -35,11 +35,6 @@ embedded { util/qsystemtrayicon_qws.cpp } -symbian { - # QDesktopServices uses CSendUi which is located on app layer - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} - !embedded:!x11:mac { OBJECTIVE_SOURCES += util/qsystemtrayicon_mac.mm } |