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

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

?? qtranslator.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************** 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 "qtranslator.h"#ifndef QT_NO_TRANSLATION#include "qfileinfo.h"#include "qstring.h"#include "qcoreapplication.h"#include "qcoreapplication_p.h"#include "qdatastream.h"#include "qfile.h"#include "qmap.h"#include "qalgorithms.h"#include "qhash.h"#include "qtranslator_p.h"#if defined(Q_OS_UNIX)#define QT_USE_MMAP#endif// most of the headers below are already included in qplatformdefs.h// also this lacks Large File support but that's probably irrelevant#if defined(QT_USE_MMAP)// for mmap#include <sys/mman.h>#include <errno.h>#endif#include <stdlib.h>#include "qobject_p.h"enum Tag { Tag_End = 1, Tag_SourceText16, Tag_Translation, Tag_Context16, Tag_Obsolete1,           Tag_SourceText, Tag_Context, Tag_Comment, Tag_Obsolete2 };/*$ mcookie3cb86418caef9c95cd211cbf60a1bddd$*/// magic number for the filestatic const int MagicLength = 16;static const uchar magic[MagicLength] = {    0x3c, 0xb8, 0x64, 0x18, 0xca, 0xef, 0x9c, 0x95,    0xcd, 0x21, 0x1c, 0xbf, 0x60, 0xa1, 0xbd, 0xdd};static bool match(const uchar* found, const char* target, uint len){    // 0 means anything, "" means empty    return !found || qstrncmp((const char *)found, target, len) == 0 && target[len] == '\0';}static uint elfHash(const char *name){    const uchar *k;    uint h = 0;    uint g;    if (name) {        k = (const uchar *) name;        while (*k) {            h = (h << 4) + *k++;            if ((g = (h & 0xf0000000)) != 0)                h ^= g >> 24;            h &= ~g;        }    }    if (!h)        h = 1;    return h;}static int numerus(int n, const uchar *rules, int rulesSize){#define CHECK_RANGE \    do { \        if (i >= rulesSize) \            return -1; \    } while (0)    int result = 0;    int i = 0;    if (rulesSize == 0)        return 0;    for (;;) {        bool orExprTruthValue = false;        for (;;) {            bool andExprTruthValue = true;            for (;;) {                bool truthValue = true;                CHECK_RANGE;                int opcode = rules[i++];                int leftOperand = n;                if (opcode & MOD_10) {                    leftOperand %= 10;                } else if (opcode & MOD_100) {                    leftOperand %= 100;                }                int op = opcode & OP_MASK;                CHECK_RANGE;                int rightOperand = rules[i++];                switch (op) {                default:                    return -1;                case EQ:                    truthValue = (leftOperand == rightOperand);                    break;                case LT:                    truthValue = (leftOperand < rightOperand);                    break;                case LEQ:                    truthValue = (leftOperand <= rightOperand);                    break;		case BETWEEN:                    int bottom = rightOperand;                    CHECK_RANGE;                    int top = rules[i++];                    truthValue = (leftOperand >= bottom && leftOperand <= top);                }                if (opcode & NOT)                    truthValue = !truthValue;                andExprTruthValue = andExprTruthValue && truthValue;                if (i == rulesSize || rules[i] != AND)                    break;                ++i;            }            orExprTruthValue = orExprTruthValue || andExprTruthValue;            if (i == rulesSize || rules[i] != OR)                break;            ++i;        }        if (orExprTruthValue)            return result;        ++result;        if (i == rulesSize)            return result;        if (rules[i++] != NEWRULE)            break;    }    return -1;}extern bool qt_detectRTLLanguage();class QTranslatorPrivate : public QObjectPrivate{    Q_DECLARE_PUBLIC(QTranslator)public:    enum { Contexts = 0x2f, Hashes = 0x42, Messages = 0x69, NumerusRules = 0x88 };    QTranslatorPrivate()        : used_mmap(0), unmapPointer(0), unmapLength(0), messageArray(0), offsetArray(0),          contextArray(0), numerusRulesArray(0), messageLength(0), offsetLength(0),          contextLength(0), numerusRulesLength(0) {}    // for mmap'ed files, this is what needs to be unmapped.    uint used_mmap : 1;    char *unmapPointer;    unsigned int unmapLength;    // for squeezed but non-file data, this is what needs to be deleted    const uchar *messageArray;    const uchar *offsetArray;    const uchar *contextArray;    const uchar *numerusRulesArray;    uint messageLength;    uint offsetLength;    uint contextLength;    uint numerusRulesLength;    bool do_load(const uchar *data, int len);    QString do_translate(const char *context, const char *sourceText, const char *comment,                         int n) const;    void clear();};/*!    \class QTranslator    \brief The QTranslator class provides internationalization support for text    output.    \ingroup i18n    \ingroup environment    \mainclass    An object of this class contains a set of translations from a    source language to a target language. QTranslator provides    functions to look up translations in a translation file.    Translation files are created using \l{Qt Linguist}.    The most common use of QTranslator is to: load a translation    file, install it using QApplication::installTranslator(), and use    it via QObject::tr(). Here's the \c main() function from the    \l{linguist/hellotr}{Hello tr()} example:    \quotefromfile linguist/hellotr/main.cpp    \skipto main(    \printuntil }    Note that the translator must be created \e before the    application's widgets.    Most applications will never need to do anything else with this    class. The other functions provided by this class are useful for    applications that work on translator files.    It is possible to lookup a translation using translate() (as tr()    and QApplication::translate() do). The translate() function takes    up to three parameters:    \list    \o The \e context - usually the class name for the tr() caller.    \o The \e {source text} - usually the argument to tr().    \o The \e comment - an optional comment that helps disambiguate       different uses of the same text in the same context.    \endlist    For example, the "Cancel" in a dialog might have "Anuluj" when the    program runs in Polish (in this case the source text would be    "Cancel"). The context would (normally) be the dialog's class    name; there would normally be no comment, and the translated text    would be "Anuluj".    But it's not always so simple. The Spanish version of a printer    dialog with settings for two-sided printing and binding would    probably require both "Activado" and "Activada" as translations    for "Enabled". In this case the source text would be "Enabled" in    both cases, and the context would be the dialog's class name, but    the two items would have disambiguating comments such as    "two-sided printing" for one and "binding" for the other. The    comment enables the translator to choose the appropriate gender    for the Spanish version, and enables Qt to distinguish between    translations.    \sa QApplication::installTranslator(), QApplication::removeTranslator(),        QObject::tr(), QApplication::translate(), {I18N Example},	{Hello tr() Example}, {Arrow Pad Example}, {Troll Print Example}*//*!    Constructs an empty message file object with parent \a parent that    is not connected to any file.*/QTranslator::QTranslator(QObject * parent)    : QObject(*new QTranslatorPrivate, parent){}#ifdef QT3_SUPPORT/*!    \overload    \obsolete */QTranslator::QTranslator(QObject * parent, const char * name)    : QObject(*new QTranslatorPrivate, parent){    setObjectName(QString::fromAscii(name));}#endif/*!    Destroys the object and frees any allocated resources.*/QTranslator::~QTranslator(){    if (QCoreApplication::instance())        QCoreApplication::instance()->removeTranslator(this);    Q_D(QTranslator);    d->clear();}/*!    Loads \a filename + \a suffix (".qm" if the \a suffix is    not specified), which may be an absolute file name or relative    to \a directory. Returns true if the translation is successfully    loaded; otherwise returns false.    The previous contents of this translator object are discarded.    If the file name does not exist, other file names are tried    in the following order:    \list 1    \o File name without \a suffix appended.    \o File name with text after a character in \a search_delimiters       stripped ("_." is the default for \a search_delimiters if it is       an empty string) and \a suffix.    \o File name stripped without \a suffix appended.    \o File name stripped further, etc.    \endlist    For example, an application running in the fr_CA locale    (French-speaking Canada) might call load("foo.fr_ca",    "/opt/foolib"). load() would then try to open the first existing    readable file from this list:    \list 1    \o \c /opt/foolib/foo.fr_ca.qm    \o \c /opt/foolib/foo.fr_ca    \o \c /opt/foolib/foo.fr.qm    \o \c /opt/foolib/foo.fr    \o \c /opt/foolib/foo.qm    \o \c /opt/foolib/foo    \endlist*/bool QTranslator::load(const QString & filename, const QString & directory,                       const QString & search_delimiters,                       const QString & suffix){    Q_D(QTranslator);    d->clear();    QString prefix;    const int l = filename.size();    if (!((l > 0 && filename[0] == QLatin1Char('/'))#ifdef Q_WS_WIN          || (l >= 2 && filename[0].isLetter() && filename[1] == QLatin1Char(':'))          || (l >= 1 && filename[0] == QLatin1Char('\\'))#endif            )) {        prefix = directory;    }    if (prefix.length()) {        if (prefix[int(prefix.length()-1)] != QLatin1Char('/'))            prefix += QLatin1Char('/');    }    QString fname = filename;    QString realname;    QString delims;    delims = search_delimiters.isNull() ? QString::fromLatin1("_.") : search_delimiters;    for (;;) {        QFileInfo fi;        realname = prefix + fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix);        fi.setFile(realname);        if (fi.isReadable())            break;        realname = prefix + fname;        fi.setFile(realname);        if (fi.isReadable())            break;        int rightmost = 0;        for (int i = 0; i < (int)delims.length(); i++) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1024久久| 91精品国产91久久久久久最新毛片| 丝袜脚交一区二区| 国产精品久久影院| 99re视频精品| 国产很黄免费观看久久| 久久国产生活片100| 中文字幕在线观看不卡视频| 久久久久久久久久久黄色| 日韩一二三四区| 91精品福利视频| 91一区二区三区在线观看| 国产.欧美.日韩| 国产高清成人在线| 国产乱子伦视频一区二区三区 | 日本一区二区三区免费乱视频| 欧美精品v日韩精品v韩国精品v| 欧美在线一二三| 色天天综合久久久久综合片| aa级大片欧美| 成人午夜视频福利| 成人亚洲一区二区一| 国产成人在线观看免费网站| 国产综合久久久久久鬼色 | 精品一区二区综合| 色综合久久九月婷婷色综合| av在线免费不卡| 色综合久久久久久久久久久| 色综合激情五月| 日本丰满少妇一区二区三区| 91九色最新地址| 欧洲一区二区三区免费视频| 欧美日韩一卡二卡三卡 | 欧美日韩久久久一区| 欧美另类videos死尸| 91精品国产91综合久久蜜臀| 91官网在线观看| 666欧美在线视频| 日韩欧美亚洲另类制服综合在线 | 久久综合久久综合久久| 久久久久久综合| 亚洲丝袜自拍清纯另类| 午夜伦欧美伦电影理论片| 国产一区二区三区精品视频 | 欧美激情一区二区| 亚洲一区二区三区四区在线观看| 免费日韩伦理电影| 成人h动漫精品一区二区| 欧美乱熟臀69xxxxxx| 久久五月婷婷丁香社区| 亚洲免费观看高清完整版在线观看熊| 亚洲成av人影院| 国产精品白丝jk白祙喷水网站 | 亚洲特级片在线| 免费成人在线观看| 99免费精品视频| 91精品国产91综合久久蜜臀| 中文字幕色av一区二区三区| 琪琪久久久久日韩精品| 99国产精品久久| 欧美大片免费久久精品三p| 日韩毛片精品高清免费| 韩国三级在线一区| 欧洲在线/亚洲| 国产精品色呦呦| 免费成人结看片| 色婷婷av一区二区三区gif| 久久久精品欧美丰满| 日韩综合一区二区| 色哟哟一区二区三区| 国产日韩精品一区二区三区| 午夜不卡av免费| 色婷婷av久久久久久久| 国产欧美日韩在线看| 裸体一区二区三区| 欧美色窝79yyyycom| 国产精品久久久久久久第一福利| 久久国产精品99精品国产 | 欧美成人video| 亚州成人在线电影| 欧美经典一区二区| 免费三级欧美电影| 欧美伦理视频网站| 亚洲国产成人av好男人在线观看| 成人a区在线观看| 国产欧美视频一区二区三区| 久久福利视频一区二区| 欧美一级片在线| 污片在线观看一区二区 | 亚洲欧美另类在线| 成人午夜看片网址| 久久久美女毛片| 国产一区二区伦理| 亚洲精品一区二区三区精华液 | 在线看国产日韩| 一区二区三区在线免费视频 | 中文字幕乱码亚洲精品一区| 国产麻豆91精品| 久久女同精品一区二区| 国产真实精品久久二三区| 91精品黄色片免费大全| 日韩成人免费看| 69久久99精品久久久久婷婷 | 欧美日韩美女一区二区| 亚洲成人av中文| 欧美老肥妇做.爰bbww视频| 香蕉久久一区二区不卡无毒影院| 欧美三级韩国三级日本一级| 亚洲一区二区三区视频在线播放 | 欧美日韩精品高清| 亚洲成人av福利| 欧美久久久久久蜜桃| 日韩电影免费在线| 欧美一区二区二区| 国产曰批免费观看久久久| 国产日韩欧美精品一区| 成人黄色av电影| 夜夜嗨av一区二区三区| 欧美日韩成人一区| 美女网站色91| 久久一留热品黄| 成人性视频免费网站| 亚洲人成网站精品片在线观看| 在线中文字幕不卡| 日韩精品色哟哟| 久久久精品欧美丰满| 成人激情开心网| 亚洲最大的成人av| 欧美日韩你懂得| 国产在线不卡一区| 亚洲欧美一区二区三区孕妇| 色伊人久久综合中文字幕| 石原莉奈一区二区三区在线观看| 日韩午夜精品电影| 国产福利一区二区三区视频在线| 国产精品伦理一区二区| 欧美丝袜第三区| 精品一区二区三区影院在线午夜| 中文字幕高清一区| 欧美亚洲丝袜传媒另类| 青青草97国产精品免费观看| 日本一区二区三区四区| 欧美日韩一区三区| 国产黄色精品网站| caoporen国产精品视频| 亚洲成av人**亚洲成av**| 久久久一区二区三区| 日本道精品一区二区三区| 美女尤物国产一区| 亚洲少妇中出一区| 日韩视频在线永久播放| www.欧美色图| 男女性色大片免费观看一区二区| 国产精品欧美精品| 欧美欧美欧美欧美首页| 国产福利精品一区二区| 视频一区视频二区中文字幕| 国产欧美综合色| 欧美顶级少妇做爰| 99re这里只有精品首页| 久久精品国内一区二区三区 | 色综合久久久网| 精品一区在线看| 亚洲综合激情另类小说区| 国产欧美日韩精品在线| 91精品欧美一区二区三区综合在 | 欧美影院午夜播放| 国产成人免费在线观看不卡| 亚洲午夜在线观看视频在线| 国产区在线观看成人精品| 日韩一区二区在线观看视频| 成人h动漫精品一区二区| 久久精品免费看| 天天综合天天综合色| 成人欧美一区二区三区1314| 精品捆绑美女sm三区| 91激情五月电影| 成人黄色软件下载| 久国产精品韩国三级视频| 亚洲自拍偷拍欧美| 中文字幕一区二区三区在线不卡| 制服丝袜亚洲色图| 国产精品一区二区在线观看网站| 欧美精品一区二区三区四区| 国产麻豆91精品| 国产欧美日韩精品一区| 成人白浆超碰人人人人| 亚洲一区二区视频在线| 91小视频在线| 亚洲国产中文字幕在线视频综合| 欧美一区二区三区人| 午夜精品爽啪视频| 制服丝袜成人动漫| 国产精华液一区二区三区| 欧美成人vps| 91久久一区二区| 午夜精品福利一区二区三区av | av亚洲精华国产精华精| 精品久久久久99| 在线一区二区视频|