亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qresource.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtCore module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "qresource.h"#include "qresource_p.h"#include "qset.h"#include "qhash.h"#include "qmutex.h"#include "qdebug.h"#include "qlocale.h"#include "qglobal.h"#include "qvector.h"#include "qdatetime.h"#include "qbytearray.h"#include "qstringlist.h"#include <qshareddata.h>#include <qplatformdefs.h>#include "private/qabstractfileengine_p.h"//resource glueclass QResourceRoot{    enum Flags    {        Compressed = 0x01,        Directory = 0x02    };    const uchar *tree, *names, *payloads;    inline int findOffset(int node) const { return node * 14; } //sizeof each tree element    int hash(int node) const;    QString name(int node) const;    short flags(int node) const;public:    mutable QAtomic ref;    inline QResourceRoot(): tree(0), names(0), payloads(0) {}    inline QResourceRoot(const uchar *t, const uchar *n, const uchar *d) { setSource(t, n, d); }    virtual ~QResourceRoot() { }    int findNode(const QString &path, const QLocale &locale=QLocale()) const;    inline bool isContainer(int node) const { return flags(node) & Directory; }    inline bool isCompressed(int node) const { return flags(node) & Compressed; }    const uchar *data(int node, qint64 *size) const;    QStringList children(int node) const;    virtual QString mappingRoot() const { return QString(); }    bool mappingRootSubdir(const QString &path, QString *match=0) const;    inline bool operator==(const QResourceRoot &other) const    { return tree == other.tree && names == other.names && payloads == other.payloads; }    inline bool operator!=(const QResourceRoot &other) const    { return !operator==(other); }    virtual bool isDynamicRoot() const { return false; }protected:    inline void setSource(const uchar *t, const uchar *n, const uchar *d) {        tree = t;        names = n;        payloads = d;    }};Q_DECLARE_TYPEINFO(QResourceRoot, Q_MOVABLE_TYPE);Q_GLOBAL_STATIC_WITH_ARGS(QMutex, resourceMutex, (QMutex::Recursive))typedef QList<QResourceRoot*> ResourceList;Q_GLOBAL_STATIC(ResourceList, resourceList)Q_GLOBAL_STATIC(QStringList, resourceSearchPaths)/*!    \class QResource    \brief The QResource class provides an interface for reading directly from resources.    \ingroup io    \mainclass    \reentrant    \since 4.2    QResource is an object that represents a set of data (and possibly    children) relating to a single resource entity. QResource gives direct    access to the bytes in their raw format. In this way direct access    allows reading data without buffer copying or indirection. Indirection    is often useful when interacting with the resource entity as if it is a    file, this can be achieved with QFile. The data and children behind a    QResource are normally compiled into an application/library, but it is    also possible to load a resource at runtime. When loaded at run time    the resource file will be loaded as one big set of data and then given    out in pieces via references into the resource tree.    A QResource can either be loaded with an absolute path, either treated    as a file system rooted with a \c{/} character, or in resource notation    rooted with a \c{:} character. A relative resource can also be opened    which will be found through the searchPaths().    A QResource that is representing a file will have data backing it, this    data can possibly be compressed, in which case qUncompress() must be    used to access the real data; this happens implicitly when accessed    through a QFile. A QResource that is representing a directory will have    only children and no data.    \section1 Dynamic Resource Loading    A resource can be left out of an application's binary and loaded when    it is needed at run-time by using the registerResource() function. The    resource file passed into registerResource() must be a binary resource    as created by rcc. Further information about binary resources can be    found in {The Qt Resource System} documentation.    This can often be useful when loading a large set of application icons    that may change based on a setting, or that can be edited by a user and    later recreated. The resource is immediately loaded into memory, either    as a result of a single file read operation, or as a memory mapped file.    This approach can prove to be a significant performance gain as only a    single file will be loaded, and pieces of data will be given out via the    path requested in setFileName().    The unregisterResource() function removes a reference to a particular    file. If there are QResources that currently reference resources related    to the unregistered file, they will continue to be valid but the resource    file itself will be removed from the resource roots, and thus no further    QResource can be created pointing into this resource data. The resource    itself will be unmapped from memory when the last QResource points into it.    \sa {The Qt Resource System}, QFile, QDir, QFileInfo*/class QResourcePrivate {public:    inline QResourcePrivate(QResource *_q) : q_ptr(_q) { clear(); }    inline ~QResourcePrivate() { clear(); }    void ensureInitialized() const;    void ensureChildren() const;    bool load(const QString &file);    void clear();    QLocale locale;    QString fileName, absoluteFilePath;    QList<QResourceRoot*> related;    uint container : 1;    mutable uint compressed : 1;    mutable qint64 size;    mutable const uchar *data;    mutable QStringList children;    QResource *q_ptr;    Q_DECLARE_PUBLIC(QResource)};voidQResourcePrivate::clear(){    absoluteFilePath.clear();    compressed = 0;    data = 0;    size = 0;    children.clear();    container = 0;    for(int i = 0; i < related.size(); ++i) {        QResourceRoot *root = related.at(i);        if(!root->ref.deref())            delete root;    }    related.clear();}boolQResourcePrivate::load(const QString &file){    related.clear();    QMutexLocker lock(resourceMutex());    const ResourceList *list = resourceList();    for(int i = 0; i < list->size(); ++i) {        QResourceRoot *res = list->at(i);        const int node = res->findNode(file);        if(node != -1) {            if(related.isEmpty()) {                container = res->isContainer(node);                if(!container) {                    data = res->data(node, &size);                    compressed = res->isCompressed(node);                } else {                    data = 0;                    size = 0;                    compressed = 0;                }            } else if(res->isContainer(node) != container) {                qWarning("QResourceInfo: Resource [%s] has both data and children!", file.toLatin1().constData());            }            res->ref.ref();            related.append(res);        } else if(res->mappingRootSubdir(file)) {            container = true;            data = 0;            size = 0;            compressed = 0;            res->ref.ref();            related.append(res);        }    }    return !related.isEmpty();}voidQResourcePrivate::ensureInitialized() const{    if(!related.isEmpty())        return;    QResourcePrivate *that = const_cast<QResourcePrivate *>(this);    if(fileName == QLatin1String(":"))        that->fileName += QLatin1Char('/');    that->absoluteFilePath = fileName;    if(!that->absoluteFilePath.startsWith(QLatin1Char(':')))        that->absoluteFilePath.prepend(QLatin1Char(':'));    QString path = fileName;    if(path.startsWith(QLatin1Char(':')))        path = path.mid(1);    bool found = false;    if(path.startsWith(QLatin1Char('/'))) {        found = that->load(path);    } else {        QMutexLocker lock(resourceMutex());        QStringList searchPaths = *resourceSearchPaths();        searchPaths << QLatin1String("");        for(int i = 0; i < searchPaths.size(); ++i) {            const QString searchPath(searchPaths.at(i) + QLatin1Char('/') + path);            if(that->load(searchPath)) {                found = true;                that->absoluteFilePath = QLatin1Char(':') + searchPath;                break;            }        }    }}voidQResourcePrivate::ensureChildren() const{    ensureInitialized();    if(!children.isEmpty() || !container || related.isEmpty())        return;    QString path = absoluteFilePath, k;    if(path.startsWith(QLatin1Char(':')))        path = path.mid(1);    QSet<QString> kids;    for(int i = 0; i < related.size(); ++i) {        QResourceRoot *res = related.at(i);        if(res->mappingRootSubdir(path, &k) && !k.isEmpty()) {            if(!kids.contains(k)) {                children += k;                kids.insert(k);            }        } else {            const int node = res->findNode(path);            if(node != -1) {                QStringList related_children = res->children(node);                for(int kid = 0; kid < related_children.size(); ++kid) {                    k = related_children.at(kid);                    if(!kids.contains(k)) {                        children += k;                        kids.insert(k);                    }                }            }        }    }}/*!    Constructs a QResource pointing to \a file. \a locale is used to    load a specific localization of a resource data.    \sa QFileInfo, searchPaths(), setFileName(), setLocale()*/QResource::QResource(const QString &file, const QLocale &locale) : d_ptr(new QResourcePrivate(this)){    Q_D(QResource);    d->fileName = file;    d->locale = locale;}/*!    Releases the resources of the QResource object.*/QResource::~QResource(){    delete d_ptr;}/*!    Sets a QResource to only load the localization of resource to for \a    locale. If a resource for the specific locale is not found then the    C locale is used.    \sa setFileName()*/void QResource::setLocale(const QLocale &locale){    Q_D(QResource);    d->clear();    d->locale = locale;}/*!    Returns the locale used to locate the data for the QResource.*/QLocale QResource::locale() const{    Q_D(const QResource);    return d->locale;}/*!    Sets a QResource to point to \a file. \a file can either be absolute,    in which case it is opened directly, if relative then the file will be    tried to be found in searchPaths().    \sa absoluteFilePath()*/void QResource::setFileName(const QString &file){    Q_D(QResource);    d->clear();    d->fileName = file;}/*!    Returns the full path to the file that this QResource represents as it    was passed.    \sa absoluteFilePath()*/QString QResource::fileName() const{    Q_D(const QResource);    d->ensureInitialized();    return d->fileName;}/*!    Returns the real path that this QResource represents, if the resource    was found via the searchPaths() it will be indicated in the path.    \sa fileName()*/QString QResource::absoluteFilePath() const{    Q_D(const QResource);    d->ensureInitialized();    return d->absoluteFilePath;}/*!    Returns true if the resource really exists in the resource heirarchy,    false otherwise.*/bool QResource::isValid() const{    Q_D(const QResource);    d->ensureInitialized();    return !d->related.isEmpty();}/*!    \fn bool QResource::isFile() const    Returns true if the resource represents a file and thus has data    backing it, false if it represents a directory.    \sa isDir()*//*!    Returns true if the resource represents a file and the data backing it    is in a compressed format, false otherwise.    \sa data(), isFile()*/bool QResource::isCompressed() const{    Q_D(const QResource);    d->ensureInitialized();    return d->compressed;}/*!    Returns the size of the data backing the resource.    \sa data(), isFile()*/qint64 QResource::size() const{    Q_D(const QResource);    d->ensureInitialized();    return d->size;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久久久久| 成人福利视频在线看| 亚洲一区二区三区不卡国产欧美| ...xxx性欧美| 日韩伦理av电影| 曰韩精品一区二区| 亚洲一区二区三区在线| 亚洲成在人线免费| 久久av资源站| 国产盗摄女厕一区二区三区| 暴力调教一区二区三区| 91久久免费观看| 欧美精品v日韩精品v韩国精品v| 欧美一区二区三区四区视频| 欧美草草影院在线视频| 久久精品男人天堂av| 国产亲近乱来精品视频 | 国产一区二区按摩在线观看| 久久不见久久见中文字幕免费| 国产一区二区三区蝌蚪| www.日本不卡| 欧美一区二区性放荡片| 久久久久九九视频| 亚洲区小说区图片区qvod| 亚洲国产精品一区二区久久| 日本不卡不码高清免费观看| 国产精品亚洲专一区二区三区 | 久久国产精品免费| 国产高清在线精品| 91网站在线观看视频| 欧美日韩高清在线播放| 欧美国产精品一区| 亚洲国产婷婷综合在线精品| 久久机这里只有精品| 97成人超碰视| 久久综合成人精品亚洲另类欧美 | 51精品国自产在线| 亚洲欧洲日韩一区二区三区| 天堂va蜜桃一区二区三区漫画版| 国产不卡视频一区| 欧美一区二区三区播放老司机| 国产日韩欧美一区二区三区乱码| 亚洲最大成人网4388xx| 国产精品一区三区| 91精品国产综合久久婷婷香蕉| 国产欧美日韩视频一区二区| 性欧美疯狂xxxxbbbb| 北岛玲一区二区三区四区| 欧美大度的电影原声| 亚洲一级在线观看| 99精品1区2区| 日本一区二区三区免费乱视频| 午夜影视日本亚洲欧洲精品| jlzzjlzz亚洲日本少妇| 日韩欧美高清在线| 日本最新不卡在线| 欧美丝袜丝交足nylons图片| 国产精品三级av| 成人在线视频一区二区| 精品少妇一区二区三区在线视频| 午夜欧美一区二区三区在线播放| 成人av电影免费观看| 国产欧美日韩精品a在线观看| 狠狠色狠狠色综合系列| 日韩一级片网址| 日本午夜精品视频在线观看| 欧美性色欧美a在线播放| 亚洲人一二三区| 色综合一区二区三区| 92精品国产成人观看免费| 日韩一区二区免费电影| 亚洲国产精品人人做人人爽| 色狠狠桃花综合| 亚洲免费av高清| 一本到不卡免费一区二区| 综合激情网...| 日本高清不卡一区| 亚洲国产成人tv| 在线观看av一区二区| 亚洲一区欧美一区| 欧美日韩国产高清一区二区| 亚洲电影激情视频网站| 91精品久久久久久久99蜜桃| 奇米综合一区二区三区精品视频| 欧美一二三区在线观看| 激情成人综合网| 亚洲国产精品t66y| 99久久久久久| 性久久久久久久久| 亚洲精品在线一区二区| 激情欧美一区二区三区在线观看| 国产亚洲欧洲997久久综合| 成人性生交大片免费看在线播放| 中文字幕日韩一区| 欧美日韩aaaaa| 国产精品一区二区你懂的| 中文字幕国产一区二区| 日本精品一区二区三区高清 | 亚洲欧美日韩人成在线播放| 日本精品视频一区二区三区| 亚洲成人精品一区二区| 日韩美女视频在线| 岛国精品在线观看| 亚洲第一成人在线| 国产欧美日韩亚州综合 | 福利一区二区在线观看| 亚洲色欲色欲www| 日韩亚洲欧美在线| 成人aa视频在线观看| 亚洲18女电影在线观看| 久久精品人人做| 欧美日韩一级片在线观看| 国产毛片精品视频| 亚洲高清中文字幕| 国产人伦精品一区二区| 欧美丰满一区二区免费视频| 国产成人自拍在线| 日韩不卡在线观看日韩不卡视频| 国产欧美综合在线观看第十页| 欧美性受xxxx黑人xyx| 成人精品鲁一区一区二区| 天天av天天翘天天综合网色鬼国产| 日本一区二区三区在线观看| 7777女厕盗摄久久久| voyeur盗摄精品| 激情五月婷婷综合| 日韩和欧美一区二区| 亚洲少妇中出一区| 国产精品无码永久免费888| 日韩欧美在线网站| 欧美日韩国产精品自在自线| caoporn国产一区二区| 国模大尺度一区二区三区| 亚洲成a人v欧美综合天堂下载| 综合分类小说区另类春色亚洲小说欧美| 日韩欧美色电影| 91精品国产免费久久综合| 欧美日韩中文字幕一区| 色哟哟国产精品| 99久久综合99久久综合网站| 国产黄人亚洲片| 国产成人午夜视频| 国产成人综合在线观看| 精品一区二区三区视频| 美女在线一区二区| 蜜臀91精品一区二区三区| 视频一区欧美日韩| 婷婷丁香激情综合| 视频一区二区国产| 午夜免费久久看| 青青草原综合久久大伊人精品 | 国产一区欧美日韩| 国产一区二区精品久久91| 久久精品72免费观看| 美国一区二区三区在线播放| 免费亚洲电影在线| 久久草av在线| 懂色av中文字幕一区二区三区| 国产乱码精品一区二区三区av| 国产在线精品一区在线观看麻豆| 激情成人午夜视频| 国产suv精品一区二区883| 成人免费不卡视频| 日本高清不卡aⅴ免费网站| 欧美性欧美巨大黑白大战| 在线成人免费视频| 26uuu精品一区二区| 欧美国产日韩在线观看| 亚洲三级视频在线观看| 亚洲国产精品一区二区www | 午夜精品一区在线观看| 日本一区中文字幕| 国产精品资源网| 97se亚洲国产综合自在线不卡| 91福利在线观看| 欧美一级午夜免费电影| 国产日韩精品视频一区| 亚洲免费成人av| 久久国产免费看| 成人av手机在线观看| 欧美三区在线观看| 久久久精品天堂| 亚洲一区在线免费观看| 久久99久久精品欧美| 91丨porny丨蝌蚪视频| 欧美精品少妇一区二区三区| 欧美精品一区在线观看| 亚洲欧美一区二区三区孕妇| 日韩精品乱码免费| eeuss鲁片一区二区三区| 6080午夜不卡| 亚洲视频资源在线| 美腿丝袜亚洲三区| 欧美优质美女网站| 欧美激情一区三区| 日本不卡1234视频| 91成人在线精品| 国产精品婷婷午夜在线观看| 亚洲国产精品影院| 99久久伊人精品|