Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/corelib/io/qresource.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    188188    as a file system rooted with a \c{/} character, or in resource notation
    189189    rooted with a \c{:} character. A relative resource can also be opened
    190     which will be found through the searchPaths().
     190    which will be found searchPaths().
    191191
    192192    A QResource that is representing a file will have data backing it, this
     
    929929};
    930930
    931 #if defined(Q_OS_UNIX)
     931#if defined(Q_OS_UNIX)
    932932#define QT_USE_MMAP
    933933#endif
     
    14121412        const QString path = (file == AbsolutePathName) ? d->resource.absoluteFilePath() : d->resource.fileName();
    14131413        const int slash = path.lastIndexOf(QLatin1Char('/'));
    1414         if (slash != -1)
    1415             return path.left(slash);
     1414        if (slash == -1)
     1415            return QLatin1String(":");
     1416        else if (slash <= 1)
     1417            return QLatin1String(":/");
     1418        return path.left(slash);
     1419
    14161420    } else if(file == CanonicalName || file == CanonicalPathName) {
    14171421        const QString absoluteFilePath = d->resource.absoluteFilePath();
Note: See TracChangeset for help on using the changeset viewer.