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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? qdir.cpp

?? QT 開發(fā)環(huán)境里面一個(gè)很重要的文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號(hào):
/******************************************************************************** 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 "qplatformdefs.h"#include "qdir.h"#include "qabstractfileengine.h"#ifndef QT_NO_DEBUG#include "qdebug.h"#endif#include "qfsfileengine.h"#include "qdatetime.h"#include "qstring.h"#include "qregexp.h"#include "qvector.h"#ifdef QT_BUILD_CORE_LIB# include "qresource.h"#endif#include <stdlib.h>static QString driveSpec(const QString &path){#ifdef Q_OS_WIN    if (path.size() < 2)        return QString();    char c = path.at(0).toAscii();    if (c < 'a' && c > 'z' && c < 'A' && c > 'Z')        return QString();    if (path.at(1).toAscii() != ':')        return QString();    return path.mid(0, 2);#else    Q_UNUSED(path);    return QString();#endif}//************* QDirPrivateclass QDirPrivate{    QDir *q_ptr;    Q_DECLARE_PUBLIC(QDir)protected:    QDirPrivate(QDir*, const QDir *copy=0);    ~QDirPrivate();    void initFileEngine(const QString &file);    void updateFileLists() const;    void sortFileList(QDir::SortFlags, QStringList &, QStringList *, QFileInfoList *) const;private:#ifdef QT3_SUPPORT    QChar filterSepChar;    bool matchAllDirs;#endif    static inline QChar getFilterSepChar(const QString &nameFilter)    {        QChar sep(QLatin1Char(';'));        int i = nameFilter.indexOf(sep, 0);        if (i == -1 && nameFilter.indexOf(QLatin1Char(' '), 0) != -1)            sep = QChar(QLatin1Char(' '));        return sep;    }    static inline QStringList splitFilters(const QString &nameFilter, QChar sep=0) {        if(sep == 0)            sep = getFilterSepChar(nameFilter);        QStringList ret = nameFilter.split(sep);        for(int i = 0; i < ret.count(); i++)            ret[i] = ret[i].trimmed();        return ret;    }    struct Data {        inline Data()            : ref(1), fileEngine(0)        { clear(); }        inline Data(const Data &copy)            : ref(1), path(copy.path), nameFilters(copy.nameFilters), sort(copy.sort),              filters(copy.filters), fileEngine(0)        { clear(); }        inline ~Data()        { delete fileEngine; }        inline void clear() {            listsDirty = 1;        }        mutable QAtomic ref;        QString path;        QStringList nameFilters;        QDir::SortFlags sort;        QDir::Filters filters;        mutable QAbstractFileEngine *fileEngine;        mutable uint listsDirty : 1;        mutable QStringList files;        mutable QFileInfoList fileInfos;    } *data;    inline void setPath(const QString &p)    {        detach(false);        QString path = p;        if ((path.endsWith(QLatin1Char('/')) || path.endsWith(QLatin1Char('\\')))                && path.length() > 1) {#ifdef Q_OS_WIN            if (!(path.length() == 3 && path.at(1) == ':'))#endif                path.truncate(path.length() - 1);        }        if(!data->fileEngine || !QDir::isRelativePath(path))            initFileEngine(path);        data->fileEngine->setFileName(path);        // set the path to be the qt friendly version so then we can operate on it using just /        data->path = data->fileEngine->fileName(QAbstractFileEngine::DefaultName);        data->clear();    }    inline void reset() {        detach();        data->clear();    }    void detach(bool createFileEngine = true);};QDirPrivate::QDirPrivate(QDir *qq, const QDir *copy) : q_ptr(qq)#ifdef QT3_SUPPORT                                                     , filterSepChar(0)                                                     , matchAllDirs(false)#endif{    if(copy) {        copy->d_func()->data->ref.ref();        data = copy->d_func()->data;    } else {        data = new QDirPrivate::Data;        data->clear();    }}QDirPrivate::~QDirPrivate(){    if (!data->ref.deref())        delete data;    data = 0;    q_ptr = 0;}/* For sorting */struct QDirSortItem {    QString filename_cache;    QString suffix_cache;    QFileInfo item;};static int qt_cmp_si_sort_flags;#if defined(Q_C_CALLBACKS)extern "C" {#endif#ifdef Q_OS_TEMPstatic int __cdecl qt_cmp_si(const void *n1, const void *n2)#elsestatic int qt_cmp_si(const void *n1, const void *n2)#endif{    if (!n1 || !n2)        return 0;    QDirSortItem* f1 = (QDirSortItem*)n1;    QDirSortItem* f2 = (QDirSortItem*)n2;    if ((qt_cmp_si_sort_flags & QDir::DirsFirst) && (f1->item.isDir() != f2->item.isDir()))        return f1->item.isDir() ? -1 : 1;    if ((qt_cmp_si_sort_flags & QDir::DirsLast) && (f1->item.isDir() != f2->item.isDir()))        return f1->item.isDir() ? 1 : -1;    int r = 0;    int sortBy = (qt_cmp_si_sort_flags & QDir::SortByMask)                 | (qt_cmp_si_sort_flags & QDir::Type);    switch (sortBy) {      case QDir::Time:        r = f1->item.lastModified().secsTo(f2->item.lastModified());        break;      case QDir::Size:        r = f2->item.size() - f1->item.size();        break;      case QDir::Type:      {        bool ic = qt_cmp_si_sort_flags & QDir::IgnoreCase;        if (f1->suffix_cache.isNull())            f1->suffix_cache = ic ? f1->item.suffix().toLower()                               : f1->item.suffix();        if (f2->suffix_cache.isNull())            f2->suffix_cache = ic ? f2->item.suffix().toLower()                               : f2->item.suffix();	r = qt_cmp_si_sort_flags & QDir::LocaleAware            ? f1->suffix_cache.localeAwareCompare(f2->suffix_cache)            : f1->suffix_cache.compare(f2->suffix_cache);      }        break;      default:        ;    }    if (r == 0 && sortBy != QDir::Unsorted) {        // Still not sorted - sort by name        bool ic = qt_cmp_si_sort_flags & QDir::IgnoreCase;        if (f1->filename_cache.isNull())            f1->filename_cache = ic ? f1->item.fileName().toLower()                                    : f1->item.fileName();        if (f2->filename_cache.isNull())            f2->filename_cache = ic ? f2->item.fileName().toLower()                                    : f2->item.fileName();	r = qt_cmp_si_sort_flags & QDir::LocaleAware            ? f1->filename_cache.localeAwareCompare(f2->filename_cache)            : f1->filename_cache.compare(f2->filename_cache);    }    if (r == 0) // Enforce an order - the order the items appear in the array        r = (char*)n1 - (char*)n2;    if (qt_cmp_si_sort_flags & QDir::Reversed)        return -r;    return r;}#if defined(Q_C_CALLBACKS)}#endifinline void QDirPrivate::sortFileList(QDir::SortFlags sort, QStringList &l,                                      QStringList *names, QFileInfoList *infos) const{    if(names)        names->clear();    if(infos)        infos->clear();    if(!l.isEmpty()) {        QDirSortItem *si= new QDirSortItem[l.count()];        int i;        for (i = 0; i < l.size(); ++i) {            QString path = data->path;            if (!path.isEmpty() && !path.endsWith(QLatin1Char('/')))                path += QLatin1Char('/');            si[i].item = QFileInfo(path + l.at(i));        }        qt_cmp_si_sort_flags = sort;        qsort(si, i, sizeof(si[0]), qt_cmp_si);        // put them back in the list(s)        for (int j = 0; j<i; j++) {            if(infos)                infos->append(si[j].item);            if(names)                names->append(si[j].item.fileName());        }        delete [] si;    }}inline void QDirPrivate::updateFileLists() const{    if(data->listsDirty) {        QStringList l = data->fileEngine->entryList(data->filters, data->nameFilters);        sortFileList(data->sort, l, &data->files, &data->fileInfos);        data->listsDirty = 0;    }}void QDirPrivate::initFileEngine(const QString &path){    detach(false);    delete data->fileEngine;    data->fileEngine = 0;    data->clear();    data->fileEngine = QAbstractFileEngine::create(path);}void QDirPrivate::detach(bool createFileEngine){    qAtomicDetach(data);    if (createFileEngine) {        delete data->fileEngine;        data->fileEngine = QAbstractFileEngine::create(data->path);    }}/*!    \class QDir    \brief The QDir class provides access to directory structures and their contents.    \ingroup io    \ingroup shared    \reentrant    \mainclass    A QDir is used to manipulate path names, access information    regarding paths and files, and manipulate the underlying file    system. It can also be used to access Qt's \l{resource system}.    Qt uses "/" as a universal directory separator in the same way    that "/" is used as a path separator in URLs. If you always use    "/" as a directory separator, Qt will translate your paths to    conform to the underlying operating system.    A QDir can point to a file using either a relative or an absolute    path. Absolute paths begin with the directory separator    (optionally preceded by a drive specification under Windows).    Relative file names begin with a directory name or a file name and    specify a path relative to the current directory.    Examples of absolute paths:    \code    QDir("/home/user/Documents")    QDir("C:/Documents and Settings")    \endcode    On Windows, the second of the examples above will be translated to    \c{C:\My Documents} when used to access files.    Examples of relative paths:    \code    QDir("images/landscape.png")    \endcode    You can use the isRelative() or isAbsolute() functions to check if    a QDir is using a relative or an absolute file path. Call    makeAbsolute() to convert a relative QDir to an absolute one.    \section1 Navigation and Directory Operations    A directory's path can be obtained with the path() function, and    a new path set with the setPath() function. The absolute path to    a directory is found by calling absolutePath().    The name of a directory is found using the dirName() function. This    typically returns the last element in the absolute path that specifies    the location of the directory. However, it can also return "." if    the QDir represents the current directory.    \code    QDir("Documents/Letters/Applications").dirName() // "Applications"    QDir().dirName()                                 // "."    \endcode    The path for a directory can also be changed with the cd() and cdUp()    functions, both of which operate like familiar shell commands.    When cd() is called with the name of an existing directory, the QDir    object changes directory so that it represents that directory instead.    The cdUp() function changes the directory of the QDir object so that    it refers to its parent directory; i.e. cd("..") is equivalent to    cdUp().    Directories can be created with mkdir(), renamed with rename(), and    removed with rmdir().    You can test for the presence of a directory with a given name by    using exists(), and the properties of a directory can be tested with    isReadable(), isAbsolute(), isRelative(), and isRoot().    The refresh() function re-reads the directory's data from disk.    \section1 Files and Directory Contents    Directories contain a number of entries, representing files,    directories, and symbolic links. The number of entries in a    directory is returned by count().    A string list of the names of all the entries in a directory can be    obtained with entryList(). If you need information about each    entry, use entryInfoList() to obtain a list of QFileInfo objects.    Paths to files and directories within a directory can be    constructed using filePath() and absoluteFilePath().    The filePath() function returns a path to the specified file    or directory relative to the path of the QDir object;    absoluteFilePath() returns an absolute path to the specified    file or directory. Neither of these functions checks for the    existence of files or directory; they only construct paths.    \code    QDir directory("Documents/Letters");    QString path = directory.filePath("contents.txt");    QString absolutePath = directory.absoluteFilePath("contents.txt");    \endcode    Files can be removed by using the remove() function. Directories    cannot be removed in the same way as files; use rmdir() to remove    them instead.    It is possible to reduce the number of entries returned by    entryList() and entryInfoList() by applying filters to a QDir object.    You can apply a name filter to specify a pattern with wildcards that    file names need to match, an attribute filter that selects properties    of entries and can distinguish between files and directories, and a    sort order.    Name filters are lists of strings that are passed to setNameFilters().    Attribute filters consist of a bitwise OR combination of Filters, and    these are specified when calling setFilter().    The sort order is specified using setSorting() with a bitwise OR    combination of SortFlags.    You can test to see if a filename matches a filter using the match()    function.    Filter and sort order flags may also be specified when calling    entryList() and entryInfoList() in order to override previously defined    behavior.    \section1 The Current Directory and Other Special Paths    Access to some common directories is provided with a number of static    functions that return QDir objects. There are also corresponding functions    for these that return strings:    \table    \header \o QDir      \o QString         \o Return Value    \row    \o current() \o currentPath()   \o The application's working directory    \row    \o home()    \o homePath()      \o The user's home directory    \row    \o root()    \o rootPath()      \o The root directory    \row    \o temp()    \o tempPath()      \o The system's temporary directory    \endtable    The setCurrent() static function can also be used to set the application's    working directory.    If you want to find the directory containing the application's executable,    see \l{QCoreApplication::applicationDirPath()}.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩日本视频| 亚洲手机成人高清视频| 国产精品午夜久久| 日本不卡高清视频| 本田岬高潮一区二区三区| 91精品国产一区二区三区香蕉| 久久综合狠狠综合久久综合88| 一区二区三区在线高清| 国产精品99久| 欧美一区二区视频在线观看| 亚洲欧美韩国综合色| 久久成人av少妇免费| 欧美在线观看一区| 亚洲欧美综合色| 卡一卡二国产精品| 欧美日韩国产一区| 一二三四社区欧美黄| av资源网一区| 久久久久9999亚洲精品| 蜜桃av噜噜一区| 欧美久久久一区| 亚洲国产精品久久久久秋霞影院| 国产乱码精品1区2区3区| 日韩一区二区三区电影在线观看 | 国产v综合v亚洲欧| 日韩欧美一级在线播放| 婷婷综合另类小说色区| 91精品办公室少妇高潮对白| 中文字幕亚洲不卡| 92精品国产成人观看免费| 中文字幕欧美激情一区| 国产一区二区三区蝌蚪| 日韩欧美亚洲一区二区| 六月丁香综合在线视频| 欧美一级免费大片| 久久精品国产999大香线蕉| 日韩欧美国产精品一区| 日韩精品亚洲专区| 欧美va在线播放| 久久99久久99| 久久蜜臀中文字幕| 国产成人一区在线| 亚洲欧美一区二区在线观看| 成人美女视频在线观看18| 中文字幕久久午夜不卡| 91看片淫黄大片一级在线观看| 中文字幕视频一区| 欧美日韩精品综合在线| 免费视频最近日韩| 久久美女艺术照精彩视频福利播放| 韩国三级中文字幕hd久久精品| 久久毛片高清国产| 91一区二区在线| 亚洲成人午夜电影| www国产成人免费观看视频 深夜成人网| 国产成人综合自拍| 国产精品欧美久久久久无广告| av中文一区二区三区| 一区二区三区在线不卡| 日韩免费一区二区三区在线播放| 国内久久精品视频| 亚洲精品五月天| 欧美一区二区三区视频在线 | 日韩欧美激情在线| 成人午夜免费av| 亚洲国产乱码最新视频| 久久综合九色综合97婷婷| 色综合久久久久久久久久久| 偷拍日韩校园综合在线| 亚洲精品一线二线三线无人区| 成人av资源网站| 亚洲电影激情视频网站| 久久九九影视网| 欧美日韩国产天堂| 99综合影院在线| 裸体歌舞表演一区二区| 日韩伦理免费电影| 欧美mv日韩mv亚洲| 欧美在线观看你懂的| 国产高清在线精品| 日韩国产在线观看一区| 国产精品美女久久久久久久| 91精品久久久久久久91蜜桃 | 欧美偷拍一区二区| 成人激情免费视频| 久久er99精品| 午夜久久久久久电影| 亚洲天堂久久久久久久| 精品免费国产二区三区| 欧美日韩国产经典色站一区二区三区| 国产成人免费高清| 久久精品国产久精国产爱| 亚洲一级二级三级| 成人免费小视频| 国产三级欧美三级日产三级99| 欧美精品免费视频| 欧美丝袜丝nylons| 91免费版pro下载短视频| 国产在线精品国自产拍免费| 午夜精品国产更新| 一区二区三区在线观看视频| 欧美国产精品一区| 亚洲国产精品国自产拍av| 欧美岛国在线观看| 精品日韩一区二区三区免费视频| 欧美午夜在线一二页| 97se狠狠狠综合亚洲狠狠| 国产成人免费视| 国产成人免费在线观看不卡| 国产精品一区2区| 精品无码三级在线观看视频 | 亚洲a一区二区| 亚洲图片有声小说| 亚洲国产成人porn| 性感美女久久精品| 日韩电影在线一区二区三区| 亚洲成av人综合在线观看| 一区二区三区国产| 亚洲成av人影院| 日韩av不卡一区二区| 天堂久久一区二区三区| 五月天精品一区二区三区| 性感美女久久精品| 久久精品国产精品亚洲红杏| 日韩av一区二区三区四区| 日本va欧美va瓶| 久久99久久精品欧美| 精品午夜久久福利影院| 国产成人精品一区二| av成人老司机| 一本色道a无线码一区v| 欧美日韩欧美一区二区| 制服丝袜成人动漫| 亚洲精品一区二区三区香蕉| 国产日韩v精品一区二区| 国产精品盗摄一区二区三区| 一区二区在线看| 丝袜美腿亚洲综合| 国产一区二区三区久久悠悠色av| 成人h精品动漫一区二区三区| 99精品国产热久久91蜜凸| 欧美日韩一二三| 久久久精品tv| 亚洲免费av高清| 久久精品国产99久久6| av成人老司机| 欧美一区二区三区在线电影| 久久婷婷国产综合精品青草| 最新不卡av在线| 日本特黄久久久高潮| 大尺度一区二区| 欧美猛男男办公室激情| 久久久www免费人成精品| 亚洲猫色日本管| 激情欧美一区二区| 色婷婷av一区二区三区大白胸| 欧美一区二区性放荡片| 亚洲欧洲一区二区三区| 裸体歌舞表演一区二区| 日本黄色一区二区| 久久亚洲欧美国产精品乐播 | 在线观看视频91| 国产午夜精品一区二区 | 国产毛片一区二区| 日本丶国产丶欧美色综合| 精品成人a区在线观看| 亚洲一区二区三区四区在线观看 | 欧美精品丝袜久久久中文字幕| 中文无字幕一区二区三区| 婷婷综合在线观看| 99久久精品国产毛片| 欧美videofree性高清杂交| 一区二区三区欧美| 国产乱码精品一区二区三| 欧美精品乱码久久久久久| 国产精品久久久久久久久免费桃花 | 91官网在线免费观看| 欧美激情资源网| 国产一区在线观看视频| 欧美精品色一区二区三区| 一区二区三区色| 99综合电影在线视频| 国产欧美一区二区精品性色 | 久久免费的精品国产v∧| 热久久国产精品| 欧美高清视频一二三区| 艳妇臀荡乳欲伦亚洲一区| 91免费看视频| 亚洲色图在线播放| 成人a级免费电影| 日本一区二区电影| 国产成人精品午夜视频免费| 精品国产亚洲在线| 精品亚洲porn| 久久久亚洲高清| 激情综合网最新| 久久精品一区二区三区不卡| 极品美女销魂一区二区三区| 欧美精品一区二区三区高清aⅴ| 免费欧美日韩国产三级电影|