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

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

?? qfile.cpp

?? QT 開發(fā)環(huán)境里面一個很重要的文件
?? 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 "qplatformdefs.h"#include "qfile.h"#include "qfsfileengine.h"#include "qtemporaryfile.h"#include "qlist.h"#include "qfileinfo.h"#include "private/qiodevice_p.h"#include "private/qfile_p.h"#include "private/qunicodetables_p.h"#if defined(QT_BUILD_CORE_LIB)# include "qcoreapplication.h"#endif#include <errno.h>static QByteArray locale_encode(const QString &f){#ifndef Q_OS_DARWIN    return f.toLocal8Bit();#else    // Mac always expects UTF-8    return f.toUtf8();#endif}static QString locale_decode(const QByteArray &f){#ifndef Q_OS_DARWIN    return QString::fromLocal8Bit(f);#else    // Mac always expects UTF-8    return QUnicodeTables::normalize(QString::fromUtf8(f), QString::NormalizationForm_C);#endif}//************* QFilePrivateQFile::EncoderFn QFilePrivate::encoder = locale_encode;QFile::DecoderFn QFilePrivate::decoder = locale_decode;QFilePrivate::QFilePrivate()    : fileEngine(0), error(QFile::NoError){}QFilePrivate::~QFilePrivate(){    delete fileEngine;    fileEngine = 0;}boolQFilePrivate::openExternalFile(int flags, int fd){    delete fileEngine;    QFSFileEngine *fe = new QFSFileEngine;    fe->setFileName(fileName);    fileEngine = fe;    return fe->open(QIODevice::OpenMode(flags), fd);}boolQFilePrivate::openExternalFile(int flags, FILE *fh){    delete fileEngine;    QFSFileEngine *fe = new QFSFileEngine;    fe->setFileName(fileName);    fileEngine = fe;    return fe->open(QIODevice::OpenMode(flags), fh);}voidQFilePrivate::setError(QFile::FileError err){    error = err;    errorString.clear();}voidQFilePrivate::setError(QFile::FileError err, const QString &errStr){    Q_Q(QFile);    error = err;    q->setErrorString(errStr);}voidQFilePrivate::setError(QFile::FileError err, int errNum){    Q_Q(QFile);    error = err;    q->setErrorString(qt_error_string(errNum));}//************* QFile/*!    \class QFile    \brief The QFile class provides an interface for reading from and writing to files.    \ingroup io    \mainclass    \reentrant    QFile is an I/O device for reading and writing text and binary    files and \l{The Qt Resource System}{resources}. A QFile may be    used by itself or, more conveniently, with a QTextStream or    QDataStream.    The file name is usually passed in the constructor, but it can be    set at any time using setFileName(). You can check for a file's    existence using exists(), and remove a file using remove(). (More    advanced file system related operations are provided by QFileInfo    and QDir.)    The file is opened with open(), closed with close(), and flushed    with flush(). Data is usually read and written using QDataStream    or QTextStream, but you can also call the QIODevice-inherited    functions read(), readLine(), readAll(), write(). QFile also    inherits getChar(), putChar(), and ungetChar(), which work one    character at a time.    The size of the file is returned by size(). You can get the    current file position using pos(), or move to a new file position    using seek(). If you've reached the end of the file, atEnd()    returns true.    The following example reads a text file line by line:    \quotefromfile snippets/file/file.cpp    \skipto noStream_snippet    \skipto QFile    \printto /^\}/    The QIODevice::Text flag passed to open() tells Qt to convert    Windows-style line terminators ("\\r\\n") into C++-style    terminators ("\\n"). By default, QFile assumes binary, i.e. it    doesn't perform any conversion on the bytes stored in the file.    The next example uses QTextStream to read a text file    line by line:    \skipto readTextStream_snippet    \skipto QFile    \printto /^\}/    QTextStream takes care of converting the 8-bit data stored on    disk into a 16-bit Unicode QString. By default, it assumes that    the user system's local 8-bit encoding is used (e.g., ISO 8859-1    for most of Europe; see QTextCodec::codecForLocale() for    details). This can be changed using setCodec().    To write text, we can use operator<<(), which is overloaded to    take a QTextStream on the left and various data types (including    QString) on the right:    \skipto writeTextStream_snippet    \skipto QFile    \printto /^\}/    QDataStream is similar, in that you can use operator<<() to write    data and operator>>() to read it back. See the class    documentation for details.    When you use QFile, QFileInfo, and QDir to access the file system    with Qt, you can use Unicode file names. On Unix, these file    names are converted to an 8-bit encoding. If you want to use    standard C++ APIs (\c <cstdio> or \c <iostream>) or    platform-specific APIs to access files instead of QFile, you can    use the encodeName() and decodeName() functions to convert    between Unicode file names and 8-bit file names.    On Unix, there are some special system files (e.g. in \c /proc) for which    size() will always return 0, yet you may still be able to read more data    from such a file; the data is generated in direct response to you calling    read(). In this case, however, you cannot use atEnd() to determine if    there is more data to read (since atEnd() will return true for a file that    claims to have size 0). Instead, you should either call readAll(), or call    read() or readLine() repeatedly until no more data can be read. The next    example uses QTextStream to read \c /proc/modules line by line:    \skipto readRegularEmptyFile_snippet    \skipto QFile    \printto /^\}/    \sa QTextStream, QDataStream, QFileInfo, QDir, {The Qt Resource System}*//*!    \enum QFile::FileError    This enum describes the errors that may be returned by the error()    function.    \value NoError          No error occurred.    \value ReadError        An error occurred when reading from the file.    \value WriteError       An error occurred when writing to the file.    \value FatalError       A fatal error occurred.    \value ResourceError    \value OpenError        The file could not be opened.    \value AbortError       The operation was aborted.    \value TimeOutError     A timeout occurred.    \value UnspecifiedError An unspecified error occurred.    \value RemoveError      The file could not be removed.    \value RenameError      The file could not be renamed.    \value PositionError    The position in the file could not be changed.    \value ResizeError      The file could not be resized.    \value PermissionsError The file could not be accessed.    \value CopyError        The file could not be copied.    \omitvalue ConnectError*//*!    \enum QFile::Permission    This enum is used by the permission() function to report the    permissions and ownership of a file. The values may be OR-ed    together to test multiple permissions and ownership values.    \value ReadOwner The file is readable by the owner of the file.    \value WriteOwner The file is writable by the owner of the file.    \value ExeOwner The file is executable by the owner of the file.    \value ReadUser The file is readable by the user.    \value WriteUser The file is writable by the user.    \value ExeUser The file is executable by the user.    \value ReadGroup The file is readable by the group.    \value WriteGroup The file is writable by the group.    \value ExeGroup The file is executable by the group.    \value ReadOther The file is readable by anyone.    \value WriteOther The file is writable by anyone.    \value ExeOther The file is executable by anyone.    \warning Because of differences in the platforms supported by Qt,    the semantics of ReadUser, WriteUser and ExeUser are    platform-dependent: On Unix, the rights of the owner of the file    are returned and on Windows the rights of the current user are    returned. This behavior might change in a future Qt version.*/#ifdef QT3_SUPPORT/*!    \typedef QFile::PermissionSpec    Use QFile::Permission instead.*/#endif#ifdef QT_NO_QOBJECTQFile::QFile()    : QIODevice(*new QFilePrivate){}QFile::QFile(const QString &name)    : QIODevice(*new QFilePrivate){    d_func()->fileName = name;}QFile::QFile(QFilePrivate &dd)    : QIODevice(dd){}#else/*!    \internal*/QFile::QFile()    : QIODevice(*new QFilePrivate, 0){}/*!    Constructs a new file object with the given \a parent.*/QFile::QFile(QObject *parent)    : QIODevice(*new QFilePrivate, parent){}/*!    Constructs a new file object to represent the file with the given \a name.*/QFile::QFile(const QString &name)    : QIODevice(*new QFilePrivate, 0){    Q_D(QFile);    d->fileName = name;}/*!    Constructs a new file object with the given \a parent to represent the    file with the specified \a name.*/QFile::QFile(const QString &name, QObject *parent)    : QIODevice(*new QFilePrivate, parent){    Q_D(QFile);    d->fileName = name;}/*!    \internal*/QFile::QFile(QFilePrivate &dd, QObject *parent)    : QIODevice(dd, parent){}#endif/*!    Destroys the file object, closing it if necessary.*/QFile::~QFile(){    close();#ifdef QT_NO_QOBJECT    delete d_ptr;#endif}/*!    Returns the name set by setFileName().    \sa setFileName(), QFileInfo::fileName()*/QString QFile::fileName() const{    return fileEngine()->fileName(QAbstractFileEngine::DefaultName);}/*!    Sets the \a name of the file. The name can have no path, a    relative path, or an absolute path.    Do not call this function if the file has already been opened.    If the file name has no path or a relative path, the path used    will be the application's current directory path    \e{at the time of the open()} call.    Example:    \code        QFile file;        QDir::setCurrent("/tmp");        file.setFileName("readme.txt");        QDir::setCurrent("/home");        file.open(QIODevice::ReadOnly);      // opens "/home/readme.txt" under Unix    \endcode    Note that the directory separator "/" works for all operating    systems supported by Qt.    \sa fileName(), QFileInfo, QDir*/voidQFile::setFileName(const QString &name){    Q_D(QFile);    if (isOpen()) {        qWarning("QFile::setFileName: File is already opened");        close();    }    if(d->fileEngine) { //get a new file engine later        delete d->fileEngine;        d->fileEngine = 0;    }    d->fileName = name;}/*!    \fn QString QFile::decodeName(const char *localFileName)    \overload    Returns the Unicode version of the given \a localFileName. See    encodeName() for details.*//*!    By default, this function converts \a fileName to the local 8-bit    encoding determined by the user's locale. This is sufficient for    file names that the user chooses. File names hard-coded into the    application should only use 7-bit ASCII filename characters.    \sa decodeName() setEncodingFunction()*/QByteArrayQFile::encodeName(const QString &fileName){    return (*QFilePrivate::encoder)(fileName);}/*!    \typedef QFile::EncoderFn    This is a typedef for a pointer to a function with the following    signature:    \code        QByteArray myEncoderFunc(const QString &fileName);    \endcode    \sa setEncodingFunction(), encodeName()*//*!    This does the reverse of QFile::encodeName() using \a localFileName.    \sa setDecodingFunction(), encodeName()*/QStringQFile::decodeName(const QByteArray &localFileName){    return (*QFilePrivate::decoder)(localFileName);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产网站一区二区三区| 亚洲最快最全在线视频| 欧美午夜精品久久久久久孕妇| 亚洲123区在线观看| 久久久亚洲国产美女国产盗摄| 色婷婷精品大在线视频| 蜜臀av性久久久久蜜臀aⅴ| 91精品国产综合久久精品| 91亚洲国产成人精品一区二区三| 亚洲一二三区在线观看| 国产精品嫩草99a| 欧美日韩一区二区三区四区| 毛片基地黄久久久久久天堂| 亚洲va韩国va欧美va| 国产色综合一区| 精品少妇一区二区三区免费观看 | 久久婷婷国产综合精品青草 | 在线精品视频小说1| 国产一区二区三区免费| 蜜桃视频在线一区| 亚洲精品国产视频| 日韩精品综合一本久道在线视频| 色婷婷激情综合| 国产美女一区二区| 国内精品免费在线观看| 亚洲综合色网站| 久久美女高清视频| 欧美成人精品高清在线播放| 欧美日韩精品系列| 欧美影院一区二区| 97se狠狠狠综合亚洲狠狠| 成人v精品蜜桃久久一区| 国产一区二区主播在线| 亚洲电影在线播放| 亚洲成人一区在线| 亚洲综合色网站| 亚洲自拍偷拍图区| 亚洲人成精品久久久久久| 国产精品国产精品国产专区不片| 精品人伦一区二区色婷婷| 日韩精品一区二区三区中文精品| 欧美少妇xxx| 色一区在线观看| 欧美色图激情小说| 色婷婷av一区二区三区软件| 91丨九色丨蝌蚪丨老版| 国产宾馆实践打屁股91| 国产91精品久久久久久久网曝门| 美女视频免费一区| 久久精品国产在热久久| 国产一区二区在线观看视频| 伦理电影国产精品| 国产在线视频精品一区| 国产毛片一区二区| 成人精品高清在线| 精品对白一区国产伦| 国产亚洲视频系列| 中文字幕一区二区在线观看| 一区二区三区在线免费观看| 亚洲国产一区二区视频| 天堂av在线一区| 精品一区二区精品| 国内成+人亚洲+欧美+综合在线| 国产成人鲁色资源国产91色综| 国产福利一区二区三区视频| 9色porny自拍视频一区二区| 91麻豆视频网站| 欧美日韩国产一区| 欧美精品日韩精品| 日韩视频一区二区| 欧美日韩精品一区二区天天拍小说| 欧美三级乱人伦电影| 91精品国产入口| 精品少妇一区二区三区在线播放| 国产精品拍天天在线| 亚洲丝袜另类动漫二区| 日本少妇一区二区| 国产精品亚洲一区二区三区在线| 99视频精品在线| 欧美自拍丝袜亚洲| 26uuuu精品一区二区| 国产欧美在线观看一区| 亚洲欧洲99久久| 亚洲伊人伊色伊影伊综合网| 日韩激情在线观看| 成人av影院在线| 在线观看不卡一区| 久久色在线视频| 日韩一区在线播放| 久久精品国产99| 不卡的电视剧免费网站有什么| 91精彩视频在线观看| 国产成人综合在线| 色国产综合视频| 日韩精品一区二区三区四区 | 一区二区三区四区在线| 三级亚洲高清视频| 不卡av电影在线播放| 欧美日韩国产一二三| 日韩视频免费观看高清完整版 | 蜜臀va亚洲va欧美va天堂| 国产成人av在线影院| 6080日韩午夜伦伦午夜伦| 国产亚洲va综合人人澡精品| 婷婷综合另类小说色区| 国产成人免费视频网站 | 一区二区在线观看视频| 久久er精品视频| 在线看国产一区| 国产欧美一区二区精品性| 日本aⅴ精品一区二区三区 | 欧美无砖专区一中文字| 国产精品污www在线观看| 婷婷综合在线观看| 欧洲精品一区二区三区在线观看| 精品999久久久| 蜜臀av一级做a爰片久久| 99r国产精品| 国产精品你懂的在线欣赏| 麻豆国产精品777777在线| 色老综合老女人久久久| 2024国产精品| 天天综合色天天| 色噜噜久久综合| 国产精品超碰97尤物18| 国产成人av影院| 欧美大片顶级少妇| 亚洲成人www| 欧美性色综合网| 国产精品大尺度| 国产成人亚洲综合a∨婷婷图片| 不卡电影免费在线播放一区| 欧美激情资源网| 国内精品久久久久影院一蜜桃| 欧美一区二区三区播放老司机| 亚洲男人都懂的| 日本韩国视频一区二区| 中文字幕在线观看一区| 天天综合色天天| 欧美日韩亚洲综合一区| 亚洲综合一二区| 欧美色图12p| 亚洲国产成人高清精品| 欧美专区日韩专区| 亚洲精品成人少妇| 99国产精品国产精品毛片| 亚洲蜜桃精久久久久久久| 成人一区二区三区在线观看| 国产精品亲子乱子伦xxxx裸| 丁香六月综合激情| 亚洲手机成人高清视频| 一本色道a无线码一区v| 国产精品亲子乱子伦xxxx裸| 99久久久久免费精品国产| 欧美极品aⅴ影院| 91麻豆福利精品推荐| 亚洲欧美成人一区二区三区| 欧美三级电影在线观看| 亚洲成人中文在线| 精品国精品自拍自在线| 国产毛片精品视频| 亚洲欧洲www| 一本大道久久a久久精二百| 亚洲国产视频一区二区| 精品婷婷伊人一区三区三| 一区二区三区久久久| 欧美精品久久久久久久多人混战 | 亚洲色图另类专区| 欧美三级中文字幕在线观看| 爽好多水快深点欧美视频| 欧美精品一区二区三区四区| 韩国理伦片一区二区三区在线播放| 欧美一级高清大全免费观看| 精品亚洲国内自在自线福利| 欧美日韩久久久久久| 国产一区二区精品久久| 欧美激情一区二区三区全黄| 91视频xxxx| 亚洲综合一区二区| 亚洲精品在线观看视频| 成人黄色综合网站| 偷偷要91色婷婷| 久久亚洲精华国产精华液| 欧美在线free| 蜜桃av噜噜一区| 国产精品超碰97尤物18| 欧美日韩在线播放一区| 久久99精品久久只有精品| 国产欧美精品在线观看| av日韩在线网站| 久久丁香综合五月国产三级网站 | 日韩精品一区二区三区四区视频 | 久久亚洲欧美国产精品乐播| 成人高清伦理免费影院在线观看| 亚洲欧美色图小说| 欧美精品一二三区| av激情综合网| 久久精品国产精品亚洲红杏| 一区二区激情小说| 精品国产凹凸成av人导航|