tools/shared/symbian/epocroot.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   151                         if (xml.isStartElement() && xml.name() == "devices") {
   151                         if (xml.isStartElement() && xml.name() == "devices") {
   152                             if (xml.attributes().value("version") == "1.0") {
   152                             if (xml.attributes().value("version") == "1.0") {
   153                                 while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) {
   153                                 while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) {
   154                                     xml.readNext();
   154                                     xml.readNext();
   155                                     if (xml.isStartElement() && xml.name() == "device") {
   155                                     if (xml.isStartElement() && xml.name() == "device") {
   156                                         const bool isDefault =  xml.attributes().value("default") == "yes";
   156                                         const bool isDefault = xml.attributes().value("default") == "yes";
   157                                         const QString id = xml.attributes().value("id").toString();
   157                                         const QString id = xml.attributes().value("id").toString();
   158                                         const QString name =  xml.attributes().value("name").toString();
   158                                         const QString name = xml.attributes().value("name").toString();
   159                                         const bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue;
   159                                         const QString alias = xml.attributes().value("alias").toString();
       
   160                                         bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue;
       
   161                                         if (!alias.isEmpty())
       
   162                                             epocDeviceMatch |= alias == epocDeviceValue;
   160                                         epocDeviceFound |= epocDeviceMatch;
   163                                         epocDeviceFound |= epocDeviceMatch;
   161 
   164 
   162                                         if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) {
   165                                         if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) {
   163                                             // Found a matching device
   166                                             // Found a matching device
   164                                             while (!(xml.isEndElement() && xml.name() == "device") && !xml.atEnd()) {
   167                                             while (!(xml.isEndElement() && xml.name() == "device") && !xml.atEnd()) {