--- a/cellular/psuinotes/tsrc/mocks/mock_xqsettingsmanager.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/psuinotes/tsrc/mocks/mock_xqsettingsmanager.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -49,7 +49,7 @@
const XQSettingsKey & key,
XQSettingsManager::Type type )
{
- SMC_MOCK_METHOD2( QVariant, XQSettingsKey &, key, XQSettingsManager::Type, type )
+ SMC_MOCK_METHOD2( QVariant, const XQSettingsKey &, key, XQSettingsManager::Type, type )
}
@@ -61,7 +61,7 @@
const XQSettingsKey & key,
const QVariant & value )
{
- SMC_MOCK_METHOD2( bool, XQSettingsKey &, key, QVariant &, value )
+ SMC_MOCK_METHOD2( bool, const XQSettingsKey &, key, const QVariant &, value )
}
--- a/cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.pro Mon Aug 23 15:50:31 2010 +0300
@@ -49,4 +49,5 @@
../mocks/mock_psetcallwaitingwrapper.cpp \
../mocks/mock_qobject.cpp \
../mocks/mock_psuiutils.cpp \
- ../mocks/mock_psetcallwaitingwrapper_p.cpp
+ ../mocks/mock_psetcallwaitingwrapper_p.cpp \
+ ../mocks/mock_psetcalldivertingwrapper.cpp
--- a/cellular/sssettings/src/rsssettings.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/sssettings/src/rsssettings.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -500,10 +500,6 @@
TInt error(KErrNone);
TInt value(0);
- if ( error != KErrNone )
- {
- return error;
- }
// If Get fails, we try to save the default data.
switch ( aSetting )
@@ -760,10 +756,6 @@
Panic( SSSettingsPanicInvalidRequest ) );
TInt error(KErrNone);
- if ( error != KErrNone )
- {
- return error;
- }
switch ( aSetting )
{
--- a/cellular/telephonysettings/inc/psetcalldivertingbase.h Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/inc/psetcalldivertingbase.h Mon Aug 23 15:50:31 2010 +0300
@@ -243,12 +243,12 @@
/**
* @see CActive::RunL().
*/
- void RunL();
+ virtual void RunL();
/**
* @see CActive::DoCancel().
*/
- void DoCancel();
+ virtual void DoCancel();
/**
* @see MSSSettingsObserver::PhoneSettingChanged().
--- a/cellular/telephonysettings/src/psetcalldivertingbasicimpl.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/src/psetcalldivertingbasicimpl.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -66,6 +66,7 @@
//
CPSetCallDivertingBasicImpl::~CPSetCallDivertingBasicImpl()
{
+ Cancel();
}
// -----------------------------------------------------------------------------
--- a/cellular/telephonysettings/xqbindings/psetwrapper/bwins/psetwrapperu.def Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/bwins/psetwrapperu.def Mon Aug 23 15:50:31 2010 +0300
@@ -131,4 +131,5 @@
??_EPSetCallWaitingWrapper@@UAE@I@Z @ 130 NONAME ; PSetCallWaitingWrapper::~PSetCallWaitingWrapper(unsigned int)
??0PSetCallWaitingWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 131 NONAME ; PSetCallWaitingWrapper::PSetCallWaitingWrapper(class CPsetContainer &, class QObject *)
?qt_metacall@PSetCallBarringWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 132 NONAME ; int PSetCallBarringWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?chageVisbilityOfManualNetworkSelection@PSetNetworkWrapper@@IAEX_N@Z @ 133 NONAME ; void PSetNetworkWrapper::chageVisbilityOfManualNetworkSelection(bool)
--- a/cellular/telephonysettings/xqbindings/psetwrapper/eabi/psetwrapperu.def Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/eabi/psetwrapperu.def Mon Aug 23 15:50:31 2010 +0300
@@ -131,4 +131,5 @@
_ZTV22PSetCallBarringWrapper @ 130 NONAME
_ZTV22PSetCallWaitingWrapper @ 131 NONAME
_ZTV24PSetCallDivertingWrapper @ 132 NONAME
+ _ZN18PSetNetworkWrapper38chageVisbilityOfManualNetworkSelectionEb @ 133 NONAME
--- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -49,6 +49,12 @@
m_psetNetwork->SetNetSAObserver(*this);
QT_TRAP_THROWING(
m_psetNetworkMode.reset(psetContainer.CreateNetworkModeObjectL(*this)));
+ QT_TRAP_THROWING(
+ m_refreshHandler.reset(psetContainer.CreateRefreshHandlerL()));
+ QT_TRAP_THROWING(m_refreshHandler->NotifyFileChangeL(
+ *this,
+ KCsp1Ef,
+ EFileChangeNotification));
QT_TRAP_THROWING(m_csp.reset(CPsetCustomerServiceProfile::NewL()));
QT_TRAP_THROWING(m_csp->OpenCSProfileL());
@@ -461,6 +467,9 @@
}
}
+/*!
+ PSetNetworkWrapperPrivate::isManualNetworkSelectionSupported
+*/
bool PSetNetworkWrapperPrivate::isManualNetworkSelectionSupported() const
{
DPRINT << ": IN ";
@@ -478,3 +487,39 @@
return settingSupported;
}
+/*!
+ PSetNetworkWrapperPrivate::AllowRefresh
+*/
+TBool PSetNetworkWrapperPrivate::AllowRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles )
+{
+ DPRINT << "aType: " << aType;
+ DPRINT << "aFiles: " << aFiles;
+
+ return ETrue;
+}
+
+/*!
+ PSetNetworkWrapperPrivate::Refresh
+*/
+void PSetNetworkWrapperPrivate::Refresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles )
+{
+ DPRINT << "aType: " << aType;
+ DPRINT << "aFiles: " << aFiles;
+
+ if ((aType != EFileChangeNotification) ||
+ ((aType == EFileChangeNotification) &&
+ (aFiles == KCsp1Ef))) {
+ TBool networkSelectionSupported;
+ if (KErrNone == m_csp->IsNetworkSelectionSupported(networkSelectionSupported)) {
+ DPRINT << "networkSelectionSupported " << networkSelectionSupported;
+ emit m_owner.chageVisbilityOfManualNetworkSelection(networkSelectionSupported);
+ }
+ }
+
+ DPRINT << ": OUT";
+}
+
--- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.h Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.h Mon Aug 23 15:50:31 2010 +0300
@@ -22,17 +22,20 @@
#include <mpsetnetworkmodeobs.h>
#include <mpsetnetworkselect.h>
#include <QList>
+#include <MSSSettingsRefreshObserver.h>
#include "psetnetworkwrapper.h"
class PSetNetworkWrapper;
class CPsetContainer;
class CPsetNetwork;
class CPsetCustomerServiceProfile;
+class CPSetRefreshHandler;
class PSetNetworkWrapperPrivate
:
public MPsetNetworkInfoObserver,
- public MPsetNetworkModeObserver
+ public MPsetNetworkModeObserver,
+ public MSSSettingsRefreshObserver
{
public:
@@ -103,6 +106,16 @@
void HandleNetworkErrorL(
const MPsetNetworkModeObserver::TServiceRequest aRequest,
const TInt aError );
+
+public: // From MSSSettingsRefreshObserver
+
+ TBool AllowRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles );
+
+ void Refresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles );
private:
@@ -125,8 +138,9 @@
/*! Own. */
QScopedPointer<CPsetCustomerServiceProfile> m_csp;
-
-
+
+ /*! Own. */
+ QScopedPointer<CPSetRefreshHandler> m_refreshHandler;
};
--- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -55,8 +55,8 @@
delete m_callWaitingWrapper;
delete m_callDivertingWrapper;
delete m_networkWrapper;
+ delete m_callBarringWrapper;
delete m_psetContainer;
- delete m_callBarringWrapper;
DPRINT << ": OUT ";
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -0,0 +1,99 @@
+/** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include <mock_cpsetrefreshhandler.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPSetRefreshHandlerMock::NewL
+// -----------------------------------------------------------------------------
+//
+CPSetRefreshHandlerMock * CPSetRefreshHandlerMock::NewL( )
+ {
+ SMC_MOCK_NEWL0( CPSetRefreshHandlerMock * )
+
+ CPSetRefreshHandlerMock* self = new( ELeave ) CPSetRefreshHandlerMock;
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPSetRefreshHandlerMock::NotifyFileChangeL
+// -----------------------------------------------------------------------------
+//
+void CPSetRefreshHandlerMock::NotifyFileChangeL(
+ MSSSettingsRefreshObserver & aObserver,
+ TSatElementaryFiles aObservedFile,
+ TSatRefreshType aObservedRefreshType )
+ {
+ m_observer = &aObserver;
+ SMC_MOCK_METHOD3( void, MSSSettingsRefreshObserver &, aObserver,
+ TSatElementaryFiles, aObservedFile,
+ TSatRefreshType, aObservedRefreshType )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPSetRefreshHandlerMock::CancelNotify
+// -----------------------------------------------------------------------------
+//
+void CPSetRefreshHandlerMock::CancelNotify( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPSetRefreshHandlerMock::ChangedCspSettings
+// -----------------------------------------------------------------------------
+//
+TInt CPSetRefreshHandlerMock::ChangedCspSettings(
+ TPSetChangedCspSetting & aChangedCspSettings,
+ TPSetChangedCspSetting & aNewValues )
+ {
+ SMC_MOCK_METHOD2( TInt, TPSetChangedCspSetting &, aChangedCspSettings,
+ TPSetChangedCspSetting &, aNewValues )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPSetRefreshHandlerMock::ChangedCspSettings
+// -----------------------------------------------------------------------------
+//
+void CPSetRefreshHandlerMock::trigerAllowRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles )
+ {
+ m_observer->AllowRefresh(aType, aFiles);
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPSetRefreshHandlerMock::ChangedCspSettings
+// -----------------------------------------------------------------------------
+//
+void CPSetRefreshHandlerMock::trigerRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles )
+ {
+ m_observer->Refresh(aType, aFiles);
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.h Mon Aug 23 15:50:31 2010 +0300
@@ -0,0 +1,41 @@
+/** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef CPSetRefreshHandler_h
+#define CPSetRefreshHandler_h
+
+#include <psetrefreshhandler.h>
+
+class CPSetRefreshHandlerMock : public CPSetRefreshHandler
+ {
+ public:
+ static CPSetRefreshHandlerMock* NewL();
+ void NotifyFileChangeL( MSSSettingsRefreshObserver & aObserver, TSatElementaryFiles aObservedFile, TSatRefreshType aObservedRefreshType );
+ void CancelNotify( );
+ TInt ChangedCspSettings( TPSetChangedCspSetting & aChangedCspSettings, TPSetChangedCspSetting & aNewValues );
+
+ public:
+ void trigerAllowRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles );
+
+ void trigerRefresh(
+ const TSatRefreshType aType,
+ const TSatElementaryFiles aFiles );
+
+ MSSSettingsRefreshObserver *m_observer;
+ };
+
+#endif
--- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -115,7 +115,7 @@
CPsetCallBarring *barringMock = NULL;
TRAPD(result, barringMock = CPsetCallBarring::NewL(dummyObserver, dummyPhone));
QScopedPointer<CPsetCallBarring> barringMockGuard(barringMock);
- EXPECT(CPsetContainer::CreateCBObjectL)
+ EXPECT(CPsetContainer, CreateCBObjectL)
.returns(barringMock);
m_wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL);
barringMockGuard.take();
@@ -143,7 +143,7 @@
*/
void UT_PSetCallBarringWrapper::t_construction()
{
- EXPECT(CPsetContainer::CreateCBObjectL).
+ EXPECT(CPsetContainer, CreateCBObjectL).
willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall));
PSetCallBarringWrapper *wrapper = NULL;
EXPECT_EXCEPTION(
@@ -157,16 +157,16 @@
void UT_PSetCallBarringWrapper::t_barringStatus()
{
// test status query with different service groups
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllBarrings);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupData, EBarringTypeAllBarrings);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupFax, EBarringTypeAllBarrings);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupAllTeleservices, EBarringTypeAllBarrings);
// invalid/unknown enumeration as service group identifier
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllBarrings);
//TODO: remove SeviceGroupUnknown enumeration?
@@ -185,25 +185,25 @@
PSetCallBarringWrapper::BarringTypeAllBarrings);
// test status query with different barring types
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllOutgoing);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeOutgoingInternational);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice,
EBarringTypeOutgoingInternationalExceptToHomeCountry);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllIncoming);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeIncomingWhenRoaming);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllServices);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllOutgoingServices);
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllIncomingServices);
// invalid/unknown enumeration as barring type
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.with(EServiceGroupVoice, EBarringTypeAllBarrings);
m_wrapper->barringStatus(ServiceGroupVoice,
PSetCallBarringWrapper::BarringTypeAllOutgoing);
@@ -235,7 +235,7 @@
*/
void UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs()
{
- EXPECT(CPsetCallBarring::GetBarringStatusL)
+ EXPECT(CPsetCallBarring, GetBarringStatusL)
.willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall));
EXPECT_EXCEPTION(
@@ -259,7 +259,7 @@
setting.iSetting = EActivateBarring;
setting.iServiceGroup = EServiceGroupVoice;
setting.iPassword.Copy(KPassword());
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -267,7 +267,7 @@
QString("1234"));
setting.iType = EBarringTypeAllOutgoing;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -275,7 +275,7 @@
QString("1234"));
setting.iType = EBarringTypeOutgoingInternational;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -283,7 +283,7 @@
QString("1234"));
setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -291,7 +291,7 @@
QString("1234"));
setting.iType = EBarringTypeAllIncoming;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -299,7 +299,7 @@
QString("1234"));
setting.iType = EBarringTypeIncomingWhenRoaming;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -307,7 +307,7 @@
QString("1234"));
setting.iType = EBarringTypeAllServices;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -315,7 +315,7 @@
QString("1234"));
setting.iType = EBarringTypeAllOutgoingServices;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -323,7 +323,7 @@
QString("1234"));
setting.iType = EBarringTypeAllIncomingServices;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->enableBarring(
ServiceGroupVoice,
@@ -331,7 +331,7 @@
QString("1234"));
// error handling
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.willOnce(invokeWithoutArguments(simulateLeaveL));
EXPECT_EXCEPTION(
m_wrapper->enableBarring(
@@ -355,7 +355,7 @@
setting.iSetting = ECancelBarring;
setting.iServiceGroup = EServiceGroupVoice;
setting.iPassword.Copy(KPassword());
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -363,7 +363,7 @@
QString("1234"));
setting.iType = EBarringTypeAllOutgoing;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -371,7 +371,7 @@
QString("1234"));
setting.iType = EBarringTypeOutgoingInternational;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -379,7 +379,7 @@
QString("1234"));
setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -387,7 +387,7 @@
QString("1234"));
setting.iType = EBarringTypeAllIncoming;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -395,7 +395,7 @@
QString("1234"));
setting.iType = EBarringTypeIncomingWhenRoaming;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -403,7 +403,7 @@
QString("1234"));
setting.iType = EBarringTypeAllServices;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -411,7 +411,7 @@
QString("1234"));
setting.iType = EBarringTypeAllOutgoingServices;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -419,7 +419,7 @@
QString("1234"));
setting.iType = EBarringTypeAllIncomingServices;
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.with(setting, EAllTeleAndBearer);
m_wrapper->disableBarring(
ServiceGroupVoice,
@@ -427,7 +427,7 @@
QString("1234"));
// error handling
- EXPECT(CPsetCallBarring::SetBarringL)
+ EXPECT(CPsetCallBarring, SetBarringL)
.willOnce(invokeWithoutArguments(simulateLeaveL));
EXPECT_EXCEPTION(
m_wrapper->disableBarring(
@@ -452,14 +452,14 @@
passwordChange.iOldPassword.Copy(oldPassword.utf16());
passwordChange.iNewPassword.Copy(newPassword.utf16());
passwordChange.iVerifiedPassword.Copy(verifiedPassword.utf16());
- EXPECT(CPsetCallBarring::ChangePasswordL)
+ EXPECT(CPsetCallBarring, ChangePasswordL)
.with(passwordChange);
m_wrapper->changeBarringPassword(
oldPassword, newPassword, verifiedPassword);
// error handling
- EXPECT(CPsetCallBarring::ChangePasswordL)
+ EXPECT(CPsetCallBarring, ChangePasswordL)
.willOnce(invokeWithoutArguments(simulateLeaveL));
EXPECT_EXCEPTION(
m_wrapper->changeBarringPassword(
--- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.pro Mon Aug 23 15:50:31 2010 +0300
@@ -38,6 +38,9 @@
SOURCES += ut_psetnetworkinfoconverter.cpp
# code to be tested
-HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h
HEADERS += ../../src/psetnetworkinfoconverter.h
SOURCES += ../../src/psetnetworkinfoconverter.cpp
+
+# mocks
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h
+SOURCES += ../mocks/mock_psetnetworkwrapper.cpp
--- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -18,6 +18,7 @@
#include <PsetContainer.h>
#include <mpsetnetworkinfoobs.h>
#include <gsmerror.h>
+#include <mock_cpsetrefreshhandler.h>
#include "ut_psetnetworkwrapper.h"
#include "testutilities.h"
#define private public
@@ -125,6 +126,8 @@
initialize();
m_psetContainerMock = new CPsetContainer();
+ m_refreshHandler = CPSetRefreshHandlerMock::NewL();
+ SmcDefaultValue<CPSetRefreshHandler *>::SetL(m_refreshHandler);
RMobilePhone dummyHandle;
NetworkInfoObserver dummyObserver;
@@ -511,4 +514,33 @@
QVERIFY(verify());
}
+/*!
+ UT_PSetNetworkWrapper::t_AllowRefresh
+ */
+void UT_PSetNetworkWrapper::t_AllowRefresh()
+{
+ TSatRefreshType type;
+ TSatElementaryFiles file;
+ m_refreshHandler->trigerAllowRefresh(type, file);
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_Refresh
+ */
+void UT_PSetNetworkWrapper::t_Refresh()
+{
+ TSatElementaryFiles file;
+ expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").returns(KErrNone);
+ m_refreshHandler->trigerRefresh(EFileChangeNotification, KCsp1Ef);
+ QVERIFY(verify());
+
+ expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").returns(KErrGeneral);
+ m_refreshHandler->trigerRefresh(EFileChangeNotification, KCsp1Ef);
+ QVERIFY(verify());
+
+ expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").times(0);
+ m_refreshHandler->trigerRefresh(EFileChangeNotification, KCsp2Ef);
+ QVERIFY(verify());
+}
+
QTEST_MAIN_S60(UT_PSetNetworkWrapper)
--- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h Mon Aug 23 15:50:31 2010 +0300
@@ -24,6 +24,7 @@
class PSetNetworkWrapper;
class CPsetContainer;
class CPsetNetwork;
+class CPSetRefreshHandlerMock;
class UT_PSetNetworkWrapper : public QObject, public MockService
{
@@ -65,12 +66,15 @@
void t_exceptionSafety();
void t_isManualNetworkSelectionSupported();
+ void t_AllowRefresh();
+ void t_Refresh();
private:
PSetNetworkWrapper *m_wrapper;
CPsetContainer *m_psetContainerMock;
CPsetNetwork *m_psetNetworkMock;
CPsetNetwork *m_psetNetworkModeMock;
+ CPSetRefreshHandlerMock *m_refreshHandler;
};
#endif
--- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.pro Mon Aug 23 15:50:31 2010 +0300
@@ -48,4 +48,6 @@
# mocks needed for testing
SOURCES += ../mocks/mock_psetcontainer.cpp \
../mocks/mock_psetnetwork.cpp \
- ../mocks/mock_psetcsp.cpp
+ ../mocks/mock_psetcsp.cpp \
+ ../mocks/mock_cpsetrefreshhandler.cpp
+HEADERS += ../mocks/mock_cpsetrefreshhandler.h
--- a/phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h Tue Aug 10 13:19:41 2010 +0300
+++ b/phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h Mon Aug 23 15:50:31 2010 +0300
@@ -148,6 +148,8 @@
void networkChanged(
PSetNetworkWrapper::NetworkInfo& currentInfo,
PSetNetworkWrapper::RegistrationStatus& status);
+
+ void chageVisbilityOfManualNetworkSelection(bool visible);
private:
--- a/satengine/satserver/Engine/src/csatprofilechangeobserver.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/satengine/satserver/Engine/src/csatprofilechangeobserver.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -17,6 +17,7 @@
// INCLUDE FILES
+#include <coreapplicationuissdkcrkeys.h>
#include "TSatSystemStateFactory.h"
#include "MSatSystemStateChangeNotifier.h"
#include "MSatUtils.h"
@@ -24,10 +25,6 @@
#include "SatLog.h"
#include "CSatSUiClientHandler.h"
-
-// CONSTANTS
-const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine
-
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -112,7 +109,7 @@
with value %d", aValue )
// If profile is off-line send removing event
- if ( KSatActiveProfileOffline == aValue )
+ if ( ECoreAppUIsNetworkConnectionNotAllowed == aValue )
{
LOG( SIMPLE, "SATENGINE: Off-line" )
// Off-line state activated.
@@ -126,8 +123,8 @@
// SetupMenu command is received from SIM card not before phone is
// in online mode. iPreviousProfile is -1 when StateChanged is called
// first time.
- else if ( ( KSatActiveProfileOffline != aValue ) &&
- ( KSatActiveProfileOffline == iPreviousProfile ) )
+ else if ( ( ECoreAppUIsNetworkConnectionNotAllowed != aValue ) &&
+ ( ECoreAppUIsNetworkConnectionNotAllowed == iPreviousProfile ) )
{
LOG( SIMPLE, "SATENGINE: !Off-line" )
// Notify listeners about SAT UI icon adding
--- a/satengine/satserver/SystemState/src/TSatSystemStateFactory.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/satengine/satserver/SystemState/src/TSatSystemStateFactory.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -15,14 +15,13 @@
*
*/
-
#include <startupdomainpskeys.h>
#include <PSVariables.h>
#define Q_OS_SYMBIAN // needed to activate homescreendomainpskeys.h
#include <homescreendomainpskeys.h>
#include <CommonEngineDomainCRKeys.h>
#include <BTSapDomainPSKeys.h>
-#include <ProfileEngineSDKCRKeys.h>
+#include <coreapplicationuissdkcrkeys.h>
#include "TSatSystemStateFactory.h"
#include "CSatSystemState.h"
#include "msatmultimodeapi.h"
@@ -30,7 +29,6 @@
#include "CSatCenRepChangeNotifier.h"
#include "SatLog.h"
-
// ======== MEMBER FUNCTIONS ========
// -----------------------------------------------------------------------------
@@ -172,8 +170,8 @@
CreateProfileChangeNotifierL calling" )
MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL(
- KCRUidProfileEngine,
- KProEngActiveProfile,
+ KCRUidCoreApplicationUIs,
+ KCoreAppUIsNetworkConnectionAllowed,
aObserver,
CSatCenRepChangeNotifier::ECRTypeInteger );
--- a/satui/satapp/inc/satappconstant.h Tue Aug 10 13:19:41 2010 +0300
+++ b/satui/satapp/inc/satappconstant.h Mon Aug 23 15:50:31 2010 +0300
@@ -82,8 +82,6 @@
const QString KeyIcon="icon"; // HbIcon
const QString KeyIconArray="icons"; // QList<QVariant/QPixmap>
-const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine
-
/**
* Play Tone Constants
*/
--- a/satui/satapp/src/satappmainhandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/satui/satapp/src/satappmainhandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -23,7 +23,7 @@
// symbian
#include <centralrepository.h>
-#include <ProfileEngineSDKCRKeys.h>
+#include <coreapplicationuissdkcrkeys.h>
#include "satappmainhandler.h"
#include "satappserverdispatcher.h"
@@ -266,17 +266,18 @@
qDebug("SATAPP: SatAppMainHandler::isOffline >");
TInt profileId(0);
CRepository* cr (NULL);
- TRAPD(err, cr = CRepository::NewL(KCRUidProfileEngine));
+ TRAPD(err, cr = CRepository::NewL(KCRUidCoreApplicationUIs));
if ( KErrNone == err )
{
// Get the ID of the currently active profile:
- const TInt error = cr->Get(KProEngActiveProfile, profileId);
+ const TInt error =
+ cr->Get(KCoreAppUIsNetworkConnectionAllowed, profileId);
qDebug("SATAPP: SatAppMainHandler::isOffline get active \
profile error=%d",error);
delete cr;
}
qDebug("SATAPP: SatAppMainHandler::isOffline< profileId = %d",profileId);
- return ( KSatActiveProfileOffline == profileId );
+ return ( ECoreAppUIsNetworkConnectionNotAllowed == profileId );
}
// ----------------------------------------------------------------------------
--- a/satui/satapp/tsrc/ut_satapp/src/ut_satappmainhandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/satui/satapp/tsrc/ut_satapp/src/ut_satappmainhandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -18,7 +18,7 @@
#include <hbmainwindow.h>
#include <centralrepository.h>
-#include <ProfileEngineSDKCRKeys.h>
+#include <coreapplicationuissdkcrkeys.h>
#include "ut_satappmainhandler.h"
//test class
#include "satappmainhandler.h"
@@ -97,24 +97,24 @@
cleanupTestCase();
TInt profileId(0);
CRepository* cr (NULL);
- TRAPD(err, cr = CRepository::NewL(KCRUidProfileEngine));
+ TRAPD(err, cr = CRepository::NewL(KCRUidCoreApplicationUIs));
if ( KErrNone == err )
{
// Get the ID of the currently active profile:
- TInt error = cr->Get(KProEngActiveProfile, profileId);
+ TInt error = cr->Get(KCoreAppUIsNetworkConnectionAllowed, profileId);
qDebug("Ut_SatAppMainHandler::SatAppMainHandler get active \
profile error=%d, profileId=%d", error, profileId);
if( KErrNone != error){
delete cr;
return;
}
- error = cr->Set(KProEngActiveProfile,
- KSatActiveProfileOffline);
+ error = cr->Set(KCoreAppUIsNetworkConnectionAllowed,
+ ECoreAppUIsNetworkConnectionNotAllowed);
qDebug("Ut_SatAppMainHandler::SatAppMainHandler set active \
profile error=%d",error);
mMainHandler = new SatAppMainHandler(*mMainWindow);
QVERIFY(mMainHandler);
- error = cr->Set(KProEngActiveProfile, profileId);
+ error = cr->Set(KCoreAppUIsNetworkConnectionAllowed, profileId);
qDebug("Ut_SatAppMainHandler::SatAppMainHandler set active \
profile error=%d",error);
delete cr;
--- a/telutils/dialpad/dialpad.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/dialpad.pro Mon Aug 23 15:50:31 2010 +0300
@@ -86,7 +86,8 @@
-lvmbxengine \
-lfeatmgr \
-lphoneclient \
- -lcentralrepository
+ -lcentralrepository \
+ -lxqsettingsmanager
}
else:win32 {
HEADERS += inc/dialpadsymbianwrapper_p_stub.h
--- a/telutils/dialpad/inc/dialpadvideomailboxeventfilter.h Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/inc/dialpadvideomailboxeventfilter.h Mon Aug 23 15:50:31 2010 +0300
@@ -63,6 +63,9 @@
Handles long key presses.
*/
void handleLongKeyPress();
+
+private:
+ bool isVideoMbxSupported();
};
#endif // DIALPADVIDEOMAILBOXEVENTFILTER_H
--- a/telutils/dialpad/src/dialpad.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/src/dialpad.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -117,6 +117,7 @@
popupLayout->setSpacing(0);
popupLayout->setItemSpacing(0,margin);
setLayout(popupLayout);
+ setLayoutDirection(Qt::LeftToRight);
// asterisk multitap handler
mMultitap = new DialpadMultitapHandler(mInputField->editor(),this);
@@ -200,16 +201,9 @@
rect.setWidth(mCloseHandleWidth);
rect.setHeight(mCloseHandleHeight);
} else {
- if (layoutDirection()==Qt::LeftToRight) {
- rect.setTop((rect.height() - mCloseHandleWidth)/2);
- rect.setWidth(mCloseHandleHeight);
- rect.setHeight(mCloseHandleWidth);
- } else {
- rect.setLeft((rect.width() - mCloseHandleHeight));
- rect.setTop((rect.height() - mCloseHandleWidth)/2);
- rect.setWidth(mCloseHandleHeight);
- rect.setHeight(mCloseHandleWidth);
- }
+ rect.setTop((rect.height() - mCloseHandleWidth)/2);
+ rect.setWidth(mCloseHandleHeight);
+ rect.setHeight(mCloseHandleWidth);
}
mIconDrawer->setFrameType(HbFrameDrawer::OnePiece);
@@ -259,11 +253,7 @@
setPos(mPosition.x(),mPosition.y()+height);
} else {
qreal width = geometry().width();
- if (layoutDirection()==Qt::LeftToRight) {
- setPos(mPosition.x()+width,mPosition.y());
- } else {
- setPos(mPosition.x()-width,mPosition.y());
- }
+ setPos(mPosition.x()+width,mPosition.y());
}
if (mOrientation!=previousOrientation) {
@@ -371,13 +361,8 @@
} else {
qreal width = geometry().width();
- if (layoutDirection()==Qt::LeftToRight) {
- newPos.setY(currentPos.y());
- newPos.setX(mPosition.x()+(width*value));
- } else {
- newPos.setY(currentPos.y());
- newPos.setX(mPosition.x()-(width*value));
- }
+ newPos.setY(currentPos.y());
+ newPos.setX(mPosition.x()+(width*value));
}
setPos(newPos);
@@ -404,13 +389,8 @@
} else {
qreal width = geometry().width();
- if (layoutDirection()==Qt::LeftToRight) {
- newPos.setY(currentPos.y());
- newPos.setX(mPosition.x()+(width*(1-value)));
- } else {
- newPos.setY(currentPos.y());
- newPos.setX(mPosition.x()-(width*(1-value)));
- }
+ newPos.setY(currentPos.y());
+ newPos.setX(mPosition.x()+(width*(1-value)));
}
setPos(newPos);
@@ -493,12 +473,9 @@
if ( mOrientation==Qt::Vertical &&
gesture->sceneVerticalDirection() == QSwipeGesture::Down ) {
closeGesture = true;
- } else if (layoutDirection()==Qt::LeftToRight &&
+ } else if (mOrientation==Qt::Horizontal &&
gesture->sceneHorizontalDirection() == QSwipeGesture::Right) {
closeGesture = true;
- } else if (layoutDirection()==Qt::RightToLeft &&
- gesture->sceneHorizontalDirection() == QSwipeGesture::Left) {
- closeGesture = true;
}
}
}
--- a/telutils/dialpad/src/dialpadvideomailboxeventfilter.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/src/dialpadvideomailboxeventfilter.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -24,10 +24,14 @@
#include "qtphonesrvlog.h"
#ifdef Q_OS_SYMBIAN
-#include <xqservicerequest.h>
#include <xqserviceutil.h>
#endif //Q_OS_SYMBIAN
+#include <xqsettingsmanager.h>
+#include <xqsettingskey.h>
+#include <voicemailboxdomaincrkeys.h>
+
+
const QString VideoVmbxCharacter("2");
DialpadVideoMailboxEventFilter::DialpadVideoMailboxEventFilter(Dialpad* dialpad, QObject* parent) :
@@ -106,24 +110,40 @@
void DialpadVideoMailboxEventFilter::handleMailboxOperation()
{
PHONE_TRACE;
- QString mailboxNumber;
- int error = mSymbianWrapper->getVideoMailboxNumber(mailboxNumber);
- // If here is no vmbx number and dialpad must start vmbx number definition procedures.
- if (DialpadErrorNone != error || mailboxNumber.length() == 0) {
- mDialpad->closeDialpad();
- // If define mailbox query was interupted than reopen dialpad.
- error = mSymbianWrapper->defineVideoMailboxNumber(mailboxNumber);
- if (DialpadErrorCancel == error) {
+
+ if (isVideoMbxSupported()) {
+ QString mailboxNumber;
+ int error = mSymbianWrapper->getVideoMailboxNumber(mailboxNumber);
+ // If here is no vmbx number and dialpad must start vmbx number definition procedures.
+ if (DialpadErrorNone != error || mailboxNumber.length() == 0) {
+ mDialpad->closeDialpad();
+ // If define mailbox query was interupted than reopen dialpad.
+ error = mSymbianWrapper->defineVideoMailboxNumber(mailboxNumber);
+ if (DialpadErrorCancel == error) {
+ mDialpad->openDialpad();
+ }
+ }
+
+ // Valid vmbx number found or defined and there vmbx didnt
+ // return error values then create a call.
+ if ((DialpadErrorNone == error) &&
+ (mailboxNumber.length() != 0)) {
+ createCall(mailboxNumber, true);
+ clearEditor();
mDialpad->openDialpad();
}
}
+}
- // Valid vmbx number found or defined and there vmbx didnt
- // return error values then create a call.
- if ((DialpadErrorNone == error) &&
- (mailboxNumber.length() != 0)) {
- createCall(mailboxNumber, true);
- clearEditor();
- mDialpad->openDialpad();
- }
+bool DialpadVideoMailboxEventFilter::isVideoMbxSupported()
+{
+ XQSettingsKey key(XQSettingsKey::TargetCentralRepository,
+ KCRUidVideoMailbox.iUid,
+ KVideoMbxSupport);
+ XQSettingsManager settingsMgr;
+
+ int ret = settingsMgr.readItemValue(key, XQSettingsManager::TypeInt).toInt();
+ PHONE_TRACE2("Video mbx support:", ret);
+ return ret;
}
+
--- a/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -105,21 +105,14 @@
if (mMainWindow.orientation() == Qt::Horizontal) {
// dialpad takes half of the screen
- if (layoutDirection() == Qt::LeftToRight) {
- mDialpad->setPos(QPointF(screenRect.width()/2,
- this->scenePos().y()));
- mDialpad->setPreferredSize(screenRect.width()/2,
- (screenRect.height()-scenePos().y()));
- } else {
- mDialpad->setPos(QPointF(0,this->scenePos().y()));
- mDialpad->setPreferredSize(screenRect.width()/2,
- (screenRect.height()-scenePos().y()));
- }
+ mDialpad->setPos(QPointF(screenRect.width()/2,
+ this->scenePos().y()));
+ mDialpad->resize(screenRect.width()/2,
+ (screenRect.height()-scenePos().y()));
} else {
qreal screenHeight = screenRect.height();
mDialpad->setPos(0, screenHeight/2.25);
- mDialpad->setPreferredSize(screenRect.width(),
- screenHeight - screenHeight/2.25);
+ mDialpad->resize(screenRect.width(),screenHeight - screenHeight/2.25);
}
}
--- a/telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -79,7 +79,6 @@
#ifndef Q_OS_SYMBIAN
void testCloseGestureLandscape();
- void testCloseGestureLandscapeMirrored();
void testOrientationChange();
#endif
@@ -105,7 +104,7 @@
rect.setHeight(rect.height()*0.7);
rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2);
- mDialpad->setPreferredSize(mMainWindow->layoutRect().width(),
+ mDialpad->resize(mMainWindow->layoutRect().width(),
mMainWindow->layoutRect().height()/2);
mDialpad->setPos(0,mMainWindow->layoutRect().height()/4);
@@ -325,7 +324,7 @@
mMainWindow->resize(640,360);
QTest::qWait( 1000 );
- mDialpad->setPreferredSize(mMainWindow->layoutRect().width()/2,
+ mDialpad->resize(mMainWindow->layoutRect().width()/2,
mMainWindow->layoutRect().height());
mDialpad->setPos(mMainWindow->layoutRect().width()/2,0);
@@ -358,57 +357,16 @@
QVERIFY(mDialpad->isVisible()==false);*/
}
-void mt_Dialpad::testCloseGestureLandscapeMirrored()
-{
- /*
- // switch to mirrored landscape
- mMainWindow->setOrientation(Qt::Horizontal);
- mMainWindow->resize(640,360);
- mMainWindow->setLayoutDirection(Qt::RightToLeft);
- QTest::qWait( 1000 );
-
- mDialpad->setPos(0,0);
-
- mDialpad->openDialpad();
-
- // slow swipe
- QTest::qWait( WAIT_TIME );
- mUtil->mouseClickDialpad(Qt::Key_4, Press, false);
- QTest::qWait( 500 ); // longer than swipe
- mUtil->mouseClickDialpad(Qt::Key_6, Release, false);
- QTest::qWait( WAIT_TIME );
- QVERIFY(mDialpad->isVisible()==true);
-
- // short swipe
- QTest::qWait( WAIT_TIME );
- mUtil->mouseClickDialpad(Qt::Key_4, Press, false);
- QTest::qWait( 200 );
- mUtil->mouseClickDialpad(Qt::Key_5, Release, false);
- QTest::qWait( 1000 );
- QVERIFY(mDialpad->isVisible()==true);
-
- // ok swipe
- mDialpad->editor().setText(QString());
- QTest::qWait( WAIT_TIME );
- mUtil->mouseClickDialpad(Qt::Key_4, Press, false);
- QTest::qWait( 200 );
- mUtil->mouseClickDialpad(Qt::Key_6, Release, false);
- QVERIFY(mDialpad->editor().text()=="");
- QTest::qWait( 1000 );
- QVERIFY(mDialpad->isVisible()==false);*/
-}
-
void mt_Dialpad::testOrientationChange()
{
mDialpad->openDialpad();
QTest::qWait( WAIT_TIME );
// test landscape
- mMainWindow->setLayoutDirection(Qt::LeftToRight);
mMainWindow->setOrientation(Qt::Horizontal);
mMainWindow->resize(640,360);
QTest::qWait( 1000 );
- mDialpad->setPreferredSize(mMainWindow->layoutRect().width()/2,
+ mDialpad->resize(mMainWindow->layoutRect().width()/2,
mMainWindow->layoutRect().height());
mDialpad->setPos(mMainWindow->layoutRect().width()/2,0);
QTest::qWait( 1000 );
@@ -421,7 +379,7 @@
// test portrait
mMainWindow->setOrientation(Qt::Vertical);
mMainWindow->resize(360,640);
- mDialpad->setPreferredSize(mMainWindow->layoutRect().width(),
+ mDialpad->resize(mMainWindow->layoutRect().width(),
mMainWindow->layoutRect().height()/2);
mDialpad->setPos(0,mMainWindow->layoutRect().height()/4);
QTest::qWait( 1000 );
--- a/telutils/dialpad/tsrc/unit/shared/mock_cenrep.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/shared/mock_cenrep.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -1,8 +1,6 @@
#include <QtTest/QtTest>
#include <mock_centralrepository.h>
-_LIT(KStringValue, "123");
-
// TODO: Add a new class named Ut_Utility to config all CR key
// to simulate 3 different images
CRepository* CRepository::NewL(TUid /*aRepositoryUid*/)
--- a/telutils/dialpad/tsrc/unit/shared/mock_dialpad.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/shared/mock_dialpad.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -61,18 +61,7 @@
//
Dialpad::Dialpad( const HbMainWindow & mainWindow )
:
- mMainWindow(mainWindow),
- mBackgroundDrawer(0),
- mIconDrawer(0),
- mBackgroundItem(0),
- mInputField(0),
- mKeypad(0),
- mMultitap(0),
- mOpenTimeLine(DialpadOpenAnimDuration),
- mCloseTimeLine(DialpadCloseAnimDuration),
- mAnimationOngoing(false),
- mOrientation(Qt::Vertical),
- mIsOpen(false)
+ mMainWindow(mainWindow)
{
}
@@ -84,9 +73,6 @@
//
Dialpad::~Dialpad( )
{
- delete mBackgroundDrawer;
- delete mIconDrawer;
- delete mBackgroundItem;
}
@@ -101,6 +87,16 @@
// -----------------------------------------------------------------------------
+// Dialpad::changeEvent
+// -----------------------------------------------------------------------------
+//
+void Dialpad::changeEvent(QEvent *event)
+ {
+ SMC_MOCK_METHOD1( void, QEvent *, event )
+ }
+
+
+// -----------------------------------------------------------------------------
// Dialpad::isOpen
// -----------------------------------------------------------------------------
//
--- a/telutils/dialpad/tsrc/unit/shared/mock_hbnotificationdialog.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/shared/mock_hbnotificationdialog.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -286,3 +286,11 @@
}
+// -----------------------------------------------------------------------------
+// HbNotificationDialog::orientationChanged
+// -----------------------------------------------------------------------------
+//
+void HbNotificationDialog::orientationChanged(Qt::Orientation orientation)
+{
+ SMC_MOCK_METHOD1( void, Qt::Orientation, orientation )
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/mock_xqrequestinfo.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -0,0 +1,199 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QDebug>
+#include <QStringList>
+#include <QSet>
+#include <smcmockclassincludes.h>
+#include "xqrequestinfo.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::XQRequestInfo
+// -----------------------------------------------------------------------------
+//
+XQRequestInfo::XQRequestInfo( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::~XQRequestInfo
+// -----------------------------------------------------------------------------
+//
+XQRequestInfo::~XQRequestInfo( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::isValid
+// -----------------------------------------------------------------------------
+//
+bool XQRequestInfo::isValid( ) const
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::setEmbedded
+// -----------------------------------------------------------------------------
+//
+void XQRequestInfo::setEmbedded(
+ bool on )
+ {
+ SMC_MOCK_METHOD1( void, bool, on )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::isEmbedded
+// -----------------------------------------------------------------------------
+//
+bool XQRequestInfo::isEmbedded( ) const
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::setBackground
+// -----------------------------------------------------------------------------
+//
+void XQRequestInfo::setBackground(
+ bool on )
+ {
+ SMC_MOCK_METHOD1( void, bool, on )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::isBackground
+// -----------------------------------------------------------------------------
+//
+bool XQRequestInfo::isBackground( ) const
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::isSynchronous
+// -----------------------------------------------------------------------------
+//
+bool XQRequestInfo::isSynchronous( ) const
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::setForeground
+// -----------------------------------------------------------------------------
+//
+void XQRequestInfo::setForeground(
+ bool on )
+ {
+ SMC_MOCK_METHOD1( void, bool, on )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::isForeground
+// -----------------------------------------------------------------------------
+//
+bool XQRequestInfo::isForeground( ) const
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::clientSecureId
+// -----------------------------------------------------------------------------
+//
+quint32 XQRequestInfo::clientSecureId( ) const
+ {
+ SMC_MOCK_METHOD0( quint32 )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::clientVendorId
+// -----------------------------------------------------------------------------
+//
+quint32 XQRequestInfo::clientVendorId( ) const
+ {
+ SMC_MOCK_METHOD0( quint32 )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::clientCapabilities
+// -----------------------------------------------------------------------------
+//
+QSet <int > XQRequestInfo::clientCapabilities( ) const
+ {
+ SMC_MOCK_METHOD0( QSet <int > )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::id
+// -----------------------------------------------------------------------------
+//
+int XQRequestInfo::id( ) const
+ {
+ SMC_MOCK_METHOD0( int )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::setInfo
+// -----------------------------------------------------------------------------
+//
+void XQRequestInfo::setInfo(
+ const QString & key,
+ const QVariant & value )
+ {
+ SMC_MOCK_METHOD2( void, const QString &, key,
+ const QVariant &, value )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::info
+// -----------------------------------------------------------------------------
+//
+QVariant XQRequestInfo::info(
+ const QString & key ) const
+ {
+ SMC_MOCK_METHOD1( QVariant, const QString &, key )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQRequestInfo::infoKeys
+// -----------------------------------------------------------------------------
+//
+QStringList XQRequestInfo::infoKeys( ) const
+ {
+ SMC_MOCK_METHOD0( QStringList )
+ }
--- a/telutils/dialpad/tsrc/unit/shared/mock_xqservicerequest.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/shared/mock_xqservicerequest.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -225,7 +225,7 @@
//
XQRequestInfo XQServiceRequest::info( ) const
{
- //SMC_MOCK_METHOD0( XQRequestInfo )
+ SMC_MOCK_METHOD0( XQRequestInfo )
}
@@ -265,31 +265,19 @@
// -----------------------------------------------------------------------------
-// XQServiceRequest::serialize
+// XQServiceRequest::addArg
// -----------------------------------------------------------------------------
//
-template <typename Stream > void XQServiceRequest::serialize(
- Stream & stream ) const
- {
- SMC_MOCK_METHOD1( template <typename Stream > void, Stream &, stream )
- }
-
-
-// -----------------------------------------------------------------------------
-// XQServiceRequest::deserialize
-// -----------------------------------------------------------------------------
-//
-template <typename Stream > void XQServiceRequest::deserialize(
- Stream & stream )
- {
- SMC_MOCK_METHOD1( template <typename Stream > void, Stream &, stream )
- }
-
void XQServiceRequest::addArg(const QVariant& v)
{
Q_UNUSED(v)
}
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::handleSharableFileArgs
+// -----------------------------------------------------------------------------
+//
bool XQServiceRequest::handleSharableFileArgs()
{
SMC_MOCK_METHOD0( bool )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/mock_xqsettingskey.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QDebug>
+#include "xqsettingskey.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// XQSettingsKey::XQSettingsKey
+// -----------------------------------------------------------------------------
+//
+XQSettingsKey::XQSettingsKey(
+ XQSettingsKey::Target target,
+ long int uid,
+ unsigned long int key )
+ {
+ Q_UNUSED(target)
+ Q_UNUSED(uid)
+ Q_UNUSED(key)
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsKey::~XQSettingsKey
+// -----------------------------------------------------------------------------
+//
+XQSettingsKey::~XQSettingsKey( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsKey::target
+// -----------------------------------------------------------------------------
+//
+XQSettingsKey::Target XQSettingsKey::target( ) const
+ {
+
+ XQSettingsKey::Target variable = (XQSettingsKey::Target)1;
+ return variable;
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsKey::uid
+// -----------------------------------------------------------------------------
+//
+long int XQSettingsKey::uid( ) const
+ {
+
+ return 0;
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsKey::key
+// -----------------------------------------------------------------------------
+//
+unsigned long int XQSettingsKey::key( ) const
+ {
+
+ return 0;
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey
+// -----------------------------------------------------------------------------
+//
+XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey(
+ long int categoryUid,
+ unsigned long int key ) :
+ XQSettingsKey( XQSettingsKey::TargetPublishAndSubscribe, categoryUid, key )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey
+// -----------------------------------------------------------------------------
+//
+XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey
+// -----------------------------------------------------------------------------
+//
+XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey(
+ long int repositoryUid,
+ unsigned long int key ) :
+ XQSettingsKey( XQSettingsKey::TargetCentralRepository, repositoryUid, key )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey
+// -----------------------------------------------------------------------------
+//
+XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey( )
+ {
+
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/mock_xqsettingsmanager.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include "xqsettingsmanager.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::XQSettingsManager
+// -----------------------------------------------------------------------------
+//
+XQSettingsManager::XQSettingsManager(
+ QObject * parent )
+ : QObject( parent )
+ {
+
+ }
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::~XQSettingsManager
+// -----------------------------------------------------------------------------
+//
+XQSettingsManager::~XQSettingsManager( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::readItemValue
+// -----------------------------------------------------------------------------
+//
+QVariant XQSettingsManager::readItemValue(
+ const XQSettingsKey & key,
+ XQSettingsManager::Type type )
+ {
+ SMC_MOCK_METHOD2( QVariant, const XQSettingsKey &, key, XQSettingsManager::Type, type )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::writeItemValue
+// -----------------------------------------------------------------------------
+//
+bool XQSettingsManager::writeItemValue(
+ const XQSettingsKey & key,
+ const QVariant & value )
+ {
+ SMC_MOCK_METHOD2( bool, const XQSettingsKey &, key, const QVariant &, value )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::startMonitoring
+// -----------------------------------------------------------------------------
+//
+bool XQSettingsManager::startMonitoring(
+ const XQSettingsKey & key,
+ XQSettingsManager::Type type )
+ {
+ SMC_MOCK_METHOD2( bool, const XQSettingsKey &, key, XQSettingsManager::Type, type )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::stopMonitoring
+// -----------------------------------------------------------------------------
+//
+bool XQSettingsManager::stopMonitoring(
+ const XQSettingsKey & key )
+ {
+ SMC_MOCK_METHOD1( bool, const XQSettingsKey &, key )
+ }
+
+
+// -----------------------------------------------------------------------------
+// XQSettingsManager::error
+// -----------------------------------------------------------------------------
+//
+XQSettingsManager::Error XQSettingsManager::error( ) const
+ {
+ SMC_MOCK_METHOD0( XQSettingsManager::Error )
+ }
+
+
+
--- a/telutils/dialpad/tsrc/unit/ut_dialpademergencycalleventfilter/ut_dialpademergencycalleventfilter.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpademergencycalleventfilter/ut_dialpademergencycalleventfilter.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -108,9 +108,9 @@
void ut_DialpadEmergencyCallEventFilter::testEmergencyCallEventFilter()
{
- EXPECT(CPhCltEmergencyCallMock::IsEmergencyPhoneNumber).willOnce(
+ EXPECT(CPhCltEmergencyCallMock, IsEmergencyPhoneNumber).willOnce(
invoke(checkNumber));
- EXPECT(CPhCltEmergencyCallMock::DialEmergencyCallL);
+ EXPECT(CPhCltEmergencyCallMock, DialEmergencyCallL);
mDialpad->openDialpad();
QTest::qWait(WAIT_TIME);
--- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/hblineedit.h Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/hblineedit.h Mon Aug 23 15:50:31 2010 +0300
@@ -115,8 +115,8 @@
void focusInEvent ( QFocusEvent * event );
private:
Q_DISABLE_COPY(HbLineEdit)
- //Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit)
- Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
+// Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit)
+// Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
};
#endif // HBLINEEDIT_H
--- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -63,11 +63,11 @@
bool isEmbedded = false;
QList<XQAiwInterfaceDescriptor> interfaceList;
interfaceList.append(descriptor);
- /*EXPECT(XQApplicationManager::list).returns(interfaceList);
+ /*EXPECT(XQApplicationManager, list).returns(interfaceList);
QPointer<XQAiwRequest> aiwRequest(new XQAiwRequest(
descriptor, dummyOperation, isEmbedded));
- EXPECT(XQApplicationManager::create).returns(aiwRequest.data());
- EXPECT(XQAiwRequest::send)
+ EXPECT(XQApplicationManager, create).returns(aiwRequest.data());
+ EXPECT(XQAiwRequest, send)
.willOnce(invoke(setValidatorReturnValue))
.returns(true);*/
@@ -104,7 +104,7 @@
void UT_DialpadHashEventFilter::testeventFilter()
{
// start long press timer
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
QKeyEvent keyEvent(
QEvent::KeyPress,
Qt::Key_NumberSign,
@@ -124,7 +124,7 @@
QVERIFY(verify());
// some other buttons pressed and released
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
QKeyEvent keyEvent3(
QEvent::KeyPress,
Qt::Key_3,
@@ -155,7 +155,7 @@
void UT_DialpadHashEventFilter::testhandleCallButtonPress()
{
// inherited method not supported
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
bool callButtonPress = m_eventFilter->handleCallButtonPress();
QVERIFY(!callButtonPress);
}
--- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.pro Mon Aug 23 15:50:31 2010 +0300
@@ -45,6 +45,8 @@
/epoc32/include/mw/xqappmgr.h \
/epoc32/include/mw/xqaiwrequest.h \
../../../../../phonesrv_plat/dialpad_api/inc/dialpad.h \
+ /epoc32/include/mw/hb/hbwidgets/hbnotificationdialog.h \
+ hblineedit.h
SOURCES += ut_dialpadhasheventfilter.cpp \
../../../src/dialpadhasheventfilter.cpp \
--- a/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -82,8 +82,8 @@
void UT_DialpadKeyHandler::t_constructionWithAllFilters()
{
- EXPECT(QObject::installEventFilter).times(5);
- EXPECT(QObject::removeEventFilter).times(5);
+ EXPECT(QObject, installEventFilter).times(5);
+ EXPECT(QObject, removeEventFilter).times(5);
DialpadKeyHandler::DialpadKeyEventFilters filters(
DialpadKeyHandler::VoiceMailbox |
@@ -103,7 +103,7 @@
void UT_DialpadKeyHandler::t_constructionWithNoFilters()
{
- EXPECT(QObject::installEventFilter).times(0);
+ EXPECT(QObject, installEventFilter).times(0);
DialpadKeyHandler::DialpadKeyEventFilters filters;
m_keyHandler = new DialpadKeyHandler(m_dialPad, filters, this);
@@ -115,8 +115,8 @@
void UT_DialpadKeyHandler::t_deprecatedConstructionWithVideoMailbox()
{
#ifdef Q_OS_SYMBIAN
- EXPECT(FeatureManager::FeatureSupported).returns(true);
- EXPECT(QObject::installEventFilter).times(4);
+ EXPECT(FeatureManager, FeatureSupported).returns(true);
+ EXPECT(QObject, installEventFilter).times(4);
HbMainWindow *dummyWindow = 0;
m_keyHandler = new DialpadKeyHandler(m_dialPad, *dummyWindow, this);
@@ -128,8 +128,8 @@
void UT_DialpadKeyHandler::t_deprecatedConstructionWithoutVideoMailbox()
{
- EXPECT(FeatureManager::FeatureSupported).returns(false);
- EXPECT(QObject::installEventFilter).times(3);
+ EXPECT(FeatureManager, FeatureSupported).returns(false);
+ EXPECT(QObject, installEventFilter).times(3);
HbMainWindow *dummyWindow = 0;
m_keyHandler = new DialpadKeyHandler(m_dialPad, *dummyWindow, this);
--- a/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.pro Mon Aug 23 15:50:31 2010 +0300
@@ -50,9 +50,10 @@
../../../inc/dialpadvideomailboxeventfilter.h \
../../../inc/dialpadvoicemailboxeventfilter.h \
../../../inc/dialpadhasheventfilter.h \
- /epoc32/include/mw/xqservicerequest.h \
+ #/epoc32/include/mw/xqservicerequest.h \
/epoc32/include/mw/xqappmgr.h \
- /epoc32/include/mw/xqaiwrequest.h
+ /epoc32/include/mw/xqaiwrequest.h \
+ /epoc32/include/mw/xqrequestinfo.h
SOURCES += ../shared/mock_dialpad.cpp \
../shared/mock_dialpadbluetootheventfilter.cpp \
@@ -66,6 +67,7 @@
../shared/mock_xqappmgr.cpp \
../shared/mock_xqaiwrequest.cpp \
../shared/mock_xqaiwinterfacedescriptor.cpp \
- ../shared/mock_hbmainwindow.cpp
+ ../shared/mock_hbmainwindow.cpp \
+ ../shared/mock_xqrequestinfo.cpp
LIBS += -lmocklib -lsymbianmock -lxqservice -lxqserviceutil
--- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/hblineedit.h Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/hblineedit.h Mon Aug 23 15:50:31 2010 +0300
@@ -116,7 +116,7 @@
private:
Q_DISABLE_COPY(HbLineEdit)
//Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit)
- Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
+ //Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
};
#endif // HBLINEEDIT_H
--- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -63,11 +63,11 @@
bool isEmbedded = false;
QList<XQAiwInterfaceDescriptor> interfaceList;
interfaceList.append(descriptor);
- EXPECT(XQApplicationManager::list).returns(interfaceList);
+ EXPECT(XQApplicationManager, list).returns(interfaceList);
QPointer<XQAiwRequest> aiwRequest(new XQAiwRequest(
descriptor, dummyOperation, isEmbedded));
- EXPECT(XQApplicationManager::create).returns(aiwRequest.data());
- EXPECT(XQAiwRequest::send)
+ EXPECT(XQApplicationManager, create).returns(aiwRequest.data());
+ EXPECT(XQAiwRequest, send)
.willOnce(invoke(setValidatorReturnValue))
.returns(true);
@@ -103,15 +103,15 @@
void UT_DialpadKeySequenceEventFilter::eventFilterValidKeySequence()
{
- EXPECT(HbLineEdit::text).returns(KValidKeySequence);
- EXPECT(XQAiwInterfaceDescriptor::isValid).returns(false);
- EXPECT(XQAiwInterfaceDescriptor::isValid).returns(true);
+ EXPECT(HbLineEdit, text).returns(KValidKeySequence);
+ EXPECT(XQAiwInterfaceDescriptor, isValid).returns(false);
+ EXPECT(XQAiwInterfaceDescriptor, isValid).returns(true);
XQAiwInterfaceDescriptor dummyDescriptor;
QString dummyOperation;
QPointer<XQAiwRequest> aiwRequest(new XQAiwRequest(
dummyDescriptor, dummyOperation, false));
- EXPECT(XQApplicationManager::create).returns(aiwRequest.data());
- EXPECT(XQAiwRequest::send)
+ EXPECT(XQApplicationManager, create).returns(aiwRequest.data());
+ EXPECT(XQAiwRequest, send)
.willOnce(invoke(setServiceRequestReturnValue))
.returns(true);
QKeyEvent keyEvent(
@@ -126,7 +126,7 @@
void UT_DialpadKeySequenceEventFilter::eventFilterNotAKeyEvent()
{
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
QMouseEvent mouseEvent(
QEvent::MouseMove,
QPoint(),
@@ -140,7 +140,7 @@
void UT_DialpadKeySequenceEventFilter::eventFilterNotAHashKey()
{
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
QKeyEvent keyEvent(
QEvent::KeyRelease,
Qt::Key_Escape,
@@ -157,9 +157,9 @@
const QString KInvalidKeySequence3("**1234#");
const QString KInvalidKeySequence4("*#1234*");
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
- EXPECT(HbLineEdit::text).returns(KInvalidKeySequence1);
+ EXPECT(HbLineEdit, text).returns(KInvalidKeySequence1);
QKeyEvent keyEvent(
QEvent::KeyRelease,
Qt::Key_NumberSign,
@@ -167,15 +167,15 @@
bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
QVERIFY(!filtered);
- EXPECT(HbLineEdit::text).returns(KInvalidKeySequence2);
+ EXPECT(HbLineEdit, text).returns(KInvalidKeySequence2);
filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
QVERIFY(!filtered);
- EXPECT(HbLineEdit::text).returns(KInvalidKeySequence3);
+ EXPECT(HbLineEdit, text).returns(KInvalidKeySequence3);
filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
QVERIFY(!filtered);
- EXPECT(HbLineEdit::text).returns(KInvalidKeySequence4);
+ EXPECT(HbLineEdit, text).returns(KInvalidKeySequence4);
filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
QVERIFY(!filtered);
@@ -185,15 +185,15 @@
void UT_DialpadKeySequenceEventFilter::eventFilterServiceRequestFails()
{
// Qt Highway error while issuing service request
- EXPECT(HbLineEdit::text).returns(KValidKeySequence);
- EXPECT(XQAiwInterfaceDescriptor::isValid).returns(false);
- EXPECT(XQAiwInterfaceDescriptor::isValid).returns(true);
+ EXPECT(HbLineEdit, text).returns(KValidKeySequence);
+ EXPECT(XQAiwInterfaceDescriptor, isValid).returns(false);
+ EXPECT(XQAiwInterfaceDescriptor, isValid).returns(true);
XQAiwInterfaceDescriptor dummyDescriptor;
QString dummyOperation;
QPointer<XQAiwRequest> aiwRequest1(new XQAiwRequest(
dummyDescriptor, dummyOperation, false));
- EXPECT(XQApplicationManager::create).returns(aiwRequest1.data());
- EXPECT(XQAiwRequest::send).returns(false);
+ EXPECT(XQApplicationManager, create).returns(aiwRequest1.data());
+ EXPECT(XQAiwRequest, send).returns(false);
QKeyEvent keyEvent(
QEvent::KeyRelease,
Qt::Key_NumberSign,
@@ -204,13 +204,13 @@
QVERIFY(verify());
// service provider fails to fulfill request
- EXPECT(HbLineEdit::text).returns(KValidKeySequence);
- EXPECT(XQAiwInterfaceDescriptor::isValid).returns(false);
- EXPECT(XQAiwInterfaceDescriptor::isValid).returns(true);
+ EXPECT(HbLineEdit, text).returns(KValidKeySequence);
+ EXPECT(XQAiwInterfaceDescriptor, isValid).returns(false);
+ EXPECT(XQAiwInterfaceDescriptor, isValid).returns(true);
QPointer<XQAiwRequest> aiwRequest2(new XQAiwRequest(
dummyDescriptor, dummyOperation, false));
- EXPECT(XQApplicationManager::create).returns(aiwRequest2.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQApplicationManager, create).returns(aiwRequest2.data());
+ EXPECT(XQAiwRequest, send).returns(true);
filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
QVERIFY(!filtered);
QVERIFY(aiwRequest2.isNull());
--- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.pro Mon Aug 23 15:50:31 2010 +0300
@@ -44,7 +44,8 @@
HEADERS += ../../../../../phonesrv_plat/dialpad_api/inc/dialpad.h
HEADERS += /epoc32/include/mw/xqservicerequest.h \
/epoc32/include/mw/xqappmgr.h \
- /epoc32/include/mw/xqaiwrequest.h
+ /epoc32/include/mw/xqaiwrequest.h \
+ hblineedit.h
SOURCES += ../shared/mock_dialpad.cpp \
../shared/mock_xqservicerequest.cpp \
--- a/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -42,16 +42,16 @@
bool mXQServiceConstructed;
bool mSendCalled;
-DialpadSymbianWrapper::DialpadSymbianWrapper(QObject *parent) : d_ptr(NULL) {}
+DialpadSymbianWrapper::DialpadSymbianWrapper(QObject */*parent*/) : d_ptr(NULL) {}
DialpadSymbianWrapper::~DialpadSymbianWrapper() {}
int DialpadSymbianWrapper::getVideoMailboxNumber(QString &vmbxNumber) { vmbxNumber=QString("12345678"); return 0; }
-int DialpadSymbianWrapper::defineVideoMailboxNumber(QString &vmbxNumber) { return 0; }
+int DialpadSymbianWrapper::defineVideoMailboxNumber(QString &/*vmbxNumber*/) { return 0; }
#ifdef Q_OS_SYMBIAN
-XQServiceRequest::XQServiceRequest(const QString& service, const QString& message, const bool& synchronous) { mService=service; mMessage=message; mXQServiceConstructed=true; }
+XQServiceRequest::XQServiceRequest(const QString& service, const QString& message, const bool& /*synchronous*/) { mService=service; mMessage=message; mXQServiceConstructed=true; }
XQServiceRequest::~XQServiceRequest() {}
-bool XQServiceRequest::send(QVariant& retValue) { mSendCalled=true; return true; }
-void XQServiceRequest::addArg(const QVariant& v) {}
+bool XQServiceRequest::send(QVariant& /*retValue*/) { mSendCalled=true; return true; }
+void XQServiceRequest::addArg(const QVariant& /*v*/) {}
#endif
// helper class
--- a/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.pro Mon Aug 23 15:50:31 2010 +0300
@@ -20,9 +20,18 @@
INCLUDEPATH += . ../../../inc ../../../../../inc ../shared
CONFIG += hb qtestlib
+DEFINES += XQSETTINGSMANAGER_NO_LIBRARY
symbian {
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ # mocks
+ HEADERS += /epoc32/include/platform/mw/xqsettingskey.h \
+ /epoc32/include/platform/mw/xqsettingsmanager.h
+ SOURCES += ../shared/mock_xqsettingsmanager.cpp \
+ ../shared/mock_xqsettingskey.cpp
+
+ LIBS += -lsymbianmock -lmocklib
} else:win32 {
DESTDIR = ./
INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc
@@ -40,5 +49,5 @@
../../../src/dialpadmailboxeventfilterbase.cpp \
../shared/dialpadtestutil.cpp
-#
+#
LIBS += -ldialpad
--- a/telutils/keysequencerecognitionservice/keysequencerecognitionservice.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/keysequencerecognitionservice.pro Mon Aug 23 15:50:31 2010 +0300
@@ -49,5 +49,6 @@
LIBS += -lxqservice -lxqserviceutil -lxqutils \
-letel -letelmm -lcustomapi \
- -lcentralrepository -lQtSystemInfo -lsecui
+ -lcentralrepository -lQtSystemInfo -lsecui \
+ -ltstaskmonitorclient
}
--- a/telutils/keysequencerecognitionservice/src/keysequencerecognitionprovider.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/src/keysequencerecognitionprovider.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -19,6 +19,7 @@
#include <QTimer>
#include <QTranslator>
#include <QLocale>
+#include <tstasksettings.h>
#include "keysequencerecognitionprovider.h"
#include "manufacturerkeysequencehandler.h"
#include "imeikeysequencehandler.h"
@@ -47,6 +48,10 @@
// created because memory for handlers will be leaked on an exception
// while being in c++ constructor.
constructKeySequenceHandlers();
+
+ // Keysequencerecognitionprovider to be invisible in taskswitcher
+ TsTaskSettings taskSettings;
+ taskSettings.setVisibility(false);
}
--- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_qsysteminfo.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/shared/mock_qsysteminfo.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -98,7 +98,7 @@
// -----------------------------------------------------------------------------
-// QSystemDeviceInfo::Q_PROPERTY
+// QSystemDeviceInfo::QSystemDeviceInfo
// -----------------------------------------------------------------------------
//
QSystemDeviceInfo::QSystemDeviceInfo ( QObject * parent )
@@ -239,6 +239,26 @@
// -----------------------------------------------------------------------------
+// QSystemDeviceInfo::connectNotify
+// -----------------------------------------------------------------------------
+//
+void QSystemDeviceInfo::connectNotify(const char *signal)
+{
+ SMC_MOCK_METHOD1( void, const char *, signal )
+}
+
+
+// -----------------------------------------------------------------------------
+// QSystemDeviceInfo::disconnectNotify
+// -----------------------------------------------------------------------------
+//
+void QSystemDeviceInfo::disconnectNotify(const char *signal)
+{
+ SMC_MOCK_METHOD1( void, const char *, signal )
+}
+
+
+// -----------------------------------------------------------------------------
// QSystemInfo::QSystemInfo
// -----------------------------------------------------------------------------
//
@@ -314,6 +334,26 @@
// -----------------------------------------------------------------------------
+// QSystemInfo::connectNotify
+// -----------------------------------------------------------------------------
+//
+void QSystemInfo::connectNotify(const char *signal)
+{
+ SMC_MOCK_METHOD1( void, const char *, signal )
+}
+
+
+// -----------------------------------------------------------------------------
+// QSystemInfo::disconnectNotify
+// -----------------------------------------------------------------------------
+//
+void QSystemInfo::disconnectNotify(const char *signal)
+{
+ SMC_MOCK_METHOD1( void, const char *, signal )
+}
+
+
+// -----------------------------------------------------------------------------
// QSystemNetworkInfo::QSystemNetworkInfo
// -----------------------------------------------------------------------------
//
--- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_rmmcustomapi.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/shared/mock_rmmcustomapi.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -37,8 +37,8 @@
// -----------------------------------------------------------------------------
//
void CMmCustomPtrHolder::ConstructL(
- const TInt aSizeOfPtrArray,
- const TInt aSizeOfPtrCArray )
+ const TInt /*aSizeOfPtrArray*/,
+ const TInt /*aSizeOfPtrCArray*/ )
{
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/keysequencerecognitionservice/tsrc/shared/mock_tstasksettings.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -0,0 +1,72 @@
+/** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include <tstasksettings.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// TsTaskSettings::TsTaskSettings
+// -----------------------------------------------------------------------------
+//
+TsTaskSettings::TsTaskSettings( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// TsTaskSettings::~TsTaskSettings
+// -----------------------------------------------------------------------------
+//
+TsTaskSettings::~TsTaskSettings( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// TsTaskSettings::registerScreenshot
+// -----------------------------------------------------------------------------
+//
+bool TsTaskSettings::registerScreenshot(
+ const QPixmap & screenshot )
+ {
+ SMC_MOCK_METHOD1( bool, const QPixmap &, screenshot )
+ }
+
+
+// -----------------------------------------------------------------------------
+// TsTaskSettings::unregisterScreenshot
+// -----------------------------------------------------------------------------
+//
+bool TsTaskSettings::unregisterScreenshot( )
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
+// -----------------------------------------------------------------------------
+// TsTaskSettings::setVisibility
+// -----------------------------------------------------------------------------
+//
+bool TsTaskSettings::setVisibility( bool Visibility )
+ {
+ SMC_MOCK_METHOD0( bool )
+ }
+
+
--- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_xqservicerequest.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/shared/mock_xqservicerequest.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -265,31 +265,19 @@
// -----------------------------------------------------------------------------
-// XQServiceRequest::serialize
+// XQServiceRequest::addArg
// -----------------------------------------------------------------------------
//
-template <typename Stream > void XQServiceRequest::serialize(
- Stream & stream ) const
- {
- SMC_MOCK_METHOD1( template <typename Stream > void, Stream &, stream )
- }
-
-
-// -----------------------------------------------------------------------------
-// XQServiceRequest::deserialize
-// -----------------------------------------------------------------------------
-//
-template <typename Stream > void XQServiceRequest::deserialize(
- Stream & stream )
- {
- SMC_MOCK_METHOD1( template <typename Stream > void, Stream &, stream )
- }
-
void XQServiceRequest::addArg(const QVariant& v)
{
Q_UNUSED(v)
}
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::handleSharableFileArgs
+// -----------------------------------------------------------------------------
+//
bool XQServiceRequest::handleSharableFileArgs()
{
SMC_MOCK_METHOD0( bool )
--- a/telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -72,9 +72,9 @@
void UT_ImeiKeySequenceHandler::t_executeValidKeySequence()
{
const QString KSerialNumber = "1234567890";
- EXPECT(QtMobility::QSystemDeviceInfo::imei).returns(KSerialNumber);
- EXPECT(HbDeviceMessageBox::setTimeout).with(HbPopup::NoTimeout);
- EXPECT(HbDeviceMessageBox::show);
+ EXPECT(QtMobility::QSystemDeviceInfo, imei).returns(KSerialNumber);
+ EXPECT(HbDeviceMessageBox, setTimeout).with(HbPopup::NoTimeout);
+ EXPECT(HbDeviceMessageBox, show);
bool handled = m_handler->executeKeySequence(KCodeImei);
QCOMPARE(handled, true);
QVERIFY(verify());
--- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprov.pro Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprov.pro Mon Aug 23 15:50:31 2010 +0300
@@ -48,7 +48,8 @@
../shared/mock_lifetimerkeysequencehandler.cpp \
../shared/mock_manufacturerkeysequencehandler.cpp \
../shared/mock_simcontrolkeysequencehandler.cpp \
- ../shared/mock_centralrepository.cpp
-
+ ../shared/mock_centralrepository.cpp \
+ ../shared/mock_tstasksettings.cpp
+
LIBS += -lmocklib -lsymbianmock -lxqservice -lxqserviceutil
}
--- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprovider.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprovider.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -66,8 +66,8 @@
void UT_KeySequenceRecognitionProvider::t_setupLocalization()
{
// localization setup ok
- EXPECT(QTranslator::load).returns(true);
- EXPECT(QCoreApplication::installTranslator).times(1);
+ EXPECT(QTranslator, load).returns(true);
+ EXPECT(QCoreApplication, installTranslator).times(1);
QScopedPointer<KeySequenceRecognitionProvider> provider1(
new KeySequenceRecognitionProvider());
@@ -75,8 +75,8 @@
QVERIFY(verify());
// localization setup fails
- EXPECT(QTranslator::load).returns(false);
- EXPECT(QCoreApplication::installTranslator).times(0);
+ EXPECT(QTranslator, load).returns(false);
+ EXPECT(QCoreApplication, installTranslator).times(0);
QScopedPointer<KeySequenceRecognitionProvider> provider2(
new KeySequenceRecognitionProvider());
@@ -88,11 +88,11 @@
void UT_KeySequenceRecognitionProvider::t_keySequenceValidator()
{
QString KExpectedValidator = "1|2|3";
- EXPECT(KeySequenceHandler::keySequenceValidator)
+ EXPECT(KeySequenceHandler, keySequenceValidator)
.returns(QString("1"));
- EXPECT(KeySequenceHandler::keySequenceValidator)
+ EXPECT(KeySequenceHandler, keySequenceValidator)
.returns(QString("2"));
- EXPECT(KeySequenceHandler::keySequenceValidator)
+ EXPECT(KeySequenceHandler, keySequenceValidator)
.returns(QString("3"));
QString actualValidator = m_provider->keySequenceValidator();
@@ -101,7 +101,7 @@
QVERIFY(verify());
// second query should not require validator string construction again
- EXPECT(KeySequenceHandler::keySequenceValidator).times(0);
+ EXPECT(KeySequenceHandler, keySequenceValidator).times(0);
actualValidator = m_provider->keySequenceValidator();
QCOMPARE(actualValidator, KExpectedValidator);
QVERIFY(verify());
@@ -111,11 +111,11 @@
void UT_KeySequenceRecognitionProvider::t_keySequenceValidatorEmptyString()
{
QString KExpectedValidator = "";
- EXPECT(KeySequenceHandler::keySequenceValidator)
+ EXPECT(KeySequenceHandler, keySequenceValidator)
.returns(QString(""));
- EXPECT(KeySequenceHandler::keySequenceValidator)
+ EXPECT(KeySequenceHandler, keySequenceValidator)
.returns(QString(""));
- EXPECT(KeySequenceHandler::keySequenceValidator)
+ EXPECT(KeySequenceHandler, keySequenceValidator)
.returns(QString(""));
QString actualValidator = m_provider->keySequenceValidator();
--- a/telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -89,7 +89,7 @@
void UT_LifeTimerKeySequenceHandler::t_constructionFails()
{
- EXPECT(CRepository::NewL).willOnce(invoke(generateLeaveL));
+ EXPECT(CRepository, NewL).willOnce(invoke(generateLeaveL));
int result = 0;
QT_TRYCATCH_ERROR(result,
@@ -103,7 +103,7 @@
void UT_LifeTimerKeySequenceHandler::t_keySequenceValidator()
{
// life timer feature enabled scenario
- EXPECT(CRepository::Get)
+ EXPECT(CRepository, Get)
.willOnce(invoke(this, setLifeTimerData))
.returns(KErrNone);
expect("KeySequenceHandler::setKeySequenceValidator")
@@ -115,7 +115,7 @@
QVERIFY(verify());
// life timer feature not enabled scenario
- EXPECT(CRepository::Get).returns(KErrNotFound);
+ EXPECT(CRepository, Get).returns(KErrNotFound);
expect("KeySequenceHandler::setKeySequenceValidator").times(0);
QScopedPointer<LifeTimerKeySequenceHandler> handler2(
@@ -127,14 +127,14 @@
void UT_LifeTimerKeySequenceHandler::t_executeValidKeySequence()
{
- EXPECT(CRepository::Get)
+ EXPECT(CRepository, Get)
.willOnce(invoke(this, setLifeTimerData))
.returns(KErrNone);
- EXPECT(RMmCustomAPI::GetLifeTime)
+ EXPECT(RMmCustomAPI, GetLifeTime)
.willOnce(invoke(this, setLifeTimeData));
- EXPECT(HbDeviceMessageBox::setTimeout).with(HbPopup::NoTimeout);
- EXPECT(HbDeviceMessageBox::show);
+ EXPECT(HbDeviceMessageBox, setTimeout).with(HbPopup::NoTimeout);
+ EXPECT(HbDeviceMessageBox, show);
bool handled = m_handler->executeKeySequence(KCodeLifeTimer);
QCOMPARE(handled, true);
@@ -152,10 +152,10 @@
void UT_LifeTimerKeySequenceHandler::t_executeKeySequenceEtelConnectionCreationFails()
{
- EXPECT(CRepository::Get)
+ EXPECT(CRepository, Get)
.willOnce(invoke(this, setLifeTimerData))
.returns(KErrNone);
- EXPECT(RTelServer::Connect).willOnce(invoke(generateLeaveL));
+ EXPECT(RTelServer, Connect).willOnce(invoke(generateLeaveL));
int result = 0;
QT_TRYCATCH_ERROR(result, m_handler->executeKeySequence(KCodeLifeTimer));
@@ -167,10 +167,10 @@
void UT_LifeTimerKeySequenceHandler::t_executeKeySequenceLifeTimeDataQueryFails()
{
- EXPECT(CRepository::Get)
+ EXPECT(CRepository, Get)
.willOnce(invoke(this, setLifeTimerData))
.returns(KErrNone);
- EXPECT(RMmCustomAPI::GetLifeTime).returns(KErrArgument);
+ EXPECT(RMmCustomAPI, GetLifeTime).returns(KErrArgument);
bool handled = m_handler->executeKeySequence(KCodeLifeTimer);
--- a/telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -85,12 +85,12 @@
XQAiwInterfaceDescriptor dummyDescriptor;
QPointer<XQAiwRequest> request =
new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("devicemanager"),
QString("showVersionNumber()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
bool handled = m_handler->executeKeySequence(KCodeSwVersion);
@@ -106,12 +106,12 @@
XQAiwInterfaceDescriptor dummyDescriptor;
QPointer<XQAiwRequest> request =
new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.symbian"), QString("IFactoryReset"),
QString("showResetUi()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
bool handled = m_handler->executeKeySequence(KCodeActivateRfsNormal);
@@ -121,12 +121,12 @@
QCOMPARE(handled, true);
request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.symbian"), QString("IFactoryReset"),
QString("showResetUi()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
handled = m_handler->executeKeySequence(KCodeActivateRfsDeep);
@@ -142,12 +142,12 @@
XQAiwInterfaceDescriptor dummyDescriptor;
QPointer<XQAiwRequest> request =
new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("bluetooth"),
QString("showBluetoothDeviceAddress()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
bool handled = m_handler->executeKeySequence(KCodeBtAddress);
@@ -157,12 +157,12 @@
QCOMPARE(handled, true);
request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("bluetooth"),
QString("showBluetoothLoopback()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
handled = m_handler->executeKeySequence(KCodeRFLoopback);
@@ -187,12 +187,12 @@
XQAiwInterfaceDescriptor dummyDescriptor;
QPointer<XQAiwRequest> request =
new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("devicemanager"),
QString("showVersionNumber()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(false);
+ EXPECT(XQAiwRequest, send).returns(false);
bool handled = m_handler->executeKeySequence(KCodeSwVersion);
m_handler->requestError(0, QString(""));
@@ -203,12 +203,12 @@
// controlled asynchronous Qt Highway error during request processing
request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("devicemanager"),
QString("showVersionNumber()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
handled = m_handler->executeKeySequence(KCodeSwVersion);
@@ -220,12 +220,12 @@
// exception during service request dispatching/send
request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("devicemanager"),
QString("showVersionNumber()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send)
+ EXPECT(XQAiwRequest, send)
.willOnce(invokeWithoutArguments(generateException));
int result = 0;
@@ -247,12 +247,12 @@
XQAiwInterfaceDescriptor dummyDescriptor;
QPointer<XQAiwRequest> request =
new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded);
- EXPECT(XQApplicationManager::create)
+ EXPECT(XQApplicationManager, create)
.with(
QString("com.nokia.services"), QString("devicemanager"),
QString("showVersionNumber()"), KIsEmbedded)
.returns(request.data());
- EXPECT(XQAiwRequest::send).returns(true);
+ EXPECT(XQAiwRequest, send).returns(true);
bool handled = m_handler->executeKeySequence(KCodeSwVersion);
@@ -261,8 +261,8 @@
QCOMPARE(handled, true);
// simultaneous request attempt
- EXPECT(XQApplicationManager::create).times(0);
- EXPECT(XQAiwRequest::send).times(0);
+ EXPECT(XQApplicationManager, create).times(0);
+ EXPECT(XQAiwRequest, send).times(0);
handled = m_handler->executeKeySequence(KCodeSwVersion);
QCOMPARE(handled, false);
}
--- a/telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysequencehandler.cpp Tue Aug 10 13:19:41 2010 +0300
+++ b/telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysequencehandler.cpp Mon Aug 23 15:50:31 2010 +0300
@@ -67,7 +67,7 @@
void UT_SimControlKeySequenceHandler::t_constructionFails()
{
- EXPECT( CManualSecuritySettings::NewL() ).willOnce(invokeWithoutArguments(generateLeaveL));
+ EXPECT( CManualSecuritySettings, NewL ).willOnce(invokeWithoutArguments(generateLeaveL));
int result = 0;
QT_TRYCATCH_ERROR(result,
@@ -82,7 +82,7 @@
{
const QString KChangePin1KeySequence( "**04*1234*4321*4321*" );
- EXPECT(CManualSecuritySettings::ChangePinL)
+ EXPECT(CManualSecuritySettings, ChangePinL)
.with(CManualSecuritySettings::EPin1, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode());
m_handler->executeKeySequence( KChangePin1KeySequence );
@@ -91,7 +91,7 @@
// leave handling
- EXPECT( CManualSecuritySettings::ChangePinL ).willOnce(invokeWithoutArguments(generateLeaveL))
+ EXPECT( CManualSecuritySettings, ChangePinL ).willOnce(invokeWithoutArguments(generateLeaveL))
.with(CManualSecuritySettings::EPin1, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode());
int result = 0;
QT_TRYCATCH_ERROR(result,
@@ -104,7 +104,7 @@
{
const QString KChangePin2KeySequence( "**042*1234*4321*4321*" );
- EXPECT(CManualSecuritySettings::ChangePinL)
+ EXPECT(CManualSecuritySettings, ChangePinL)
.with(CManualSecuritySettings::EPin2, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode());
m_handler->executeKeySequence(KChangePin2KeySequence);
@@ -113,7 +113,7 @@
//leave handling
- EXPECT( CManualSecuritySettings::ChangePinL ).willOnce(invokeWithoutArguments(generateLeaveL))
+ EXPECT( CManualSecuritySettings, ChangePinL ).willOnce(invokeWithoutArguments(generateLeaveL))
.with(CManualSecuritySettings::EPin2, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode());
int result = 0;
@@ -127,7 +127,7 @@
{
const QString KUnblockPin1KeySequence( "**05*11111111*4321*4321*" );
- EXPECT(CManualSecuritySettings::UnblockPinL)
+ EXPECT(CManualSecuritySettings, UnblockPinL)
.with(CManualSecuritySettings::EPin1, KPukCode(), KNewPinCode(), KVerifyNewPinCode());
m_handler->executeKeySequence(KUnblockPin1KeySequence);
@@ -136,7 +136,7 @@
//leave handling
- EXPECT( CManualSecuritySettings::UnblockPinL ).willOnce(invokeWithoutArguments(generateLeaveL))
+ EXPECT( CManualSecuritySettings, UnblockPinL ).willOnce(invokeWithoutArguments(generateLeaveL))
.with(CManualSecuritySettings::EPin1, KPukCode(), KNewPinCode(), KVerifyNewPinCode());
int result = 0;
@@ -151,7 +151,7 @@
{
const QString KUnblockPin2KeySequence( "**052*11111111*4321*4321*" );
- EXPECT(CManualSecuritySettings::UnblockPinL)
+ EXPECT(CManualSecuritySettings, UnblockPinL)
.with(CManualSecuritySettings::EPin2, KPukCode(), KNewPinCode(), KVerifyNewPinCode());
m_handler->executeKeySequence(KUnblockPin2KeySequence);
@@ -160,7 +160,7 @@
//leave handling
- EXPECT( CManualSecuritySettings::UnblockPinL ).willOnce(invokeWithoutArguments(generateLeaveL))
+ EXPECT( CManualSecuritySettings, UnblockPinL ).willOnce(invokeWithoutArguments(generateLeaveL))
.with(CManualSecuritySettings::EPin2, KPukCode(), KNewPinCode(), KVerifyNewPinCode());
int result = 0;