void SymbianIDeviceConfigurationWidget::getRomInfoResult(const Coda::CodaCommandResult &result) { codaIncreaseProgress(); if (result.type == Coda::CodaCommandResult::SuccessReply && result.values.count()) { startTable(m_deviceInfo); QTextStream str(&m_deviceInfo); QVariantHash obj = result.values[0].toVariant().toHash(); QString romVersion = obj.value(QLatin1String("romVersion"), tr("unknown")).toString(); romVersion.replace(QLatin1Char('\n'), QLatin1Char(' ')); // The ROM string is split across multiple lines, for some reason. addToTable(str, tr("ROM version:"), romVersion); QString pr = obj.value(QLatin1String("prInfo")).toString(); if (pr.length()) addToTable(str, tr("Release:"), pr); finishTable(m_deviceInfo); } QList<quint32> packagesOfInterest; packagesOfInterest.append(CODA_UID); packagesOfInterest.append(QTMOBILITY_UID); packagesOfInterest.append(QTCOMPONENTS_UID); packagesOfInterest.append(QMLVIEWER_UID); if (m_codaInfoDevice) m_codaInfoDevice->sendSymbianInstallGetPackageInfoCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getInstalledPackagesResult), packagesOfInterest); }
void SymbianIDeviceConfigurationWidget::getInstalledPackagesResult(const Coda::CodaCommandResult &result) { codaIncreaseProgress(); if (result.type == Coda::CodaCommandResult::SuccessReply && result.values.count()) { startTable(m_deviceInfo); QTextStream str(&m_deviceInfo); QVariantList resultsList = result.values[0].toVariant().toList(); const QString uidKey = QLatin1String("uid"); const QString errorKey = QLatin1String("error"); const QString versionKey = QLatin1String("version"); foreach (const QVariant& var, resultsList) { QVariantHash obj = var.toHash(); bool ok = false; uint uid = obj.value(uidKey).toString().toUInt(&ok, 16); if (ok) { const bool error = !obj.value(errorKey).isNull(); QString versionString; if (!error) { QVariantList version = obj.value(versionKey).toList(); versionString = QString::fromLatin1("%1.%2.%3").arg(version[0].toInt()) .arg(version[1].toInt()) .arg(version[2].toInt()); } switch (uid) { case CODA_UID: { if (error) { // How can coda not be installed? Presumably some UID wrongness... addErrorToTable(str, tr("CODA version: "), tr("Error reading CODA version")); } else addToTable(str, tr("CODA version: "), versionString); } break; case QTMOBILITY_UID: { if (error) addErrorToTable(str, tr("Qt Mobility version: "), tr("Error reading Qt Mobility version")); else addToTable(str, tr("Qt Mobility version: "), versionString); } break; case QTCOMPONENTS_UID: { addToTable(str, tr("Qt Quick components version: "), error ? tr("Not installed") : versionString); } break; case QMLVIEWER_UID: { addToTable(str, tr("QML Viewer version: "), error ? tr("Not installed") : versionString); } break; default: break; } } }
void mmHTMLBuilder::init() { html_ = wxString::Format(wxString::FromUTF8(tags::HTML) , mmex::getProgramName() ); //Show user name if provided if (mmOptions::instance().userNameString_ != "") { startTable(); startTableRow(); startTableCell(); addHeader(2, mmOptions::instance().userNameString_); endTableCell(); endTableRow(); endTable(); addHorizontalLine(2); } }
void SymbianIDeviceConfigurationWidget::getQtVersionCommandResult(const Coda::CodaCommandResult &result) { m_deviceInfo.clear(); if (result.type == Coda::CodaCommandResult::FailReply) { setDeviceInfoLabel(tr("No device information available"), true); SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaInfoDevice); m_deviceInfoButton->setEnabled(true); m_codaTimeout->stop(); return; } else if (result.type == Coda::CodaCommandResult::CommandErrorReply){ startTable(m_deviceInfo); QTextStream str(&m_deviceInfo); addErrorToTable(str, tr("Qt version: "), tr("Not installed on device")); finishTable(m_deviceInfo); } else { if (result.values.count()) { QHash<QString, QVariant> obj = result.values[0].toVariant().toHash(); QString ver = obj.value(QLatin1String("qVersion")).toString(); startTable(m_deviceInfo); QTextStream str(&m_deviceInfo); addToTable(str, tr("Qt version:"), ver); QString systemVersion; const int symVer = obj.value(QLatin1String("symbianVersion")).toInt(); // Ugh why won't QSysInfo define these on non-symbian builds... switch (symVer) { case 10: systemVersion.append(QLatin1String("Symbian OS v9.2")); break; case 20: systemVersion.append(QLatin1String("Symbian OS v9.3")); break; case 30: systemVersion.append(QLatin1String("Symbian OS v9.4 / Symbian^1")); break; case 40: systemVersion.append(QLatin1String("Symbian^2")); break; case 50: systemVersion.append(QLatin1String("Symbian^3")); break; case 60: systemVersion.append(QLatin1String("Symbian^4")); break; case 70: systemVersion.append(QLatin1String("Symbian^3")); // TODO: might change break; default: systemVersion.append(tr("Unrecognised Symbian version 0x%1").arg(symVer, 0, 16)); break; } systemVersion.append(QLatin1String(", ")); int s60Ver = obj.value(QLatin1String("s60Version")).toInt(); switch (s60Ver) { case 10: systemVersion.append(QLatin1String("S60 3rd Edition Feature Pack 1")); break; case 20: systemVersion.append(QLatin1String("S60 3rd Edition Feature Pack 2")); break; case 30: systemVersion.append(QLatin1String("S60 5th Edition")); break; case 40: systemVersion.append(QLatin1String("S60 5th Edition Feature Pack 1")); break; case 50: systemVersion.append(QLatin1String("S60 5th Edition Feature Pack 2")); break; case 70: systemVersion.append(QLatin1String("S60 5th Edition Feature Pack 3")); // TODO: might change break; default: systemVersion.append(tr("Unrecognised S60 version 0x%1").arg(symVer, 0, 16)); break; } addToTable(str, tr("OS version:"), systemVersion); finishTable(m_deviceInfo); } } codaIncreaseProgress(); if (m_codaInfoDevice) m_codaInfoDevice->sendSymbianOsDataGetRomInfoCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getRomInfoResult)); }
HashTable::HashTable(int pLength){ _length = pLength; _table = new AVLTree<HashEntry, std::string>*[pLength]; _ocurrences = new AVLTree<int, int>(); startTable(); }
HashTable::HashTable(){ _length = DEFAULT_LENGTH; _table = new AVLTree<HashEntry, std::string>*[_length]; _ocurrences = new AVLTree<int, int>(); startTable(); }