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/qt3support/tools/q3cstring.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the Qt3Support module 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
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7878    undefined.
    7979
    80     A Q3CString that has not been assigned to anything is \e null, i.e.
    81     both the length and the data pointer is 0. A Q3CString that
    82     references the empty string ("", a single '\0' char) is \e empty.
    83     Both null and empty Q3CStrings are legal parameters to the methods.
    84     Assigning \c{const char *} 0 to Q3CString produces a null Q3CString.
     80    A default constructed Q3CString is \e null, i.e. both the length
     81    and the data pointer are 0 and isNull() returns true.
     82   
     83    \note However, if you ask for the data pointer of a null Q3CString
     84    by calling data(), then because the internal representation of the
     85    null Q3CString is shared, it will be detached and replaced with a
     86    non-shared, empty representation, a non-null data pointer will be
     87    returned, and subsequent calls to isNull() will return false. But
     88    if you ask for the data pointer of a null Q3CString by calling
     89    constData(), the shared internal representation is not detached, a
     90    null data pointer is returned, and subsequent calls to isNull()
     91    will continue to return true.
     92
     93    A Q3CString that references the empty string ("", a single '\0'
     94    char) is \e empty, i.e. isEmpty() returns true.  Both null and
     95    empty Q3CStrings are legal parameters to the methods.  Assigning
     96    \c{const char *} 0 to Q3CString produces a null Q3CString.
    8597
    8698    The length() function returns the length of the string; resize()
     
    321333    Returns true if the string is null, i.e. if data() == 0; otherwise
    322334    returns false. A null string is also an empty string.
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
    323345
    324346    Example:
Note: See TracChangeset for help on using the changeset viewer.