QVariant LinuxDeviceConfigurations::data(const QModelIndex &index, int role) const { if (!index.isValid() || index.row() >= rowCount() || role != Qt::DisplayRole) return QVariant(); const LinuxDeviceConfiguration::ConstPtr devConf = deviceAt(index.row()); QString name = devConf->name(); if (devConf->isDefault()) { name += QLatin1Char(' ') + tr("(default for %1)") .arg(RemoteLinuxUtils::osTypeToString(devConf->osType())); } return name; }
QString MaemoGlobal::deviceConfigurationName(const LinuxDeviceConfiguration::ConstPtr &devConf) { return devConf ? devConf->name() : tr("(No device)"); }