--- a/wlanutilities/wpswizard/src/wpswizardstepthreenumber.cpp Fri Aug 06 18:38:57 2010 +0300
+++ b/wlanutilities/wpswizard/src/wpswizardstepthreenumber.cpp Mon Aug 23 13:30:09 2010 +0300
@@ -25,6 +25,7 @@
#include <QTextStream>
#include <QTime>
#include <HbMainWindow>
+#include <HbParameterLengthLimiter>
// User includes
#include "wpswizardstepthreenumber.h"
@@ -92,21 +93,11 @@
mLoader->load(":/docml/occ_wps_02_03.docml", &ok);
Q_ASSERT(ok);
- // Initialize orientation
- loadDocmlSection(mWizard->mainWindow()->orientation());
-
mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P2"));
Q_ASSERT(mWidget);
mHeading= qobject_cast<HbLabel*> (mLoader->findWidget("label_heading"));
Q_ASSERT(mHeading);
-
- bool connectOk = connect(
- mWizard->mainWindow(),
- SIGNAL(orientationChanged(Qt::Orientation)),
- this,
- SLOT(loadDocmlSection(Qt::Orientation)));
- Q_ASSERT(connectOk);
}
OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_INITIALIZEPAGE_EXIT, this);
@@ -166,9 +157,10 @@
bool WpsPageStepThreeNumber::showPage()
{
int randomNumber = computeRandNumber();
- mHeading->setPlainText(hbTrId(
+ mHeading->setPlainText(
+ HbParameterLengthLimiter(
"txt_occ_dialog_enter_1_on_the_wireless_station_t").arg(
- randomNumber));
+ QString::number(randomNumber)));
mWizard->setPin(randomNumber);
return true;
}
@@ -224,25 +216,3 @@
OstTraceFunctionExit1(WPSPAGESTEPTHREENUMBER_COMPUTECHECKSUM_EXIT, this);
return (10 - digit) % 10;
}
-
-/*!
- Loads docml at initialization phase and when HbMainWindow sends
- orientation() signal.
-
- @param [in] orientation orientation to be loaded.
- */
-void WpsPageStepThreeNumber::loadDocmlSection(Qt::Orientation orientation)
-{
- bool ok = false;
-
- // Load the orientation specific section
- if (orientation == Qt::Horizontal) {
- mLoader->load(":/docml/occ_wps_02_03.docml", "landscape", &ok);
- Q_ASSERT(ok);
- } else {
- Q_ASSERT(orientation == Qt::Vertical);
- mLoader->load(":/docml/occ_wps_02_03.docml", "portrait", &ok);
- Q_ASSERT(ok);
- }
-}
-