diff -r f27aebe284bb -r c5af8598d22c logsui/logsengine/tsrc/hbstubs/hbstubs.cpp --- a/logsui/logsengine/tsrc/hbstubs/hbstubs.cpp Wed Aug 18 09:49:12 2010 +0300 +++ b/logsui/logsengine/tsrc/hbstubs/hbstubs.cpp Thu Sep 02 20:27:05 2010 +0300 @@ -16,9 +16,13 @@ */ // Orbit classes +#include #include #include #include +#include +#include "hbstubs_helper.h" + QString mUTClipboard; @@ -35,6 +39,31 @@ } // ----------------------------------------------------------------------------- +// HbStubsHelper +// ----------------------------------------------------------------------------- +// + +QString testNotifDialogText; +bool testConversionEnabled = false; + +void HbStubHelper::reset() +{ + testNotifDialogText.clear(); + testConversionEnabled = false; +} + +QString HbStubHelper::notificationDialogTxt() +{ + return testNotifDialogText; +} + +void HbStubHelper::stringUtilDigitConversion(bool enabled) +{ + testConversionEnabled = enabled; +} + + +// ----------------------------------------------------------------------------- // HbIcon::HbIcon // ----------------------------------------------------------------------------- // @@ -70,7 +99,7 @@ // HbIcon::HbIcon(const HbIcon &icon) { - mName = "c:\\data\\images\\designer.png"; + mName = icon.mName; ENSURE_DEFAULT_ICON } @@ -193,3 +222,34 @@ { return mText; } + +// ----------------------------------------------------------------------------- +// HbNotificationDialog::launchDialog +// ----------------------------------------------------------------------------- +// +void HbNotificationDialog::launchDialog(const QString &title, QGraphicsScene *scene) +{ + Q_UNUSED(scene); + testNotifDialogText = title; +} + +// ----------------------------------------------------------------------------- +// HbStringUtil +// ----------------------------------------------------------------------------- +// + +QString HbStringUtil::convertDigits( const QString str ) +{ + // Normally this method converts to current locale digits but for testing purpose + // is enough to see just that some conversion occured. + return convertDigitsTo(str, WesternDigit); +} + +QString HbStringUtil::convertDigitsTo( const QString str, const DigitType digitType ) +{ + Q_UNUSED(digitType); + if ( testConversionEnabled && !str.isEmpty() ){ + return ( QString("conv") + str ); + } + return str; +}