Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/tools/uic3/converter.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    122122}
    123123
    124 DomUI *Ui3Reader::generateUi4(const QDomElement &widget, bool implicitIncludes)
     124DomUI *Ui3Reader::generateUi4(const QDomElement &widget)
    125125{
    126126    QDomNodeList nl;
     
    475475        // Magic header generation feature for legacy KDE forms
    476476        // (for example, filesharing/advanced/kcm_sambaconf/share.ui)
    477         if (implicitIncludes && isKDEClass(customClass)) {
     477        if ((m_options & ImplicitIncludes) && isKDEClass(customClass)) {
    478478            QString header = customClass.toLower();
    479479            header += QLatin1String(".h");
     
    711711        } else if (t == QLatin1String("property")) {
    712712            // skip the property it is already handled by createProperties
    713 
    714             QString name = e.attribute(QLatin1String("name"));  // change the varname this widget
    715             if (name == QLatin1String("name"))
    716                 ui_widget->setAttributeName(DomTool::readProperty(w, QLatin1String("name"), QVariant()).toString());
     713            const QString name = e.attribute(QLatin1String("name"));  // change the varname this widget
     714            if (name == QLatin1String("name")) {
     715                // Do not name QLayoutWidget if layout names are to be used.
     716                const bool applyName = !(m_options & PreserveLayoutNames) || className != QLatin1String("QLayoutWidget");
     717                if (applyName)
     718                    ui_widget->setAttributeName(DomTool::readProperty(w, QLatin1String("name"), QVariant()).toString());
     719            }
    717720        } else if (t == QLatin1String("row")) {
    718721            DomRow *row = new DomRow();
     
    798801    createProperties(w, &ui_property_list, className);
    799802    createAttributes(w, &ui_attribute_list, className);
     803    if (m_options & PreserveLayoutNames) {
     804        const QString layoutName = getLayoutName(w);
     805        if (!layoutName.isEmpty())
     806            lay->setAttributeName(layoutName);
     807    }
    800808
    801809    QDomElement e = w.firstChild().toElement();
Note: See TracChangeset for help on using the changeset viewer.