Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7070
    7171    out << "class " << subClass << " : public " << nameOfClass << endl;
    72     out << "{" << endl;
     72    out << '{' << endl;
    7373
    7474/* tmake ignore Q_OBJECT */
     
    106106        QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void"));
    107107        QString functionName = n.firstChild().toText().data().trimmed();
    108         if ( functionName.endsWith(QLatin1String(";")))
    109             functionName = functionName.left( functionName.length() - 1 );
     108        if ( functionName.endsWith(QLatin1Char(';')))
     109            functionName.chop(1);
    110110        QString specifier = n.attribute(QLatin1String("specifier"));
    111111        QString access = n.attribute(QLatin1String("access"));
     
    134134        QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void"));
    135135        QString functionName = n.firstChild().toText().data().trimmed();
    136         if ( functionName.endsWith(QLatin1String(";")) )
    137             functionName = functionName.left( functionName.length() - 1 );
     136        if ( functionName.endsWith(QLatin1Char(';')) )
     137            functionName.chop(1);
    138138        QString specifier = n.attribute(QLatin1String("specifier"));
    139139        QString access = n.attribute(QLatin1String("access"));
     
    196196        if ( *it3 == QLatin1String("non virtual") )
    197197            continue;
    198         out << "    " << type << " " << fixDeclaration(*it) << ";" << endl;
     198        out << "    " << type << ' ' << fixDeclaration(*it) << ';' << endl;
    199199    }
    200200    out << endl;
     
    224224        out << " *" << endl;
    225225        out << " *  The " << objClass.mid(1).toLower() << " will by default be modeless, unless you set 'modal' to" << endl;
    226         out << " *  true to construct a modal " << objClass.mid(1).toLower() << "." << endl;
     226        out << " *  true to construct a modal " << objClass.mid(1).toLower() << '.' << endl;
    227227        out << " */" << endl;
    228228        out << subClass << "::" << subClass << "( QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl )" << endl;
     
    236236        out << "    : " << nameOfClass << "( parent, name, fl )" << endl;
    237237    }
    238     out << "{" << endl;
    239     out << "}" << endl;
     238    out << '{' << endl;
     239    out << '}' << endl;
    240240    out << endl;
    241241
     
    245245    out << " */" << endl;
    246246    out << subClass << "::~" << subClass << "()" << endl;
    247     out << "{" << endl;
     247    out << '{' << endl;
    248248    out << "    // no need to delete child widgets, Qt does it all for us" << endl;
    249     out << "}" << endl;
     249    out << '}' << endl;
    250250    out << endl;
    251251
     
    269269        QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void"));
    270270        QString functionName = n.firstChild().toText().data().trimmed();
    271         if ( functionName.endsWith(QLatin1String(";")) )
    272             functionName = functionName.left( functionName.length() - 1 );
     271        if ( functionName.endsWith(QLatin1Char(';')) )
     272            functionName.chop(1);
    273273        QString specifier = n.attribute(QLatin1String("specifier"));
    274274        QString access = n.attribute(QLatin1String("access"));
     
    297297        QString returnType = n.attribute(QLatin1String("returnType"), QLatin1String("void"));
    298298        QString functionName = n.firstChild().toText().data().trimmed();
    299         if ( functionName.endsWith(QLatin1String(";")) )
    300             functionName = functionName.left( functionName.length() - 1 );
     299        if ( functionName.endsWith(QLatin1Char(';')) )
     300            functionName.chop(1);
    301301        QString specifier = n.attribute(QLatin1String("specifier"));
    302302        QString access = n.attribute(QLatin1String("access"));
     
    352352        out << " * " << descr << endl;
    353353        out << " */" << endl;
    354         out << type << " " << subClass << "::" << fixDeclaration(*it) << endl;
    355         out << "{" << endl;
     354        out << type << ' ' << subClass << "::" << fixDeclaration(*it) << endl;
     355        out << '{' << endl;
    356356        out << "    qWarning( \"" << subClass << "::" << fixDeclaration(*it) << " not yet implemented!\" );" << endl;
    357         out << "}" << endl << endl;
     357        out << '}' << endl << endl;
    358358    }
    359359    out << endl;
Note: See TracChangeset for help on using the changeset viewer.