0

I've found something like below on the net

//Get S60 version and display it on label
switch (QSysInfo::s60Version ())
{
    case QSysInfo::SV_S60_3_1: return "S60 version: S60 3.1";
    case QSysInfo::SV_S60_3_2: return "S60 version: S60 3.2";
    case QSysInfo::SV_S60_5_0: return "S60 version: S60 5.0";
    case QSysInfo::SV_S60_Unknown: return "S60 version: S60 Unknown";
    default:
    break;
}

//Get OS version and display it on label
switch (QSysInfo::symbianVersion ())
{
    case QSysInfo::QSysInfo::SV_9_2: return "Symbian OS version: 9.2";
    case QSysInfo::SV_9_3: return "Symbian OS version: 9.3";
    case QSysInfo::SV_9_4: return "Symbian OS version: 9.4";
    case QSysInfo::SV_Unknown: return "Symbian OS version: Unknown";
    default:
    break;
}

BUT this doesn't compile as the QSysInfo class doesn't have s60Version method nor the symbian Version - I only get windowsVersion...

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
argh
  • 933
  • 13
  • 37
  • Which version of Qt, on which platform? – laalto Nov 08 '10 at 19:50
  • It should have `s60Version()` then. But only when you're compiling for Symbian emulator or device target. The simulator target is plain Windows, for example `Q_OS_SYMBIAN` is not defined. – laalto Nov 10 '10 at 20:22

1 Answers1

6

Ok, found it - for everybody that needs that stuff:

QString carrierName = QSystemNetworkInfo::networkName(QSystemNetworkInfo::GsmMode);

QtMobility::QSystemDeviceInfo* d = new QtMobility::QSystemDeviceInfo(this);
QString imei = d->imei();
QString manufacturer = d->manufacturer();
QString model = d->model();
delete d;

QtMobility::QSystemInfo* s = new QtMobility::QSystemInfo(this);
QString osVer = s->version(QSystemInfo::Os);
delete s;

hope this helps someone :) cheers!

argh
  • 933
  • 13
  • 37