diff -r d4198dcb9983 -r de27cc8389dd wlanutilities/eapwizard/src/eapwizardpagecertca.cpp --- a/wlanutilities/eapwizard/src/eapwizardpagecertca.cpp Wed Aug 18 10:52:46 2010 +0300 +++ b/wlanutilities/eapwizard/src/eapwizardpagecertca.cpp Thu Sep 02 21:36:44 2010 +0300 @@ -1,36 +1,39 @@ /* - * Copyright (c) 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" - * 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: - * EAP Wizard Page: Certificate Authority Selection. - * - */ +* Copyright (c) 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" +* 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: +* EAP Wizard Page: Certificate Authority Selection. +*/ // System includes + #include #include #include #include #include + #include #include #include #include // User includes + #include "wlanwizardhelper.h" #include "eapwizard_p.h" #include "eapwizardpagecertca.h" + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "eapwizardpagecertcaTraces.h" @@ -63,8 +66,8 @@ mTitle(NULL), mCertList(NULL) { - OstTraceFunctionEntry0( EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_ENTRY ); - OstTraceFunctionExit0( EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_EXIT ); + OstTraceFunctionEntry0(EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_ENTRY); + OstTraceFunctionExit0(EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_EXIT); } /*! @@ -72,8 +75,8 @@ */ EapWizardPageCertCa::~EapWizardPageCertCa() { - OstTraceFunctionEntry0( DUP1_EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_ENTRY ); - OstTraceFunctionExit0( DUP1_EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_EXIT ); + OstTraceFunctionEntry0(DUP1_EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_ENTRY); + OstTraceFunctionExit0(DUP1_EAPWIZARDPAGECERTCA_EAPWIZARDPAGECERTCA_EXIT); } /*! @@ -81,7 +84,8 @@ */ HbWidget* EapWizardPageCertCa::initializePage() { - OstTraceFunctionEntry0( EAPWIZARDPAGECERTCA_INITIALIZEPAGE_ENTRY ); + OstTraceFunctionEntry0(EAPWIZARDPAGECERTCA_INITIALIZEPAGE_ENTRY); + if (!mWidget) { mDocumentLoader.reset( new HbDocumentLoader( mWizard->wizardHelper()->mainWindow()) ); @@ -121,14 +125,8 @@ QStringList list; list << hbTrId("txt_occ_setlabel_val_select_automatically"); - for (int i = 0; i < mCerts.count(); ++i) { - // TODO: workaround for BBHA-863EJN - // graphics memory runs out for long lists and items - QString tmp(mCerts.at(i).value( - EapQtCertificateInfo::CertificateLabel).toString()); - tmp.truncate(10); - list << tmp; + list << mCerts.at(i).value(EapQtCertificateInfo::CertificateLabel).toString(); } // If certificate list has been changed update the content otherwise do not @@ -138,7 +136,8 @@ // Automatic is selected by default mCertList->setSelected(IndexForAutomatic); } - OstTraceFunctionExit0( EAPWIZARDPAGECERTCA_INITIALIZEPAGE_EXIT ); + + OstTraceFunctionExit0(EAPWIZARDPAGECERTCA_INITIALIZEPAGE_EXIT); return mWidget; } @@ -149,14 +148,16 @@ */ void EapWizardPageCertCa::loadDocmlSection(Qt::Orientation orientation) { - OstTraceFunctionEntry0( EAPWIZARDPAGECERTCA_LOADDOCMLSECTION_ENTRY ); + OstTraceFunctionEntry0(EAPWIZARDPAGECERTCA_LOADDOCMLSECTION_ENTRY); + EapWizardPage::loadDocmlSection( mDocumentLoader.data(), orientation, ":/docml/occ_eap_wizard_01_02_04.docml", "portrait_section", "landscape_section"); - OstTraceFunctionExit0( EAPWIZARDPAGECERTCA_LOADDOCMLSECTION_EXIT ); + + OstTraceFunctionExit0(EAPWIZARDPAGECERTCA_LOADDOCMLSECTION_EXIT); } /*! @@ -168,7 +169,8 @@ */ int EapWizardPageCertCa::nextId() const { - OstTraceFunctionEntry0( EAPWIZARDPAGECERTCA_NEXTID_ENTRY ); + OstTraceFunctionEntry0(EAPWIZARDPAGECERTCA_NEXTID_ENTRY); + int id = WlanWizardPage::PageNone; bool ok; int type = mWizard->configurations(EapWizardPrivate::OuterType).toInt(&ok); @@ -177,20 +179,23 @@ if (type == EapQtPluginHandle::PluginEapTls) { id = EapWizardPage::PageCertificateUser; } else { - Q_ASSERT(type == EapQtPluginHandle::PluginEapTtls || + Q_ASSERT( + type == EapQtPluginHandle::PluginEapTtls || type == EapQtPluginHandle::PluginPeap); id = EapWizardPage::PageIdentity; } int selected = mCertList->selected(); if (selected == IndexForAutomatic) { - mWizard->setConfigurations(EapWizardPrivate::CertificateCa, QVariant()); + mWizard->setConfigurations( + EapWizardPrivate::CertificateCa, + QVariant()); } else { mWizard->setConfigurations( - EapWizardPrivate::CertificateCa, qVariantFromValue(mCerts.at( - selected - AmountOfNonCertItems))); + EapWizardPrivate::CertificateCa, + qVariantFromValue(mCerts.at(selected - AmountOfNonCertItems))); } - OstTraceFunctionExit0( EAPWIZARDPAGECERTCA_NEXTID_EXIT ); + OstTraceFunctionExit0(EAPWIZARDPAGECERTCA_NEXTID_EXIT); return id; }