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

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

?? qsettings.cpp

?? QT 開發(fā)環(huán)境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
    QString currentSection;    int currentSectionStart = 0;    int dataPos = 0;    int lineStart;    int lineLen;    int equalsPos;    bool ok = true;    while (readIniLine(data, dataPos, lineStart, lineLen, equalsPos)) {        char ch = data.at(lineStart);        if (ch == '[') {            FLUSH_CURRENT_SECTION();            // this is a section            QByteArray iniSection;            int idx = data.indexOf(']', lineStart);            if (idx == -1 || idx >= lineStart + lineLen) {                ok = false;                iniSection = data.mid(lineStart + 1, lineLen - 1);            } else {                iniSection = data.mid(lineStart + 1, idx - lineStart - 1);            }            iniSection = iniSection.trimmed();            if (qstricmp(iniSection, "general") == 0) {                currentSection.clear();            } else {                if (qstricmp(iniSection, "%general") == 0) {                    currentSection = QLatin1String(iniSection.constData() + 1);                } else {                    currentSection.clear();                    iniUnescapedKey(iniSection, 0, iniSection.size(), currentSection);                }                currentSection += QLatin1Char('/');            }            currentSectionStart = dataPos;        }    }    Q_ASSERT(lineStart == data.length());    FLUSH_CURRENT_SECTION();    return ok;#undef FLUSH_CURRENT_SECTION}bool QConfFileSettingsPrivate::readIniSection(const QSettingsKey &section, const QByteArray &data,                                              ParsedSettingsMap *settingsMap){    QStringList strListValue;    bool sectionIsLowercase = (section == section.originalCaseKey());    int equalsPos;    bool ok = true;    int dataPos = 0;    int lineStart;    int lineLen;    while (readIniLine(data, dataPos, lineStart, lineLen, equalsPos)) {        char ch = data.at(lineStart);        Q_ASSERT(ch != '[');        if (equalsPos == -1) {            if (ch != ';')                ok = false;            continue;        }        int keyEnd = equalsPos;        while (keyEnd > lineStart && ((ch = data.at(keyEnd - 1)) == ' ' || ch == '\t'))            --keyEnd;        int valueStart = equalsPos + 1;        QString key = section.originalCaseKey();        bool keyIsLowercase = (iniUnescapedKey(data, lineStart, keyEnd, key) && sectionIsLowercase);        QString strValue;        strValue.reserve(lineLen - (valueStart - lineStart));        bool isStringList = iniUnescapedStringList(data, valueStart, lineStart + lineLen,                                                   strValue, strListValue);        QVariant variant;        if (isStringList) {            variant = stringListToVariantList(strListValue);        } else {            variant = stringToVariant(strValue);        }        /*            We try to avoid the expensive toLower() call in            QSettingsKey by passing Qt::CaseSensitive when the            key is already in lowercase.        */        settingsMap->insert(QSettingsKey(key, keyIsLowercase ? Qt::CaseSensitive                                                             : IniCaseSensitivity),                            variant);    }    return ok;}bool QConfFileSettingsPrivate::writeIniFile(QIODevice &device, const ParsedSettingsMap &map){    typedef QMap<QString, QVariantMap> IniMap;    IniMap iniMap;    IniMap::const_iterator i;#ifdef Q_OS_WIN    const char * const eol = "\r\n";#else    const char eol = '\n';#endif    for (ParsedSettingsMap::const_iterator j = map.constBegin(); j != map.constEnd(); ++j) {        QString section;        QString key = j.key().originalCaseKey();        int slashPos;        if ((slashPos = key.indexOf(QLatin1Char('/'))) != -1) {            section = key.left(slashPos);            key.remove(0, slashPos + 1);        }        iniMap[section][key] = j.value();    }    bool writeError = false;    for (i = iniMap.constBegin(); !writeError && i != iniMap.constEnd(); ++i) {        QByteArray realSection;        iniEscapedKey(i.key(), realSection);        if (realSection.isEmpty()) {            realSection = "[General]";        } else if (qstricmp(realSection, "general") == 0) {            realSection = "[%General]";        } else {            realSection.prepend('[');            realSection.append(']');        }        if (i != iniMap.constBegin())            realSection.prepend(eol);        realSection += eol;        device.write(realSection);        const QVariantMap &ents = i.value();        for (QVariantMap::const_iterator j = ents.constBegin(); j != ents.constEnd(); ++j) {            QByteArray block;            iniEscapedKey(j.key(), block);            block += '=';            const QVariant &value = j.value();            /*                The size() != 1 trick is necessary because                QVariant(QString("foo")).toList() returns an empty                list, not a list containing "foo".            */            if (value.type() == QVariant::StringList                    || (value.type() == QVariant::List && value.toList().size() != 1)) {                iniEscapedStringList(variantListToStringList(value.toList()), block);            } else {                iniEscapedString(variantToString(value), block);            }            block += eol;            if (device.write(block) == -1) {                writeError = true;                break;            }        }    }    return !writeError;}void QConfFileSettingsPrivate::ensureAllSectionsParsed(QConfFile *confFile) const{    UnparsedSettingsMap::const_iterator i = confFile->unparsedIniSections.constBegin();    const UnparsedSettingsMap::const_iterator end = confFile->unparsedIniSections.constEnd();    for (; i != end; ++i) {        if (!QConfFileSettingsPrivate::readIniSection(i.key(), i.value(), &confFile->originalKeys))            setStatus(QSettings::FormatError);    }    confFile->unparsedIniSections.clear();}void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,                                                   const QSettingsKey &key) const{    if (confFile->unparsedIniSections.isEmpty())        return;    UnparsedSettingsMap::iterator i;    int indexOfSlash = key.indexOf(QLatin1Char('/'));    if (indexOfSlash != -1) {        i = confFile->unparsedIniSections.upperBound(key);        if (i == confFile->unparsedIniSections.begin())            return;        --i;        if (i.key().isEmpty() || !key.startsWith(i.key()))            return;    } else {        i = confFile->unparsedIniSections.begin();        if (i == confFile->unparsedIniSections.end() || !i.key().isEmpty())            return;    }    if (!QConfFileSettingsPrivate::readIniSection(i.key(), i.value(), &confFile->originalKeys))        setStatus(QSettings::FormatError);    confFile->unparsedIniSections.erase(i);}/*!    \class QSettings    \brief The QSettings class provides persistent platform-independent application settings.    \ingroup io    \ingroup misc    \mainclass    \reentrant    Users normally expect an application to remember its settings    (window sizes and positions, options, etc.) across sessions. This    information is often stored in the system registry on Windows,    and in XML preferences files on Mac OS X. On Unix systems, in the    absence of a standard, many applications (including the KDE    applications) use INI text files.    QSettings is an abstraction around these technologies, enabling    you to save and restore application settings in a portable    manner. It also supports \l{registerFormat()}{custom storage    formats}.    QSettings's API is based on QVariant, allowing you to save    most value-based types, such as QString, QRect, and QImage,    with the minimum of effort.    If all you need is a non-persistent memory-based structure,    consider using QMap<QString, QVariant> instead.    \tableofcontents section1    \section1 Basic Usage    When creating a QSettings object, you must pass the name of your    company or organization as well as the name of your application.    For example, if your product is called Star Runner and your    company is called MySoft, you would construct the QSettings    object as follows:    \quotefromfile snippets/settings/settings.cpp    \skipuntil snippet_ctor1    \skipline {    \printline QSettings settings    QSettings objects can be created either on the stack or on    the heap (i.e. using \c new). Constructing and destroying a    QSettings object is very fast.    If you use QSettings from many places in your application, you    might want to specify the organization name and the application    name using QCoreApplication::setOrganizationName() and    QCoreApplication::setApplicationName(), and then use the default    QSettings constructor:    \skipuntil snippet_ctor2    \skipline {    \printline setOrganizationName    \printline setOrganizationDomain    \printline setApplicationName    \dots    \printline QSettings settings;    (Here, we also specify the organization's Internet domain. When    the Internet domain is set, it is used on Mac OS X instead of the    organization name, since Mac OS X applications conventionally use    Internet domains to identify themselves. If no domain is set, a    fake domain is derived from the organization name. See the    \l{Platform-Specific Notes} below for details.)    QSettings stores settings. Each setting consists of a QString    that specifies the setting's name (the \e key) and a QVariant    that stores the data associated with the key. To write a setting,    use setValue(). For example:    \printline setValue(    If there already exists a setting with the same key, the existing    value is overwritten by the new value. For efficiency, the    changes may not be saved to permanent storage immediately. (You    can always call sync() to commit your changes.)    You can get a setting's value back using value():    \printline settings.value(    If there is no setting with the specified name, QSettings    returns a null QVariant (which can be converted to the integer 0).    You can specify another default value by passing a second    argument to value():    \skipline {    \printline /settings.value\(.*,.*\)/    \skipline }    To test whether a given key exists, call contains(). To remove    the setting associated with a key, call remove(). To obtain the    list of all keys, call allKeys(). To remove all keys, call    clear().    \section1 QVariant and GUI Types    Because QVariant is part of the \l QtCore library, it cannot provide    conversion functions to data types such as QColor, QImage, and    QPixmap, which are part of \l QtGui. In other words, there is no    \c toColor(), \c toImage(), or \c toPixmap() functions in QVariant.    Instead, you can use the QVariant::value() or the qVariantValue()    template function. For example:    \code        QSettings settings("MySoft", "Star Runner");        QColor color = settings.value("DataPump/bgcolor").value<QColor>();    \endcode    The inverse conversion (e.g., from QColor to QVariant) is    automatic for all data types supported by QVariant, including    GUI-related types:    \code        QSettings settings("MySoft", "Star Runner");        QColor color = palette().background().color();        settings.setValue("DataPump/bgcolor", color);    \endcode    Custom types registered using qRegisterMetaType() and    qRegisterMetaTypeStreamOperators() can be stored using QSettings.    \section1 Key Syntax    Setting keys can contain any Unicode characters. The Windows    registry and INI files use case-insensitive keys, whereas the    Carbon Preferences API on Mac OS X uses case-sensitive keys. To    avoid portability problems, follow these two simple rules:    \list 1    \o Always refer to the same key using the same case. For example,       if you refer to a key as "text fonts" in one place in your       code, don't refer to it as "Text Fonts" somewhere else.    \o Avoid key names that are identical except for the case. For       example, if you have a key called "MainWindow", don't try to       save another key as "mainwindow".    \endlist    You can form hierarchical keys using the '/' character as a    separator, similar to Unix file paths. For example:    \printline setValue    \printline setValue    \printline setValue    If you want to save or restore many settings with the same    prefix, you can specify the prefix using beginGroup() and call    endGroup() at the end. Here's the same example again, but this    time using the group mechanism:    \printline beginGroup    \printuntil endGroup    \printline beginGroup    \printuntil endGroup    If a group is set using beginGroup(), the behavior of most    functions changes consequently. Groups can be set recursively.    In addition to groups, QSettings also supports an "array"    concept. See beginReadArray() and beginWriteArray() for details.    \section1 Fallback Mechanism    Let's assume that you have created a QSettings object with the    organization name MySoft and the application name Star Runner.    When you look up a value, up to four locations are searched in    that order:    \list 1    \o a user-specific location for the Star Runner application    \o a user-specific location for all applications by MySoft    \o a system-wide location for the Star Runner application    \o a system-wide location for all applications by MySoft    \endlist    (See \l{Platform-Specific Notes} below for information on what    these locations are on the different platforms supported by Qt.)    If a key cannot be found in the first location, the search goes    on in the second location, and so on. This enables you to store    system-wide or organization-wide settings and to override them on    a per-user or per-application basis. To turn off this mechanism,    call setFallbacksEnabled(false).    Although keys from all four locations are available for reading,    only the first file (the user-specific location for the    application at hand) is accessible for writing. To write to any    of the other files, omit the application name and/or specify    QSettings::SystemScope (as opposed to QSettings::UserScope, the    default).    Let's see with an example:    \skipuntil snippet_locations    \skipline {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米精品一区二区三区四区| 国产精品午夜在线观看| 成人午夜视频福利| 寂寞少妇一区二区三区| 青青国产91久久久久久| 婷婷综合在线观看| 亚洲午夜一二三区视频| 亚洲最快最全在线视频| 亚洲黄色片在线观看| 中文字幕成人av| 国产精品拍天天在线| 欧美经典一区二区三区| 国产亚洲va综合人人澡精品 | 中文字幕欧美一区| 国产欧美视频一区二区三区| 国产精品久久久久影院亚瑟| 亚洲免费av观看| 亚洲国产视频一区| 视频在线在亚洲| 激情综合色综合久久综合| 久久99精品国产91久久来源| 国产另类ts人妖一区二区| aaa亚洲精品| 欧美日韩国产精选| 精品国产区一区| 国产欧美一区二区精品仙草咪 | 国产精品你懂的| 玉米视频成人免费看| 日韩电影免费一区| 国产福利91精品一区二区三区| 丁香另类激情小说| 欧洲av在线精品| 精品成人一区二区三区| 亚洲欧美影音先锋| 青青草成人在线观看| 国产成人自拍网| 欧美日韩的一区二区| 久久日韩粉嫩一区二区三区| 夜夜揉揉日日人人青青一国产精品| 亚洲成人动漫av| 国产一区二区三区黄视频 | 在线电影欧美成精品| 日韩美女视频在线| 自拍偷自拍亚洲精品播放| 免费人成黄页网站在线一区二区| 高清久久久久久| 欧美日韩成人高清| 国产精品福利影院| 免费高清不卡av| 在线观看中文字幕不卡| 久久伊人蜜桃av一区二区| 亚洲一区二区三区在线看| 国产精品白丝av| 制服视频三区第一页精品| 国产精品电影一区二区| 久久97超碰色| 欧美日本一区二区在线观看| 国产精品三级电影| 国产一区二区三区在线观看免费| 欧美三级日韩在线| 国产精品午夜春色av| 精品午夜一区二区三区在线观看| 欧美视频一区二区三区四区 | 国产日韩欧美高清在线| 久久精品国产精品亚洲红杏| 欧美在线制服丝袜| 国产精品久久久久久久久免费丝袜| 免费在线看成人av| 欧美视频在线播放| 亚洲最大的成人av| 91色porny在线视频| 中文字幕不卡在线播放| 国产精品一区二区久久不卡| 日韩欧美一二三区| 日本成人中文字幕在线视频| 欧美日韩成人综合天天影院| 亚洲国产欧美日韩另类综合| 在线国产亚洲欧美| 亚洲国产日产av| 欧美美女喷水视频| 亚洲成人久久影院| 欧美少妇bbb| 亚洲成在人线免费| 在线不卡a资源高清| 日日噜噜夜夜狠狠视频欧美人| 欧美日韩日日摸| 午夜国产不卡在线观看视频| 91精品国产免费| 老司机精品视频导航| 亚洲精品一区二区三区99| 久久不见久久见中文字幕免费| 日韩午夜在线影院| 国产一区二区不卡在线| 欧美韩国日本一区| 91一区二区三区在线观看| 亚洲日本免费电影| 欧美性色综合网| 日本一不卡视频| 久久亚洲一级片| yourporn久久国产精品| 一区二区三区中文免费| 91精品国产aⅴ一区二区| 精品一区二区日韩| 国产精品福利一区| 777a∨成人精品桃花网| 国内成人精品2018免费看| 国产日产亚洲精品系列| 91视频精品在这里| 日本不卡视频一二三区| 欧美激情在线看| 欧美日韩免费电影| 国产一区二区女| 亚洲一区二区偷拍精品| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久精品国产一区二区三| 国产亚洲一二三区| 欧美日韩一区二区在线视频| 国产一区免费电影| 一二三四区精品视频| 久久这里都是精品| 欧美精品在线观看播放| 岛国一区二区在线观看| 日韩精彩视频在线观看| 日本一区二区三区电影| 欧美日韩精品免费观看视频 | 一级女性全黄久久生活片免费| 日韩精品在线一区二区| 在线亚洲免费视频| 国产成人精品亚洲777人妖 | 精品国产伦一区二区三区免费| 日本韩国欧美一区二区三区| 国产一区二三区| 免费在线观看精品| 亚洲地区一二三色| 亚洲精品免费播放| 国产亚洲一区二区在线观看| 在线播放日韩导航| 色一情一伦一子一伦一区| 国产精品一区二区免费不卡| 美国十次综合导航| 日韩黄色在线观看| 亚洲综合网站在线观看| 欧美激情综合五月色丁香小说| 日韩一区二区三区在线| 欧美日韩高清影院| 欧美日韩视频第一区| 在线精品视频一区二区三四 | 午夜亚洲国产au精品一区二区| 国产精品久久久久久久久免费樱桃| 日韩美女主播在线视频一区二区三区| 色婷婷狠狠综合| 97se亚洲国产综合在线| 成人国产精品免费| 国产suv一区二区三区88区| 国产在线精品一区二区三区不卡| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲色图都市小说| 中文字幕一区二区在线观看| 亚洲精品一线二线三线无人区| 精品三级av在线| 日韩天堂在线观看| 日韩欧美一区二区久久婷婷| 日韩欧美国产综合一区| 精品久久久影院| 337p粉嫩大胆噜噜噜噜噜91av| 精品久久久久久久久久久久久久久久久 | 极品少妇一区二区| 韩国成人福利片在线播放| 国产一区二区三区久久久| 国产传媒一区在线| 成人午夜精品在线| 91视频你懂的| 欧美日韩成人在线| 日韩午夜中文字幕| 欧美国产一区视频在线观看| 亚洲欧洲av一区二区三区久久| 一区二区高清免费观看影视大全| 天天亚洲美女在线视频| 激情综合色丁香一区二区| 国产成人av福利| 色天天综合色天天久久| 欧美日本高清视频在线观看| 精品日韩99亚洲| 国产精品久久久久久久久久久免费看| 一级特黄大欧美久久久| 久久国产精品一区二区| 99久久99久久综合| 91精品国产综合久久久久久久| 精品国产电影一区二区| 亚洲人成网站精品片在线观看| 水蜜桃久久夜色精品一区的特点| 国产在线麻豆精品观看| 色综合久久精品| 亚洲精品在线观| 亚洲一区二区三区在线看| 国产乱子伦视频一区二区三区 | 免费在线一区观看| av中文字幕亚洲| 日韩精品专区在线影院观看 | 久久午夜国产精品|