OSDN Git Service

Merge remote branch 'origin/2.0'
authorhjk <qtc-committer@nokia.com>
Fri, 13 Aug 2010 09:19:44 +0000 (11:19 +0200)
committerhjk <qtc-committer@nokia.com>
Fri, 13 Aug 2010 09:19:44 +0000 (11:19 +0200)
Conflicts:
share/qtcreator/gdbmacros/dumper.py
share/qtcreator/gdbmacros/gdbmacros.py
src/plugins/projectexplorer/customwizard/customwizardparameters.cpp

1  2 
share/qtcreator/gdbmacros/dumper.py
share/qtcreator/gdbmacros/gdbmacros.py
share/qtcreator/translations/qtcreator_de.ts
src/plugins/projectexplorer/customwizard/customwizard.cpp
src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
src/plugins/projectexplorer/customwizard/customwizardparameters.h

@@@ -1349,11 -1322,11 +1349,18 @@@ class Dumper
                  value = item.value
                  type = value.type
  
 -        typedefStrippedType = stripTypedefs(type);
 -        nsStrippedType = self.stripNamespaceFromType(
 -            typedefStrippedType).replace("::", "__")
 +        typedefStrippedType = stripTypedefs(type)
 +        nsStrippedType = self.stripNamespaceFromType(typedefStrippedType)\
 +            .replace("::", "__")
 +
 +        # Is this derived from QObject?
++        try:
++            item.value['staticMetaObject']
++            hasMetaObject = True
++        except:
++            hasMetaObject = False
+         # Is this derived from QObject?
          try:
              item.value['staticMetaObject']
              hasMetaObject = True
@@@ -463,31 -419,8 +471,31 @@@ CustomWizardParameters::ParseResul
                      break;
                  case ParseWithinField: // field attribute
                      field.name = attributeValue(reader, fieldNameAttributeC);
-                     field.mandatory = booleanAttributeValue(reader, fieldMandatoryAttributeC);
+                     field.mandatory = booleanAttributeValue(reader, fieldMandatoryAttributeC, false);
                      break;
 +                case ParseWithinFieldDescription:
 +                    assignLanguageElementText(reader, language, &field.description);
 +                    state = ParseWithinField; // The above reads away the end tag, set state.
 +                    break;
 +                case ParseWithinFieldControl: // Copy widget control attributes
 +                    field.controlAttributes = attributesToStringMap(reader.attributes());
 +                    break;
 +                case ParseWithinComboEntries:
 +                    break;
 +                case ParseWithinComboEntry: // Combo entry with 'value' attribute
 +                    field.controlAttributes.insert(CustomWizardField::comboEntryValueKey(comboEntryCount),
 +                                                   attributeValue(reader, "value"));
 +                    break;
 +                case ParseWithinComboEntryText: {
 +
 +                        // This reads away the end tag, set state here.
 +                        QString text;
 +                        if (assignLanguageElementText(reader, language, &text))
 +                            field.controlAttributes.insert(CustomWizardField::comboEntryTextKey(comboEntryCount),
 +                                                           text);
 +                        state = ParseWithinComboEntry;
 +                }
 +                     break;
                  case ParseWithinFile: { // file attribute
                          CustomWizardFile file;
                          file.source = attributeValue(reader, fileNameSourceAttributeC);
              break;
          case QXmlStreamReader::EndElement:
              state = nextClosingState(state, reader.name());
 -            if (state == ParseError) {
 +            switch (state) {
 +            case ParseError:
                  *errorMessage = msgError(reader, configFileFullPath,
                                           QString::fromLatin1("Unexpected end element %1").arg(reader.name().toString()));
-                 return false;
+                 return ParseFailed;
 -            }
 -            if (state == ParseWithinFields) { // Leaving a field element
 +            case ParseWithinFields:  // Leaving a field element
                  fields.push_back(field);
                  field.clear();
 +                break;
 +            case ParseWithinComboEntries:
 +                comboEntryCount++;
 +                break;
 +            default:
 +                break;
              }
              break;
          default: