mirror of
https://github.com/dolphin-emu/ext-win-qt.git
synced 2026-01-31 01:15:23 +01:00
update to qt6.5.1
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,108 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MINIMUMLINUX_P_H
|
||||
#define MINIMUMLINUX_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
// EXTRA WARNING
|
||||
// -------------
|
||||
//
|
||||
// This file must also be valid assembler source.
|
||||
//
|
||||
|
||||
#include "private/qglobal_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/* Minimum Linux kernel version:
|
||||
* We require the following features in Qt (unconditional, no fallback):
|
||||
* Feature Added in version Macro
|
||||
* - inotify_init1 before 2.6.12-rc12
|
||||
* - futex(2) before 2.6.12-rc12
|
||||
* - FUTEX_WAKE_OP 2.6.14 FUTEX_OP
|
||||
* - linkat(2) 2.6.17 O_TMPFILE && QT_CONFIG(linkat)
|
||||
* - FUTEX_PRIVATE_FLAG 2.6.22
|
||||
* - O_CLOEXEC 2.6.23
|
||||
* - eventfd 2.6.23
|
||||
* - pipe2 & dup3 2.6.27
|
||||
* - accept4 2.6.28
|
||||
* - renameat2 3.16 QT_CONFIG(renameat2)
|
||||
* - getrandom 3.17 QT_CONFIG(getentropy)
|
||||
* - statx 4.11 QT_CONFIG(statx)
|
||||
*/
|
||||
|
||||
#if QT_CONFIG(statx) && !QT_CONFIG(glibc)
|
||||
// if using glibc, the statx() function in sysdeps/unix/sysv/linux/statx.c
|
||||
// falls back to stat() for us.
|
||||
// (Using QT_CONFIG(glibc) instead of __GLIBC__ because the macros aren't
|
||||
// defined in assembler mode)
|
||||
# define QT_ELF_NOTE_OS_MAJOR 4
|
||||
# define QT_ELF_NOTE_OS_MINOR 11
|
||||
# define QT_ELF_NOTE_OS_PATCH 0
|
||||
#elif QT_CONFIG(getentropy)
|
||||
# define QT_ELF_NOTE_OS_MAJOR 3
|
||||
# define QT_ELF_NOTE_OS_MINOR 17
|
||||
# define QT_ELF_NOTE_OS_PATCH 0
|
||||
#elif QT_CONFIG(renameat2)
|
||||
# define QT_ELF_NOTE_OS_MAJOR 3
|
||||
# define QT_ELF_NOTE_OS_MINOR 16
|
||||
# define QT_ELF_NOTE_OS_PATCH 0
|
||||
#else
|
||||
# define QT_ELF_NOTE_OS_MAJOR 2
|
||||
# define QT_ELF_NOTE_OS_MINOR 6
|
||||
# define QT_ELF_NOTE_OS_PATCH 28
|
||||
#endif
|
||||
|
||||
/* you must include <elf.h> */
|
||||
#define QT_ELF_NOTE_OS_TYPE ELF_NOTE_OS_LINUX
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // MINIMUMLINUX_P_H
|
||||
@@ -1,302 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QABSTRACTANIMATION_P_H
|
||||
#define QABSTRACTANIMATION_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API.
|
||||
// This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qbasictimer.h>
|
||||
#include <QtCore/qdatetime.h>
|
||||
#include <QtCore/qtimer.h>
|
||||
#include <QtCore/qelapsedtimer.h>
|
||||
#include <private/qobject_p.h>
|
||||
#include <private/qproperty_p.h>
|
||||
#include <qabstractanimation.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAnimationGroup;
|
||||
class QAbstractAnimation;
|
||||
class QAbstractAnimationPrivate : public QObjectPrivate
|
||||
{
|
||||
public:
|
||||
virtual ~QAbstractAnimationPrivate();
|
||||
|
||||
static QAbstractAnimationPrivate *get(QAbstractAnimation *q)
|
||||
{
|
||||
return q->d_func();
|
||||
}
|
||||
|
||||
Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QAbstractAnimationPrivate, QAbstractAnimation::State,
|
||||
state, QAbstractAnimation::Stopped)
|
||||
void setState(QAbstractAnimation::State state);
|
||||
|
||||
void setDirection(QAbstractAnimation::Direction direction)
|
||||
{
|
||||
q_func()->setDirection(direction);
|
||||
}
|
||||
void emitDirectionChanged() { emit q_func()->directionChanged(direction); }
|
||||
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QAbstractAnimationPrivate, QAbstractAnimation::Direction,
|
||||
direction, &QAbstractAnimationPrivate::setDirection,
|
||||
&QAbstractAnimationPrivate::emitDirectionChanged,
|
||||
QAbstractAnimation::Forward)
|
||||
|
||||
void setCurrentTime(int msecs) { q_func()->setCurrentTime(msecs); }
|
||||
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QAbstractAnimationPrivate, int, totalCurrentTime,
|
||||
&QAbstractAnimationPrivate::setCurrentTime, 0)
|
||||
int currentTime = 0;
|
||||
|
||||
Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QAbstractAnimationPrivate, int, loopCount, 1)
|
||||
|
||||
void emitCurrentLoopChanged() { emit q_func()->currentLoopChanged(currentLoop); }
|
||||
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QAbstractAnimationPrivate, int, currentLoop, nullptr,
|
||||
&QAbstractAnimationPrivate::emitCurrentLoopChanged, 0)
|
||||
|
||||
bool deleteWhenStopped = false;
|
||||
bool hasRegisteredTimer = false;
|
||||
bool isPause = false;
|
||||
bool isGroup = false;
|
||||
|
||||
QAnimationGroup *group = nullptr;
|
||||
|
||||
private:
|
||||
Q_DECLARE_PUBLIC(QAbstractAnimation)
|
||||
};
|
||||
|
||||
|
||||
class QUnifiedTimer;
|
||||
class QDefaultAnimationDriver : public QAnimationDriver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QDefaultAnimationDriver(QUnifiedTimer *timer);
|
||||
void timerEvent(QTimerEvent *e) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void startTimer();
|
||||
void stopTimer();
|
||||
|
||||
private:
|
||||
QBasicTimer m_timer;
|
||||
QUnifiedTimer *m_unified_timer;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QAnimationDriverPrivate : public QObjectPrivate
|
||||
{
|
||||
public:
|
||||
QAnimationDriverPrivate() : running(false) {}
|
||||
QElapsedTimer timer;
|
||||
bool running;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QAbstractAnimationTimer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QAbstractAnimationTimer() : isRegistered(false), isPaused(false), pauseDuration(0) {}
|
||||
|
||||
virtual void updateAnimationsTime(qint64 delta) = 0;
|
||||
virtual void restartAnimationTimer() = 0;
|
||||
virtual int runningAnimationCount() = 0;
|
||||
|
||||
bool isRegistered;
|
||||
bool isPaused;
|
||||
int pauseDuration;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QUnifiedTimer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
QUnifiedTimer();
|
||||
|
||||
public:
|
||||
static QUnifiedTimer *instance();
|
||||
static QUnifiedTimer *instance(bool create);
|
||||
|
||||
static void startAnimationTimer(QAbstractAnimationTimer *timer);
|
||||
static void stopAnimationTimer(QAbstractAnimationTimer *timer);
|
||||
|
||||
static void pauseAnimationTimer(QAbstractAnimationTimer *timer, int duration);
|
||||
static void resumeAnimationTimer(QAbstractAnimationTimer *timer);
|
||||
|
||||
//defines the timing interval. Default is DEFAULT_TIMER_INTERVAL
|
||||
void setTimingInterval(int interval);
|
||||
|
||||
/*
|
||||
this allows to have a consistent timer interval at each tick from the timer
|
||||
not taking the real time that passed into account.
|
||||
*/
|
||||
void setConsistentTiming(bool consistent) { consistentTiming = consistent; }
|
||||
|
||||
//these facilitate fine-tuning of complex animations
|
||||
void setSlowModeEnabled(bool enabled) { slowMode = enabled; }
|
||||
void setSlowdownFactor(qreal factor) { slowdownFactor = factor; }
|
||||
|
||||
void installAnimationDriver(QAnimationDriver *driver);
|
||||
void uninstallAnimationDriver(QAnimationDriver *driver);
|
||||
bool canUninstallAnimationDriver(QAnimationDriver *driver);
|
||||
|
||||
void restart();
|
||||
void maybeUpdateAnimationsToCurrentTime();
|
||||
void updateAnimationTimers();
|
||||
|
||||
//useful for profiling/debugging
|
||||
int runningAnimationCount();
|
||||
void registerProfilerCallback(void (*cb)(qint64));
|
||||
|
||||
void startAnimationDriver();
|
||||
void stopAnimationDriver();
|
||||
qint64 elapsed() const;
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void startTimers();
|
||||
void stopTimer();
|
||||
|
||||
private:
|
||||
friend class QDefaultAnimationDriver;
|
||||
friend class QAnimationDriver;
|
||||
|
||||
QAnimationDriver *driver;
|
||||
QDefaultAnimationDriver defaultDriver;
|
||||
|
||||
QBasicTimer pauseTimer;
|
||||
|
||||
QElapsedTimer time;
|
||||
|
||||
qint64 lastTick;
|
||||
int timingInterval;
|
||||
int currentAnimationIdx;
|
||||
bool insideTick;
|
||||
bool insideRestart;
|
||||
bool consistentTiming;
|
||||
bool slowMode;
|
||||
bool startTimersPending;
|
||||
bool stopTimerPending;
|
||||
bool allowNegativeDelta;
|
||||
|
||||
// This factor will be used to divide the DEFAULT_TIMER_INTERVAL at each tick
|
||||
// when slowMode is enabled. Setting it to 0 or higher than DEFAULT_TIMER_INTERVAL (16)
|
||||
// stops all animations.
|
||||
qreal slowdownFactor;
|
||||
|
||||
QList<QAbstractAnimationTimer*> animationTimers, animationTimersToStart;
|
||||
QList<QAbstractAnimationTimer*> pausedAnimationTimers;
|
||||
|
||||
void localRestart();
|
||||
int closestPausedAnimationTimerTimeToFinish();
|
||||
|
||||
void (*profilerCallback)(qint64);
|
||||
|
||||
qint64 driverStartTime; // The time the animation driver was started
|
||||
qint64 temporalDrift; // The delta between animation driver time and wall time.
|
||||
};
|
||||
|
||||
class QAnimationTimer : public QAbstractAnimationTimer
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
QAnimationTimer();
|
||||
|
||||
public:
|
||||
static QAnimationTimer *instance();
|
||||
static QAnimationTimer *instance(bool create);
|
||||
|
||||
static void registerAnimation(QAbstractAnimation *animation, bool isTopLevel);
|
||||
static void unregisterAnimation(QAbstractAnimation *animation);
|
||||
|
||||
/*
|
||||
this is used for updating the currentTime of all animations in case the pause
|
||||
timer is active or, otherwise, only of the animation passed as parameter.
|
||||
*/
|
||||
static void ensureTimerUpdate();
|
||||
|
||||
/*
|
||||
this will evaluate the need of restarting the pause timer in case there is still
|
||||
some pause animations running.
|
||||
*/
|
||||
static void updateAnimationTimer();
|
||||
|
||||
void restartAnimationTimer() override;
|
||||
void updateAnimationsTime(qint64 delta) override;
|
||||
|
||||
//useful for profiling/debugging
|
||||
int runningAnimationCount() override { return animations.count(); }
|
||||
|
||||
private Q_SLOTS:
|
||||
void startAnimations();
|
||||
void stopTimer();
|
||||
|
||||
private:
|
||||
qint64 lastTick;
|
||||
int currentAnimationIdx;
|
||||
bool insideTick;
|
||||
bool startAnimationPending;
|
||||
bool stopTimerPending;
|
||||
|
||||
QList<QAbstractAnimation*> animations, animationsToStart;
|
||||
|
||||
// this is the count of running animations that are not a group neither a pause animation
|
||||
int runningLeafAnimations;
|
||||
QList<QAbstractAnimation*> runningPauseAnimations;
|
||||
|
||||
void registerRunningAnimation(QAbstractAnimation *animation);
|
||||
void unregisterRunningAnimation(QAbstractAnimation *animation);
|
||||
|
||||
int closestPauseAnimationTimeToFinish();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QABSTRACTANIMATION_P_H
|
||||
@@ -1,77 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QABSTRACTEVENTDISPATCHER_P_H
|
||||
#define QABSTRACTEVENTDISPATCHER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qabstracteventdispatcher.h"
|
||||
#include "private/qobject_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_CORE_EXPORT uint qGlobalPostedEventsCount();
|
||||
|
||||
class Q_CORE_EXPORT QAbstractEventDispatcherPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QAbstractEventDispatcher)
|
||||
public:
|
||||
inline QAbstractEventDispatcherPrivate()
|
||||
{ }
|
||||
~QAbstractEventDispatcherPrivate() override;
|
||||
|
||||
QList<QAbstractNativeEventFilter *> eventFilters;
|
||||
|
||||
static int allocateTimerId();
|
||||
static void releaseTimerId(int id);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTEVENTDISPATCHER_P_H
|
||||
@@ -1,280 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QABSTRACTFILEENGINE_P_H
|
||||
#define QABSTRACTFILEENGINE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qfile.h"
|
||||
#include "QtCore/qdir.h"
|
||||
|
||||
#include <optional>
|
||||
|
||||
#ifdef open
|
||||
#error qabstractfileengine_p.h must be included before any header file that defines open
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QVariant;
|
||||
class QAbstractFileEngineIterator;
|
||||
class QAbstractFileEnginePrivate;
|
||||
|
||||
class Q_CORE_EXPORT QAbstractFileEngine
|
||||
{
|
||||
public:
|
||||
enum FileFlag {
|
||||
//perms (overlaps the QFile::Permission)
|
||||
ReadOwnerPerm = 0x4000, WriteOwnerPerm = 0x2000, ExeOwnerPerm = 0x1000,
|
||||
ReadUserPerm = 0x0400, WriteUserPerm = 0x0200, ExeUserPerm = 0x0100,
|
||||
ReadGroupPerm = 0x0040, WriteGroupPerm = 0x0020, ExeGroupPerm = 0x0010,
|
||||
ReadOtherPerm = 0x0004, WriteOtherPerm = 0x0002, ExeOtherPerm = 0x0001,
|
||||
|
||||
//types
|
||||
LinkType = 0x10000,
|
||||
FileType = 0x20000,
|
||||
DirectoryType = 0x40000,
|
||||
BundleType = 0x80000,
|
||||
|
||||
//flags
|
||||
HiddenFlag = 0x0100000,
|
||||
LocalDiskFlag = 0x0200000,
|
||||
ExistsFlag = 0x0400000,
|
||||
RootFlag = 0x0800000,
|
||||
Refresh = 0x1000000,
|
||||
|
||||
//masks
|
||||
PermsMask = 0x0000FFFF,
|
||||
TypesMask = 0x000F0000,
|
||||
FlagsMask = 0x0FF00000,
|
||||
FileInfoAll = FlagsMask | PermsMask | TypesMask
|
||||
};
|
||||
Q_DECLARE_FLAGS(FileFlags, FileFlag)
|
||||
|
||||
enum FileName {
|
||||
DefaultName,
|
||||
BaseName,
|
||||
PathName,
|
||||
AbsoluteName,
|
||||
AbsolutePathName,
|
||||
AbsoluteLinkTarget,
|
||||
CanonicalName,
|
||||
CanonicalPathName,
|
||||
BundleName,
|
||||
JunctionName,
|
||||
NFileNames // Must be last.
|
||||
};
|
||||
enum FileOwner {
|
||||
OwnerUser,
|
||||
OwnerGroup
|
||||
};
|
||||
enum FileTime {
|
||||
AccessTime,
|
||||
BirthTime,
|
||||
MetadataChangeTime,
|
||||
ModificationTime
|
||||
};
|
||||
|
||||
virtual ~QAbstractFileEngine();
|
||||
|
||||
virtual bool open(QIODevice::OpenMode openMode,
|
||||
std::optional<QFile::Permissions> permissions = std::nullopt);
|
||||
virtual bool close();
|
||||
virtual bool flush();
|
||||
virtual bool syncToDisk();
|
||||
virtual qint64 size() const;
|
||||
virtual qint64 pos() const;
|
||||
virtual bool seek(qint64 pos);
|
||||
virtual bool isSequential() const;
|
||||
virtual bool remove();
|
||||
virtual bool copy(const QString &newName);
|
||||
virtual bool rename(const QString &newName);
|
||||
virtual bool renameOverwrite(const QString &newName);
|
||||
virtual bool link(const QString &newName);
|
||||
virtual bool mkdir(const QString &dirName, bool createParentDirectories,
|
||||
std::optional<QFile::Permissions> permissions = std::nullopt) const;
|
||||
virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
|
||||
virtual bool setSize(qint64 size);
|
||||
virtual bool caseSensitive() const;
|
||||
virtual bool isRelativePath() const;
|
||||
virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
|
||||
virtual FileFlags fileFlags(FileFlags type=FileInfoAll) const;
|
||||
virtual bool setPermissions(uint perms);
|
||||
virtual QByteArray id() const;
|
||||
virtual QString fileName(FileName file=DefaultName) const;
|
||||
virtual uint ownerId(FileOwner) const;
|
||||
virtual QString owner(FileOwner) const;
|
||||
virtual bool setFileTime(const QDateTime &newDate, FileTime time);
|
||||
virtual QDateTime fileTime(FileTime time) const;
|
||||
virtual void setFileName(const QString &file);
|
||||
virtual int handle() const;
|
||||
virtual bool cloneTo(QAbstractFileEngine *target);
|
||||
bool atEnd() const;
|
||||
uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);
|
||||
bool unmap(uchar *ptr);
|
||||
|
||||
typedef QAbstractFileEngineIterator Iterator;
|
||||
virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
|
||||
virtual Iterator *endEntryList();
|
||||
|
||||
virtual qint64 read(char *data, qint64 maxlen);
|
||||
virtual qint64 readLine(char *data, qint64 maxlen);
|
||||
virtual qint64 write(const char *data, qint64 len);
|
||||
|
||||
QFile::FileError error() const;
|
||||
QString errorString() const;
|
||||
|
||||
enum Extension {
|
||||
AtEndExtension,
|
||||
FastReadLineExtension,
|
||||
MapExtension,
|
||||
UnMapExtension
|
||||
};
|
||||
class ExtensionOption
|
||||
{};
|
||||
class ExtensionReturn
|
||||
{};
|
||||
|
||||
class MapExtensionOption : public ExtensionOption {
|
||||
public:
|
||||
qint64 offset;
|
||||
qint64 size;
|
||||
QFile::MemoryMapFlags flags;
|
||||
};
|
||||
class MapExtensionReturn : public ExtensionReturn {
|
||||
public:
|
||||
uchar *address;
|
||||
};
|
||||
|
||||
class UnMapExtensionOption : public ExtensionOption {
|
||||
public:
|
||||
uchar *address;
|
||||
};
|
||||
|
||||
virtual bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr);
|
||||
virtual bool supportsExtension(Extension extension) const;
|
||||
|
||||
// Factory
|
||||
static QAbstractFileEngine *create(const QString &fileName);
|
||||
|
||||
protected:
|
||||
void setError(QFile::FileError error, const QString &str);
|
||||
|
||||
QAbstractFileEngine();
|
||||
QAbstractFileEngine(QAbstractFileEnginePrivate &);
|
||||
|
||||
QScopedPointer<QAbstractFileEnginePrivate> d_ptr;
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(QAbstractFileEngine)
|
||||
Q_DISABLE_COPY_MOVE(QAbstractFileEngine)
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags)
|
||||
|
||||
class Q_CORE_EXPORT QAbstractFileEngineHandler
|
||||
{
|
||||
public:
|
||||
QAbstractFileEngineHandler();
|
||||
virtual ~QAbstractFileEngineHandler();
|
||||
virtual QAbstractFileEngine *create(const QString &fileName) const = 0;
|
||||
};
|
||||
|
||||
class QAbstractFileEngineIteratorPrivate;
|
||||
class Q_CORE_EXPORT QAbstractFileEngineIterator
|
||||
{
|
||||
public:
|
||||
QAbstractFileEngineIterator(QDir::Filters filters, const QStringList &nameFilters);
|
||||
virtual ~QAbstractFileEngineIterator();
|
||||
|
||||
virtual QString next() = 0;
|
||||
virtual bool hasNext() const = 0;
|
||||
|
||||
QString path() const;
|
||||
QStringList nameFilters() const;
|
||||
QDir::Filters filters() const;
|
||||
|
||||
virtual QString currentFileName() const = 0;
|
||||
virtual QFileInfo currentFileInfo() const;
|
||||
QString currentFilePath() const;
|
||||
|
||||
protected:
|
||||
enum EntryInfoType {
|
||||
};
|
||||
virtual QVariant entryInfo(EntryInfoType type) const;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY_MOVE(QAbstractFileEngineIterator)
|
||||
friend class QDirIterator;
|
||||
friend class QDirIteratorPrivate;
|
||||
void setPath(const QString &path);
|
||||
QScopedPointer<QAbstractFileEngineIteratorPrivate> d;
|
||||
};
|
||||
|
||||
class QAbstractFileEnginePrivate
|
||||
{
|
||||
public:
|
||||
inline QAbstractFileEnginePrivate()
|
||||
: fileError(QFile::UnspecifiedError)
|
||||
{
|
||||
}
|
||||
inline virtual ~QAbstractFileEnginePrivate() { }
|
||||
|
||||
QFile::FileError fileError;
|
||||
QString errorString;
|
||||
|
||||
QAbstractFileEngine *q_ptr;
|
||||
Q_DECLARE_PUBLIC(QAbstractFileEngine)
|
||||
};
|
||||
|
||||
QAbstractFileEngine *qt_custom_file_engine_handler_create(const QString &path);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTFILEENGINE_P_H
|
||||
@@ -1,162 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QABSTRACTITEMMODEL_P_H
|
||||
#define QABSTRACTITEMMODEL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of QAbstractItemModel*. This header file may change from version
|
||||
// to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
//
|
||||
|
||||
#include "QtCore/qabstractitemmodel.h"
|
||||
#include "QtCore/private/qobject_p.h"
|
||||
#include "QtCore/qstack.h"
|
||||
#include "QtCore/qset.h"
|
||||
#include "QtCore/qhash.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_REQUIRE_CONFIG(itemmodel);
|
||||
|
||||
class QPersistentModelIndexData
|
||||
{
|
||||
public:
|
||||
QPersistentModelIndexData() {}
|
||||
QPersistentModelIndexData(const QModelIndex &idx) : index(idx) {}
|
||||
QModelIndex index;
|
||||
QAtomicInt ref;
|
||||
static QPersistentModelIndexData *create(const QModelIndex &index);
|
||||
static void destroy(QPersistentModelIndexData *data);
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QAbstractItemModelPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QAbstractItemModel)
|
||||
|
||||
public:
|
||||
QAbstractItemModelPrivate();
|
||||
~QAbstractItemModelPrivate();
|
||||
|
||||
void removePersistentIndexData(QPersistentModelIndexData *data);
|
||||
void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
|
||||
Qt::Orientation orientation);
|
||||
void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
|
||||
void rowsInserted(const QModelIndex &parent, int first, int last);
|
||||
void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
|
||||
void rowsRemoved(const QModelIndex &parent, int first, int last);
|
||||
void columnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
|
||||
void columnsInserted(const QModelIndex &parent, int first, int last);
|
||||
void columnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
|
||||
void columnsRemoved(const QModelIndex &parent, int first, int last);
|
||||
static QAbstractItemModel *staticEmptyModel();
|
||||
static bool variantLessThan(const QVariant &v1, const QVariant &v2);
|
||||
|
||||
void itemsAboutToBeMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation);
|
||||
void itemsMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
|
||||
bool allowMove(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
|
||||
|
||||
// ugly hack for QTreeModel, see QTBUG-94546
|
||||
virtual void executePendingOperations() const;
|
||||
|
||||
inline QModelIndex createIndex(int row, int column, void *data = nullptr) const {
|
||||
return q_func()->createIndex(row, column, data);
|
||||
}
|
||||
|
||||
inline QModelIndex createIndex(int row, int column, int id) const {
|
||||
return q_func()->createIndex(row, column, id);
|
||||
}
|
||||
|
||||
inline bool indexValid(const QModelIndex &index) const {
|
||||
return (index.row() >= 0) && (index.column() >= 0) && (index.model() == q_func());
|
||||
}
|
||||
|
||||
void invalidatePersistentIndexes();
|
||||
void invalidatePersistentIndex(const QModelIndex &index);
|
||||
|
||||
struct Change {
|
||||
constexpr Change() : parent(), first(-1), last(-1), needsAdjust(false) {}
|
||||
constexpr Change(const QModelIndex &p, int f, int l) : parent(p), first(f), last(l), needsAdjust(false) {}
|
||||
|
||||
QModelIndex parent;
|
||||
int first, last;
|
||||
|
||||
|
||||
// In cases such as this:
|
||||
// - A
|
||||
// - B
|
||||
// - C
|
||||
// - - D
|
||||
// - - E
|
||||
// - - F
|
||||
//
|
||||
// If B is moved to above E, C is the source parent in the signal and its row is 2. When the move is
|
||||
// completed however, C is at row 1 and there is no row 2 at the same level in the model at all.
|
||||
// The QModelIndex is adjusted to correct that in those cases before reporting it though the
|
||||
// rowsMoved signal.
|
||||
bool needsAdjust;
|
||||
|
||||
constexpr bool isValid() const { return first >= 0 && last >= 0; }
|
||||
};
|
||||
QStack<Change> changes;
|
||||
|
||||
struct Persistent {
|
||||
Persistent() {}
|
||||
QMultiHash<QModelIndex, QPersistentModelIndexData *> indexes;
|
||||
QStack<QList<QPersistentModelIndexData *>> moved;
|
||||
QStack<QList<QPersistentModelIndexData *>> invalidated;
|
||||
void insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data);
|
||||
} persistent;
|
||||
|
||||
static const QHash<int,QByteArray> &defaultRoleNames();
|
||||
static bool isVariantLessThan(const QVariant &left, const QVariant &right,
|
||||
Qt::CaseSensitivity cs = Qt::CaseSensitive, bool isLocaleAware = false);
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QAbstractItemModelPrivate::Change, Q_RELOCATABLE_TYPE);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTITEMMODEL_P_H
|
||||
@@ -1,88 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QABSTRACTPROXYMODEL_P_H
|
||||
#define QABSTRACTPROXYMODEL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of QAbstractItemModel*. This header file may change from version
|
||||
// to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
//
|
||||
|
||||
#include "private/qabstractitemmodel_p.h"
|
||||
#include "private/qproperty_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(proxymodel);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QAbstractProxyModelPrivate : public QAbstractItemModelPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QAbstractProxyModel)
|
||||
public:
|
||||
QAbstractProxyModelPrivate() : QAbstractItemModelPrivate() { }
|
||||
void setModelForwarder(QAbstractItemModel *sourceModel)
|
||||
{
|
||||
q_func()->setSourceModel(sourceModel);
|
||||
}
|
||||
void modelChangedForwarder()
|
||||
{
|
||||
Q_EMIT q_func()->sourceModelChanged(QAbstractProxyModel::QPrivateSignal());
|
||||
}
|
||||
QAbstractItemModel *getModelForwarder() const { return q_func()->sourceModel(); }
|
||||
|
||||
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QAbstractProxyModelPrivate, QAbstractItemModel *, model,
|
||||
&QAbstractProxyModelPrivate::setModelForwarder,
|
||||
&QAbstractProxyModelPrivate::modelChangedForwarder,
|
||||
&QAbstractProxyModelPrivate::getModelForwarder, nullptr)
|
||||
virtual void _q_sourceModelDestroyed();
|
||||
void mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
|
||||
int *source_row, int *source_column, QModelIndex *source_parent) const;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTPROXYMODEL_P_H
|
||||
@@ -1,300 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QANDROIDEXTRAS_H
|
||||
#define QANDROIDEXTRAS_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <jni.h>
|
||||
#include <functional>
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/qjniobject.h>
|
||||
#include <QtCore/private/qjnihelpers_p.h>
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtCore/qmap.h>
|
||||
|
||||
#if QT_CONFIG(future)
|
||||
#include <QtCore/qfuture.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAndroidParcel;
|
||||
class QAndroidBinderPrivate;
|
||||
class QAndroidBinder;
|
||||
|
||||
class Q_CORE_EXPORT QAndroidBinder
|
||||
{
|
||||
public:
|
||||
enum class CallType {
|
||||
Normal = 0,
|
||||
OneWay = 1
|
||||
};
|
||||
|
||||
public:
|
||||
explicit QAndroidBinder();
|
||||
QAndroidBinder(const QJniObject &binder);
|
||||
|
||||
virtual ~QAndroidBinder();
|
||||
|
||||
virtual bool onTransact(int code, const QAndroidParcel &data,
|
||||
const QAndroidParcel &reply, CallType flags);
|
||||
bool transact(int code, const QAndroidParcel &data,
|
||||
QAndroidParcel *reply = nullptr, CallType flags = CallType::Normal) const;
|
||||
|
||||
QJniObject handle() const;
|
||||
|
||||
private:
|
||||
friend class QAndroidBinderPrivate;
|
||||
friend class QAndroidParcelPrivate;
|
||||
friend class QAndroidServicePrivate;
|
||||
QSharedPointer<QAndroidBinderPrivate> d;
|
||||
};
|
||||
|
||||
class QAndroidParcelPrivate;
|
||||
|
||||
class Q_CORE_EXPORT QAndroidParcel
|
||||
{
|
||||
public:
|
||||
QAndroidParcel();
|
||||
explicit QAndroidParcel(const QJniObject& parcel);
|
||||
virtual ~QAndroidParcel();
|
||||
|
||||
void writeData(const QByteArray &data) const;
|
||||
void writeVariant(const QVariant &value) const;
|
||||
void writeBinder(const QAndroidBinder &binder) const;
|
||||
void writeFileDescriptor(int fd) const;
|
||||
|
||||
QByteArray readData() const;
|
||||
QVariant readVariant() const;
|
||||
QAndroidBinder readBinder() const;
|
||||
int readFileDescriptor() const;
|
||||
|
||||
QJniObject handle() const;
|
||||
|
||||
private:
|
||||
friend class QAndroidParcelPrivate;
|
||||
friend class QAndroidBinder;
|
||||
QSharedPointer<QAndroidParcelPrivate> d;
|
||||
};
|
||||
|
||||
class QAndroidActivityResultReceiverPrivate;
|
||||
|
||||
class Q_CORE_EXPORT QAndroidActivityResultReceiver
|
||||
{
|
||||
public:
|
||||
QAndroidActivityResultReceiver();
|
||||
virtual ~QAndroidActivityResultReceiver();
|
||||
virtual void handleActivityResult(int receiverRequestCode, int resultCode,
|
||||
const QJniObject &data) = 0;
|
||||
|
||||
private:
|
||||
friend class QAndroidActivityResultReceiverPrivate;
|
||||
Q_DISABLE_COPY(QAndroidActivityResultReceiver)
|
||||
|
||||
QScopedPointer<QAndroidActivityResultReceiverPrivate> d;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QAndroidServiceConnection
|
||||
{
|
||||
public:
|
||||
QAndroidServiceConnection();
|
||||
explicit QAndroidServiceConnection(const QJniObject &serviceConnection);
|
||||
virtual ~QAndroidServiceConnection();
|
||||
|
||||
virtual void onServiceConnected(const QString &name,
|
||||
const QAndroidBinder &serviceBinder) = 0;
|
||||
virtual void onServiceDisconnected(const QString &name) = 0;
|
||||
|
||||
QJniObject handle() const;
|
||||
private:
|
||||
Q_DISABLE_COPY(QAndroidServiceConnection)
|
||||
QJniObject m_handle;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QAndroidIntent
|
||||
{
|
||||
public:
|
||||
QAndroidIntent();
|
||||
virtual ~QAndroidIntent();
|
||||
explicit QAndroidIntent(const QJniObject &intent);
|
||||
explicit QAndroidIntent(const QString &action);
|
||||
explicit QAndroidIntent(const QJniObject &packageContext, const char *className);
|
||||
|
||||
void putExtra(const QString &key, const QByteArray &data);
|
||||
QByteArray extraBytes(const QString &key);
|
||||
|
||||
void putExtra(const QString &key, const QVariant &value);
|
||||
QVariant extraVariant(const QString &key);
|
||||
|
||||
QJniObject handle() const;
|
||||
|
||||
private:
|
||||
QJniObject m_handle;
|
||||
};
|
||||
|
||||
class QAndroidServicePrivate;
|
||||
|
||||
class Q_CORE_EXPORT QAndroidService : public QCoreApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QAndroidService(int &argc, char **argv
|
||||
#ifndef Q_QDOC
|
||||
, int flags = ApplicationFlags
|
||||
#endif
|
||||
);
|
||||
QAndroidService(int &argc, char **argv,
|
||||
const std::function<QAndroidBinder*(const QAndroidIntent &intent)> & binder
|
||||
#ifndef Q_QDOC
|
||||
, int flags = ApplicationFlags
|
||||
#endif
|
||||
);
|
||||
virtual ~QAndroidService();
|
||||
|
||||
virtual QAndroidBinder* onBind(const QAndroidIntent &intent);
|
||||
|
||||
private:
|
||||
friend class QAndroidServicePrivate;
|
||||
Q_DISABLE_COPY(QAndroidService)
|
||||
|
||||
QScopedPointer<QAndroidServicePrivate> d;
|
||||
};
|
||||
|
||||
class QAndroidActivityCallbackResultReceiver: public QAndroidActivityResultReceiver
|
||||
{
|
||||
public:
|
||||
QAndroidActivityCallbackResultReceiver();
|
||||
void handleActivityResult(int receiverRequestCode, int resultCode,
|
||||
const QJniObject &intent) override;
|
||||
void registerCallback(int receiverRequestCode,
|
||||
std::function<void(int, int, const QJniObject &)> callbackFunc);
|
||||
|
||||
static QAndroidActivityCallbackResultReceiver *instance();
|
||||
private:
|
||||
QMap<int, std::function<void(int, int, const QJniObject &data)>> callbackMap;
|
||||
|
||||
static QAndroidActivityCallbackResultReceiver *s_instance;
|
||||
};
|
||||
|
||||
namespace QtAndroidPrivate
|
||||
{
|
||||
Q_CORE_EXPORT void startIntentSender(const QJniObject &intentSender,
|
||||
int receiverRequestCode,
|
||||
QAndroidActivityResultReceiver *resultReceiver = nullptr);
|
||||
Q_CORE_EXPORT void startActivity(const QJniObject &intent,
|
||||
int receiverRequestCode,
|
||||
QAndroidActivityResultReceiver *resultReceiver = nullptr);
|
||||
Q_CORE_EXPORT void startActivity(const QAndroidIntent &intent,
|
||||
int receiverRequestCode,
|
||||
QAndroidActivityResultReceiver *resultReceiver = nullptr);
|
||||
Q_CORE_EXPORT void startActivity(const QJniObject &intent,
|
||||
int receiverRequestCode,
|
||||
std::function<void(int, int, const QJniObject &data)>
|
||||
callbackFunc);
|
||||
|
||||
enum class BindFlag {
|
||||
None = 0x00000000,
|
||||
AutoCreate = 0x00000001,
|
||||
DebugUnbind = 0x00000002,
|
||||
NotForeground = 0x00000004,
|
||||
AboveClient = 0x00000008,
|
||||
AllowOomManagement = 0x00000010,
|
||||
WaivePriority = 0x00000020,
|
||||
Important = 0x00000040,
|
||||
AdjustWithActivity = 0x00000080,
|
||||
ExternalService = -2147483648 // 0x80000000
|
||||
|
||||
};
|
||||
Q_DECLARE_FLAGS(BindFlags, BindFlag)
|
||||
|
||||
Q_CORE_EXPORT bool bindService(const QAndroidIntent &serviceIntent,
|
||||
const QAndroidServiceConnection &serviceConnection,
|
||||
BindFlags flags = BindFlag::None);
|
||||
|
||||
#if QT_CONFIG(future)
|
||||
enum PermissionType {
|
||||
Camera,
|
||||
Microphone,
|
||||
Bluetooth,
|
||||
Location,
|
||||
PreciseLocation,
|
||||
BackgroundLocation,
|
||||
PreciseBackgroundLocation,
|
||||
BodySensors,
|
||||
PhysicalActivity,
|
||||
Contacts,
|
||||
Storage,
|
||||
Calendar
|
||||
};
|
||||
|
||||
enum PermissionResult {
|
||||
Undetermined,
|
||||
Authorized,
|
||||
Denied
|
||||
};
|
||||
|
||||
Q_CORE_EXPORT QFuture<QtAndroidPrivate::PermissionResult>
|
||||
requestPermission(QtAndroidPrivate::PermissionType permission);
|
||||
Q_CORE_EXPORT QFuture<QtAndroidPrivate::PermissionResult>
|
||||
requestPermission(const QString &permission);
|
||||
|
||||
Q_CORE_EXPORT QFuture<QtAndroidPrivate::PermissionResult>
|
||||
checkPermission(QtAndroidPrivate::PermissionType permission);
|
||||
Q_CORE_EXPORT QFuture<QtAndroidPrivate::PermissionResult>
|
||||
checkPermission(const QString &permission);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QANDROIDEXTRAS_H
|
||||
@@ -1,94 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QANIMATIONGROUP_P_H
|
||||
#define QANIMATIONGROUP_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qanimationgroup.h"
|
||||
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
#include "private/qabstractanimation_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAnimationGroupPrivate : public QAbstractAnimationPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QAnimationGroup)
|
||||
public:
|
||||
QAnimationGroupPrivate()
|
||||
{
|
||||
isGroup = true;
|
||||
}
|
||||
|
||||
virtual void animationInsertedAt(int) { }
|
||||
virtual void animationRemoved(int, QAbstractAnimation *);
|
||||
|
||||
void clear(bool onDestruction);
|
||||
|
||||
void disconnectUncontrolledAnimation(QAbstractAnimation *anim)
|
||||
{
|
||||
//0 for the signal here because we might be called from the animation destructor
|
||||
QObject::disconnect(anim, nullptr, q_func(), SLOT(_q_uncontrolledAnimationFinished()));
|
||||
}
|
||||
|
||||
void connectUncontrolledAnimation(QAbstractAnimation *anim)
|
||||
{
|
||||
QObject::connect(anim, SIGNAL(finished()), q_func(), SLOT(_q_uncontrolledAnimationFinished()));
|
||||
}
|
||||
|
||||
QList<QAbstractAnimation *> animations;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QANIMATIONGROUP_P_H
|
||||
@@ -1,65 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QBYTEARRAY_P_H
|
||||
#define QBYTEARRAY_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of other Qt classes. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include "private/qtools_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// -1 because of the terminating NUL
|
||||
constexpr qsizetype MaxByteArraySize = MaxAllocSize - sizeof(std::remove_pointer<QByteArray::DataPointer>::type) - 1;
|
||||
constexpr qsizetype MaxStringSize = (MaxAllocSize - sizeof(std::remove_pointer<QByteArray::DataPointer>::type)) / 2 - 1;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QBYTEARRAY_P_H
|
||||
@@ -1,311 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QBYTEDATA_P_H
|
||||
#define QBYTEDATA_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <qbytearray.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// this class handles a list of QByteArrays. It is a variant of QRingBuffer
|
||||
// that avoid malloc/realloc/memcpy.
|
||||
class QByteDataBuffer
|
||||
{
|
||||
private:
|
||||
QList<QByteArray> buffers;
|
||||
qint64 bufferCompleteSize = 0;
|
||||
qint64 firstPos = 0;
|
||||
public:
|
||||
static inline void popFront(QByteArray &ba, qint64 n)
|
||||
{
|
||||
ba = QByteArray(ba.constData() + n, ba.size() - n);
|
||||
}
|
||||
|
||||
inline void squeezeFirst()
|
||||
{
|
||||
if (!buffers.isEmpty() && firstPos > 0) {
|
||||
popFront(buffers.first(), firstPos);
|
||||
firstPos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
inline void append(const QByteDataBuffer& other)
|
||||
{
|
||||
if (other.isEmpty())
|
||||
return;
|
||||
|
||||
buffers.append(other.buffers);
|
||||
bufferCompleteSize += other.byteAmount();
|
||||
|
||||
if (other.firstPos > 0)
|
||||
popFront(buffers[bufferCount() - other.bufferCount()], other.firstPos);
|
||||
}
|
||||
|
||||
inline void append(QByteDataBuffer &&other)
|
||||
{
|
||||
if (other.isEmpty())
|
||||
return;
|
||||
|
||||
auto otherBufferCount = other.bufferCount();
|
||||
auto otherByteAmount = other.byteAmount();
|
||||
buffers.append(std::move(other.buffers));
|
||||
bufferCompleteSize += otherByteAmount;
|
||||
|
||||
if (other.firstPos > 0)
|
||||
popFront(buffers[bufferCount() - otherBufferCount], other.firstPos);
|
||||
}
|
||||
|
||||
inline void append(const QByteArray& bd)
|
||||
{
|
||||
append(QByteArray(bd));
|
||||
}
|
||||
|
||||
inline void append(QByteArray &&bd)
|
||||
{
|
||||
if (bd.isEmpty())
|
||||
return;
|
||||
|
||||
bufferCompleteSize += bd.size();
|
||||
buffers.append(std::move(bd));
|
||||
}
|
||||
|
||||
inline void prepend(const QByteArray& bd)
|
||||
{
|
||||
prepend(QByteArray(bd));
|
||||
}
|
||||
|
||||
inline void prepend(QByteArray &&bd)
|
||||
{
|
||||
if (bd.isEmpty())
|
||||
return;
|
||||
|
||||
squeezeFirst();
|
||||
|
||||
bufferCompleteSize += bd.size();
|
||||
buffers.prepend(std::move(bd));
|
||||
}
|
||||
|
||||
// return the first QByteData. User of this function has to free() its .data!
|
||||
// preferably use this function to read data.
|
||||
inline QByteArray read()
|
||||
{
|
||||
squeezeFirst();
|
||||
bufferCompleteSize -= buffers.first().size();
|
||||
return buffers.takeFirst();
|
||||
}
|
||||
|
||||
// return everything. User of this function has to free() its .data!
|
||||
// avoid to use this, it might malloc and memcpy.
|
||||
inline QByteArray readAll()
|
||||
{
|
||||
return read(byteAmount());
|
||||
}
|
||||
|
||||
// return amount. User of this function has to free() its .data!
|
||||
// avoid to use this, it might malloc and memcpy.
|
||||
inline QByteArray read(qint64 amount)
|
||||
{
|
||||
amount = qMin(byteAmount(), amount);
|
||||
QByteArray byteData;
|
||||
byteData.resize(amount);
|
||||
read(byteData.data(), byteData.size());
|
||||
return byteData;
|
||||
}
|
||||
|
||||
// return amount bytes. User of this function has to free() its .data!
|
||||
// avoid to use this, it will memcpy.
|
||||
qint64 read(char* dst, qint64 amount)
|
||||
{
|
||||
amount = qMin(amount, byteAmount());
|
||||
qint64 originalAmount = amount;
|
||||
char *writeDst = dst;
|
||||
|
||||
while (amount > 0) {
|
||||
const QByteArray &first = buffers.first();
|
||||
qint64 firstSize = first.size() - firstPos;
|
||||
if (amount >= firstSize) {
|
||||
// take it completely
|
||||
bufferCompleteSize -= firstSize;
|
||||
amount -= firstSize;
|
||||
memcpy(writeDst, first.constData() + firstPos, firstSize);
|
||||
writeDst += firstSize;
|
||||
firstPos = 0;
|
||||
buffers.takeFirst();
|
||||
} else {
|
||||
// take a part of it & it is the last one to take
|
||||
bufferCompleteSize -= amount;
|
||||
memcpy(writeDst, first.constData() + firstPos, amount);
|
||||
firstPos += amount;
|
||||
amount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return originalAmount;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
Returns a view into the first QByteArray contained inside,
|
||||
ignoring any already read data. Call advanceReadPointer()
|
||||
to advance the view forward. When a QByteArray is exhausted
|
||||
the view returned by this function will view into another
|
||||
QByteArray if any. Returns a default constructed view if
|
||||
no data is available.
|
||||
|
||||
\sa advanceReadPointer
|
||||
*/
|
||||
QByteArrayView readPointer() const
|
||||
{
|
||||
if (isEmpty())
|
||||
return {};
|
||||
return { buffers.first().constData() + qsizetype(firstPos),
|
||||
buffers.first().size() - qsizetype(firstPos) };
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
Advances the read pointer by \a distance.
|
||||
|
||||
\sa readPointer
|
||||
*/
|
||||
void advanceReadPointer(qint64 distance)
|
||||
{
|
||||
qint64 newPos = firstPos + distance;
|
||||
if (isEmpty()) {
|
||||
newPos = 0;
|
||||
} else if (auto size = buffers.first().size(); newPos >= size) {
|
||||
while (newPos >= size) {
|
||||
bufferCompleteSize -= (size - firstPos);
|
||||
newPos -= size;
|
||||
buffers.pop_front();
|
||||
if (isEmpty()) {
|
||||
size = 0;
|
||||
newPos = 0;
|
||||
break;
|
||||
}
|
||||
size = buffers.front().size();
|
||||
}
|
||||
bufferCompleteSize -= newPos;
|
||||
} else {
|
||||
bufferCompleteSize -= newPos - firstPos;
|
||||
}
|
||||
firstPos = newPos;
|
||||
}
|
||||
|
||||
inline char getChar()
|
||||
{
|
||||
Q_ASSERT_X(!isEmpty(), "QByteDataBuffer::getChar",
|
||||
"Cannot read a char from an empty buffer!");
|
||||
char c;
|
||||
read(&c, 1);
|
||||
return c;
|
||||
}
|
||||
|
||||
inline void clear()
|
||||
{
|
||||
buffers.clear();
|
||||
bufferCompleteSize = 0;
|
||||
firstPos = 0;
|
||||
}
|
||||
|
||||
// The byte count of all QByteArrays
|
||||
inline qint64 byteAmount() const
|
||||
{
|
||||
return bufferCompleteSize;
|
||||
}
|
||||
|
||||
// the number of QByteArrays
|
||||
inline int bufferCount() const
|
||||
{
|
||||
return buffers.length();
|
||||
}
|
||||
|
||||
inline bool isEmpty() const
|
||||
{
|
||||
return byteAmount() == 0;
|
||||
}
|
||||
|
||||
inline qint64 sizeNextBlock() const
|
||||
{
|
||||
if (buffers.isEmpty())
|
||||
return 0;
|
||||
else
|
||||
return buffers.first().size() - firstPos;
|
||||
}
|
||||
|
||||
inline QByteArray& operator[](int i)
|
||||
{
|
||||
if (i == 0)
|
||||
squeezeFirst();
|
||||
|
||||
return buffers[i];
|
||||
}
|
||||
|
||||
inline bool canReadLine() const {
|
||||
int i = 0;
|
||||
if (i < buffers.length()) {
|
||||
if (buffers.at(i).indexOf('\n', firstPos) != -1)
|
||||
return true;
|
||||
++i;
|
||||
|
||||
for (; i < buffers.length(); i++)
|
||||
if (buffers.at(i).contains('\n'))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QBYTEDATA_P_H
|
||||
@@ -1,170 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCALENDAR_BACKEND_P_H
|
||||
#define QCALENDAR_BACKEND_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of calendar implementations. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qobjectdefs.h>
|
||||
#include <QtCore/qcalendar.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qmap.h>
|
||||
#include <QtCore/qanystringview.h>
|
||||
#include <QtCore/private/qlocale_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtPrivate {
|
||||
class QCalendarRegistry;
|
||||
}
|
||||
|
||||
// Locale-related parts, mostly handled in ../text/qlocale.cpp
|
||||
|
||||
struct QCalendarLocale {
|
||||
quint16 m_language_id, m_script_id, m_territory_id;
|
||||
|
||||
#define rangeGetter(name) \
|
||||
QLocaleData::DataRange name() const { return { m_ ## name ## _idx, m_ ## name ## _size }; }
|
||||
|
||||
rangeGetter(longMonthStandalone) rangeGetter(longMonth)
|
||||
rangeGetter(shortMonthStandalone) rangeGetter(shortMonth)
|
||||
rangeGetter(narrowMonthStandalone) rangeGetter(narrowMonth)
|
||||
#undef rangeGetter
|
||||
|
||||
// Month name indexes:
|
||||
quint16 m_longMonthStandalone_idx, m_longMonth_idx;
|
||||
quint16 m_shortMonthStandalone_idx, m_shortMonth_idx;
|
||||
quint16 m_narrowMonthStandalone_idx, m_narrowMonth_idx;
|
||||
|
||||
// Twelve long month names (separated by commas) can add up to more than 256
|
||||
// QChars - e.g. kde_TZ gets to 264.
|
||||
quint16 m_longMonthStandalone_size, m_longMonth_size;
|
||||
quint8 m_shortMonthStandalone_size, m_shortMonth_size;
|
||||
quint8 m_narrowMonthStandalone_size, m_narrowMonth_size;
|
||||
};
|
||||
|
||||
// Partial implementation, of methods with common forms, in qcalendar.cpp
|
||||
class Q_CORE_EXPORT QCalendarBackend
|
||||
{
|
||||
friend class QCalendar;
|
||||
friend class QtPrivate::QCalendarRegistry;
|
||||
|
||||
public:
|
||||
virtual ~QCalendarBackend();
|
||||
virtual QString name() const = 0;
|
||||
|
||||
QStringList names() const;
|
||||
|
||||
QCalendar::System calendarSystem() const;
|
||||
QCalendar::SystemId calendarId() const { return m_id; }
|
||||
// Date queries:
|
||||
virtual int daysInMonth(int month, int year = QCalendar::Unspecified) const = 0;
|
||||
virtual int daysInYear(int year) const;
|
||||
virtual int monthsInYear(int year) const;
|
||||
virtual bool isDateValid(int year, int month, int day) const;
|
||||
// Properties of the calendar:
|
||||
virtual bool isLeapYear(int year) const = 0;
|
||||
virtual bool isLunar() const = 0;
|
||||
virtual bool isLuniSolar() const = 0;
|
||||
virtual bool isSolar() const = 0;
|
||||
virtual bool isProleptic() const;
|
||||
virtual bool hasYearZero() const;
|
||||
virtual int maximumDaysInMonth() const;
|
||||
virtual int minimumDaysInMonth() const;
|
||||
virtual int maximumMonthsInYear() const;
|
||||
// Julian Day conversions:
|
||||
virtual bool dateToJulianDay(int year, int month, int day, qint64 *jd) const = 0;
|
||||
virtual QCalendar::YearMonthDay julianDayToDate(qint64 jd) const = 0;
|
||||
// Day of week and week numbering:
|
||||
virtual int dayOfWeek(qint64 jd) const;
|
||||
|
||||
// Names of months and week-days (implemented in qlocale.cpp):
|
||||
virtual QString monthName(const QLocale &locale, int month, int year,
|
||||
QLocale::FormatType format) const;
|
||||
virtual QString standaloneMonthName(const QLocale &locale, int month, int year,
|
||||
QLocale::FormatType format) const;
|
||||
virtual QString weekDayName(const QLocale &locale, int day,
|
||||
QLocale::FormatType format) const;
|
||||
virtual QString standaloneWeekDayName(const QLocale &locale, int day,
|
||||
QLocale::FormatType format) const;
|
||||
|
||||
// Formatting of date-times (implemented in qlocale.cpp):
|
||||
virtual QString dateTimeToString(QStringView format, const QDateTime &datetime,
|
||||
QDate dateOnly, QTime timeOnly,
|
||||
const QLocale &locale) const;
|
||||
|
||||
bool isGregorian() const;
|
||||
|
||||
QCalendar::SystemId registerCustomBackend(const QStringList &names);
|
||||
|
||||
// Calendar enumeration by name:
|
||||
static QStringList availableCalendars();
|
||||
|
||||
protected:
|
||||
// Locale support:
|
||||
virtual const QCalendarLocale *localeMonthIndexData() const = 0;
|
||||
virtual const char16_t *localeMonthData() const = 0;
|
||||
|
||||
private:
|
||||
QCalendar::SystemId m_id;
|
||||
|
||||
void setIndex(size_t index);
|
||||
|
||||
// QCalendar's access to its registry:
|
||||
static const QCalendarBackend *fromName(QAnyStringView name);
|
||||
static const QCalendarBackend *fromId(QCalendar::SystemId id);
|
||||
// QCalendar's access to singletons:
|
||||
static const QCalendarBackend *fromEnum(QCalendar::System system);
|
||||
static const QCalendarBackend *gregorian();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCALENDAR_BACKEND_P_H
|
||||
@@ -1,77 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCALENDARMATH_P_H
|
||||
#define QCALENDARMATH_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of q*calendar.cpp. This header file may change from version to version
|
||||
// without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QRoundingDown {
|
||||
/*
|
||||
Division, rounding down (rather than towards zero).
|
||||
|
||||
From C++11 onwards, integer division is defined to round towards zero, so we
|
||||
can rely on that when implementing this. This is only used with denominator b
|
||||
> 0, so we only have to treat negative numerator, a, specially.
|
||||
*/
|
||||
|
||||
template<typename Int> constexpr Int qDiv(Int a, unsigned b)
|
||||
{ return (a - (a < 0 ? int(b - 1) : 0)) / int(b); }
|
||||
|
||||
template<typename Int> constexpr Int qMod(Int a, unsigned b)
|
||||
{ return a - qDiv(a, b) * b; }
|
||||
|
||||
} // QRoundingDown
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCALENDARMATH_P_H
|
||||
@@ -1,84 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 Intel Corporation.
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCBORCOMMON_P_H
|
||||
#define QCBORCOMMON_P_H
|
||||
|
||||
#include "qcborcommon.h"
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifdef QT_NO_DEBUG
|
||||
# define NDEBUG 1
|
||||
#endif
|
||||
#undef assert
|
||||
#define assert Q_ASSERT
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wunused-function")
|
||||
QT_WARNING_DISABLE_CLANG("-Wunused-function")
|
||||
QT_WARNING_DISABLE_CLANG("-Wundefined-internal")
|
||||
|
||||
#define CBOR_NO_VALIDATION_API 1
|
||||
#define CBOR_NO_PRETTY_API 1
|
||||
#define CBOR_API static inline
|
||||
#define CBOR_PRIVATE_API static inline
|
||||
#define CBOR_INLINE_API static inline
|
||||
|
||||
#include <cbor.h>
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
Q_DECLARE_TYPEINFO(CborValue, Q_PRIMITIVE_TYPE);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCBORCOMMON_P_H
|
||||
@@ -1,430 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCBORVALUE_P_H
|
||||
#define QCBORVALUE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API.
|
||||
// This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qcborvalue.h"
|
||||
|
||||
#if QT_CONFIG(cborstreamreader)
|
||||
# include "qcborstreamreader.h"
|
||||
#endif
|
||||
|
||||
#include <private/qglobal_p.h>
|
||||
#include <private/qstringconverter_p.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtCbor {
|
||||
struct Undefined {};
|
||||
struct Element
|
||||
{
|
||||
enum ValueFlag : quint32 {
|
||||
IsContainer = 0x0001,
|
||||
HasByteData = 0x0002,
|
||||
StringIsUtf16 = 0x0004,
|
||||
StringIsAscii = 0x0008
|
||||
};
|
||||
Q_DECLARE_FLAGS(ValueFlags, ValueFlag)
|
||||
|
||||
union {
|
||||
qint64 value;
|
||||
QCborContainerPrivate *container;
|
||||
};
|
||||
QCborValue::Type type;
|
||||
ValueFlags flags = {};
|
||||
|
||||
Element(qint64 v = 0, QCborValue::Type t = QCborValue::Undefined, ValueFlags f = {})
|
||||
: value(v), type(t), flags(f)
|
||||
{}
|
||||
|
||||
Element(QCborContainerPrivate *d, QCborValue::Type t, ValueFlags f = {})
|
||||
: container(d), type(t), flags(f | IsContainer)
|
||||
{}
|
||||
|
||||
double fpvalue() const
|
||||
{
|
||||
double d;
|
||||
memcpy(&d, &value, sizeof(d));
|
||||
return d;
|
||||
}
|
||||
};
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Element::ValueFlags)
|
||||
static_assert(sizeof(Element) == 16);
|
||||
|
||||
struct ByteData
|
||||
{
|
||||
QByteArray::size_type len;
|
||||
|
||||
const char *byte() const { return reinterpret_cast<const char *>(this + 1); }
|
||||
char *byte() { return reinterpret_cast<char *>(this + 1); }
|
||||
const QChar *utf16() const { return reinterpret_cast<const QChar *>(this + 1); }
|
||||
QChar *utf16() { return reinterpret_cast<QChar *>(this + 1); }
|
||||
|
||||
QByteArray toByteArray() const { return QByteArray(byte(), len); }
|
||||
QString toString() const { return QString(utf16(), len / 2); }
|
||||
QString toUtf8String() const { return QString::fromUtf8(byte(), len); }
|
||||
|
||||
QByteArray asByteArrayView() const { return QByteArray::fromRawData(byte(), len); }
|
||||
QLatin1String asLatin1() const { return QLatin1String(byte(), len); }
|
||||
QStringView asStringView() const{ return QStringView(utf16(), len / 2); }
|
||||
QString asQStringRaw() const { return QString::fromRawData(utf16(), len / 2); }
|
||||
};
|
||||
static_assert(std::is_trivial<ByteData>::value);
|
||||
static_assert(std::is_standard_layout<ByteData>::value);
|
||||
} // namespace QtCbor
|
||||
|
||||
Q_DECLARE_TYPEINFO(QtCbor::Element, Q_PRIMITIVE_TYPE);
|
||||
|
||||
class QCborContainerPrivate : public QSharedData
|
||||
{
|
||||
friend class QExplicitlySharedDataPointer<QCborContainerPrivate>;
|
||||
~QCborContainerPrivate();
|
||||
|
||||
public:
|
||||
enum ContainerDisposition { CopyContainer, MoveContainer };
|
||||
|
||||
QByteArray::size_type usedData = 0;
|
||||
QByteArray data;
|
||||
QList<QtCbor::Element> elements;
|
||||
|
||||
void deref() { if (!ref.deref()) delete this; }
|
||||
void compact(qsizetype reserved);
|
||||
static QCborContainerPrivate *clone(QCborContainerPrivate *d, qsizetype reserved = -1);
|
||||
static QCborContainerPrivate *detach(QCborContainerPrivate *d, qsizetype reserved);
|
||||
static QCborContainerPrivate *grow(QCborContainerPrivate *d, qsizetype index);
|
||||
|
||||
qptrdiff addByteData(const char *block, qsizetype len)
|
||||
{
|
||||
// This function does not do overflow checking, since the len parameter
|
||||
// is expected to be trusted. There's another version of this function
|
||||
// in decodeStringFromCbor(), which checks.
|
||||
|
||||
qptrdiff offset = data.size();
|
||||
|
||||
// align offset
|
||||
offset += alignof(QtCbor::ByteData) - 1;
|
||||
offset &= ~(alignof(QtCbor::ByteData) - 1);
|
||||
|
||||
qptrdiff increment = qptrdiff(sizeof(QtCbor::ByteData)) + len;
|
||||
|
||||
usedData += increment;
|
||||
data.resize(offset + increment);
|
||||
|
||||
char *ptr = data.begin() + offset;
|
||||
auto b = new (ptr) QtCbor::ByteData;
|
||||
b->len = len;
|
||||
if (block)
|
||||
memcpy(b->byte(), block, len);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
const QtCbor::ByteData *byteData(QtCbor::Element e) const
|
||||
{
|
||||
if ((e.flags & QtCbor::Element::HasByteData) == 0)
|
||||
return nullptr;
|
||||
|
||||
size_t offset = size_t(e.value);
|
||||
Q_ASSERT((offset % alignof(QtCbor::ByteData)) == 0);
|
||||
Q_ASSERT(offset + sizeof(QtCbor::ByteData) <= size_t(data.size()));
|
||||
|
||||
auto b = reinterpret_cast<const QtCbor::ByteData *>(data.constData() + offset);
|
||||
Q_ASSERT(offset + sizeof(*b) + size_t(b->len) <= size_t(data.size()));
|
||||
return b;
|
||||
}
|
||||
const QtCbor::ByteData *byteData(qsizetype idx) const
|
||||
{
|
||||
return byteData(elements.at(idx));
|
||||
}
|
||||
|
||||
QCborContainerPrivate *containerAt(qsizetype idx, QCborValue::Type type) const
|
||||
{
|
||||
const QtCbor::Element &e = elements.at(idx);
|
||||
if (e.type != type || (e.flags & QtCbor::Element::IsContainer) == 0)
|
||||
return nullptr;
|
||||
return e.container;
|
||||
}
|
||||
|
||||
void replaceAt_complex(QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp);
|
||||
void replaceAt_internal(QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp)
|
||||
{
|
||||
if (value.container)
|
||||
return replaceAt_complex(e, value, disp);
|
||||
|
||||
e = { value.value_helper(), value.type() };
|
||||
if (value.isContainer())
|
||||
e.container = nullptr;
|
||||
}
|
||||
void replaceAt(qsizetype idx, const QCborValue &value, ContainerDisposition disp = CopyContainer)
|
||||
{
|
||||
QtCbor::Element &e = elements[idx];
|
||||
if (e.flags & QtCbor::Element::IsContainer) {
|
||||
e.container->deref();
|
||||
e.container = nullptr;
|
||||
e.flags = {};
|
||||
} else if (auto b = byteData(e)) {
|
||||
usedData -= b->len + sizeof(QtCbor::ByteData);
|
||||
}
|
||||
replaceAt_internal(e, value, disp);
|
||||
}
|
||||
void insertAt(qsizetype idx, const QCborValue &value, ContainerDisposition disp = CopyContainer)
|
||||
{
|
||||
replaceAt_internal(*elements.insert(elements.begin() + int(idx), {}), value, disp);
|
||||
}
|
||||
|
||||
void append(QtCbor::Undefined)
|
||||
{
|
||||
elements.append(QtCbor::Element());
|
||||
}
|
||||
void append(qint64 value)
|
||||
{
|
||||
elements.append(QtCbor::Element(value , QCborValue::Integer));
|
||||
}
|
||||
void append(QCborTag tag)
|
||||
{
|
||||
elements.append(QtCbor::Element(qint64(tag), QCborValue::Tag));
|
||||
}
|
||||
void appendByteData(const char *data, qsizetype len, QCborValue::Type type,
|
||||
QtCbor::Element::ValueFlags extraFlags = {})
|
||||
{
|
||||
elements.append(QtCbor::Element(addByteData(data, len), type,
|
||||
QtCbor::Element::HasByteData | extraFlags));
|
||||
}
|
||||
void appendAsciiString(const QString &s);
|
||||
void appendAsciiString(const char *str, qsizetype len)
|
||||
{
|
||||
appendByteData(str, len, QCborValue::String, QtCbor::Element::StringIsAscii);
|
||||
}
|
||||
void appendUtf8String(const char *str, qsizetype len)
|
||||
{
|
||||
appendByteData(str, len, QCborValue::String);
|
||||
}
|
||||
void append(QLatin1String s)
|
||||
{
|
||||
if (!QtPrivate::isAscii(s))
|
||||
return append(QString(s));
|
||||
|
||||
// US-ASCII is a subset of UTF-8, so we can keep in 8-bit
|
||||
appendByteData(s.latin1(), s.size(), QCborValue::String,
|
||||
QtCbor::Element::StringIsAscii);
|
||||
}
|
||||
void appendAsciiString(QStringView s);
|
||||
|
||||
#if QT_STRINGVIEW_LEVEL < 2
|
||||
void append(const QString &s)
|
||||
{
|
||||
append(qToStringViewIgnoringNull(s));
|
||||
}
|
||||
#endif
|
||||
|
||||
void append(QStringView s)
|
||||
{
|
||||
if (QtPrivate::isAscii(s))
|
||||
appendAsciiString(s);
|
||||
else
|
||||
appendByteData(reinterpret_cast<const char *>(s.utf16()), s.size() * 2,
|
||||
QCborValue::String, QtCbor::Element::StringIsUtf16);
|
||||
}
|
||||
void append(const QCborValue &v)
|
||||
{
|
||||
insertAt(elements.size(), v);
|
||||
}
|
||||
|
||||
QByteArray byteArrayAt(qsizetype idx) const
|
||||
{
|
||||
const auto &e = elements.at(idx);
|
||||
const auto data = byteData(e);
|
||||
if (!data)
|
||||
return QByteArray();
|
||||
return data->toByteArray();
|
||||
}
|
||||
QString stringAt(qsizetype idx) const
|
||||
{
|
||||
const auto &e = elements.at(idx);
|
||||
const auto data = byteData(e);
|
||||
if (!data)
|
||||
return QString();
|
||||
if (e.flags & QtCbor::Element::StringIsUtf16)
|
||||
return data->toString();
|
||||
if (e.flags & QtCbor::Element::StringIsAscii)
|
||||
return data->asLatin1();
|
||||
return data->toUtf8String();
|
||||
}
|
||||
|
||||
static void resetValue(QCborValue &v)
|
||||
{
|
||||
v.container = nullptr;
|
||||
}
|
||||
|
||||
static QCborValue makeValue(QCborValue::Type type, qint64 n, QCborContainerPrivate *d = nullptr,
|
||||
ContainerDisposition disp = CopyContainer)
|
||||
{
|
||||
QCborValue result(type);
|
||||
result.n = n;
|
||||
result.container = d;
|
||||
if (d && disp == CopyContainer)
|
||||
d->ref.ref();
|
||||
return result;
|
||||
}
|
||||
|
||||
QCborValue valueAt(qsizetype idx) const
|
||||
{
|
||||
const auto &e = elements.at(idx);
|
||||
|
||||
if (e.flags & QtCbor::Element::IsContainer) {
|
||||
if (e.type == QCborValue::Tag && e.container->elements.size() != 2) {
|
||||
// invalid tags can be created due to incomplete parsing
|
||||
return makeValue(QCborValue::Invalid, 0, nullptr);
|
||||
}
|
||||
return makeValue(e.type, -1, e.container);
|
||||
} else if (e.flags & QtCbor::Element::HasByteData) {
|
||||
return makeValue(e.type, idx, const_cast<QCborContainerPrivate *>(this));
|
||||
}
|
||||
return makeValue(e.type, e.value);
|
||||
}
|
||||
QCborValue extractAt_complex(QtCbor::Element e);
|
||||
QCborValue extractAt(qsizetype idx)
|
||||
{
|
||||
QtCbor::Element e;
|
||||
qSwap(e, elements[idx]);
|
||||
|
||||
if (e.flags & QtCbor::Element::IsContainer) {
|
||||
if (e.type == QCborValue::Tag && e.container->elements.size() != 2) {
|
||||
// invalid tags can be created due to incomplete parsing
|
||||
e.container->deref();
|
||||
return makeValue(QCborValue::Invalid, 0, nullptr);
|
||||
}
|
||||
return makeValue(e.type, -1, e.container, MoveContainer);
|
||||
} else if (e.flags & QtCbor::Element::HasByteData) {
|
||||
return extractAt_complex(e);
|
||||
}
|
||||
return makeValue(e.type, e.value);
|
||||
}
|
||||
|
||||
static QtCbor::Element elementFromValue(const QCborValue &value)
|
||||
{
|
||||
if (value.n >= 0 && value.container)
|
||||
return value.container->elements.at(value.n);
|
||||
|
||||
QtCbor::Element e;
|
||||
e.value = value.n;
|
||||
e.type = value.t;
|
||||
if (value.container) {
|
||||
e.container = value.container;
|
||||
e.flags = QtCbor::Element::IsContainer;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
static int compareUtf8(const QtCbor::ByteData *b, const QLatin1String &s)
|
||||
{
|
||||
return QUtf8::compareUtf8(QByteArrayView(b->byte(), b->len), s);
|
||||
}
|
||||
|
||||
static int compareUtf8(const QtCbor::ByteData *b, QStringView s)
|
||||
{
|
||||
return QUtf8::compareUtf8(QByteArrayView(b->byte(), b->len), s);
|
||||
}
|
||||
|
||||
template<typename String>
|
||||
int stringCompareElement(const QtCbor::Element &e, String s) const
|
||||
{
|
||||
if (e.type != QCborValue::String)
|
||||
return int(e.type) - int(QCborValue::String);
|
||||
|
||||
const QtCbor::ByteData *b = byteData(e);
|
||||
if (!b)
|
||||
return s.isEmpty() ? 0 : -1;
|
||||
|
||||
if (e.flags & QtCbor::Element::StringIsUtf16)
|
||||
return QtPrivate::compareStrings(b->asStringView(), s);
|
||||
return compareUtf8(b, s);
|
||||
}
|
||||
|
||||
template<typename String>
|
||||
bool stringEqualsElement(const QtCbor::Element &e, String s) const
|
||||
{
|
||||
return stringCompareElement(e, s) == 0;
|
||||
}
|
||||
|
||||
template<typename String>
|
||||
bool stringEqualsElement(qsizetype idx, String s) const
|
||||
{
|
||||
return stringEqualsElement(elements.at(idx), s);
|
||||
}
|
||||
|
||||
static int compareElement_helper(const QCborContainerPrivate *c1, QtCbor::Element e1,
|
||||
const QCborContainerPrivate *c2, QtCbor::Element e2);
|
||||
int compareElement(qsizetype idx, const QCborValue &value) const
|
||||
{
|
||||
auto &e1 = elements.at(idx);
|
||||
auto e2 = elementFromValue(value);
|
||||
return compareElement_helper(this, e1, value.container, e2);
|
||||
}
|
||||
|
||||
void removeAt(qsizetype idx)
|
||||
{
|
||||
replaceAt(idx, {});
|
||||
elements.remove(idx);
|
||||
}
|
||||
|
||||
#if QT_CONFIG(cborstreamreader)
|
||||
void decodeValueFromCbor(QCborStreamReader &reader, int remainingStackDepth);
|
||||
void decodeStringFromCbor(QCborStreamReader &reader);
|
||||
static inline void setErrorInReader(QCborStreamReader &reader, QCborError error);
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCBORVALUE_P_H
|
||||
@@ -1,112 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCFSOCKETNOTIFIER_P_H
|
||||
#define QCFSOCKETNOTIFIER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/qabstracteventdispatcher.h>
|
||||
#include <QtCore/qhash.h>
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct MacSocketInfo {
|
||||
MacSocketInfo() : socket(0), runloop(0), readNotifier(0), writeNotifier(0),
|
||||
readEnabled(false), writeEnabled(false) {}
|
||||
CFSocketRef socket;
|
||||
CFRunLoopSourceRef runloop;
|
||||
QObject *readNotifier;
|
||||
QObject *writeNotifier;
|
||||
bool readEnabled;
|
||||
bool writeEnabled;
|
||||
};
|
||||
typedef QHash<int, MacSocketInfo *> MacSocketHash;
|
||||
|
||||
typedef void (*MaybeCancelWaitForMoreEventsFn)(QAbstractEventDispatcher *hostEventDispacher);
|
||||
|
||||
// The CoreFoundationSocketNotifier class implements socket notifiers support using
|
||||
// CFSocket for event dispatchers running on top of the Core Foundation run loop system.
|
||||
// (currently Mac and iOS)
|
||||
//
|
||||
// The principal functions are registerSocketNotifier() and unregisterSocketNotifier().
|
||||
//
|
||||
// setHostEventDispatcher() should be called at startup.
|
||||
// removeSocketNotifiers() should be called at shutdown.
|
||||
//
|
||||
class Q_CORE_EXPORT QCFSocketNotifier
|
||||
{
|
||||
public:
|
||||
QCFSocketNotifier();
|
||||
~QCFSocketNotifier();
|
||||
void setHostEventDispatcher(QAbstractEventDispatcher *hostEventDispacher);
|
||||
void setMaybeCancelWaitForMoreEventsCallback(MaybeCancelWaitForMoreEventsFn callBack);
|
||||
void registerSocketNotifier(QSocketNotifier *notifier);
|
||||
void unregisterSocketNotifier(QSocketNotifier *notifier);
|
||||
void removeSocketNotifiers();
|
||||
|
||||
private:
|
||||
void destroyRunLoopObserver();
|
||||
|
||||
static void unregisterSocketInfo(MacSocketInfo *socketInfo);
|
||||
static void enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info);
|
||||
|
||||
MacSocketHash macSockets;
|
||||
QAbstractEventDispatcher *eventDispatcher;
|
||||
MaybeCancelWaitForMoreEventsFn maybeCancelWaitForMoreEvents;
|
||||
CFRunLoopObserverRef enableNotifiersObserver;
|
||||
|
||||
friend void qt_mac_socket_callback(CFSocketRef, CFSocketCallBackType, CFDataRef, const void *, void *);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,70 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
// no, this is not a misspelling of "coffeeparser"
|
||||
#ifndef QCOFFPEPARSER_H
|
||||
#define QCOFFPEPARSER_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qlibrary_p.h"
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct QCoffPeParser
|
||||
{
|
||||
static QLibraryScanResult parse(QByteArrayView data, QString *errMsg);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
||||
|
||||
#endif // QCOFFPEPARSER_H
|
||||
@@ -1,141 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2013 Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCOLLATOR_P_H
|
||||
#define QCOLLATOR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qcollator.h"
|
||||
#include <QList>
|
||||
#if QT_CONFIG(icu)
|
||||
#include <unicode/ucol.h>
|
||||
#elif defined(Q_OS_MACOS)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#elif defined(Q_OS_WIN)
|
||||
#include <qt_windows.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if QT_CONFIG(icu)
|
||||
typedef UCollator *CollatorType;
|
||||
typedef QByteArray CollatorKeyType;
|
||||
const CollatorType NoCollator = nullptr;
|
||||
|
||||
#elif defined(Q_OS_MACOS)
|
||||
typedef CollatorRef CollatorType;
|
||||
typedef QList<UCCollationValue> CollatorKeyType;
|
||||
const CollatorType NoCollator = 0;
|
||||
|
||||
#elif defined(Q_OS_WIN)
|
||||
typedef QString CollatorKeyType;
|
||||
typedef int CollatorType;
|
||||
const CollatorType NoCollator = 0;
|
||||
|
||||
#else // posix - ignores CollatorType collator, only handles system locale
|
||||
typedef QList<wchar_t> CollatorKeyType;
|
||||
typedef bool CollatorType;
|
||||
const CollatorType NoCollator = false;
|
||||
#endif
|
||||
|
||||
class QCollatorPrivate
|
||||
{
|
||||
public:
|
||||
QAtomicInt ref = 1;
|
||||
QLocale locale;
|
||||
#if defined(Q_OS_WIN) && !QT_CONFIG(icu)
|
||||
LCID localeID;
|
||||
#endif
|
||||
Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive;
|
||||
bool numericMode = false;
|
||||
bool ignorePunctuation = false;
|
||||
bool dirty = true;
|
||||
|
||||
CollatorType collator = NoCollator;
|
||||
|
||||
QCollatorPrivate(const QLocale &locale) : locale(locale) {}
|
||||
~QCollatorPrivate() { cleanup(); }
|
||||
bool isC() { return locale.language() == QLocale::C; }
|
||||
|
||||
void clear() {
|
||||
cleanup();
|
||||
collator = NoCollator;
|
||||
}
|
||||
|
||||
// Implemented by each back-end, in its own way:
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY_MOVE(QCollatorPrivate)
|
||||
};
|
||||
|
||||
class QCollatorSortKeyPrivate : public QSharedData
|
||||
{
|
||||
friend class QCollator;
|
||||
public:
|
||||
template <typename...T>
|
||||
explicit QCollatorSortKeyPrivate(T &&...args)
|
||||
: QSharedData()
|
||||
, m_key(std::forward<T>(args)...)
|
||||
{
|
||||
}
|
||||
|
||||
CollatorKeyType m_key;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY_MOVE(QCollatorSortKeyPrivate)
|
||||
};
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCOLLATOR_P_H
|
||||
@@ -1,118 +0,0 @@
|
||||
#define QT_FEATURE_use_bfd_linker -1
|
||||
|
||||
#define QT_FEATURE_use_gold_linker -1
|
||||
|
||||
#define QT_FEATURE_use_lld_linker -1
|
||||
|
||||
#define QT_FEATURE_use_mold_linker -1
|
||||
|
||||
#define QT_FEATURE_android_style_assets -1
|
||||
|
||||
#define QT_FEATURE_gc_binaries -1
|
||||
|
||||
#define QT_FEATURE_developer_build -1
|
||||
|
||||
#define QT_FEATURE_no_prefix -1
|
||||
|
||||
#define QT_FEATURE_private_tests -1
|
||||
|
||||
#define QT_FEATURE_debug 1
|
||||
|
||||
#define QT_FEATURE_reduce_exports -1
|
||||
|
||||
#define QT_FEATURE_reduce_relocations -1
|
||||
|
||||
#define QT_FEATURE_sse2 -1
|
||||
|
||||
#define QT_FEATURE_sse3 -1
|
||||
|
||||
#define QT_FEATURE_ssse3 -1
|
||||
|
||||
#define QT_FEATURE_sse4_1 -1
|
||||
|
||||
#define QT_FEATURE_sse4_2 -1
|
||||
|
||||
#define QT_FEATURE_avx -1
|
||||
|
||||
#define QT_FEATURE_f16c -1
|
||||
|
||||
#define QT_FEATURE_avx2 -1
|
||||
|
||||
#define QT_FEATURE_avx512f -1
|
||||
|
||||
#define QT_FEATURE_avx512er -1
|
||||
|
||||
#define QT_FEATURE_avx512cd -1
|
||||
|
||||
#define QT_FEATURE_avx512pf -1
|
||||
|
||||
#define QT_FEATURE_avx512dq -1
|
||||
|
||||
#define QT_FEATURE_avx512bw -1
|
||||
|
||||
#define QT_FEATURE_avx512vl -1
|
||||
|
||||
#define QT_FEATURE_avx512ifma -1
|
||||
|
||||
#define QT_FEATURE_avx512vbmi -1
|
||||
|
||||
#define QT_FEATURE_aesni -1
|
||||
|
||||
#define QT_FEATURE_rdrnd -1
|
||||
|
||||
#define QT_FEATURE_rdseed -1
|
||||
|
||||
#define QT_FEATURE_shani -1
|
||||
|
||||
#define QT_FEATURE_mips_dsp -1
|
||||
|
||||
#define QT_FEATURE_mips_dspr2 -1
|
||||
|
||||
#define QT_FEATURE_neon -1
|
||||
|
||||
#define QT_FEATURE_arm_crc32 -1
|
||||
|
||||
#define QT_FEATURE_arm_crypto -1
|
||||
|
||||
#define QT_FEATURE_posix_fallocate -1
|
||||
|
||||
#define QT_FEATURE_alloca_h -1
|
||||
|
||||
#define QT_FEATURE_alloca_malloc_h 1
|
||||
|
||||
#define QT_FEATURE_alloca 1
|
||||
|
||||
#define QT_FEATURE_stack_protector_strong -1
|
||||
|
||||
#define QT_FEATURE_system_zlib -1
|
||||
|
||||
#define QT_FEATURE_zstd -1
|
||||
|
||||
#define QT_FEATURE_stdlib_libcpp -1
|
||||
|
||||
#define QT_FEATURE_dbus -1
|
||||
|
||||
#define QT_FEATURE_dbus_linked -1
|
||||
|
||||
#define QT_FEATURE_gui 1
|
||||
|
||||
#define QT_FEATURE_network -1
|
||||
|
||||
#define QT_FEATURE_printsupport -1
|
||||
|
||||
#define QT_FEATURE_sql -1
|
||||
|
||||
#define QT_FEATURE_testlib -1
|
||||
|
||||
#define QT_FEATURE_widgets 1
|
||||
|
||||
#define QT_FEATURE_xml 1
|
||||
|
||||
#define QT_FEATURE_libudev -1
|
||||
|
||||
#define QT_FEATURE_dlopen -1
|
||||
|
||||
#define QT_FEATURE_relocatable 1
|
||||
|
||||
#define QT_FEATURE_intelcet -1
|
||||
|
||||
@@ -1,461 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCORE_MAC_P_H
|
||||
#define QCORE_MAC_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of other Qt classes. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qglobal_p.h"
|
||||
|
||||
#include <QtCore/qoperatingsystemversion.h>
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
#include <mach/port.h>
|
||||
struct mach_header;
|
||||
typedef int kern_return_t;
|
||||
typedef mach_port_t io_object_t;
|
||||
extern "C" {
|
||||
kern_return_t IOObjectRetain(io_object_t object);
|
||||
kern_return_t IOObjectRelease(io_object_t object);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __IMAGECAPTURE__
|
||||
# define __IMAGECAPTURE__
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#if defined(QT_BOOTSTRAPPED)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#else
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <functional>
|
||||
#endif
|
||||
|
||||
#include "qstring.h"
|
||||
#include "qscopedpointer.h"
|
||||
#include "qpair.h"
|
||||
|
||||
#if defined( __OBJC__) && defined(QT_NAMESPACE)
|
||||
#define QT_NAMESPACE_ALIAS_OBJC_CLASS(__KLASS__) @compatibility_alias __KLASS__ QT_MANGLE_NAMESPACE(__KLASS__)
|
||||
#else
|
||||
#define QT_NAMESPACE_ALIAS_OBJC_CLASS(__KLASS__)
|
||||
#endif
|
||||
|
||||
#define QT_MAC_WEAK_IMPORT(symbol) extern "C" decltype(symbol) symbol __attribute__((weak_import));
|
||||
|
||||
#if defined(__OBJC__)
|
||||
#define QT_DECLARE_NAMESPACED_OBJC_INTERFACE(classname, definition) \
|
||||
@interface QT_MANGLE_NAMESPACE(classname) : \
|
||||
definition \
|
||||
@end \
|
||||
QT_NAMESPACE_ALIAS_OBJC_CLASS(classname);
|
||||
#else
|
||||
#define QT_DECLARE_NAMESPACED_OBJC_INTERFACE(classname, definition) \
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(classname)); \
|
||||
using classname = QT_MANGLE_NAMESPACE(classname);
|
||||
#endif
|
||||
|
||||
#define QT_FORWARD_DECLARE_OBJC_ENUM(name, type) \
|
||||
typedef type name;
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
template <typename T, typename U, auto RetainFunction, auto ReleaseFunction>
|
||||
class QAppleRefCounted
|
||||
{
|
||||
public:
|
||||
QAppleRefCounted() : value() {}
|
||||
QAppleRefCounted(const T &t) : value(t) {}
|
||||
QAppleRefCounted(T &&t) noexcept(std::is_nothrow_move_constructible<T>::value)
|
||||
: value(std::move(t)) {}
|
||||
QAppleRefCounted(QAppleRefCounted &&other)
|
||||
noexcept(std::is_nothrow_move_assignable<T>::value &&
|
||||
std::is_nothrow_move_constructible<T>::value)
|
||||
: value(qExchange(other.value, T())) {}
|
||||
QAppleRefCounted(const QAppleRefCounted &other) : value(other.value) { if (value) RetainFunction(value); }
|
||||
~QAppleRefCounted() { if (value) ReleaseFunction(value); }
|
||||
operator T() const { return value; }
|
||||
void swap(QAppleRefCounted &other) noexcept(noexcept(qSwap(value, other.value)))
|
||||
{ qSwap(value, other.value); }
|
||||
QAppleRefCounted &operator=(const QAppleRefCounted &other)
|
||||
{ QAppleRefCounted copy(other); swap(copy); return *this; }
|
||||
QAppleRefCounted &operator=(QAppleRefCounted &&other)
|
||||
noexcept(std::is_nothrow_move_assignable<T>::value &&
|
||||
std::is_nothrow_move_constructible<T>::value)
|
||||
{ QAppleRefCounted moved(std::move(other)); swap(moved); return *this; }
|
||||
T *operator&() { return &value; }
|
||||
protected:
|
||||
T value;
|
||||
};
|
||||
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
class QMacRootLevelAutoReleasePool
|
||||
{
|
||||
public:
|
||||
QMacRootLevelAutoReleasePool();
|
||||
~QMacRootLevelAutoReleasePool();
|
||||
private:
|
||||
QScopedPointer<QMacAutoReleasePool> pool;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
Helper class that automates reference counting for CFtypes.
|
||||
After constructing the QCFType object, it can be copied like a
|
||||
value-based type.
|
||||
|
||||
Note that you must own the object you are wrapping.
|
||||
This is typically the case if you get the object from a Core
|
||||
Foundation function with the word "Create" or "Copy" in it. If
|
||||
you got the object from a "Get" function, either retain it or use
|
||||
constructFromGet(). One exception to this rule is the
|
||||
HIThemeGet*Shape functions, which in reality are "Copy" functions.
|
||||
*/
|
||||
template <typename T>
|
||||
class QCFType : public QAppleRefCounted<T, CFTypeRef, CFRetain, CFRelease>
|
||||
{
|
||||
using Base = QAppleRefCounted<T, CFTypeRef, CFRetain, CFRelease>;
|
||||
public:
|
||||
using Base::Base;
|
||||
explicit QCFType(CFTypeRef r) : Base(static_cast<T>(r)) {}
|
||||
template <typename X> X as() const { return reinterpret_cast<X>(this->value); }
|
||||
static QCFType constructFromGet(const T &t)
|
||||
{
|
||||
if (t)
|
||||
CFRetain(t);
|
||||
return QCFType<T>(t);
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
template <typename T>
|
||||
class QIOType : public QAppleRefCounted<T, io_object_t, IOObjectRetain, IOObjectRelease>
|
||||
{
|
||||
using QAppleRefCounted<T, io_object_t, IOObjectRetain, IOObjectRelease>::QAppleRefCounted;
|
||||
};
|
||||
#endif
|
||||
|
||||
class Q_CORE_EXPORT QCFString : public QCFType<CFStringRef>
|
||||
{
|
||||
public:
|
||||
using QCFType<CFStringRef>::QCFType;
|
||||
inline QCFString(const QString &str) : QCFType<CFStringRef>(0), string(str) {}
|
||||
inline QCFString(const CFStringRef cfstr = 0) : QCFType<CFStringRef>(cfstr) {}
|
||||
inline QCFString(const QCFType<CFStringRef> &other) : QCFType<CFStringRef>(other) {}
|
||||
operator QString() const;
|
||||
operator CFStringRef() const;
|
||||
|
||||
private:
|
||||
QString string;
|
||||
};
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
Q_CORE_EXPORT bool qt_mac_applicationIsInDarkMode();
|
||||
Q_CORE_EXPORT bool qt_mac_runningUnderRosetta();
|
||||
Q_CORE_EXPORT std::optional<uint32_t> qt_mac_sipConfiguration();
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool);
|
||||
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QCFString &string);
|
||||
#endif
|
||||
|
||||
Q_CORE_EXPORT bool qt_apple_isApplicationExtension();
|
||||
Q_CORE_EXPORT bool qt_apple_isSandboxed();
|
||||
|
||||
#if !defined(QT_BOOTSTRAPPED) && defined(__OBJC__)
|
||||
QT_END_NAMESPACE
|
||||
@interface NSObject (QtSandboxHelpers)
|
||||
- (id)qt_valueForPrivateKey:(NSString *)key;
|
||||
@end
|
||||
QT_BEGIN_NAMESPACE
|
||||
#endif
|
||||
|
||||
#if !defined(QT_BOOTSTRAPPED) && !defined(Q_OS_WATCHOS)
|
||||
QT_END_NAMESPACE
|
||||
# if defined(Q_OS_MACOS)
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSApplication);
|
||||
using AppleApplication = NSApplication;
|
||||
# else
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(UIApplication);
|
||||
using AppleApplication = UIApplication;
|
||||
# endif
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_CORE_EXPORT AppleApplication *qt_apple_sharedApplication();
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#if !defined(QT_BOOTSTRAPPED)
|
||||
#define QT_USE_APPLE_UNIFIED_LOGGING
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#include <os/log.h>
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT AppleUnifiedLogger
|
||||
{
|
||||
public:
|
||||
static bool messageHandler(QtMsgType msgType, const QMessageLogContext &context, const QString &message,
|
||||
const QString &subsystem = QString());
|
||||
static bool willMirrorToStderr();
|
||||
private:
|
||||
static os_log_type_t logTypeForMessageType(QtMsgType msgType);
|
||||
static os_log_t cachedLog(const QString &subsystem, const QString &category);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#if !defined(QT_BOOTSTRAPPED)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#include <os/activity.h>
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template <typename T> using QAppleOsType = QAppleRefCounted<T, void *, os_retain, os_release>;
|
||||
|
||||
class Q_CORE_EXPORT QAppleLogActivity
|
||||
{
|
||||
public:
|
||||
QAppleLogActivity() : activity(nullptr) {}
|
||||
QAppleLogActivity(os_activity_t activity) : activity(activity) {}
|
||||
~QAppleLogActivity() { if (activity) leave(); }
|
||||
|
||||
Q_DISABLE_COPY(QAppleLogActivity)
|
||||
|
||||
QAppleLogActivity(QAppleLogActivity &&other)
|
||||
: activity(qExchange(other.activity, nullptr)), state(other.state)
|
||||
{
|
||||
}
|
||||
|
||||
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QAppleLogActivity)
|
||||
|
||||
QAppleLogActivity &&enter()
|
||||
{
|
||||
if (activity)
|
||||
os_activity_scope_enter(static_cast<os_activity_t>(*this), &state);
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
void leave()
|
||||
{
|
||||
if (activity)
|
||||
os_activity_scope_leave(&state);
|
||||
}
|
||||
|
||||
operator os_activity_t()
|
||||
{
|
||||
return reinterpret_cast<os_activity_t>(static_cast<void *>(activity));
|
||||
}
|
||||
|
||||
void swap(QAppleLogActivity &other)
|
||||
{
|
||||
qSwap(activity, other.activity);
|
||||
qSwap(state, other.state);
|
||||
}
|
||||
|
||||
private:
|
||||
// Work around API_AVAILABLE not working for templates by using void*
|
||||
QAppleOsType<void *> activity;
|
||||
os_activity_scope_state_s state;
|
||||
};
|
||||
|
||||
#define QT_APPLE_LOG_ACTIVITY_CREATE(condition, description, parent) []() { \
|
||||
if (!(condition)) \
|
||||
return QAppleLogActivity(); \
|
||||
return QAppleLogActivity(os_activity_create(description, parent, OS_ACTIVITY_FLAG_DEFAULT)); \
|
||||
}()
|
||||
|
||||
#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT_3(condition, description, parent) QT_APPLE_LOG_ACTIVITY_CREATE(condition, description, parent)
|
||||
#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT_2(description, parent) QT_APPLE_LOG_ACTIVITY_WITH_PARENT_3(true, description, parent)
|
||||
#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT(...) QT_OVERLOADED_MACRO(QT_APPLE_LOG_ACTIVITY_WITH_PARENT, __VA_ARGS__)
|
||||
|
||||
QT_MAC_WEAK_IMPORT(_os_activity_current);
|
||||
#define QT_APPLE_LOG_ACTIVITY_2(condition, description) QT_APPLE_LOG_ACTIVITY_CREATE(condition, description, OS_ACTIVITY_CURRENT)
|
||||
#define QT_APPLE_LOG_ACTIVITY_1(description) QT_APPLE_LOG_ACTIVITY_2(true, description)
|
||||
#define QT_APPLE_LOG_ACTIVITY(...) QT_OVERLOADED_MACRO(QT_APPLE_LOG_ACTIVITY, __VA_ARGS__)
|
||||
|
||||
#define QT_APPLE_SCOPED_LOG_ACTIVITY(...) QAppleLogActivity scopedLogActivity = QT_APPLE_LOG_ACTIVITY(__VA_ARGS__).enter();
|
||||
|
||||
#endif // !defined(QT_BOOTSTRAPPED)
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
class Q_CORE_EXPORT QMacNotificationObserver
|
||||
{
|
||||
public:
|
||||
QMacNotificationObserver() {}
|
||||
|
||||
#if defined( __OBJC__)
|
||||
template<typename Functor>
|
||||
QMacNotificationObserver(NSObject *object, NSNotificationName name, Functor callback) {
|
||||
observer = [[NSNotificationCenter defaultCenter] addObserverForName:name
|
||||
object:object queue:nil usingBlock:^(NSNotification *) {
|
||||
callback();
|
||||
}
|
||||
];
|
||||
}
|
||||
#endif
|
||||
|
||||
QMacNotificationObserver(const QMacNotificationObserver &other) = delete;
|
||||
QMacNotificationObserver(QMacNotificationObserver &&other)
|
||||
: observer(qExchange(other.observer, nullptr))
|
||||
{
|
||||
}
|
||||
|
||||
QMacNotificationObserver &operator=(const QMacNotificationObserver &other) = delete;
|
||||
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QMacNotificationObserver)
|
||||
|
||||
void swap(QMacNotificationObserver &other) noexcept
|
||||
{
|
||||
qSwap(observer, other.observer);
|
||||
}
|
||||
|
||||
void remove();
|
||||
~QMacNotificationObserver() { remove(); }
|
||||
|
||||
private:
|
||||
NSObject *observer = nullptr;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
QT_DECLARE_NAMESPACED_OBJC_INTERFACE(KeyValueObserver, NSObject)
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QMacKeyValueObserver
|
||||
{
|
||||
public:
|
||||
using Callback = std::function<void()>;
|
||||
|
||||
QMacKeyValueObserver() = default;
|
||||
|
||||
#if defined( __OBJC__)
|
||||
// Note: QMacKeyValueObserver must not outlive the object observed!
|
||||
QMacKeyValueObserver(NSObject *object, NSString *keyPath, Callback callback,
|
||||
NSKeyValueObservingOptions options = NSKeyValueObservingOptionNew)
|
||||
: object(object), keyPath(keyPath), callback(new Callback(callback))
|
||||
{
|
||||
addObserver(options);
|
||||
}
|
||||
#endif
|
||||
|
||||
QMacKeyValueObserver(const QMacKeyValueObserver &other);
|
||||
|
||||
QMacKeyValueObserver(QMacKeyValueObserver &&other) noexcept { swap(other); }
|
||||
|
||||
~QMacKeyValueObserver() { removeObserver(); }
|
||||
|
||||
QMacKeyValueObserver &operator=(const QMacKeyValueObserver &other)
|
||||
{
|
||||
QMacKeyValueObserver tmp(other);
|
||||
swap(tmp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QMacKeyValueObserver)
|
||||
|
||||
void removeObserver();
|
||||
|
||||
void swap(QMacKeyValueObserver &other) noexcept
|
||||
{
|
||||
qSwap(object, other.object);
|
||||
qSwap(keyPath, other.keyPath);
|
||||
qSwap(callback, other.callback);
|
||||
}
|
||||
|
||||
private:
|
||||
#if defined( __OBJC__)
|
||||
void addObserver(NSKeyValueObservingOptions options);
|
||||
#endif
|
||||
|
||||
NSObject *object = nullptr;
|
||||
NSString *keyPath = nullptr;
|
||||
std::unique_ptr<Callback> callback;
|
||||
|
||||
static KeyValueObserver *observer;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
class Q_CORE_EXPORT QMacVersion
|
||||
{
|
||||
public:
|
||||
enum VersionTarget {
|
||||
ApplicationBinary,
|
||||
QtLibraries
|
||||
};
|
||||
|
||||
static QOperatingSystemVersion buildSDK(VersionTarget target = ApplicationBinary);
|
||||
static QOperatingSystemVersion deploymentTarget(VersionTarget target = ApplicationBinary);
|
||||
static QOperatingSystemVersion currentRuntime();
|
||||
|
||||
private:
|
||||
QMacVersion() = default;
|
||||
using VersionTuple = QPair<QOperatingSystemVersion, QOperatingSystemVersion>;
|
||||
static VersionTuple versionsForImage(const mach_header *machHeader);
|
||||
static VersionTuple applicationVersion();
|
||||
static VersionTuple libraryVersion();
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCORE_MAC_P_H
|
||||
@@ -1,400 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCORE_UNIX_P_H
|
||||
#define QCORE_UNIX_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of Qt code on Unix. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qplatformdefs.h"
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qatomic.h"
|
||||
#include "qbytearray.h"
|
||||
|
||||
#ifndef Q_OS_UNIX
|
||||
# error "qcore_unix_p.h included on a non-Unix system"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if !defined (Q_OS_VXWORKS)
|
||||
# if !defined(Q_OS_HPUX) || defined(__ia64)
|
||||
# include <sys/select.h>
|
||||
# endif
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <selectLib.h>
|
||||
#endif
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if !defined(QT_POSIX_IPC) && !defined(QT_NO_SHAREDMEMORY) && !defined(Q_OS_ANDROID)
|
||||
# include <sys/ipc.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_VXWORKS)
|
||||
# include <ioLib.h>
|
||||
#endif
|
||||
|
||||
#ifdef QT_NO_NATIVE_POLL
|
||||
# include "qpoll_p.h"
|
||||
#else
|
||||
# include <poll.h>
|
||||
#endif
|
||||
|
||||
struct sockaddr;
|
||||
|
||||
#define EINTR_LOOP(var, cmd) \
|
||||
do { \
|
||||
var = cmd; \
|
||||
} while (var == -1 && errno == EINTR)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECLARE_TYPEINFO(pollfd, Q_PRIMITIVE_TYPE);
|
||||
|
||||
// Internal operator functions for timespecs
|
||||
constexpr inline timespec &normalizedTimespec(timespec &t)
|
||||
{
|
||||
while (t.tv_nsec >= 1000000000) {
|
||||
++t.tv_sec;
|
||||
t.tv_nsec -= 1000000000;
|
||||
}
|
||||
while (t.tv_nsec < 0) {
|
||||
--t.tv_sec;
|
||||
t.tv_nsec += 1000000000;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
constexpr inline bool operator<(const timespec &t1, const timespec &t2)
|
||||
{ return t1.tv_sec < t2.tv_sec || (t1.tv_sec == t2.tv_sec && t1.tv_nsec < t2.tv_nsec); }
|
||||
constexpr inline bool operator==(const timespec &t1, const timespec &t2)
|
||||
{ return t1.tv_sec == t2.tv_sec && t1.tv_nsec == t2.tv_nsec; }
|
||||
constexpr inline bool operator!=(const timespec &t1, const timespec &t2)
|
||||
{ return !(t1 == t2); }
|
||||
constexpr inline timespec &operator+=(timespec &t1, const timespec &t2)
|
||||
{
|
||||
t1.tv_sec += t2.tv_sec;
|
||||
t1.tv_nsec += t2.tv_nsec;
|
||||
return normalizedTimespec(t1);
|
||||
}
|
||||
constexpr inline timespec operator+(const timespec &t1, const timespec &t2)
|
||||
{
|
||||
timespec tmp = {};
|
||||
tmp.tv_sec = t1.tv_sec + t2.tv_sec;
|
||||
tmp.tv_nsec = t1.tv_nsec + t2.tv_nsec;
|
||||
return normalizedTimespec(tmp);
|
||||
}
|
||||
constexpr inline timespec operator-(const timespec &t1, const timespec &t2)
|
||||
{
|
||||
timespec tmp = {};
|
||||
tmp.tv_sec = t1.tv_sec - (t2.tv_sec - 1);
|
||||
tmp.tv_nsec = t1.tv_nsec - (t2.tv_nsec + 1000000000);
|
||||
return normalizedTimespec(tmp);
|
||||
}
|
||||
constexpr inline timespec operator*(const timespec &t1, int mul)
|
||||
{
|
||||
timespec tmp = {};
|
||||
tmp.tv_sec = t1.tv_sec * mul;
|
||||
tmp.tv_nsec = t1.tv_nsec * mul;
|
||||
return normalizedTimespec(tmp);
|
||||
}
|
||||
inline timeval timespecToTimeval(const timespec &ts)
|
||||
{
|
||||
timeval tv;
|
||||
tv.tv_sec = ts.tv_sec;
|
||||
tv.tv_usec = ts.tv_nsec / 1000;
|
||||
return tv;
|
||||
}
|
||||
|
||||
|
||||
inline void qt_ignore_sigpipe()
|
||||
{
|
||||
// Set to ignore SIGPIPE once only.
|
||||
static QBasicAtomicInt atom = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
if (!atom.loadRelaxed()) {
|
||||
// More than one thread could turn off SIGPIPE at the same time
|
||||
// But that's acceptable because they all would be doing the same
|
||||
// action
|
||||
struct sigaction noaction;
|
||||
memset(&noaction, 0, sizeof(noaction));
|
||||
noaction.sa_handler = SIG_IGN;
|
||||
::sigaction(SIGPIPE, &noaction, nullptr);
|
||||
atom.storeRelaxed(1);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(Q_PROCESSOR_X86_32) && defined(__GLIBC__)
|
||||
# if !__GLIBC_PREREQ(2, 22)
|
||||
Q_CORE_EXPORT int qt_open64(const char *pathname, int flags, mode_t);
|
||||
# undef QT_OPEN
|
||||
# define QT_OPEN qt_open64
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// don't call QT_OPEN or ::open
|
||||
// call qt_safe_open
|
||||
static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 0777)
|
||||
{
|
||||
#ifdef O_CLOEXEC
|
||||
flags |= O_CLOEXEC;
|
||||
#endif
|
||||
int fd;
|
||||
EINTR_LOOP(fd, QT_OPEN(pathname, flags, mode));
|
||||
|
||||
#ifndef O_CLOEXEC
|
||||
if (fd != -1)
|
||||
::fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
#endif
|
||||
|
||||
return fd;
|
||||
}
|
||||
#undef QT_OPEN
|
||||
#define QT_OPEN qt_safe_open
|
||||
|
||||
#ifndef Q_OS_VXWORKS // no POSIX pipes in VxWorks
|
||||
// don't call ::pipe
|
||||
// call qt_safe_pipe
|
||||
static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
|
||||
{
|
||||
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
|
||||
|
||||
#ifdef QT_THREADSAFE_CLOEXEC
|
||||
// use pipe2
|
||||
flags |= O_CLOEXEC;
|
||||
return ::pipe2(pipefd, flags); // pipe2 is documented not to return EINTR
|
||||
#else
|
||||
int ret = ::pipe(pipefd);
|
||||
if (ret == -1)
|
||||
return -1;
|
||||
|
||||
::fcntl(pipefd[0], F_SETFD, FD_CLOEXEC);
|
||||
::fcntl(pipefd[1], F_SETFD, FD_CLOEXEC);
|
||||
|
||||
// set non-block too?
|
||||
if (flags & O_NONBLOCK) {
|
||||
::fcntl(pipefd[0], F_SETFL, ::fcntl(pipefd[0], F_GETFL) | O_NONBLOCK);
|
||||
::fcntl(pipefd[1], F_SETFL, ::fcntl(pipefd[1], F_GETFL) | O_NONBLOCK);
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // Q_OS_VXWORKS
|
||||
|
||||
// don't call dup or fcntl(F_DUPFD)
|
||||
static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC)
|
||||
{
|
||||
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
|
||||
|
||||
#ifdef F_DUPFD_CLOEXEC
|
||||
int cmd = F_DUPFD;
|
||||
if (flags & FD_CLOEXEC)
|
||||
cmd = F_DUPFD_CLOEXEC;
|
||||
return ::fcntl(oldfd, cmd, atleast);
|
||||
#else
|
||||
// use F_DUPFD
|
||||
int ret = ::fcntl(oldfd, F_DUPFD, atleast);
|
||||
|
||||
if (flags && ret != -1)
|
||||
::fcntl(ret, F_SETFD, flags);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
// don't call dup2
|
||||
// call qt_safe_dup2
|
||||
static inline int qt_safe_dup2(int oldfd, int newfd, int flags = FD_CLOEXEC)
|
||||
{
|
||||
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
|
||||
|
||||
int ret;
|
||||
#ifdef QT_THREADSAFE_CLOEXEC
|
||||
// use dup3
|
||||
EINTR_LOOP(ret, ::dup3(oldfd, newfd, flags ? O_CLOEXEC : 0));
|
||||
return ret;
|
||||
#else
|
||||
EINTR_LOOP(ret, ::dup2(oldfd, newfd));
|
||||
if (ret == -1)
|
||||
return -1;
|
||||
|
||||
if (flags)
|
||||
::fcntl(newfd, F_SETFD, flags);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline qint64 qt_safe_read(int fd, void *data, qint64 maxlen)
|
||||
{
|
||||
qint64 ret = 0;
|
||||
EINTR_LOOP(ret, QT_READ(fd, data, maxlen));
|
||||
return ret;
|
||||
}
|
||||
#undef QT_READ
|
||||
#define QT_READ qt_safe_read
|
||||
|
||||
static inline qint64 qt_safe_write(int fd, const void *data, qint64 len)
|
||||
{
|
||||
qint64 ret = 0;
|
||||
EINTR_LOOP(ret, QT_WRITE(fd, data, len));
|
||||
return ret;
|
||||
}
|
||||
#undef QT_WRITE
|
||||
#define QT_WRITE qt_safe_write
|
||||
|
||||
static inline qint64 qt_safe_write_nosignal(int fd, const void *data, qint64 len)
|
||||
{
|
||||
qt_ignore_sigpipe();
|
||||
return qt_safe_write(fd, data, len);
|
||||
}
|
||||
|
||||
static inline int qt_safe_close(int fd)
|
||||
{
|
||||
int ret;
|
||||
EINTR_LOOP(ret, QT_CLOSE(fd));
|
||||
return ret;
|
||||
}
|
||||
#undef QT_CLOSE
|
||||
#define QT_CLOSE qt_safe_close
|
||||
|
||||
// - VxWorks & iOS/tvOS/watchOS don't have processes
|
||||
#if QT_CONFIG(process)
|
||||
static inline int qt_safe_execve(const char *filename, char *const argv[],
|
||||
char *const envp[])
|
||||
{
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::execve(filename, argv, envp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int qt_safe_execv(const char *path, char *const argv[])
|
||||
{
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::execv(path, argv));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int qt_safe_execvp(const char *file, char *const argv[])
|
||||
{
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::execvp(file, argv));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
|
||||
{
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::waitpid(pid, status, options));
|
||||
return ret;
|
||||
}
|
||||
#endif // QT_CONFIG(process)
|
||||
|
||||
#if !defined(_POSIX_MONOTONIC_CLOCK)
|
||||
# define _POSIX_MONOTONIC_CLOCK -1
|
||||
#endif
|
||||
|
||||
// in qelapsedtimer_mac.cpp or qtimestamp_unix.cpp
|
||||
timespec qt_gettime() noexcept;
|
||||
void qt_nanosleep(timespec amount);
|
||||
QByteArray qt_readlink(const char *path);
|
||||
|
||||
/* non-static */
|
||||
inline bool qt_haveLinuxProcfs()
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
# ifdef QT_LINUX_ALWAYS_HAVE_PROCFS
|
||||
return true;
|
||||
# else
|
||||
static const bool present = (access("/proc/version", F_OK) == 0);
|
||||
return present;
|
||||
# endif
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT int qt_safe_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts);
|
||||
|
||||
static inline int qt_poll_msecs(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||
{
|
||||
timespec ts, *pts = nullptr;
|
||||
|
||||
if (timeout >= 0) {
|
||||
ts.tv_sec = timeout / 1000;
|
||||
ts.tv_nsec = (timeout % 1000) * 1000 * 1000;
|
||||
pts = &ts;
|
||||
}
|
||||
|
||||
return qt_safe_poll(fds, nfds, pts);
|
||||
}
|
||||
|
||||
static inline struct pollfd qt_make_pollfd(int fd, short events)
|
||||
{
|
||||
struct pollfd pfd = { fd, events, 0 };
|
||||
return pfd;
|
||||
}
|
||||
|
||||
// according to X/OPEN we have to define semun ourselves
|
||||
// we use prefix as on some systems sem.h will have it
|
||||
struct semid_ds;
|
||||
union qt_semun {
|
||||
int val; /* value for SETVAL */
|
||||
struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */
|
||||
unsigned short *array; /* array for GETALL, SETALL */
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,207 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCOREAPPLICATION_P_H
|
||||
#define QCOREAPPLICATION_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qcoreapplication.h"
|
||||
#if QT_CONFIG(commandlineparser)
|
||||
#include "QtCore/qcommandlineoption.h"
|
||||
#endif
|
||||
#include "QtCore/qtranslator.h"
|
||||
#if QT_CONFIG(settings)
|
||||
#include "QtCore/qsettings.h"
|
||||
#endif
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#include "private/qobject_p.h"
|
||||
#include "private/qlocking_p.h"
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
#include "private/qcore_mac_p.h"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
typedef QList<QTranslator*> QTranslatorList;
|
||||
|
||||
class QAbstractEventDispatcher;
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
class QEvent;
|
||||
#endif
|
||||
|
||||
class Q_CORE_EXPORT QCoreApplicationPrivate
|
||||
#ifndef QT_NO_QOBJECT
|
||||
: public QObjectPrivate
|
||||
#endif
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QCoreApplication)
|
||||
|
||||
public:
|
||||
enum Type {
|
||||
Tty,
|
||||
Gui
|
||||
};
|
||||
|
||||
QCoreApplicationPrivate(int &aargc, char **aargv, uint flags);
|
||||
|
||||
// If not inheriting from QObjectPrivate: force this class to be polymorphic
|
||||
#ifdef QT_NO_QOBJECT
|
||||
virtual
|
||||
#endif
|
||||
~QCoreApplicationPrivate();
|
||||
|
||||
void init();
|
||||
|
||||
QString appName() const;
|
||||
QString appVersion() const;
|
||||
|
||||
#ifdef Q_OS_DARWIN
|
||||
static QString infoDictionaryStringProperty(const QString &propertyName);
|
||||
#endif
|
||||
|
||||
static void initLocale();
|
||||
|
||||
static bool checkInstance(const char *method);
|
||||
|
||||
#if QT_CONFIG(commandlineparser)
|
||||
virtual void addQtOptions(QList<QCommandLineOption> *options);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
bool sendThroughApplicationEventFilters(QObject *, QEvent *);
|
||||
static bool sendThroughObjectEventFilters(QObject *, QEvent *);
|
||||
static bool notify_helper(QObject *, QEvent *);
|
||||
static inline void setEventSpontaneous(QEvent *e, bool spontaneous) { e->m_spont = spontaneous; }
|
||||
|
||||
virtual void createEventDispatcher();
|
||||
virtual void eventDispatcherReady();
|
||||
static void removePostedEvent(QEvent *);
|
||||
#ifdef Q_OS_WIN
|
||||
static void removePostedTimerEvent(QObject *object, int timerId);
|
||||
#endif
|
||||
|
||||
QAtomicInt quitLockRef;
|
||||
void ref();
|
||||
void deref();
|
||||
virtual bool canQuitAutomatically();
|
||||
void quitAutomatically();
|
||||
virtual void quit();
|
||||
|
||||
static QBasicAtomicPointer<QThread> theMainThread;
|
||||
static QThread *mainThread();
|
||||
static bool threadRequiresCoreApplication();
|
||||
|
||||
static void sendPostedEvents(QObject *receiver, int event_type, QThreadData *data);
|
||||
|
||||
static void checkReceiverThread(QObject *receiver);
|
||||
void cleanupThreadData();
|
||||
|
||||
struct QPostEventListLocker
|
||||
{
|
||||
QThreadData *threadData;
|
||||
std::unique_lock<QMutex> locker;
|
||||
|
||||
void unlock() { locker.unlock(); }
|
||||
};
|
||||
static QPostEventListLocker lockThreadPostEventList(QObject *object);
|
||||
#endif // QT_NO_QOBJECT
|
||||
|
||||
int &argc;
|
||||
char **argv;
|
||||
#if defined(Q_OS_WIN)
|
||||
int origArgc;
|
||||
char **origArgv; // store unmodified arguments for QCoreApplication::arguments()
|
||||
#endif
|
||||
void appendApplicationPathToLibraryPaths(void);
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QTranslatorList translators;
|
||||
QReadWriteLock translateMutex;
|
||||
static bool isTranslatorInstalled(QTranslator *translator);
|
||||
#endif
|
||||
|
||||
QCoreApplicationPrivate::Type application_type;
|
||||
|
||||
QString cachedApplicationDirPath;
|
||||
static QString *cachedApplicationFilePath;
|
||||
static void setApplicationFilePath(const QString &path);
|
||||
static inline void clearApplicationFilePath() { delete cachedApplicationFilePath; cachedApplicationFilePath = nullptr; }
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
void execCleanup();
|
||||
|
||||
bool in_exec;
|
||||
bool aboutToQuitEmitted;
|
||||
bool threadData_clean;
|
||||
|
||||
static QAbstractEventDispatcher *eventDispatcher;
|
||||
static bool is_app_running;
|
||||
static bool is_app_closing;
|
||||
#endif
|
||||
|
||||
static bool setuidAllowed;
|
||||
static uint attribs;
|
||||
static inline bool testAttribute(uint flag) { return attribs & (1 << flag); }
|
||||
static int app_compile_version;
|
||||
|
||||
void processCommandLineArguments();
|
||||
QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging.
|
||||
inline QString qmljsDebugArgumentsString() const { return qmljs_debug_arguments; }
|
||||
|
||||
#ifdef QT_NO_QOBJECT
|
||||
QCoreApplication *q_ptr;
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCOREAPPLICATION_P_H
|
||||
@@ -1,90 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCORECMDLINEARGS_P_H
|
||||
#define QCORECMDLINEARGS_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtCore/qstringlist.h"
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
# ifdef Q_OS_WIN32
|
||||
# include <qt_windows.h> // first to suppress min, max macros.
|
||||
# include <shlobj.h>
|
||||
# else
|
||||
# include <qt_windows.h>
|
||||
# endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
|
||||
static inline QStringList qWinCmdArgs(const QString &cmdLine)
|
||||
{
|
||||
QStringList result;
|
||||
int size;
|
||||
if (wchar_t **argv = CommandLineToArgvW((const wchar_t *)cmdLine.utf16(), &size)) {
|
||||
result.reserve(size);
|
||||
wchar_t **argvEnd = argv + size;
|
||||
for (wchar_t **a = argv; a < argvEnd; ++a)
|
||||
result.append(QString::fromWCharArray(*a));
|
||||
LocalFree(argv);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // Q_OS_WIN32
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
#endif // QCORECMDLINEARGS_WIN_P_H
|
||||
@@ -1,75 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCOREGLOBALDATA_P_H
|
||||
#define QCOREGLOBALDATA_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qstringlist.h"
|
||||
#include "QtCore/qreadwritelock.h"
|
||||
#include "QtCore/qhash.h"
|
||||
#include "QtCore/qbytearray.h"
|
||||
#include "QtCore/qmutex.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct QCoreGlobalData
|
||||
{
|
||||
QCoreGlobalData();
|
||||
~QCoreGlobalData();
|
||||
|
||||
QHash<QString, QStringList> dirSearchPaths;
|
||||
QReadWriteLock dirSearchPathsLock;
|
||||
|
||||
static QCoreGlobalData *instance();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QCOREGLOBALDATA_P_H
|
||||
@@ -1,73 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDATASTREAM_P_H
|
||||
#define QDATASTREAM_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <qdatastream.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
|
||||
class QDataStreamPrivate
|
||||
{
|
||||
public:
|
||||
QDataStreamPrivate() : floatingPointPrecision(QDataStream::DoublePrecision),
|
||||
transactionDepth(0) { }
|
||||
|
||||
QDataStream::FloatingPointPrecision floatingPointPrecision;
|
||||
int transactionDepth;
|
||||
};
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QDATASTREAM_P_H
|
||||
@@ -1,66 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDATAURL_P_H
|
||||
#define QDATAURL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of qDecodeDataUrl. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qurl.h"
|
||||
#include "QtCore/qbytearray.h"
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtCore/qpair.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &url, QString &mimeType, QByteArray &payload);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QDATAURL_P_H
|
||||
@@ -1,145 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDATETIME_P_H
|
||||
#define QDATETIME_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qplatformdefs.h"
|
||||
#include "QtCore/qatomic.h"
|
||||
#include "QtCore/qdatetime.h"
|
||||
#include "QtCore/qshareddata.h"
|
||||
|
||||
#if QT_CONFIG(timezone)
|
||||
#include "qtimezone.h"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDateTimePrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
// forward the declarations from QDateTime (this makes them public)
|
||||
typedef QDateTime::ShortData QDateTimeShortData;
|
||||
typedef QDateTime::Data QDateTimeData;
|
||||
|
||||
// Never change or delete this enum, it is required for backwards compatible
|
||||
// serialization of QDateTime before 5.2, so is essentially public API
|
||||
enum Spec {
|
||||
LocalUnknown = -1,
|
||||
LocalStandard = 0,
|
||||
LocalDST = 1,
|
||||
UTC = 2,
|
||||
OffsetFromUTC = 3,
|
||||
TimeZone = 4
|
||||
};
|
||||
|
||||
// Daylight Time Status
|
||||
enum DaylightStatus {
|
||||
UnknownDaylightTime = -1,
|
||||
StandardTime = 0,
|
||||
DaylightTime = 1
|
||||
};
|
||||
|
||||
// Status of date/time
|
||||
enum StatusFlag {
|
||||
ShortData = 0x01,
|
||||
|
||||
ValidDate = 0x02,
|
||||
ValidTime = 0x04,
|
||||
ValidDateTime = 0x08,
|
||||
ValidWhenMask = ValidDate | ValidTime | ValidDateTime,
|
||||
|
||||
TimeSpecMask = 0x30,
|
||||
|
||||
SetToStandardTime = 0x40,
|
||||
SetToDaylightTime = 0x80,
|
||||
ValidityMask = ValidDate | ValidTime | ValidDateTime,
|
||||
DaylightMask = SetToStandardTime | SetToDaylightTime,
|
||||
};
|
||||
Q_DECLARE_FLAGS(StatusFlags, StatusFlag)
|
||||
|
||||
enum {
|
||||
TimeSpecShift = 4,
|
||||
};
|
||||
|
||||
static QDateTime::Data create(QDate toDate, QTime toTime, Qt::TimeSpec toSpec,
|
||||
int offsetSeconds);
|
||||
|
||||
#if QT_CONFIG(timezone)
|
||||
static QDateTime::Data create(QDate toDate, QTime toTime, const QTimeZone & timeZone);
|
||||
|
||||
static qint64 zoneMSecsToEpochMSecs(qint64 msecs, const QTimeZone &zone,
|
||||
DaylightStatus *hint = nullptr,
|
||||
QDate *localDate = nullptr, QTime *localTime = nullptr,
|
||||
QString *abbreviation = nullptr);
|
||||
#endif // timezone
|
||||
|
||||
static bool epochMSecsToLocalTime(qint64 msecs, QDate *localDate, QTime *localTime,
|
||||
DaylightStatus *daylightStatus = nullptr);
|
||||
static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
|
||||
DaylightStatus *daylightStatus,
|
||||
QDate *localDate = nullptr, QTime *localTime = nullptr,
|
||||
QString *abbreviation = nullptr);
|
||||
|
||||
StatusFlags m_status = StatusFlag(Qt::LocalTime << TimeSpecShift);
|
||||
qint64 m_msecs = 0;
|
||||
int m_offsetFromUtc = 0;
|
||||
#if QT_CONFIG(timezone)
|
||||
QTimeZone m_timeZone;
|
||||
#endif // timezone
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QDateTimePrivate::StatusFlags)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QDATETIME_P_H
|
||||
@@ -1,310 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDATETIMEPARSER_P_H
|
||||
#define QDATETIMEPARSER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qplatformdefs.h"
|
||||
#include "QtCore/qatomic.h"
|
||||
#include "QtCore/qcalendar.h"
|
||||
#include "QtCore/qcoreapplication.h"
|
||||
#include "QtCore/qdatetime.h"
|
||||
#include "QtCore/qlist.h"
|
||||
#include "QtCore/qlocale.h"
|
||||
#include "QtCore/qstringlist.h"
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
# include "QtCore/qvariant.h"
|
||||
#endif
|
||||
|
||||
QT_REQUIRE_CONFIG(datetimeparser);
|
||||
|
||||
#define QDATETIMEEDIT_TIME_MIN QTime(0, 0) // Prefer QDate::startOfDay()
|
||||
#define QDATETIMEEDIT_TIME_MAX QTime(23, 59, 59, 999) // Prefer QDate::endOfDay()
|
||||
#define QDATETIMEEDIT_DATE_MIN QDate(100, 1, 1)
|
||||
#define QDATETIMEEDIT_COMPAT_DATE_MIN QDate(1752, 9, 14)
|
||||
#define QDATETIMEEDIT_DATE_MAX QDate(9999, 12, 31)
|
||||
#define QDATETIMEEDIT_DATE_INITIAL QDate(2000, 1, 1)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QDateTimeParser
|
||||
{
|
||||
public:
|
||||
enum Context {
|
||||
FromString,
|
||||
DateTimeEdit
|
||||
};
|
||||
QDateTimeParser(QMetaType::Type t, Context ctx, const QCalendar &cal = QCalendar())
|
||||
: parserType(t), context(ctx), calendar(cal)
|
||||
{
|
||||
defaultLocale = QLocale::system();
|
||||
first.type = FirstSection;
|
||||
first.pos = -1;
|
||||
first.count = -1;
|
||||
first.zeroesAdded = 0;
|
||||
last.type = LastSection;
|
||||
last.pos = -1;
|
||||
last.count = -1;
|
||||
last.zeroesAdded = 0;
|
||||
none.type = NoSection;
|
||||
none.pos = -1;
|
||||
none.count = -1;
|
||||
none.zeroesAdded = 0;
|
||||
}
|
||||
virtual ~QDateTimeParser();
|
||||
|
||||
enum Section {
|
||||
NoSection = 0x00000,
|
||||
AmPmSection = 0x00001,
|
||||
MSecSection = 0x00002,
|
||||
SecondSection = 0x00004,
|
||||
MinuteSection = 0x00008,
|
||||
Hour12Section = 0x00010,
|
||||
Hour24Section = 0x00020,
|
||||
TimeZoneSection = 0x00040,
|
||||
HourSectionMask = (Hour12Section | Hour24Section),
|
||||
TimeSectionMask = (MSecSection | SecondSection | MinuteSection |
|
||||
HourSectionMask | AmPmSection | TimeZoneSection),
|
||||
|
||||
DaySection = 0x00100,
|
||||
MonthSection = 0x00200,
|
||||
YearSection = 0x00400,
|
||||
YearSection2Digits = 0x00800,
|
||||
YearSectionMask = YearSection | YearSection2Digits,
|
||||
DayOfWeekSectionShort = 0x01000,
|
||||
DayOfWeekSectionLong = 0x02000,
|
||||
DayOfWeekSectionMask = DayOfWeekSectionShort | DayOfWeekSectionLong,
|
||||
DaySectionMask = DaySection | DayOfWeekSectionMask,
|
||||
DateSectionMask = DaySectionMask | MonthSection | YearSectionMask,
|
||||
|
||||
Internal = 0x10000,
|
||||
FirstSection = 0x20000 | Internal,
|
||||
LastSection = 0x40000 | Internal,
|
||||
CalendarPopupSection = 0x80000 | Internal,
|
||||
|
||||
NoSectionIndex = -1,
|
||||
FirstSectionIndex = -2,
|
||||
LastSectionIndex = -3,
|
||||
CalendarPopupIndex = -4
|
||||
}; // extending qdatetimeedit.h's equivalent
|
||||
Q_DECLARE_FLAGS(Sections, Section)
|
||||
|
||||
struct Q_CORE_EXPORT SectionNode {
|
||||
Section type;
|
||||
mutable int pos;
|
||||
int count; // (used as Case(count) indicator for AmPmSection)
|
||||
int zeroesAdded;
|
||||
|
||||
static QString name(Section s);
|
||||
QString name() const { return name(type); }
|
||||
QString format() const;
|
||||
int maxChange() const;
|
||||
};
|
||||
|
||||
enum State { // duplicated from QValidator
|
||||
Invalid,
|
||||
Intermediate,
|
||||
Acceptable
|
||||
};
|
||||
|
||||
struct StateNode {
|
||||
StateNode() : state(Invalid), padded(0), conflicts(false) {}
|
||||
StateNode(const QDateTime &val, State ok=Acceptable, int pad=0, bool bad=false)
|
||||
: value(val), state(ok), padded(pad), conflicts(bad) {}
|
||||
QDateTime value;
|
||||
State state;
|
||||
int padded;
|
||||
bool conflicts;
|
||||
};
|
||||
|
||||
enum AmPm {
|
||||
AmText,
|
||||
PmText
|
||||
};
|
||||
|
||||
StateNode parse(const QString &input, int position,
|
||||
const QDateTime &defaultValue, bool fixup) const;
|
||||
bool fromString(const QString &text, QDate *date, QTime *time) const;
|
||||
bool fromString(const QString &text, QDateTime* datetime) const;
|
||||
bool parseFormat(QStringView format);
|
||||
|
||||
enum FieldInfoFlag {
|
||||
Numeric = 0x01,
|
||||
FixedWidth = 0x02,
|
||||
AllowPartial = 0x04,
|
||||
Fraction = 0x08
|
||||
};
|
||||
Q_DECLARE_FLAGS(FieldInfo, FieldInfoFlag)
|
||||
|
||||
FieldInfo fieldInfo(int index) const;
|
||||
|
||||
void setDefaultLocale(const QLocale &loc) { defaultLocale = loc; }
|
||||
virtual QString displayText() const { return m_text; }
|
||||
void setCalendar(const QCalendar &calendar);
|
||||
|
||||
private:
|
||||
int sectionMaxSize(Section s, int count) const;
|
||||
QString sectionText(const QString &text, int sectionIndex, int index) const;
|
||||
StateNode scanString(const QDateTime &defaultValue, bool fixup) const;
|
||||
struct ParsedSection {
|
||||
int value;
|
||||
int used;
|
||||
int zeroes;
|
||||
State state;
|
||||
constexpr ParsedSection(State ok = Invalid,
|
||||
int val = 0, int read = 0, int zs = 0)
|
||||
: value(ok == Invalid ? -1 : val), used(read), zeroes(zs), state(ok)
|
||||
{}
|
||||
};
|
||||
ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex, int offset) const;
|
||||
int findMonth(const QString &str1, int monthstart, int sectionIndex,
|
||||
int year, QString *monthName = nullptr, int *used = nullptr) const;
|
||||
int findDay(const QString &str1, int intDaystart, int sectionIndex,
|
||||
QString *dayName = nullptr, int *used = nullptr) const;
|
||||
ParsedSection findUtcOffset(QStringView str) const;
|
||||
ParsedSection findTimeZoneName(QStringView str, const QDateTime &when) const;
|
||||
ParsedSection findTimeZone(QStringView str, const QDateTime &when,
|
||||
int maxVal, int minVal) const;
|
||||
// Implemented in qdatetime.cpp:
|
||||
static int startsWithLocalTimeZone(const QStringView name);
|
||||
|
||||
enum AmPmFinder {
|
||||
Neither = -1,
|
||||
AM = 0,
|
||||
PM = 1,
|
||||
PossibleAM = 2,
|
||||
PossiblePM = 3,
|
||||
PossibleBoth = 4
|
||||
};
|
||||
AmPmFinder findAmPm(QString &str, int index, int *used = nullptr) const;
|
||||
|
||||
bool potentialValue(QStringView str, int min, int max, int index,
|
||||
const QDateTime ¤tValue, int insert) const;
|
||||
bool potentialValue(const QString &str, int min, int max, int index,
|
||||
const QDateTime ¤tValue, int insert) const
|
||||
{
|
||||
return potentialValue(QStringView(str), min, max, index, currentValue, insert);
|
||||
}
|
||||
|
||||
enum Case {
|
||||
NativeCase,
|
||||
LowerCase,
|
||||
UpperCase
|
||||
};
|
||||
|
||||
QString getAmPmText(AmPm ap, Case cs) const;
|
||||
|
||||
friend class QDTPUnitTestParser;
|
||||
|
||||
protected: // for the benefit of QDateTimeEditPrivate
|
||||
int sectionSize(int index) const;
|
||||
int sectionMaxSize(int index) const;
|
||||
int sectionPos(int index) const;
|
||||
int sectionPos(const SectionNode &sn) const;
|
||||
|
||||
const SectionNode §ionNode(int index) const;
|
||||
Section sectionType(int index) const;
|
||||
QString sectionText(int sectionIndex) const;
|
||||
int getDigit(const QDateTime &dt, int index) const;
|
||||
bool setDigit(QDateTime &t, int index, int newval) const;
|
||||
|
||||
int absoluteMax(int index, const QDateTime &value = QDateTime()) const;
|
||||
int absoluteMin(int index) const;
|
||||
|
||||
bool skipToNextSection(int section, const QDateTime ¤t, QStringView sectionText) const;
|
||||
bool skipToNextSection(int section, const QDateTime ¤t, const QString §ionText) const
|
||||
{
|
||||
return skipToNextSection(section, current, QStringView(sectionText));
|
||||
}
|
||||
QString stateName(State s) const;
|
||||
|
||||
virtual QDateTime getMinimum() const;
|
||||
virtual QDateTime getMaximum() const;
|
||||
virtual int cursorPosition() const { return -1; }
|
||||
virtual QLocale locale() const { return defaultLocale; }
|
||||
|
||||
mutable int currentSectionIndex = int(NoSectionIndex);
|
||||
Sections display;
|
||||
/*
|
||||
This stores the most recently selected day.
|
||||
It is useful when considering the following scenario:
|
||||
|
||||
1. Date is: 31/01/2000
|
||||
2. User increments month: 29/02/2000
|
||||
3. User increments month: 31/03/2000
|
||||
|
||||
At step 1, cachedDay stores 31. At step 2, the 31 is invalid for February, so the cachedDay is not updated.
|
||||
At step 3, the month is changed to March, for which 31 is a valid day. Since 29 < 31, the day is set to cachedDay.
|
||||
This is good for when users have selected their desired day and are scrolling up or down in the month or year section
|
||||
and do not want smaller months (or non-leap years) to alter the day that they chose.
|
||||
*/
|
||||
mutable int cachedDay = -1;
|
||||
mutable QString m_text;
|
||||
QList<SectionNode> sectionNodes;
|
||||
SectionNode first, last, none, popup;
|
||||
QStringList separators;
|
||||
QString displayFormat;
|
||||
QLocale defaultLocale;
|
||||
QMetaType::Type parserType;
|
||||
bool fixday = false;
|
||||
Context context;
|
||||
QCalendar calendar;
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QDateTimeParser::SectionNode, Q_PRIMITIVE_TYPE);
|
||||
|
||||
Q_CORE_EXPORT bool operator==(const QDateTimeParser::SectionNode &s1, const QDateTimeParser::SectionNode &s2);
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QDateTimeParser::Sections)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QDateTimeParser::FieldInfo)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QDATETIME_P_H
|
||||
@@ -1,70 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDEADLINETIMER_P_H
|
||||
#define QDEADLINETIMER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum {
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
|
||||
// t1 contains seconds and t2 contains nanoseconds
|
||||
QDeadlineTimerNanosecondsInT2 = 1
|
||||
#else
|
||||
// t1 contains nanoseconds, t2 is always zero
|
||||
QDeadlineTimerNanosecondsInT2 = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,139 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDEBUG_P_H
|
||||
#define QDEBUG_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of other Qt classes. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qdebug.h"
|
||||
#include "QtCore/qmetaobject.h"
|
||||
#include "QtCore/qflags.h"
|
||||
#include "QtCore/qbytearray.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtDebugUtils {
|
||||
|
||||
Q_CORE_EXPORT QByteArray toPrintable(const char *data, int len, int maxSize);
|
||||
|
||||
// inline helpers for formatting basic classes.
|
||||
|
||||
template <class Point>
|
||||
static inline void formatQPoint(QDebug &debug, const Point &point)
|
||||
{
|
||||
debug << point.x() << ',' << point.y();
|
||||
}
|
||||
|
||||
template <class Size>
|
||||
static inline void formatQSize(QDebug &debug, const Size &size)
|
||||
{
|
||||
debug << size.width() << ", " << size.height();
|
||||
}
|
||||
|
||||
template <class Rect>
|
||||
static inline void formatQRect(QDebug &debug, const Rect &rect)
|
||||
{
|
||||
debug << rect.x() << ',' << rect.y() << ' ' << rect.width() << 'x' << rect.height();
|
||||
}
|
||||
|
||||
template <class Margins>
|
||||
static inline void formatQMargins(QDebug &debug, const Margins &margins)
|
||||
{
|
||||
debug << margins.left() << ", " << margins.top() << ", " << margins.right()
|
||||
<< ", " << margins.bottom();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
template <class QEnum>
|
||||
static inline void formatQEnum(QDebug &debug, QEnum value)
|
||||
{
|
||||
const QMetaObject *metaObject = qt_getEnumMetaObject(value);
|
||||
const QMetaEnum me = metaObject->enumerator(metaObject->indexOfEnumerator(qt_getEnumName(value)));
|
||||
if (const char *key = me.valueToKey(int(value)))
|
||||
debug << key;
|
||||
else
|
||||
debug << int(value);
|
||||
}
|
||||
|
||||
template <class QEnum>
|
||||
static inline void formatNonNullQEnum(QDebug &debug, const char *prefix, QEnum value)
|
||||
{
|
||||
if (value) {
|
||||
debug << prefix;
|
||||
formatQEnum(debug, value);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Enum>
|
||||
static inline void formatQFlags(QDebug &debug, const QFlags<Enum> &value)
|
||||
{
|
||||
const QMetaObject *metaObject = qt_getEnumMetaObject(Enum());
|
||||
const QMetaEnum me = metaObject->enumerator(metaObject->indexOfEnumerator(qt_getEnumName(Enum())));
|
||||
const QDebugStateSaver saver(debug);
|
||||
debug.noquote();
|
||||
debug << me.valueToKeys(value);
|
||||
}
|
||||
|
||||
template <class Enum>
|
||||
static inline void formatNonNullQFlags(QDebug &debug, const char *prefix, const QFlags<Enum> &value)
|
||||
{
|
||||
if (value) {
|
||||
debug << prefix;
|
||||
formatQFlags(debug, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !QT_NO_QOBJECT
|
||||
|
||||
} // namespace QtDebugUtils
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QDEBUG_P_H
|
||||
@@ -1,116 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDIR_P_H
|
||||
#define QDIR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystementry_p.h"
|
||||
#include "qfilesystemmetadata_p.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDirPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
enum PathNormalization {
|
||||
DefaultNormalization = 0x00,
|
||||
AllowUncPaths = 0x01,
|
||||
RemotePath = 0x02
|
||||
};
|
||||
Q_DECLARE_FLAGS(PathNormalizations, PathNormalization)
|
||||
Q_FLAGS(PathNormalizations)
|
||||
|
||||
explicit QDirPrivate(const QString &path, const QStringList &nameFilters_ = QStringList(),
|
||||
QDir::SortFlags sort_ = QDir::SortFlags(QDir::Name | QDir::IgnoreCase),
|
||||
QDir::Filters filters_ = QDir::AllEntries);
|
||||
|
||||
explicit QDirPrivate(const QDirPrivate ©);
|
||||
|
||||
bool exists() const;
|
||||
|
||||
void initFileEngine();
|
||||
void initFileLists(const QDir &dir) const;
|
||||
|
||||
static void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *);
|
||||
|
||||
static inline QChar getFilterSepChar(const QString &nameFilter);
|
||||
|
||||
static inline QStringList splitFilters(const QString &nameFilter, QChar sep = {});
|
||||
|
||||
void setPath(const QString &path);
|
||||
|
||||
void clearFileLists();
|
||||
|
||||
void resolveAbsoluteEntry() const;
|
||||
|
||||
mutable bool fileListsInitialized;
|
||||
mutable QStringList files;
|
||||
mutable QFileInfoList fileInfos;
|
||||
|
||||
QStringList nameFilters;
|
||||
QDir::SortFlags sort;
|
||||
QDir::Filters filters;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> fileEngine;
|
||||
|
||||
QFileSystemEntry dirEntry;
|
||||
mutable QFileSystemEntry absoluteDirEntry;
|
||||
mutable QFileSystemMetaData metaData;
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QDirPrivate::PathNormalizations)
|
||||
|
||||
Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, QDirPrivate::PathNormalizations flags, bool *ok = nullptr);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,156 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QDOUBLESCANPRINT_P_H
|
||||
#define QDOUBLESCANPRINT_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of internal files. This header file may change from version to version
|
||||
// without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if defined(Q_CC_MSVC) && (defined(QT_BOOTSTRAPPED) || defined(QT_NO_DOUBLECONVERSION))
|
||||
# include <stdio.h>
|
||||
# include <locale.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// We can always use _sscanf_l and _snprintf_l on MSVC as those were introduced in 2005.
|
||||
|
||||
// MSVC doesn't document what it will do with a NULL locale passed to _sscanf_l or _snprintf_l.
|
||||
// The documentation for _create_locale() does not formally document "C" to be valid, but an example
|
||||
// code snippet in the same documentation shows it.
|
||||
|
||||
struct QCLocaleT {
|
||||
QCLocaleT() : locale(_create_locale(LC_ALL, "C"))
|
||||
{
|
||||
}
|
||||
|
||||
~QCLocaleT()
|
||||
{
|
||||
_free_locale(locale);
|
||||
}
|
||||
|
||||
const _locale_t locale;
|
||||
};
|
||||
|
||||
# define QT_CLOCALE_HOLDER Q_GLOBAL_STATIC(QCLocaleT, cLocaleT)
|
||||
# define QT_CLOCALE cLocaleT()->locale
|
||||
|
||||
inline int qDoubleSscanf(const char *buf, _locale_t locale, const char *format, double *d,
|
||||
int *processed)
|
||||
{
|
||||
return _sscanf_l(buf, format, locale, d, processed);
|
||||
}
|
||||
|
||||
inline int qDoubleSnprintf(char *buf, size_t buflen, _locale_t locale, const char *format, double d)
|
||||
{
|
||||
return _snprintf_l(buf, buflen, format, locale, d);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#elif defined(QT_BOOTSTRAPPED)
|
||||
# include <stdio.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// When bootstrapping we don't have libdouble-conversion available, yet. We can also not use locale
|
||||
// aware snprintf and sscanf variants in the general case because those are only available on select
|
||||
// platforms. We can use the regular snprintf and sscanf because we don't do setlocale(3) when
|
||||
// bootstrapping and the locale is always "C" then.
|
||||
|
||||
# define QT_CLOCALE_HOLDER
|
||||
# define QT_CLOCALE 0
|
||||
|
||||
inline int qDoubleSscanf(const char *buf, int, const char *format, double *d, int *processed)
|
||||
{
|
||||
return sscanf(buf, format, d, processed);
|
||||
}
|
||||
inline int qDoubleSnprintf(char *buf, size_t buflen, int, const char *format, double d)
|
||||
{
|
||||
return snprintf(buf, buflen, format, d);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#else // !QT_BOOTSTRAPPED && (!Q_CC_MSVC || !QT_NO_DOUBLECONVERSION)
|
||||
# ifdef QT_NO_DOUBLECONVERSION
|
||||
# include <stdio.h>
|
||||
# include <xlocale.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// OS X and FreeBSD both treat NULL as the "C" locale for snprintf_l and sscanf_l.
|
||||
// When other implementations with different behavior show up, we'll have to do newlocale(3) and
|
||||
// freelocale(3) here. The arguments to those will depend on what the other implementations will
|
||||
// offer. OS X and FreeBSD again interpret a locale name of NULL as "C", but "C" itself is not
|
||||
// documented as valid locale name. Mind that the names of the LC_* constants differ between e.g.
|
||||
// BSD variants and linux.
|
||||
|
||||
# define QT_CLOCALE_HOLDER
|
||||
# define QT_CLOCALE NULL
|
||||
|
||||
inline int qDoubleSscanf(const char *buf, locale_t locale, const char *format, double *d,
|
||||
int *processed)
|
||||
{
|
||||
return sscanf_l(buf, locale, format, d, processed);
|
||||
}
|
||||
inline int qDoubleSnprintf(char *buf, size_t buflen, locale_t locale, const char *format, double d)
|
||||
{
|
||||
return snprintf_l(buf, buflen, locale, format, d);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
# else // !QT_NO_DOUBLECONVERSION
|
||||
# include <double-conversion/double-conversion.h>
|
||||
# define QT_CLOCALE_HOLDER
|
||||
# endif // QT_NO_DOUBLECONVERSION
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
|
||||
#endif // QDOUBLESCANPRINT_P_H
|
||||
@@ -1,160 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef QDUPLICATETRACKER_P_H
|
||||
#define QDUPLICATETRACKER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if __has_include(<memory_resource>)
|
||||
# include <unordered_set>
|
||||
# include <memory_resource>
|
||||
# include <qhash.h> // for the hashing helpers
|
||||
#else
|
||||
# include <qset.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template <typename T, size_t Prealloc = 32>
|
||||
class QDuplicateTracker {
|
||||
#ifdef __cpp_lib_memory_resource
|
||||
template <typename HT>
|
||||
struct QHasher {
|
||||
size_t storedSeed = QHashSeed::globalSeed();
|
||||
size_t operator()(const HT &t) const {
|
||||
return QHashPrivate::calculateHash(t, storedSeed);
|
||||
}
|
||||
};
|
||||
|
||||
struct node_guesstimate { void *next; size_t hash; T value; };
|
||||
static constexpr size_t bufferSize(size_t N) {
|
||||
return N * sizeof(void*) // bucket list
|
||||
+ N * sizeof(node_guesstimate); // nodes
|
||||
}
|
||||
|
||||
char buffer[bufferSize(Prealloc)];
|
||||
std::pmr::monotonic_buffer_resource res{buffer, sizeof buffer};
|
||||
std::pmr::unordered_set<T, QHasher<T>> set{Prealloc, &res};
|
||||
#else
|
||||
class Set : public QSet<T> {
|
||||
qsizetype setSize = 0;
|
||||
public:
|
||||
explicit Set(qsizetype n) : QSet<T>{}
|
||||
{ this->reserve(n); }
|
||||
|
||||
auto insert(const T &e) {
|
||||
auto it = QSet<T>::insert(e);
|
||||
const auto n = this->size();
|
||||
return std::pair{it, qExchange(setSize, n) != n};
|
||||
}
|
||||
|
||||
auto insert(T &&e) {
|
||||
auto it = QSet<T>::insert(std::move(e));
|
||||
const auto n = this->size();
|
||||
return std::pair{it, qExchange(setSize, n) != n};
|
||||
}
|
||||
};
|
||||
Set set{Prealloc};
|
||||
#endif
|
||||
Q_DISABLE_COPY_MOVE(QDuplicateTracker);
|
||||
public:
|
||||
static constexpr inline bool uses_pmr =
|
||||
#ifdef __cpp_lib_memory_resource
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
;
|
||||
QDuplicateTracker() = default;
|
||||
explicit QDuplicateTracker(qsizetype n)
|
||||
#ifdef __cpp_lib_memory_resource
|
||||
: set{size_t(n), &res}
|
||||
#else
|
||||
: set{n}
|
||||
#endif
|
||||
{}
|
||||
Q_DECL_DEPRECATED_X("Pass the capacity to reserve() to the ctor instead.")
|
||||
void reserve(qsizetype n) { set.reserve(n); }
|
||||
[[nodiscard]] bool hasSeen(const T &s)
|
||||
{
|
||||
return !set.insert(s).second;
|
||||
}
|
||||
[[nodiscard]] bool hasSeen(T &&s)
|
||||
{
|
||||
return !set.insert(std::move(s)).second;
|
||||
}
|
||||
|
||||
template <typename C>
|
||||
void appendTo(C &c) const &
|
||||
{
|
||||
for (const auto &e : set)
|
||||
c.push_back(e);
|
||||
}
|
||||
|
||||
template <typename C>
|
||||
void appendTo(C &c) &&
|
||||
{
|
||||
if constexpr (uses_pmr) {
|
||||
while (!set.empty())
|
||||
c.push_back(std::move(set.extract(set.begin()).value()));
|
||||
} else {
|
||||
return appendTo(c); // lvalue version
|
||||
}
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
set.clear();
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif /* QDUPLICATETRACKER_P_H */
|
||||
@@ -1,72 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QELFPARSER_P_H
|
||||
#define QELFPARSER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <qendian.h>
|
||||
#include "qlibrary_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(library);
|
||||
|
||||
#ifdef Q_OF_ELF
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct QElfParser
|
||||
{
|
||||
static QLibraryScanResult parse(QByteArrayView data, QString *errMsg);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // Q_OF_ELF
|
||||
|
||||
#endif // QELFPARSER_P_H
|
||||
@@ -1,135 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QENDIAN_P_H
|
||||
#define QENDIAN_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qendian.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// Note if using multiple of these bitfields in a union; the underlying storage type must
|
||||
// match. Since we always use an unsigned storage type, unsigned and signed versions may
|
||||
// be used together, but different bit-widths may not.
|
||||
template<class S, int pos, int width>
|
||||
class QSpecialIntegerBitfield
|
||||
{
|
||||
protected:
|
||||
typedef typename S::StorageType T;
|
||||
typedef typename std::make_unsigned<T>::type UT;
|
||||
|
||||
static constexpr UT mask()
|
||||
{
|
||||
return ((UT(1) << width) - 1) << pos;
|
||||
}
|
||||
public:
|
||||
// FIXME: val is public until qtdeclarative is fixed to not access it directly.
|
||||
UT val;
|
||||
|
||||
QSpecialIntegerBitfield &operator=(T t)
|
||||
{
|
||||
UT i = S::fromSpecial(val);
|
||||
i &= ~mask();
|
||||
i |= (UT(t) << pos) & mask();
|
||||
val = S::toSpecial(i);
|
||||
return *this;
|
||||
}
|
||||
operator T() const
|
||||
{
|
||||
if (std::is_signed<T>::value) {
|
||||
UT i = S::fromSpecial(val);
|
||||
i <<= (sizeof(T) * 8) - width - pos;
|
||||
T t = T(i);
|
||||
t >>= (sizeof(T) * 8) - width;
|
||||
return t;
|
||||
}
|
||||
return (S::fromSpecial(val) & mask()) >> pos;
|
||||
}
|
||||
|
||||
bool operator!() const { return !(val & S::toSpecial(mask())); }
|
||||
bool operator==(QSpecialIntegerBitfield<S, pos, width> i) const
|
||||
{
|
||||
return ((val ^ i.val) & S::toSpecial(mask())) == 0;
|
||||
}
|
||||
bool operator!=(QSpecialIntegerBitfield<S, pos, width> i) const
|
||||
{
|
||||
return ((val ^ i.val) & S::toSpecial(mask())) != 0;
|
||||
}
|
||||
|
||||
QSpecialIntegerBitfield &operator+=(T i) { return (*this = (T(*this) + i)); }
|
||||
QSpecialIntegerBitfield &operator-=(T i) { return (*this = (T(*this) - i)); }
|
||||
QSpecialIntegerBitfield &operator*=(T i) { return (*this = (T(*this) * i)); }
|
||||
QSpecialIntegerBitfield &operator/=(T i) { return (*this = (T(*this) / i)); }
|
||||
QSpecialIntegerBitfield &operator%=(T i) { return (*this = (T(*this) % i)); }
|
||||
QSpecialIntegerBitfield &operator|=(T i) { return (*this = (T(*this) | i)); }
|
||||
QSpecialIntegerBitfield &operator&=(T i) { return (*this = (T(*this) & i)); }
|
||||
QSpecialIntegerBitfield &operator^=(T i) { return (*this = (T(*this) ^ i)); }
|
||||
QSpecialIntegerBitfield &operator>>=(T i) { return (*this = (T(*this) >> i)); }
|
||||
QSpecialIntegerBitfield &operator<<=(T i) { return (*this = (T(*this) << i)); }
|
||||
};
|
||||
|
||||
template<typename T, int pos, int width>
|
||||
using QLEIntegerBitfield = QSpecialIntegerBitfield<QLittleEndianStorageType<T>, pos, width>;
|
||||
|
||||
template<typename T, int pos, int width>
|
||||
using QBEIntegerBitfield = QSpecialIntegerBitfield<QBigEndianStorageType<T>, pos, width>;
|
||||
|
||||
template<int pos, int width>
|
||||
using qint32_le_bitfield = QLEIntegerBitfield<int, pos, width>;
|
||||
template<int pos, int width>
|
||||
using quint32_le_bitfield = QLEIntegerBitfield<uint, pos, width>;
|
||||
template<int pos, int width>
|
||||
using qint32_be_bitfield = QBEIntegerBitfield<int, pos, width>;
|
||||
template<int pos, int width>
|
||||
using quint32_be_bitfield = QBEIntegerBitfield<uint, pos, width>;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QENDIAN_P_H
|
||||
@@ -1,277 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (c) 2007-2008, Apple, Inc.
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
**
|
||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
**
|
||||
** * Neither the name of Apple, Inc. nor the names of its contributors
|
||||
** may be used to endorse or promote products derived from this software
|
||||
** without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QEVENTDISPATCHER_CF_P_H
|
||||
#define QEVENTDISPATCHER_CF_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qabstracteventdispatcher.h>
|
||||
#include <QtCore/private/qtimerinfo_unix_p.h>
|
||||
#include <QtCore/private/qcfsocketnotifier_p.h>
|
||||
#include <QtCore/private/qcore_mac_p.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(RunLoopModeTracker));
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtPrivate {
|
||||
Q_CORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher);
|
||||
Q_CORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcherTimers)
|
||||
}
|
||||
|
||||
class QEventDispatcherCoreFoundation;
|
||||
|
||||
template <class T = QEventDispatcherCoreFoundation>
|
||||
class RunLoopSource
|
||||
{
|
||||
public:
|
||||
typedef bool (T::*CallbackFunction)();
|
||||
|
||||
enum { kHighestPriority = 0 } RunLoopSourcePriority;
|
||||
|
||||
RunLoopSource(T *delegate, CallbackFunction callback)
|
||||
: m_delegate(delegate), m_callback(callback)
|
||||
{
|
||||
CFRunLoopSourceContext context = {};
|
||||
context.info = this;
|
||||
context.perform = RunLoopSource::process;
|
||||
|
||||
m_source = CFRunLoopSourceCreate(kCFAllocatorDefault, kHighestPriority, &context);
|
||||
Q_ASSERT(m_source);
|
||||
}
|
||||
|
||||
~RunLoopSource()
|
||||
{
|
||||
CFRunLoopSourceInvalidate(m_source);
|
||||
CFRelease(m_source);
|
||||
}
|
||||
|
||||
void addToMode(CFStringRef mode, CFRunLoopRef runLoop = 0)
|
||||
{
|
||||
if (!runLoop)
|
||||
runLoop = CFRunLoopGetCurrent();
|
||||
|
||||
CFRunLoopAddSource(runLoop, m_source, mode);
|
||||
}
|
||||
|
||||
void signal() { CFRunLoopSourceSignal(m_source); }
|
||||
|
||||
private:
|
||||
static void process(void *info)
|
||||
{
|
||||
RunLoopSource *self = static_cast<RunLoopSource *>(info);
|
||||
((self->m_delegate)->*(self->m_callback))();
|
||||
}
|
||||
|
||||
T *m_delegate;
|
||||
CallbackFunction m_callback;
|
||||
CFRunLoopSourceRef m_source;
|
||||
};
|
||||
|
||||
template <class T = QEventDispatcherCoreFoundation>
|
||||
class RunLoopObserver
|
||||
{
|
||||
public:
|
||||
typedef void (T::*CallbackFunction) (CFRunLoopActivity activity);
|
||||
|
||||
RunLoopObserver(T *delegate, CallbackFunction callback, CFOptionFlags activities)
|
||||
: m_delegate(delegate), m_callback(callback)
|
||||
{
|
||||
CFRunLoopObserverContext context = {};
|
||||
context.info = this;
|
||||
|
||||
m_observer = CFRunLoopObserverCreate(kCFAllocatorDefault, activities, true, 0, process, &context);
|
||||
Q_ASSERT(m_observer);
|
||||
}
|
||||
|
||||
~RunLoopObserver()
|
||||
{
|
||||
CFRunLoopObserverInvalidate(m_observer);
|
||||
CFRelease(m_observer);
|
||||
}
|
||||
|
||||
void addToMode(CFStringRef mode, CFRunLoopRef runLoop = 0)
|
||||
{
|
||||
if (!runLoop)
|
||||
runLoop = CFRunLoopGetCurrent();
|
||||
|
||||
if (!CFRunLoopContainsObserver(runLoop, m_observer, mode))
|
||||
CFRunLoopAddObserver(runLoop, m_observer, mode);
|
||||
}
|
||||
|
||||
void removeFromMode(CFStringRef mode, CFRunLoopRef runLoop = 0)
|
||||
{
|
||||
if (!runLoop)
|
||||
runLoop = CFRunLoopGetCurrent();
|
||||
|
||||
if (CFRunLoopContainsObserver(runLoop, m_observer, mode))
|
||||
CFRunLoopRemoveObserver(runLoop, m_observer, mode);
|
||||
}
|
||||
|
||||
private:
|
||||
static void process(CFRunLoopObserverRef, CFRunLoopActivity activity, void *info)
|
||||
{
|
||||
RunLoopObserver *self = static_cast<RunLoopObserver *>(info);
|
||||
((self->m_delegate)->*(self->m_callback))(activity);
|
||||
}
|
||||
|
||||
T *m_delegate;
|
||||
CallbackFunction m_callback;
|
||||
CFRunLoopObserverRef m_observer;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherCoreFoundation : public QAbstractEventDispatcher
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherCoreFoundation(QObject *parent = nullptr);
|
||||
void startingUp() override;
|
||||
~QEventDispatcherCoreFoundation();
|
||||
|
||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
|
||||
void registerSocketNotifier(QSocketNotifier *notifier) override;
|
||||
void unregisterSocketNotifier(QSocketNotifier *notifier) override;
|
||||
|
||||
void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) override;
|
||||
bool unregisterTimer(int timerId) override;
|
||||
bool unregisterTimers(QObject *object) override;
|
||||
QList<QAbstractEventDispatcher::TimerInfo> registeredTimers(QObject *object) const override;
|
||||
|
||||
int remainingTime(int timerId) override;
|
||||
|
||||
void wakeUp() override;
|
||||
void interrupt() override;
|
||||
|
||||
protected:
|
||||
QEventLoop *currentEventLoop() const;
|
||||
|
||||
virtual bool processPostedEvents();
|
||||
|
||||
struct ProcessEventsState
|
||||
{
|
||||
ProcessEventsState(QEventLoop::ProcessEventsFlags f)
|
||||
: flags(f.toInt()), wasInterrupted(false)
|
||||
, processedPostedEvents(false), processedTimers(false)
|
||||
, deferredWakeUp(false), deferredUpdateTimers(false) {}
|
||||
|
||||
QAtomicInt flags;
|
||||
QAtomicInteger<char> wasInterrupted;
|
||||
QAtomicInteger<char> processedPostedEvents;
|
||||
QAtomicInteger<char> processedTimers;
|
||||
QAtomicInteger<char> deferredWakeUp;
|
||||
bool deferredUpdateTimers;
|
||||
};
|
||||
|
||||
ProcessEventsState m_processEvents;
|
||||
|
||||
private:
|
||||
RunLoopSource<> m_postedEventsRunLoopSource;
|
||||
RunLoopObserver<> m_runLoopActivityObserver;
|
||||
|
||||
QT_MANGLE_NAMESPACE(RunLoopModeTracker) *m_runLoopModeTracker;
|
||||
|
||||
QTimerInfoList m_timerInfoList;
|
||||
CFRunLoopTimerRef m_runLoopTimer;
|
||||
CFRunLoopTimerRef m_blockedRunLoopTimer;
|
||||
QCFType<CFRunLoopRef> m_runLoop;
|
||||
bool m_overdueTimerScheduled;
|
||||
|
||||
QCFSocketNotifier m_cfSocketNotifier;
|
||||
|
||||
void processTimers(CFRunLoopTimerRef);
|
||||
|
||||
void handleRunLoopActivity(CFRunLoopActivity activity);
|
||||
|
||||
void updateTimers();
|
||||
void invalidateTimer();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEVENTDISPATCHER_CF_P_H
|
||||
@@ -1,116 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QEVENTDISPATCHER_GLIB_P_H
|
||||
#define QEVENTDISPATCHER_GLIB_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of the QLibrary class. This header file may change from
|
||||
// version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qabstracteventdispatcher.h"
|
||||
#include "qabstracteventdispatcher_p.h"
|
||||
|
||||
typedef struct _GMainContext GMainContext;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEventDispatcherGlibPrivate;
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherGlib : public QAbstractEventDispatcher
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QEventDispatcherGlib)
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherGlib(QObject *parent = nullptr);
|
||||
explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = nullptr);
|
||||
~QEventDispatcherGlib();
|
||||
|
||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
|
||||
void registerSocketNotifier(QSocketNotifier *socketNotifier) final;
|
||||
void unregisterSocketNotifier(QSocketNotifier *socketNotifier) final;
|
||||
|
||||
void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) final;
|
||||
bool unregisterTimer(int timerId) final;
|
||||
bool unregisterTimers(QObject *object) final;
|
||||
QList<TimerInfo> registeredTimers(QObject *object) const final;
|
||||
|
||||
int remainingTime(int timerId) final;
|
||||
|
||||
void wakeUp() final;
|
||||
void interrupt() final;
|
||||
|
||||
static bool versionSupported();
|
||||
|
||||
protected:
|
||||
QEventDispatcherGlib(QEventDispatcherGlibPrivate &dd, QObject *parent);
|
||||
};
|
||||
|
||||
struct GPostEventSource;
|
||||
struct GSocketNotifierSource;
|
||||
struct GTimerSource;
|
||||
struct GIdleTimerSource;
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatcherPrivate
|
||||
{
|
||||
|
||||
public:
|
||||
QEventDispatcherGlibPrivate(GMainContext *context = nullptr);
|
||||
GMainContext *mainContext;
|
||||
GPostEventSource *postEventSource;
|
||||
GSocketNotifierSource *socketNotifierSource;
|
||||
GTimerSource *timerSource;
|
||||
GIdleTimerSource *idleTimerSource;
|
||||
bool wakeUpCalled = true;
|
||||
|
||||
void runTimersOnceWithNormalPriority();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEVENTDISPATCHER_GLIB_P_H
|
||||
@@ -1,181 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QEVENTDISPATCHER_UNIX_P_H
|
||||
#define QEVENTDISPATCHER_UNIX_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qabstracteventdispatcher.h"
|
||||
#include "QtCore/qlist.h"
|
||||
#include "private/qabstracteventdispatcher_p.h"
|
||||
#include "private/qcore_unix_p.h"
|
||||
#include "QtCore/qvarlengtharray.h"
|
||||
#include "private/qtimerinfo_unix_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEventDispatcherUNIXPrivate;
|
||||
|
||||
struct Q_CORE_EXPORT QSocketNotifierSetUNIX final
|
||||
{
|
||||
inline QSocketNotifierSetUNIX() noexcept;
|
||||
|
||||
inline bool isEmpty() const noexcept;
|
||||
inline short events() const noexcept;
|
||||
|
||||
QSocketNotifier *notifiers[3];
|
||||
};
|
||||
|
||||
Q_DECLARE_TYPEINFO(QSocketNotifierSetUNIX, Q_PRIMITIVE_TYPE);
|
||||
|
||||
struct QThreadPipe
|
||||
{
|
||||
QThreadPipe();
|
||||
~QThreadPipe();
|
||||
|
||||
bool init();
|
||||
pollfd prepare() const;
|
||||
|
||||
void wakeUp();
|
||||
int check(const pollfd &pfd);
|
||||
|
||||
// note for eventfd(7) support:
|
||||
// if fds[1] is -1, then eventfd(7) is in use and is stored in fds[0]
|
||||
int fds[2];
|
||||
QAtomicInt wakeUps;
|
||||
|
||||
#if defined(Q_OS_VXWORKS)
|
||||
static const int len_name = 20;
|
||||
char name[len_name];
|
||||
#endif
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherUNIX : public QAbstractEventDispatcher
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QEventDispatcherUNIX)
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherUNIX(QObject *parent = nullptr);
|
||||
~QEventDispatcherUNIX();
|
||||
|
||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
|
||||
void registerSocketNotifier(QSocketNotifier *notifier) final;
|
||||
void unregisterSocketNotifier(QSocketNotifier *notifier) final;
|
||||
|
||||
void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) final;
|
||||
bool unregisterTimer(int timerId) final;
|
||||
bool unregisterTimers(QObject *object) final;
|
||||
QList<TimerInfo> registeredTimers(QObject *object) const final;
|
||||
|
||||
int remainingTime(int timerId) final;
|
||||
|
||||
void wakeUp() override;
|
||||
void interrupt() final;
|
||||
|
||||
protected:
|
||||
QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = nullptr);
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherUNIXPrivate : public QAbstractEventDispatcherPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QEventDispatcherUNIX)
|
||||
|
||||
public:
|
||||
QEventDispatcherUNIXPrivate();
|
||||
~QEventDispatcherUNIXPrivate();
|
||||
|
||||
int activateTimers();
|
||||
|
||||
void markPendingSocketNotifiers();
|
||||
int activateSocketNotifiers();
|
||||
void setSocketNotifierPending(QSocketNotifier *notifier);
|
||||
|
||||
QThreadPipe threadPipe;
|
||||
QList<pollfd> pollfds;
|
||||
|
||||
QHash<int, QSocketNotifierSetUNIX> socketNotifiers;
|
||||
QList<QSocketNotifier *> pendingNotifiers;
|
||||
|
||||
QTimerInfoList timerList;
|
||||
QAtomicInt interrupt; // bool
|
||||
};
|
||||
|
||||
inline QSocketNotifierSetUNIX::QSocketNotifierSetUNIX() noexcept
|
||||
{
|
||||
notifiers[0] = nullptr;
|
||||
notifiers[1] = nullptr;
|
||||
notifiers[2] = nullptr;
|
||||
}
|
||||
|
||||
inline bool QSocketNotifierSetUNIX::isEmpty() const noexcept
|
||||
{
|
||||
return !notifiers[0] && !notifiers[1] && !notifiers[2];
|
||||
}
|
||||
|
||||
inline short QSocketNotifierSetUNIX::events() const noexcept
|
||||
{
|
||||
short result = 0;
|
||||
|
||||
if (notifiers[0])
|
||||
result |= POLLIN;
|
||||
|
||||
if (notifiers[1])
|
||||
result |= POLLOUT;
|
||||
|
||||
if (notifiers[2])
|
||||
result |= POLLPRI;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEVENTDISPATCHER_UNIX_P_H
|
||||
@@ -1,140 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QEVENTDISPATCHER_WASM_P_H
|
||||
#define QEVENTDISPATCHER_WASM_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qabstracteventdispatcher.h"
|
||||
#include "private/qtimerinfo_unix_p.h"
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
#include <QtCore/qwaitcondition.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <tuple>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher);
|
||||
Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcherTimers)
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherWasm : public QAbstractEventDispatcher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QEventDispatcherWasm();
|
||||
~QEventDispatcherWasm();
|
||||
|
||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
|
||||
void registerSocketNotifier(QSocketNotifier *notifier) override;
|
||||
void unregisterSocketNotifier(QSocketNotifier *notifier) override;
|
||||
|
||||
void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) override;
|
||||
bool unregisterTimer(int timerId) override;
|
||||
bool unregisterTimers(QObject *object) override;
|
||||
QList<QAbstractEventDispatcher::TimerInfo> registeredTimers(QObject *object) const override;
|
||||
int remainingTime(int timerId) override;
|
||||
|
||||
void interrupt() override;
|
||||
void wakeUp() override;
|
||||
|
||||
protected:
|
||||
virtual void processWindowSystemEvents(QEventLoop::ProcessEventsFlags flags);
|
||||
|
||||
private:
|
||||
bool isMainThreadEventDispatcher();
|
||||
bool isSecondaryThreadEventDispatcher();
|
||||
|
||||
void handleApplicationExec();
|
||||
void handleDialogExec();
|
||||
void pollForNativeEvents();
|
||||
bool waitForForEvents();
|
||||
static void callProcessEvents(void *eventDispatcher);
|
||||
|
||||
void processTimers();
|
||||
void updateNativeTimer();
|
||||
static void callProcessTimers(void *eventDispatcher);
|
||||
|
||||
void setEmscriptenSocketCallbacks();
|
||||
void clearEmscriptenSocketCallbacks();
|
||||
static void socketError(int fd, int err, const char* msg, void *context);
|
||||
static void socketOpen(int fd, void *context);
|
||||
static void socketListen(int fd, void *context);
|
||||
static void socketConnection(int fd, void *context);
|
||||
static void socketMessage(int fd, void *context);
|
||||
static void socketClose(int fd, void *context);
|
||||
|
||||
#if QT_CONFIG(thread)
|
||||
void runOnMainThread(std::function<void(void)> fn);
|
||||
#endif
|
||||
|
||||
static QEventDispatcherWasm *g_mainThreadEventDispatcher;
|
||||
|
||||
bool m_interrupted = false;
|
||||
bool m_processTimers = false;
|
||||
bool m_pendingProcessEvents = false;
|
||||
|
||||
QTimerInfoList *m_timerInfo = new QTimerInfoList();
|
||||
long m_timerId = 0;
|
||||
uint64_t m_timerTargetTime = 0;
|
||||
|
||||
#if QT_CONFIG(thread)
|
||||
std::mutex m_mutex;
|
||||
bool m_wakeUpCalled = false;
|
||||
std::condition_variable m_moreEvents;
|
||||
|
||||
static QVector<QEventDispatcherWasm *> g_secondaryThreadEventDispatchers;
|
||||
static std::mutex g_secondaryThreadEventDispatchersMutex;
|
||||
#endif
|
||||
static std::multimap<int, QSocketNotifier *> g_socketNotifiers;
|
||||
};
|
||||
|
||||
#endif // QEVENTDISPATCHER_WASM_P_H
|
||||
@@ -1,185 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QEVENTDISPATCHER_WIN_P_H
|
||||
#define QEVENTDISPATCHER_WIN_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qabstracteventdispatcher.h"
|
||||
#include "QtCore/qt_windows.h"
|
||||
#include "QtCore/qhash.h"
|
||||
#include "QtCore/qatomic.h"
|
||||
|
||||
#include "qabstracteventdispatcher_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEventDispatcherWin32Private;
|
||||
|
||||
// forward declaration
|
||||
LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
|
||||
quint64 qt_msectime();
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherWin32 : public QAbstractEventDispatcher
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QEventDispatcherWin32)
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherWin32(QObject *parent = nullptr);
|
||||
~QEventDispatcherWin32();
|
||||
|
||||
bool QT_ENSURE_STACK_ALIGNED_FOR_SSE processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
|
||||
void registerSocketNotifier(QSocketNotifier *notifier) override;
|
||||
void unregisterSocketNotifier(QSocketNotifier *notifier) override;
|
||||
|
||||
void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject *object) override;
|
||||
bool unregisterTimer(int timerId) override;
|
||||
bool unregisterTimers(QObject *object) override;
|
||||
QList<TimerInfo> registeredTimers(QObject *object) const override;
|
||||
|
||||
int remainingTime(int timerId) override;
|
||||
|
||||
void wakeUp() override;
|
||||
void interrupt() override;
|
||||
|
||||
void startingUp() override;
|
||||
void closingDown() override;
|
||||
|
||||
bool event(QEvent *e) override;
|
||||
|
||||
HWND internalHwnd();
|
||||
|
||||
protected:
|
||||
QEventDispatcherWin32(QEventDispatcherWin32Private &dd, QObject *parent = nullptr);
|
||||
virtual void sendPostedEvents();
|
||||
void doUnregisterSocketNotifier(QSocketNotifier *notifier);
|
||||
|
||||
private:
|
||||
friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
|
||||
};
|
||||
|
||||
struct QSockNot {
|
||||
QSocketNotifier *obj;
|
||||
int fd;
|
||||
};
|
||||
typedef QHash<int, QSockNot *> QSNDict;
|
||||
|
||||
struct QSockFd {
|
||||
long event;
|
||||
long mask;
|
||||
bool selected;
|
||||
|
||||
explicit inline QSockFd(long ev = 0, long ma = 0) : event(ev), mask(ma), selected(false) { }
|
||||
};
|
||||
typedef QHash<int, QSockFd> QSFDict;
|
||||
|
||||
struct WinTimerInfo { // internal timer info
|
||||
QObject *dispatcher;
|
||||
int timerId;
|
||||
qint64 interval;
|
||||
Qt::TimerType timerType;
|
||||
quint64 timeout; // - when to actually fire
|
||||
QObject *obj; // - object to receive events
|
||||
bool inTimerEvent;
|
||||
UINT fastTimerId;
|
||||
};
|
||||
|
||||
class QZeroTimerEvent : public QTimerEvent
|
||||
{
|
||||
public:
|
||||
explicit inline QZeroTimerEvent(int timerId)
|
||||
: QTimerEvent(timerId)
|
||||
{ t = QEvent::ZeroTimerEvent; }
|
||||
};
|
||||
|
||||
typedef QHash<int, WinTimerInfo*> WinTimerDict; // fast dict of timers
|
||||
|
||||
class Q_CORE_EXPORT QEventDispatcherWin32Private : public QAbstractEventDispatcherPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QEventDispatcherWin32)
|
||||
public:
|
||||
QEventDispatcherWin32Private();
|
||||
~QEventDispatcherWin32Private();
|
||||
|
||||
QAtomicInt interrupt;
|
||||
|
||||
// internal window handle used for socketnotifiers/timers/etc
|
||||
HWND internalHwnd;
|
||||
|
||||
// for controlling when to send posted events
|
||||
UINT_PTR sendPostedEventsTimerId;
|
||||
QAtomicInt wakeUps;
|
||||
void startPostedEventsTimer();
|
||||
|
||||
// timers
|
||||
WinTimerDict timerDict;
|
||||
void registerTimer(WinTimerInfo *t);
|
||||
void unregisterTimer(WinTimerInfo *t);
|
||||
void sendTimerEvent(int timerId);
|
||||
|
||||
// socket notifiers
|
||||
QSNDict sn_read;
|
||||
QSNDict sn_write;
|
||||
QSNDict sn_except;
|
||||
QSFDict active_fd;
|
||||
bool activateNotifiersPosted;
|
||||
void postActivateSocketNotifiers();
|
||||
void doWsaAsyncSelect(int socket, long event);
|
||||
|
||||
bool closingDown = false;
|
||||
|
||||
QList<MSG> queuedUserInputEvents;
|
||||
QList<MSG> queuedSocketEvents;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEVENTDISPATCHER_WIN_P_H
|
||||
@@ -1,91 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QEVENTLOOP_P_H
|
||||
#define QEVENTLOOP_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qcoreapplication.h"
|
||||
#include "qobject_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEventLoopPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QEventLoop)
|
||||
public:
|
||||
inline QEventLoopPrivate()
|
||||
: inExec(false)
|
||||
{
|
||||
returnCode.storeRelaxed(-1);
|
||||
exit.storeRelaxed(true);
|
||||
}
|
||||
|
||||
QAtomicInt quitLockRef;
|
||||
|
||||
QBasicAtomicInt exit; // bool
|
||||
QBasicAtomicInt returnCode;
|
||||
bool inExec;
|
||||
|
||||
void ref()
|
||||
{
|
||||
quitLockRef.ref();
|
||||
}
|
||||
|
||||
void deref()
|
||||
{
|
||||
if (!quitLockRef.deref() && inExec) {
|
||||
qApp->postEvent(q_ptr, new QEvent(QEvent::Quit));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEVENTLOOP_P_H
|
||||
@@ -1,149 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Copyright (C) 2022 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFACTORYLOADER_P_H
|
||||
#define QFACTORYLOADER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qglobal.h"
|
||||
#ifndef QT_NO_QOBJECT
|
||||
|
||||
#include "QtCore/private/qplugin_p.h"
|
||||
#include "QtCore/qcbormap.h"
|
||||
#include "QtCore/qcborvalue.h"
|
||||
#include "QtCore/qmap.h"
|
||||
#include "QtCore/qobject.h"
|
||||
#include "QtCore/qplugin.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QJsonObject;
|
||||
class QLibraryPrivate;
|
||||
|
||||
class QPluginParsedMetaData
|
||||
{
|
||||
QCborValue data;
|
||||
bool setError(const QString &errorString) Q_DECL_COLD_FUNCTION
|
||||
{
|
||||
data = errorString;
|
||||
return false;
|
||||
}
|
||||
public:
|
||||
QPluginParsedMetaData() = default;
|
||||
QPluginParsedMetaData(QByteArrayView input) { parse(input); }
|
||||
|
||||
bool isError() const { return !data.isMap(); }
|
||||
QString errorString() const { return data.toString(); }
|
||||
|
||||
bool parse(QByteArrayView input);
|
||||
bool parse(QPluginMetaData metaData)
|
||||
{ return parse(QByteArrayView(reinterpret_cast<const char *>(metaData.data), metaData.size)); }
|
||||
|
||||
QJsonObject toJson() const; // only for QLibrary & QPluginLoader
|
||||
|
||||
// if data is not a map, toMap() returns empty, so shall these functions
|
||||
QCborMap toCbor() const { return data.toMap(); }
|
||||
QCborValue value(QtPluginMetaDataKeys k) const { return toCbor()[int(k)]; }
|
||||
};
|
||||
|
||||
class QFactoryLoaderPrivate;
|
||||
class Q_CORE_EXPORT QFactoryLoader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QFactoryLoader)
|
||||
|
||||
public:
|
||||
explicit QFactoryLoader(const char *iid,
|
||||
const QString &suffix = QString(),
|
||||
Qt::CaseSensitivity = Qt::CaseSensitive);
|
||||
|
||||
#if QT_CONFIG(library)
|
||||
~QFactoryLoader();
|
||||
|
||||
void update();
|
||||
static void refreshAll();
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined (Q_OS_MAC)
|
||||
QLibraryPrivate *library(const QString &key) const;
|
||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
||||
#endif // QT_CONFIG(library)
|
||||
|
||||
void setExtraSearchPath(const QString &path);
|
||||
QMultiMap<int, QString> keyMap() const;
|
||||
int indexOf(const QString &needle) const;
|
||||
|
||||
using MetaDataList = QList<QPluginParsedMetaData>;
|
||||
|
||||
MetaDataList metaData() const;
|
||||
QObject *instance(int index) const;
|
||||
};
|
||||
|
||||
template <class PluginInterface, class FactoryInterface, typename ...Args>
|
||||
PluginInterface *qLoadPlugin(const QFactoryLoader *loader, const QString &key, Args &&...args)
|
||||
{
|
||||
const int index = loader->indexOf(key);
|
||||
if (index != -1) {
|
||||
QObject *factoryObject = loader->instance(index);
|
||||
if (FactoryInterface *factory = qobject_cast<FactoryInterface *>(factoryObject))
|
||||
if (PluginInterface *result = factory->create(key, std::forward<Args>(args)...))
|
||||
return result;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <class PluginInterface, class FactoryInterface, typename Arg>
|
||||
Q_DECL_DEPRECATED PluginInterface *qLoadPlugin1(const QFactoryLoader *loader, const QString &key, Arg &&arg)
|
||||
{ return qLoadPlugin<PluginInterface, FactoryInterface>(loader, key, std::forward<Arg>(arg)); }
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_QOBJECT
|
||||
|
||||
#endif // QFACTORYLOADER_P_H
|
||||
@@ -1,80 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILE_P_H
|
||||
#define QFILE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfile.h"
|
||||
#include "private/qfiledevice_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QTemporaryFile;
|
||||
|
||||
class QFilePrivate : public QFileDevicePrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFile)
|
||||
friend class QTemporaryFile;
|
||||
|
||||
protected:
|
||||
QFilePrivate();
|
||||
~QFilePrivate();
|
||||
|
||||
bool openExternalFile(QIODevice::OpenMode flags, int fd, QFile::FileHandleFlags handleFlags);
|
||||
bool openExternalFile(QIODevice::OpenMode flags, FILE *fh, QFile::FileHandleFlags handleFlags);
|
||||
|
||||
QAbstractFileEngine *engine() const override;
|
||||
|
||||
QString fileName;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFILE_P_H
|
||||
@@ -1,167 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILEDEVICE_P_H
|
||||
#define QFILEDEVICE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qiodevice_p.h"
|
||||
#include "qfiledevice.h"
|
||||
|
||||
#include <memory>
|
||||
#if defined(Q_OS_UNIX)
|
||||
# include <sys/types.h> // for mode_t
|
||||
# include <sys/stat.h> // for mode_t constants
|
||||
#elif defined(Q_OS_WINDOWS)
|
||||
# include <qt_windows.h>
|
||||
# include <winnt.h> // for SECURITY_DESCRIPTOR
|
||||
# include <optional>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAbstractFileEngine;
|
||||
class QFSFileEngine;
|
||||
|
||||
class QFileDevicePrivate : public QIODevicePrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFileDevice)
|
||||
protected:
|
||||
QFileDevicePrivate();
|
||||
~QFileDevicePrivate();
|
||||
|
||||
virtual QAbstractFileEngine *engine() const;
|
||||
|
||||
inline bool ensureFlushed() const;
|
||||
|
||||
bool putCharHelper(char c) override;
|
||||
|
||||
void setError(QFileDevice::FileError err);
|
||||
void setError(QFileDevice::FileError err, const QString &errorString);
|
||||
void setError(QFileDevice::FileError err, int errNum);
|
||||
|
||||
mutable std::unique_ptr<QAbstractFileEngine> fileEngine;
|
||||
mutable qint64 cachedSize;
|
||||
|
||||
QFileDevice::FileHandleFlags handleFlags;
|
||||
QFileDevice::FileError error;
|
||||
|
||||
bool lastWasWrite;
|
||||
};
|
||||
|
||||
inline bool QFileDevicePrivate::ensureFlushed() const
|
||||
{
|
||||
// This function ensures that the write buffer has been flushed (const
|
||||
// because certain const functions need to call it.
|
||||
if (lastWasWrite) {
|
||||
const_cast<QFileDevicePrivate *>(this)->lastWasWrite = false;
|
||||
if (!const_cast<QFileDevice *>(q_func())->flush())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
namespace QtPrivate {
|
||||
|
||||
constexpr mode_t toMode_t(QFileDevice::Permissions permissions)
|
||||
{
|
||||
mode_t mode = 0;
|
||||
if (permissions & (QFileDevice::ReadOwner | QFileDevice::ReadUser))
|
||||
mode |= S_IRUSR;
|
||||
if (permissions & (QFileDevice::WriteOwner | QFileDevice::WriteUser))
|
||||
mode |= S_IWUSR;
|
||||
if (permissions & (QFileDevice::ExeOwner | QFileDevice::ExeUser))
|
||||
mode |= S_IXUSR;
|
||||
if (permissions & QFileDevice::ReadGroup)
|
||||
mode |= S_IRGRP;
|
||||
if (permissions & QFileDevice::WriteGroup)
|
||||
mode |= S_IWGRP;
|
||||
if (permissions & QFileDevice::ExeGroup)
|
||||
mode |= S_IXGRP;
|
||||
if (permissions & QFileDevice::ReadOther)
|
||||
mode |= S_IROTH;
|
||||
if (permissions & QFileDevice::WriteOther)
|
||||
mode |= S_IWOTH;
|
||||
if (permissions & QFileDevice::ExeOther)
|
||||
mode |= S_IXOTH;
|
||||
return mode;
|
||||
}
|
||||
|
||||
} // namespace QtPrivate
|
||||
#elif defined(Q_OS_WINDOWS)
|
||||
|
||||
class QNativeFilePermissions
|
||||
{
|
||||
public:
|
||||
QNativeFilePermissions(std::optional<QFileDevice::Permissions> perms, bool isDir);
|
||||
|
||||
SECURITY_ATTRIBUTES *securityAttributes();
|
||||
bool isOk() const { return ok; }
|
||||
|
||||
private:
|
||||
bool ok = false;
|
||||
bool isNull = true;
|
||||
|
||||
// At most 1 allow + 1 deny ACEs for user and group, 1 allow ACE for others
|
||||
static constexpr auto MaxNumACEs = 5;
|
||||
|
||||
static constexpr auto MaxACLSize =
|
||||
sizeof(ACL) + (sizeof(ACCESS_ALLOWED_ACE) + SECURITY_MAX_SID_SIZE) * MaxNumACEs;
|
||||
|
||||
SECURITY_DESCRIPTOR sd;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
alignas(DWORD) char aclStorage[MaxACLSize];
|
||||
};
|
||||
|
||||
#endif // Q_OS_UNIX
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFILEDEVICE_P_H
|
||||
@@ -1,209 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILEINFO_P_H
|
||||
#define QFILEINFO_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfileinfo.h"
|
||||
#include "qdatetime.h"
|
||||
#include "qatomic.h"
|
||||
#include "qshareddata.h"
|
||||
#include "qfilesystemengine_p.h"
|
||||
|
||||
#include <QtCore/private/qabstractfileengine_p.h>
|
||||
#include <QtCore/private/qfilesystementry_p.h>
|
||||
#include <QtCore/private/qfilesystemmetadata_p.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileInfoPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
enum {
|
||||
// note: cachedFlags is only 30-bits wide
|
||||
CachedFileFlags = 0x01,
|
||||
CachedLinkTypeFlag = 0x02,
|
||||
CachedBundleTypeFlag = 0x04,
|
||||
CachedSize = 0x08,
|
||||
CachedATime = 0x10,
|
||||
CachedBTime = 0x20,
|
||||
CachedMCTime = 0x40,
|
||||
CachedMTime = 0x80,
|
||||
CachedPerms = 0x100
|
||||
};
|
||||
|
||||
inline QFileInfoPrivate()
|
||||
: QSharedData(), fileEngine(nullptr),
|
||||
cachedFlags(0),
|
||||
isDefaultConstructed(true),
|
||||
cache_enabled(true), fileFlags(0), fileSize(0)
|
||||
{}
|
||||
inline QFileInfoPrivate(const QFileInfoPrivate ©)
|
||||
: QSharedData(copy),
|
||||
fileEntry(copy.fileEntry),
|
||||
metaData(copy.metaData),
|
||||
fileEngine(QFileSystemEngine::resolveEntryAndCreateLegacyEngine(fileEntry, metaData)),
|
||||
cachedFlags(0),
|
||||
#ifndef QT_NO_FSFILEENGINE
|
||||
isDefaultConstructed(false),
|
||||
#else
|
||||
isDefaultConstructed(!fileEngine),
|
||||
#endif
|
||||
cache_enabled(copy.cache_enabled), fileFlags(0), fileSize(0)
|
||||
{}
|
||||
inline QFileInfoPrivate(const QString &file)
|
||||
: fileEntry(file),
|
||||
fileEngine(QFileSystemEngine::resolveEntryAndCreateLegacyEngine(fileEntry, metaData)),
|
||||
cachedFlags(0),
|
||||
#ifndef QT_NO_FSFILEENGINE
|
||||
isDefaultConstructed(file.isEmpty()),
|
||||
#else
|
||||
isDefaultConstructed(!fileEngine),
|
||||
#endif
|
||||
cache_enabled(true), fileFlags(0), fileSize(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline QFileInfoPrivate(const QFileSystemEntry &file, const QFileSystemMetaData &data)
|
||||
: QSharedData(),
|
||||
fileEntry(file),
|
||||
metaData(data),
|
||||
fileEngine(QFileSystemEngine::resolveEntryAndCreateLegacyEngine(fileEntry, metaData)),
|
||||
cachedFlags(0),
|
||||
isDefaultConstructed(false),
|
||||
cache_enabled(true), fileFlags(0), fileSize(0)
|
||||
{
|
||||
//If the file engine is not null, this maybe a "mount point" for a custom file engine
|
||||
//in which case we can't trust the metadata
|
||||
if (fileEngine)
|
||||
metaData = QFileSystemMetaData();
|
||||
}
|
||||
|
||||
inline QFileInfoPrivate(const QFileSystemEntry &file, const QFileSystemMetaData &data, std::unique_ptr<QAbstractFileEngine> engine)
|
||||
: fileEntry(file),
|
||||
metaData(data),
|
||||
fileEngine{std::move(engine)},
|
||||
cachedFlags(0),
|
||||
#ifndef QT_NO_FSFILEENGINE
|
||||
isDefaultConstructed(false),
|
||||
#else
|
||||
isDefaultConstructed(!fileEngine),
|
||||
#endif
|
||||
cache_enabled(true), fileFlags(0), fileSize(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline void clearFlags() const {
|
||||
fileFlags = 0;
|
||||
cachedFlags = 0;
|
||||
if (fileEngine)
|
||||
(void)fileEngine->fileFlags(QAbstractFileEngine::Refresh);
|
||||
}
|
||||
inline void clear() {
|
||||
metaData.clear();
|
||||
clearFlags();
|
||||
for (int i = QAbstractFileEngine::NFileNames - 1 ; i >= 0 ; --i)
|
||||
fileNames[i].clear();
|
||||
fileOwners[1].clear();
|
||||
fileOwners[0].clear();
|
||||
}
|
||||
|
||||
uint getFileFlags(QAbstractFileEngine::FileFlags) const;
|
||||
QDateTime &getFileTime(QAbstractFileEngine::FileTime) const;
|
||||
QString getFileName(QAbstractFileEngine::FileName) const;
|
||||
QString getFileOwner(QAbstractFileEngine::FileOwner own) const;
|
||||
|
||||
QFileSystemEntry fileEntry;
|
||||
mutable QFileSystemMetaData metaData;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> const fileEngine;
|
||||
|
||||
mutable QString fileNames[QAbstractFileEngine::NFileNames];
|
||||
mutable QString fileOwners[2]; // QAbstractFileEngine::FileOwner: OwnerUser and OwnerGroup
|
||||
mutable QDateTime fileTimes[4]; // QAbstractFileEngine::FileTime: BirthTime, MetadataChangeTime, ModificationTime, AccessTime
|
||||
|
||||
mutable uint cachedFlags : 30;
|
||||
bool const isDefaultConstructed : 1; // QFileInfo is a default constructed instance
|
||||
bool cache_enabled : 1;
|
||||
mutable uint fileFlags;
|
||||
mutable qint64 fileSize;
|
||||
inline bool getCachedFlag(uint c) const
|
||||
{ return cache_enabled ? (cachedFlags & c) : 0; }
|
||||
inline void setCachedFlag(uint c) const
|
||||
{ if (cache_enabled) cachedFlags |= c; }
|
||||
|
||||
template <typename Ret, typename FSLambda, typename EngineLambda>
|
||||
Ret checkAttribute(Ret defaultValue, QFileSystemMetaData::MetaDataFlags fsFlags, const FSLambda &fsLambda,
|
||||
const EngineLambda &engineLambda) const
|
||||
{
|
||||
if (isDefaultConstructed)
|
||||
return defaultValue;
|
||||
if (fileEngine)
|
||||
return engineLambda();
|
||||
if (!cache_enabled || !metaData.hasFlags(fsFlags)) {
|
||||
QFileSystemEngine::fillMetaData(fileEntry, metaData, fsFlags);
|
||||
// ignore errors, fillMetaData will have cleared the flags
|
||||
}
|
||||
return fsLambda();
|
||||
}
|
||||
|
||||
template <typename Ret, typename FSLambda, typename EngineLambda>
|
||||
Ret checkAttribute(QFileSystemMetaData::MetaDataFlags fsFlags, const FSLambda &fsLambda,
|
||||
const EngineLambda &engineLambda) const
|
||||
{
|
||||
return checkAttribute(Ret(), fsFlags, fsLambda, engineLambda);
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFILEINFO_P_H
|
||||
@@ -1,84 +0,0 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESELECTOR_P_H
|
||||
#define QFILESELECTOR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QFileSelector>
|
||||
#include <private/qobject_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct QFileSelectorSharedData //Not QSharedData because currently is just a global store
|
||||
{
|
||||
QStringList staticSelectors;
|
||||
QStringList preloadedStatics;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QFileSelectorPrivate : QObjectPrivate //Exported for use in other modules (like QtGui)
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFileSelector)
|
||||
public:
|
||||
static void updateSelectors();
|
||||
static QStringList platformSelectors();
|
||||
static void addStatics(const QStringList &); //For loading GUI statics from other Qt modules
|
||||
static QString selectionHelper(const QString &path, const QString &fileName,
|
||||
const QStringList &selectors, const QChar &indicator = QLatin1Char('+'));
|
||||
QFileSelectorPrivate();
|
||||
QString select(const QString &filePath) const;
|
||||
|
||||
QStringList extras;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMENGINE_P_H
|
||||
#define QFILESYSTEMENGINE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfile.h"
|
||||
#include "qfilesystementry_p.h"
|
||||
#include "qfilesystemmetadata_p.h"
|
||||
#include <QtCore/private/qsystemerror_p.h>
|
||||
|
||||
#include <optional>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define Q_RETURN_ON_INVALID_FILENAME(message, result) \
|
||||
{ \
|
||||
QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).warning(message); \
|
||||
errno = EINVAL; \
|
||||
return (result); \
|
||||
}
|
||||
|
||||
inline bool qIsFilenameBroken(const QByteArray &name)
|
||||
{
|
||||
return name.contains('\0');
|
||||
}
|
||||
|
||||
inline bool qIsFilenameBroken(const QString &name)
|
||||
{
|
||||
return name.contains(QLatin1Char('\0'));
|
||||
}
|
||||
|
||||
inline bool qIsFilenameBroken(const QFileSystemEntry &entry)
|
||||
{
|
||||
return qIsFilenameBroken(entry.nativeFilePath());
|
||||
}
|
||||
|
||||
#define Q_CHECK_FILE_NAME(name, result) \
|
||||
do { \
|
||||
if (Q_UNLIKELY((name).isEmpty())) \
|
||||
Q_RETURN_ON_INVALID_FILENAME("Empty filename passed to function", (result)); \
|
||||
if (Q_UNLIKELY(qIsFilenameBroken(name))) \
|
||||
Q_RETURN_ON_INVALID_FILENAME("Broken filename passed to function", (result)); \
|
||||
} while (false)
|
||||
|
||||
class Q_AUTOTEST_EXPORT QFileSystemEngine
|
||||
{
|
||||
public:
|
||||
static bool isCaseSensitive()
|
||||
{
|
||||
#ifndef Q_OS_WIN
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static QFileSystemEntry getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data);
|
||||
static QFileSystemEntry getJunctionTarget(const QFileSystemEntry &link, QFileSystemMetaData &data);
|
||||
static QFileSystemEntry canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
|
||||
static QFileSystemEntry absoluteName(const QFileSystemEntry &entry);
|
||||
static QByteArray id(const QFileSystemEntry &entry);
|
||||
static QString resolveUserName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
|
||||
static QString resolveGroupName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
static QString resolveUserName(uint userId);
|
||||
static QString resolveGroupName(uint groupId);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_DARWIN)
|
||||
static QString bundleName(const QFileSystemEntry &entry);
|
||||
#else
|
||||
static QString bundleName(const QFileSystemEntry &) { return QString(); }
|
||||
#endif
|
||||
|
||||
static bool fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
|
||||
QFileSystemMetaData::MetaDataFlags what);
|
||||
#if defined(Q_OS_UNIX)
|
||||
static bool cloneFile(int srcfd, int dstfd, const QFileSystemMetaData &knownData);
|
||||
static bool fillMetaData(int fd, QFileSystemMetaData &data); // what = PosixStatFlags
|
||||
static QByteArray id(int fd);
|
||||
static bool setFileTime(int fd, const QDateTime &newDate,
|
||||
QAbstractFileEngine::FileTime whatTime, QSystemError &error);
|
||||
static bool setPermissions(int fd, QFile::Permissions permissions, QSystemError &error,
|
||||
QFileSystemMetaData *data = nullptr);
|
||||
#endif
|
||||
#if defined(Q_OS_WIN)
|
||||
static QFileSystemEntry junctionTarget(const QFileSystemEntry &link, QFileSystemMetaData &data);
|
||||
static bool uncListSharesOnServer(const QString &server, QStringList *list); //Used also by QFSFileEngineIterator::hasNext()
|
||||
static bool fillMetaData(int fd, QFileSystemMetaData &data,
|
||||
QFileSystemMetaData::MetaDataFlags what);
|
||||
static bool fillMetaData(HANDLE fHandle, QFileSystemMetaData &data,
|
||||
QFileSystemMetaData::MetaDataFlags what);
|
||||
static bool fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data,
|
||||
QFileSystemMetaData::MetaDataFlags what);
|
||||
static QByteArray id(HANDLE fHandle);
|
||||
static bool setFileTime(HANDLE fHandle, const QDateTime &newDate,
|
||||
QAbstractFileEngine::FileTime whatTime, QSystemError &error);
|
||||
static QString owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own);
|
||||
static QString nativeAbsoluteFilePath(const QString &path);
|
||||
static bool isDirPath(const QString &path, bool *existed);
|
||||
#endif
|
||||
//homePath, rootPath and tempPath shall return clean paths
|
||||
static QString homePath();
|
||||
static QString rootPath();
|
||||
static QString tempPath();
|
||||
|
||||
static bool createDirectory(const QFileSystemEntry &entry, bool createParents,
|
||||
std::optional<QFile::Permissions> permissions = std::nullopt);
|
||||
static bool removeDirectory(const QFileSystemEntry &entry, bool removeEmptyParents);
|
||||
|
||||
static bool createLink(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
|
||||
|
||||
static bool copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
|
||||
static bool moveFileToTrash(const QFileSystemEntry &source, QFileSystemEntry &newLocation, QSystemError &error);
|
||||
static bool renameFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
|
||||
static bool renameOverwriteFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
|
||||
static bool removeFile(const QFileSystemEntry &entry, QSystemError &error);
|
||||
|
||||
static bool setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error,
|
||||
QFileSystemMetaData *data = nullptr);
|
||||
|
||||
// unused, therefore not implemented
|
||||
static bool setFileTime(const QFileSystemEntry &entry, const QDateTime &newDate,
|
||||
QAbstractFileEngine::FileTime whatTime, QSystemError &error);
|
||||
|
||||
static bool setCurrentPath(const QFileSystemEntry &entry);
|
||||
static QFileSystemEntry currentPath();
|
||||
|
||||
static QAbstractFileEngine *resolveEntryAndCreateLegacyEngine(QFileSystemEntry &entry,
|
||||
QFileSystemMetaData &data);
|
||||
private:
|
||||
static QString slowCanonicalized(const QString &path);
|
||||
#if defined(Q_OS_WIN)
|
||||
static void clearWinStatData(QFileSystemMetaData &data);
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // include guard
|
||||
@@ -1,129 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMENTRY_P_H
|
||||
#define QFILESYSTEMENTRY_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qbytearray.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileSystemEntry
|
||||
{
|
||||
public:
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
typedef QByteArray NativePath;
|
||||
#else
|
||||
typedef QString NativePath;
|
||||
#endif
|
||||
struct FromNativePath{};
|
||||
struct FromInternalPath{};
|
||||
|
||||
QFileSystemEntry();
|
||||
explicit QFileSystemEntry(const QString &filePath);
|
||||
|
||||
QFileSystemEntry(const QString &filePath, FromInternalPath dummy);
|
||||
QFileSystemEntry(const NativePath &nativeFilePath, FromNativePath dummy);
|
||||
QFileSystemEntry(const QString &filePath, const NativePath &nativeFilePath);
|
||||
|
||||
QString filePath() const;
|
||||
QString fileName() const;
|
||||
QString path() const;
|
||||
NativePath nativeFilePath() const;
|
||||
QString baseName() const;
|
||||
QString completeBaseName() const;
|
||||
QString suffix() const;
|
||||
QString completeSuffix() const;
|
||||
bool isAbsolute() const;
|
||||
bool isRelative() const;
|
||||
bool isClean() const;
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
bool isDriveRoot() const;
|
||||
static bool isDriveRootPath(const QString &path);
|
||||
static QString removeUncOrLongPathPrefix(QString path);
|
||||
#endif
|
||||
bool isRoot() const;
|
||||
|
||||
bool isEmpty() const
|
||||
{
|
||||
return m_filePath.isEmpty() && m_nativeFilePath.isEmpty();
|
||||
}
|
||||
void clear()
|
||||
{
|
||||
*this = QFileSystemEntry();
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT static bool isRootPath(const QString &path);
|
||||
|
||||
private:
|
||||
// creates the QString version out of the bytearray version
|
||||
void resolveFilePath() const;
|
||||
// creates the bytearray version out of the QString version
|
||||
void resolveNativeFilePath() const;
|
||||
// resolves the separator
|
||||
void findLastSeparator() const;
|
||||
// resolves the dots and the separator
|
||||
void findFileNameSeparators() const;
|
||||
|
||||
mutable QString m_filePath; // always has slashes as separator
|
||||
mutable NativePath m_nativeFilePath; // native encoding and separators
|
||||
|
||||
mutable qint16 m_lastSeparator; // index in m_filePath of last separator
|
||||
mutable qint16 m_firstDotInFileName; // index after m_filePath for first dot (.)
|
||||
mutable qint16 m_lastDotInFileName; // index after m_firstDotInFileName for last dot (.)
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // include guard
|
||||
@@ -1,106 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMITERATOR_P_H
|
||||
#define QFILESYSTEMITERATOR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef QT_NO_FILESYSTEMITERATOR
|
||||
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtCore/qdiriterator.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
#include <QtCore/private/qfilesystementry_p.h>
|
||||
#include <QtCore/private/qfilesystemmetadata_p.h>
|
||||
|
||||
// Platform-specific headers
|
||||
#if !defined(Q_OS_WIN)
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileSystemIterator
|
||||
{
|
||||
public:
|
||||
QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters,
|
||||
const QStringList &nameFilters, QDirIterator::IteratorFlags flags
|
||||
= QDirIterator::FollowSymlinks | QDirIterator::Subdirectories);
|
||||
~QFileSystemIterator();
|
||||
|
||||
bool advance(QFileSystemEntry &fileEntry, QFileSystemMetaData &metaData);
|
||||
|
||||
private:
|
||||
QFileSystemEntry::NativePath nativePath;
|
||||
|
||||
// Platform-specific data
|
||||
#if defined(Q_OS_WIN)
|
||||
QString dirPath;
|
||||
HANDLE findFileHandle;
|
||||
QStringList uncShares;
|
||||
bool uncFallback;
|
||||
int uncShareIndex;
|
||||
bool onlyDirs;
|
||||
#else
|
||||
QT_DIR *dir;
|
||||
QT_DIRENT *dirEntry;
|
||||
int lastError;
|
||||
#endif
|
||||
|
||||
Q_DISABLE_COPY_MOVE(QFileSystemIterator)
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILESYSTEMITERATOR
|
||||
|
||||
#endif // include guard
|
||||
@@ -1,394 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMMETADATA_P_H
|
||||
#define QFILESYSTEMMETADATA_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qplatformdefs.h"
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qdatetime.h>
|
||||
#include <QtCore/private/qabstractfileengine_p.h>
|
||||
|
||||
// Platform-specific includes
|
||||
#ifdef Q_OS_WIN
|
||||
# include <QtCore/qt_windows.h>
|
||||
# ifndef IO_REPARSE_TAG_SYMLINK
|
||||
# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
struct statx;
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileSystemEngine;
|
||||
|
||||
class Q_AUTOTEST_EXPORT QFileSystemMetaData
|
||||
{
|
||||
public:
|
||||
QFileSystemMetaData()
|
||||
: size_(-1)
|
||||
{
|
||||
}
|
||||
|
||||
enum MetaDataFlag {
|
||||
// Permissions, overlaps with QFile::Permissions
|
||||
OtherReadPermission = 0x00000004, OtherWritePermission = 0x00000002, OtherExecutePermission = 0x00000001,
|
||||
GroupReadPermission = 0x00000040, GroupWritePermission = 0x00000020, GroupExecutePermission = 0x00000010,
|
||||
UserReadPermission = 0x00000400, UserWritePermission = 0x00000200, UserExecutePermission = 0x00000100,
|
||||
OwnerReadPermission = 0x00004000, OwnerWritePermission = 0x00002000, OwnerExecutePermission = 0x00001000,
|
||||
|
||||
OtherPermissions = OtherReadPermission | OtherWritePermission | OtherExecutePermission,
|
||||
GroupPermissions = GroupReadPermission | GroupWritePermission | GroupExecutePermission,
|
||||
UserPermissions = UserReadPermission | UserWritePermission | UserExecutePermission,
|
||||
OwnerPermissions = OwnerReadPermission | OwnerWritePermission | OwnerExecutePermission,
|
||||
|
||||
ReadPermissions = OtherReadPermission | GroupReadPermission | UserReadPermission | OwnerReadPermission,
|
||||
WritePermissions = OtherWritePermission | GroupWritePermission | UserWritePermission | OwnerWritePermission,
|
||||
ExecutePermissions = OtherExecutePermission | GroupExecutePermission | UserExecutePermission | OwnerExecutePermission,
|
||||
|
||||
Permissions = OtherPermissions | GroupPermissions | UserPermissions | OwnerPermissions,
|
||||
|
||||
// Type
|
||||
LinkType = 0x00010000,
|
||||
FileType = 0x00020000,
|
||||
DirectoryType = 0x00040000,
|
||||
#if defined(Q_OS_DARWIN)
|
||||
BundleType = 0x00080000,
|
||||
AliasType = 0x08000000,
|
||||
#else
|
||||
BundleType = 0x0,
|
||||
AliasType = 0x0,
|
||||
#endif
|
||||
#if defined(Q_OS_WIN)
|
||||
JunctionType = 0x04000000,
|
||||
WinLnkType = 0x08000000, // Note: Uses the same position for AliasType on Mac
|
||||
#else
|
||||
JunctionType = 0x0,
|
||||
WinLnkType = 0x0,
|
||||
#endif
|
||||
SequentialType = 0x00800000, // Note: overlaps with QAbstractFileEngine::RootFlag
|
||||
|
||||
LegacyLinkType = LinkType | AliasType | WinLnkType,
|
||||
|
||||
Type = LinkType | FileType | DirectoryType | BundleType | SequentialType | AliasType,
|
||||
|
||||
// Attributes
|
||||
HiddenAttribute = 0x00100000,
|
||||
SizeAttribute = 0x00200000, // Note: overlaps with QAbstractFileEngine::LocalDiskFlag
|
||||
ExistsAttribute = 0x00400000, // For historical reasons, indicates existence of data, not the file
|
||||
#if defined(Q_OS_WIN)
|
||||
WasDeletedAttribute = 0x0,
|
||||
#else
|
||||
WasDeletedAttribute = 0x40000000, // Indicates the file was deleted
|
||||
#endif
|
||||
|
||||
Attributes = HiddenAttribute | SizeAttribute | ExistsAttribute | WasDeletedAttribute,
|
||||
|
||||
// Times - if we know one of them, we know them all
|
||||
AccessTime = 0x02000000,
|
||||
BirthTime = 0x02000000,
|
||||
MetadataChangeTime = 0x02000000,
|
||||
ModificationTime = 0x02000000,
|
||||
|
||||
Times = AccessTime | BirthTime | MetadataChangeTime | ModificationTime,
|
||||
|
||||
// Owner IDs
|
||||
UserId = 0x10000000,
|
||||
GroupId = 0x20000000,
|
||||
|
||||
OwnerIds = UserId | GroupId,
|
||||
|
||||
PosixStatFlags = QFileSystemMetaData::OtherPermissions
|
||||
| QFileSystemMetaData::GroupPermissions
|
||||
| QFileSystemMetaData::OwnerPermissions
|
||||
| QFileSystemMetaData::FileType
|
||||
| QFileSystemMetaData::DirectoryType
|
||||
| QFileSystemMetaData::SequentialType
|
||||
| QFileSystemMetaData::SizeAttribute
|
||||
| QFileSystemMetaData::WasDeletedAttribute
|
||||
| QFileSystemMetaData::Times
|
||||
| QFileSystemMetaData::OwnerIds,
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
WinStatFlags = QFileSystemMetaData::FileType
|
||||
| QFileSystemMetaData::DirectoryType
|
||||
| QFileSystemMetaData::HiddenAttribute
|
||||
| QFileSystemMetaData::ExistsAttribute
|
||||
| QFileSystemMetaData::SizeAttribute
|
||||
| QFileSystemMetaData::Times,
|
||||
#endif
|
||||
|
||||
AllMetaDataFlags = 0xFFFFFFFF
|
||||
|
||||
};
|
||||
Q_DECLARE_FLAGS(MetaDataFlags, MetaDataFlag)
|
||||
|
||||
bool hasFlags(MetaDataFlags flags) const
|
||||
{
|
||||
return ((knownFlagsMask & flags) == flags);
|
||||
}
|
||||
|
||||
MetaDataFlags missingFlags(MetaDataFlags flags)
|
||||
{
|
||||
return flags & ~knownFlagsMask;
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
knownFlagsMask = {};
|
||||
}
|
||||
|
||||
void clearFlags(MetaDataFlags flags = AllMetaDataFlags)
|
||||
{
|
||||
knownFlagsMask &= ~flags;
|
||||
}
|
||||
|
||||
bool exists() const { return entryFlags.testAnyFlag(ExistsAttribute); }
|
||||
|
||||
bool isLink() const { return entryFlags.testAnyFlag(LinkType); }
|
||||
bool isFile() const { return entryFlags.testAnyFlag(FileType); }
|
||||
bool isDirectory() const { return entryFlags.testAnyFlag(DirectoryType); }
|
||||
bool isBundle() const;
|
||||
bool isAlias() const;
|
||||
bool isLegacyLink() const { return entryFlags.testAnyFlag(LegacyLinkType); }
|
||||
bool isSequential() const { return entryFlags.testAnyFlag(SequentialType); }
|
||||
bool isHidden() const { return entryFlags.testAnyFlag(HiddenAttribute); }
|
||||
bool wasDeleted() const { return entryFlags.testAnyFlag(WasDeletedAttribute); }
|
||||
#if defined(Q_OS_WIN)
|
||||
bool isLnkFile() const { return entryFlags.testAnyFlag(WinLnkType); }
|
||||
bool isJunction() const { return entryFlags.testAnyFlag(JunctionType); }
|
||||
#else
|
||||
bool isLnkFile() const { return false; }
|
||||
bool isJunction() const { return false; }
|
||||
#endif
|
||||
|
||||
qint64 size() const { return size_; }
|
||||
|
||||
QFile::Permissions permissions() const;
|
||||
|
||||
QDateTime accessTime() const;
|
||||
QDateTime birthTime() const;
|
||||
QDateTime metadataChangeTime() const;
|
||||
QDateTime modificationTime() const;
|
||||
|
||||
QDateTime fileTime(QAbstractFileEngine::FileTime time) const;
|
||||
uint userId() const;
|
||||
uint groupId() const;
|
||||
uint ownerId(QAbstractFileEngine::FileOwner owner) const;
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
void fillFromStatxBuf(const struct statx &statBuffer);
|
||||
void fillFromStatBuf(const QT_STATBUF &statBuffer);
|
||||
void fillFromDirEnt(const QT_DIRENT &statBuffer);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
inline void fillFromFileAttribute(DWORD fileAttribute, bool isDriveRoot = false);
|
||||
inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false);
|
||||
inline void fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo);
|
||||
#endif
|
||||
private:
|
||||
friend class QFileSystemEngine;
|
||||
|
||||
MetaDataFlags knownFlagsMask;
|
||||
MetaDataFlags entryFlags;
|
||||
|
||||
qint64 size_;
|
||||
|
||||
// Platform-specific data goes here:
|
||||
#if defined(Q_OS_WIN)
|
||||
DWORD fileAttribute_;
|
||||
FILETIME birthTime_;
|
||||
FILETIME changeTime_;
|
||||
FILETIME lastAccessTime_;
|
||||
FILETIME lastWriteTime_;
|
||||
#else
|
||||
// msec precision
|
||||
qint64 accessTime_;
|
||||
qint64 birthTime_;
|
||||
qint64 metadataChangeTime_;
|
||||
qint64 modificationTime_;
|
||||
|
||||
uint userId_;
|
||||
uint groupId_;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QFileSystemMetaData::MetaDataFlags)
|
||||
|
||||
inline QFile::Permissions QFileSystemMetaData::permissions() const { return QFile::Permissions::fromInt((Permissions & entryFlags).toInt()); }
|
||||
|
||||
#if defined(Q_OS_DARWIN)
|
||||
inline bool QFileSystemMetaData::isBundle() const { return entryFlags.testAnyFlag(BundleType); }
|
||||
inline bool QFileSystemMetaData::isAlias() const { return entryFlags.testAnyFlag(AliasType); }
|
||||
#else
|
||||
inline bool QFileSystemMetaData::isBundle() const { return false; }
|
||||
inline bool QFileSystemMetaData::isAlias() const { return false; }
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) || defined (Q_OS_WIN)
|
||||
inline QDateTime QFileSystemMetaData::fileTime(QAbstractFileEngine::FileTime time) const
|
||||
{
|
||||
switch (time) {
|
||||
case QAbstractFileEngine::ModificationTime:
|
||||
return modificationTime();
|
||||
|
||||
case QAbstractFileEngine::AccessTime:
|
||||
return accessTime();
|
||||
|
||||
case QAbstractFileEngine::BirthTime:
|
||||
return birthTime();
|
||||
|
||||
case QAbstractFileEngine::MetadataChangeTime:
|
||||
return metadataChangeTime();
|
||||
}
|
||||
|
||||
return QDateTime();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
inline QDateTime QFileSystemMetaData::birthTime() const
|
||||
{ return birthTime_ ? QDateTime::fromMSecsSinceEpoch(birthTime_, Qt::UTC) : QDateTime(); }
|
||||
inline QDateTime QFileSystemMetaData::metadataChangeTime() const
|
||||
{ return metadataChangeTime_ ? QDateTime::fromMSecsSinceEpoch(metadataChangeTime_, Qt::UTC) : QDateTime(); }
|
||||
inline QDateTime QFileSystemMetaData::modificationTime() const
|
||||
{ return modificationTime_ ? QDateTime::fromMSecsSinceEpoch(modificationTime_, Qt::UTC) : QDateTime(); }
|
||||
inline QDateTime QFileSystemMetaData::accessTime() const
|
||||
{ return accessTime_ ? QDateTime::fromMSecsSinceEpoch(accessTime_, Qt::UTC) : QDateTime(); }
|
||||
|
||||
inline uint QFileSystemMetaData::userId() const { return userId_; }
|
||||
inline uint QFileSystemMetaData::groupId() const { return groupId_; }
|
||||
|
||||
inline uint QFileSystemMetaData::ownerId(QAbstractFileEngine::FileOwner owner) const
|
||||
{
|
||||
if (owner == QAbstractFileEngine::OwnerUser)
|
||||
return userId();
|
||||
else
|
||||
return groupId();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
inline uint QFileSystemMetaData::userId() const { return (uint) -2; }
|
||||
inline uint QFileSystemMetaData::groupId() const { return (uint) -2; }
|
||||
inline uint QFileSystemMetaData::ownerId(QAbstractFileEngine::FileOwner owner) const
|
||||
{
|
||||
if (owner == QAbstractFileEngine::OwnerUser)
|
||||
return userId();
|
||||
else
|
||||
return groupId();
|
||||
}
|
||||
|
||||
inline void QFileSystemMetaData::fillFromFileAttribute(DWORD fileAttribute,bool isDriveRoot)
|
||||
{
|
||||
fileAttribute_ = fileAttribute;
|
||||
// Ignore the hidden attribute for drives.
|
||||
if (!isDriveRoot && (fileAttribute_ & FILE_ATTRIBUTE_HIDDEN))
|
||||
entryFlags |= HiddenAttribute;
|
||||
entryFlags |= ((fileAttribute & FILE_ATTRIBUTE_DIRECTORY) ? DirectoryType: FileType);
|
||||
entryFlags |= ExistsAttribute;
|
||||
knownFlagsMask |= FileType | DirectoryType | HiddenAttribute | ExistsAttribute;
|
||||
}
|
||||
|
||||
inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot)
|
||||
{
|
||||
fillFromFileAttribute(findData.dwFileAttributes, isDriveRoot);
|
||||
birthTime_ = findData.ftCreationTime;
|
||||
lastAccessTime_ = findData.ftLastAccessTime;
|
||||
changeTime_ = lastWriteTime_ = findData.ftLastWriteTime;
|
||||
if (fileAttribute_ & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
size_ = 0;
|
||||
} else {
|
||||
size_ = findData.nFileSizeHigh;
|
||||
size_ <<= 32;
|
||||
size_ += findData.nFileSizeLow;
|
||||
}
|
||||
knownFlagsMask |= Times | SizeAttribute;
|
||||
if (setLinkType) {
|
||||
knownFlagsMask |= LinkType;
|
||||
entryFlags &= ~LinkType;
|
||||
if (fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) {
|
||||
if (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK) {
|
||||
entryFlags |= LinkType;
|
||||
#if defined(IO_REPARSE_TAG_MOUNT_POINT)
|
||||
} else if ((fileAttribute_ & FILE_ATTRIBUTE_DIRECTORY)
|
||||
&& (findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) {
|
||||
entryFlags |= JunctionType;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void QFileSystemMetaData::fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo)
|
||||
{
|
||||
fillFromFileAttribute(fileInfo.dwFileAttributes);
|
||||
birthTime_ = fileInfo.ftCreationTime;
|
||||
lastAccessTime_ = fileInfo.ftLastAccessTime;
|
||||
changeTime_ = lastWriteTime_ = fileInfo.ftLastWriteTime;
|
||||
if (fileAttribute_ & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
size_ = 0;
|
||||
} else {
|
||||
size_ = fileInfo.nFileSizeHigh;
|
||||
size_ <<= 32;
|
||||
size_ += fileInfo.nFileSizeLow;
|
||||
}
|
||||
knownFlagsMask |= Times | SizeAttribute;
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // include guard
|
||||
@@ -1,152 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMWATCHER_FSEVENTS_P_H
|
||||
#define QFILESYSTEMWATCHER_FSEVENTS_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystemwatcher_p.h"
|
||||
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qmutex.h>
|
||||
#include <QtCore/qsocketnotifier.h>
|
||||
#include <QtCore/qthread.h>
|
||||
|
||||
#include <dispatch/dispatch.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(filesystemwatcher);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFseventsFileSystemWatcherEngine : public QFileSystemWatcherEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
~QFseventsFileSystemWatcherEngine();
|
||||
|
||||
static QFseventsFileSystemWatcherEngine *create(QObject *parent);
|
||||
|
||||
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories);
|
||||
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories);
|
||||
|
||||
void processEvent(ConstFSEventStreamRef streamRef, size_t numEvents, char **eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]);
|
||||
|
||||
Q_SIGNALS:
|
||||
void emitFileChanged(const QString &path, bool removed);
|
||||
void emitDirectoryChanged(const QString &path, bool removed);
|
||||
void scheduleStreamRestart();
|
||||
|
||||
private slots:
|
||||
void doEmitFileChanged(const QString &path, bool removed);
|
||||
void doEmitDirectoryChanged(const QString &path, bool removed);
|
||||
bool restartStream();
|
||||
|
||||
private:
|
||||
struct Info {
|
||||
QString origPath;
|
||||
timespec ctime;
|
||||
mode_t mode;
|
||||
QString watchedPath;
|
||||
|
||||
Info(): mode(0)
|
||||
{
|
||||
ctime.tv_sec = 0;
|
||||
ctime.tv_nsec = 0;
|
||||
}
|
||||
|
||||
Info(const QString &origPath, const timespec &ctime, mode_t mode, const QString &watchedPath)
|
||||
: origPath(origPath)
|
||||
, ctime(ctime)
|
||||
, mode(mode)
|
||||
, watchedPath(watchedPath)
|
||||
{}
|
||||
};
|
||||
typedef QHash<QString, Info> InfoByName;
|
||||
typedef QHash<QString, InfoByName> FilesByPath;
|
||||
struct DirInfo {
|
||||
Info dirInfo;
|
||||
InfoByName entries;
|
||||
};
|
||||
typedef QHash<QString, DirInfo> DirsByName;
|
||||
typedef QHash<QString, qint64> PathRefCounts;
|
||||
|
||||
struct WatchingState {
|
||||
// These fields go hand-in-hand. FSEvents watches paths, and there is no use in watching
|
||||
// the same path multiple times. So, the "refcount" on a path is the number of watched
|
||||
// files that have the same path, plus the number of directories that have the same path.
|
||||
//
|
||||
// If the stream fails to start after adding files/directories, the watcher will try to
|
||||
// keep watching files/directories that it was already watching. It does that by restoring
|
||||
// the previous WatchingState and restarting the stream.
|
||||
FilesByPath watchedFiles;
|
||||
DirsByName watchedDirectories;
|
||||
PathRefCounts watchedPaths;
|
||||
};
|
||||
|
||||
QFseventsFileSystemWatcherEngine(QObject *parent);
|
||||
bool startStream();
|
||||
void stopStream(bool isStopped = false);
|
||||
InfoByName scanForDirEntries(const QString &path);
|
||||
bool derefPath(const QString &watchedPath);
|
||||
bool checkDir(DirsByName::iterator &it);
|
||||
bool rescanDirs(const QString &path);
|
||||
bool rescanFiles(InfoByName &filesInPath);
|
||||
bool rescanFiles(const QString &path);
|
||||
|
||||
QMutex lock;
|
||||
dispatch_queue_t queue;
|
||||
FSEventStreamRef stream;
|
||||
FSEventStreamEventId lastReceivedEvent;
|
||||
WatchingState watchingState;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFILESYSTEMWATCHER_FSEVENTS_P_H
|
||||
@@ -1,92 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMWATCHER_INOTIFY_P_H
|
||||
#define QFILESYSTEMWATCHER_INOTIFY_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystemwatcher_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(filesystemwatcher);
|
||||
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qmutex.h>
|
||||
#include <QtCore/qsocketnotifier.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QInotifyFileSystemWatcherEngine : public QFileSystemWatcherEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
~QInotifyFileSystemWatcherEngine();
|
||||
|
||||
static QInotifyFileSystemWatcherEngine *create(QObject *parent);
|
||||
|
||||
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
|
||||
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void readFromInotify();
|
||||
|
||||
private:
|
||||
QString getPathFromID(int id) const;
|
||||
|
||||
private:
|
||||
QInotifyFileSystemWatcherEngine(int fd, QObject *parent);
|
||||
int inotifyFd;
|
||||
QHash<QString, int> pathToID;
|
||||
QMultiHash<int, QString> idToPath;
|
||||
QSocketNotifier notifier;
|
||||
};
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QFILESYSTEMWATCHER_INOTIFY_P_H
|
||||
@@ -1,94 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMWATCHER_KQUEUE_P_H
|
||||
#define QFILESYSTEMWATCHER_KQUEUE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystemwatcher_p.h"
|
||||
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qmutex.h>
|
||||
#include <QtCore/qsocketnotifier.h>
|
||||
#include <QtCore/qthread.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(filesystemwatcher);
|
||||
struct kevent;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QKqueueFileSystemWatcherEngine : public QFileSystemWatcherEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
~QKqueueFileSystemWatcherEngine();
|
||||
|
||||
static QKqueueFileSystemWatcherEngine *create(QObject *parent);
|
||||
|
||||
QStringList addPaths(const QStringList &paths, QStringList *files,
|
||||
QStringList *directories) override;
|
||||
QStringList removePaths(const QStringList &paths, QStringList *files,
|
||||
QStringList *directories) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void readFromKqueue();
|
||||
|
||||
private:
|
||||
QKqueueFileSystemWatcherEngine(int kqfd, QObject *parent);
|
||||
|
||||
int kqfd;
|
||||
|
||||
QHash<QString, int> pathToID;
|
||||
QHash<int, QString> idToPath;
|
||||
QSocketNotifier notifier;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFILESYSTEMWATCHER_KQUEUE_P_H
|
||||
@@ -1,123 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMWATCHER_P_H
|
||||
#define QFILESYSTEMWATCHER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystemwatcher.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(filesystemwatcher);
|
||||
|
||||
#include <private/qobject_p.h>
|
||||
|
||||
#include <QtCore/qstringlist.h>
|
||||
#include <QtCore/qhash.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileSystemWatcherEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
protected:
|
||||
inline QFileSystemWatcherEngine(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
// fills \a files and \a directories with the \a paths it could
|
||||
// watch, and returns a list of paths this engine could not watch
|
||||
virtual QStringList addPaths(const QStringList &paths,
|
||||
QStringList *files,
|
||||
QStringList *directories) = 0;
|
||||
// removes \a paths from \a files and \a directories, and returns
|
||||
// a list of paths this engine does not know about (either addPath
|
||||
// failed or wasn't called)
|
||||
virtual QStringList removePaths(const QStringList &paths,
|
||||
QStringList *files,
|
||||
QStringList *directories) = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
void fileChanged(const QString &path, bool removed);
|
||||
void directoryChanged(const QString &path, bool removed);
|
||||
};
|
||||
|
||||
class QFileSystemWatcherPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFileSystemWatcher)
|
||||
|
||||
static QFileSystemWatcherEngine *createNativeEngine(QObject *parent);
|
||||
|
||||
public:
|
||||
QFileSystemWatcherPrivate();
|
||||
void init();
|
||||
void initPollerEngine();
|
||||
|
||||
QFileSystemWatcherEngine *native, *poller;
|
||||
QStringList files, directories;
|
||||
|
||||
// private slots
|
||||
void _q_fileChanged(const QString &path, bool removed);
|
||||
void _q_directoryChanged(const QString &path, bool removed);
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
void _q_winDriveLockForRemoval(const QString &);
|
||||
void _q_winDriveLockForRemovalFailed(const QString &);
|
||||
void _q_winDriveRemoved(const QString &);
|
||||
|
||||
private:
|
||||
QHash<QChar, QStringList> temporarilyRemovedPaths;
|
||||
#endif // Q_OS_WIN
|
||||
};
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QFILESYSTEMWATCHER_P_H
|
||||
@@ -1,125 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMWATCHER_POLLING_P_H
|
||||
#define QFILESYSTEMWATCHER_POLLING_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qfileinfo.h>
|
||||
#include <QtCore/qmutex.h>
|
||||
#include <QtCore/qdatetime.h>
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtCore/qtimer.h>
|
||||
#include <QtCore/qhash.h>
|
||||
|
||||
#include "qfilesystemwatcher_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(filesystemwatcher);
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum { PollingInterval = 1000 };
|
||||
|
||||
class QPollingFileSystemWatcherEngine : public QFileSystemWatcherEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
class FileInfo
|
||||
{
|
||||
uint ownerId;
|
||||
uint groupId;
|
||||
QFile::Permissions permissions;
|
||||
QDateTime lastModified;
|
||||
QStringList entries;
|
||||
|
||||
public:
|
||||
FileInfo(const QFileInfo &fileInfo)
|
||||
: ownerId(fileInfo.ownerId()),
|
||||
groupId(fileInfo.groupId()),
|
||||
permissions(fileInfo.permissions()),
|
||||
lastModified(fileInfo.lastModified())
|
||||
{
|
||||
if (fileInfo.isDir()) {
|
||||
entries = fileInfo.absoluteDir().entryList(QDir::AllEntries);
|
||||
}
|
||||
}
|
||||
FileInfo &operator=(const QFileInfo &fileInfo)
|
||||
{
|
||||
*this = FileInfo(fileInfo);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator!=(const QFileInfo &fileInfo) const
|
||||
{
|
||||
if (fileInfo.isDir() && entries != fileInfo.absoluteDir().entryList(QDir::AllEntries))
|
||||
return true;
|
||||
return (ownerId != fileInfo.ownerId()
|
||||
|| groupId != fileInfo.groupId()
|
||||
|| permissions != fileInfo.permissions()
|
||||
|| lastModified != fileInfo.lastModified());
|
||||
}
|
||||
};
|
||||
|
||||
QHash<QString, FileInfo> files, directories;
|
||||
|
||||
public:
|
||||
QPollingFileSystemWatcherEngine(QObject *parent);
|
||||
|
||||
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
|
||||
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void timeout();
|
||||
|
||||
private:
|
||||
QTimer timer;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QFILESYSTEMWATCHER_POLLING_P_H
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFILESYSTEMWATCHER_WIN_P_H
|
||||
#define QFILESYSTEMWATCHER_WIN_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfilesystemwatcher_p.h"
|
||||
|
||||
#include <QtCore/qdatetime.h>
|
||||
#include <QtCore/qfile.h>
|
||||
#include <QtCore/qfileinfo.h>
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtCore/qmutex.h>
|
||||
#include <QtCore/qthread.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QWindowsFileSystemWatcherEngineThread;
|
||||
class QWindowsRemovableDriveListener;
|
||||
|
||||
// Even though QWindowsFileSystemWatcherEngine is derived of QThread
|
||||
// via QFileSystemWatcher, it does not start a thread.
|
||||
// Instead QWindowsFileSystemWatcher creates QWindowsFileSystemWatcherEngineThreads
|
||||
// to do the actually watching.
|
||||
class QWindowsFileSystemWatcherEngine : public QFileSystemWatcherEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWindowsFileSystemWatcherEngine(QObject *parent);
|
||||
~QWindowsFileSystemWatcherEngine();
|
||||
|
||||
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
|
||||
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
|
||||
|
||||
class Handle
|
||||
{
|
||||
public:
|
||||
Qt::HANDLE handle;
|
||||
uint flags;
|
||||
|
||||
Handle();
|
||||
};
|
||||
|
||||
class PathInfo {
|
||||
public:
|
||||
QString absolutePath;
|
||||
QString path;
|
||||
bool isDir;
|
||||
|
||||
// fileinfo bits
|
||||
uint ownerId;
|
||||
uint groupId;
|
||||
QFile::Permissions permissions;
|
||||
QDateTime lastModified;
|
||||
|
||||
PathInfo &operator=(const QFileInfo &fileInfo)
|
||||
{
|
||||
ownerId = fileInfo.ownerId();
|
||||
groupId = fileInfo.groupId();
|
||||
permissions = fileInfo.permissions();
|
||||
lastModified = fileInfo.lastModified();
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator!=(const QFileInfo &fileInfo) const
|
||||
{
|
||||
return (ownerId != fileInfo.ownerId()
|
||||
|| groupId != fileInfo.groupId()
|
||||
|| permissions != fileInfo.permissions()
|
||||
|| lastModified != fileInfo.lastModified());
|
||||
}
|
||||
};
|
||||
|
||||
signals:
|
||||
void driveLockForRemoval(const QString &);
|
||||
void driveLockForRemovalFailed(const QString &);
|
||||
void driveRemoved(const QString &);
|
||||
|
||||
private:
|
||||
QList<QWindowsFileSystemWatcherEngineThread *> threads;
|
||||
QWindowsRemovableDriveListener *m_driveListener = nullptr;
|
||||
};
|
||||
|
||||
class QFileSystemWatcherPathKey : public QString
|
||||
{
|
||||
public:
|
||||
QFileSystemWatcherPathKey() {}
|
||||
explicit QFileSystemWatcherPathKey(const QString &other) : QString(other) {}
|
||||
QFileSystemWatcherPathKey(const QFileSystemWatcherPathKey &other) : QString(other) {}
|
||||
bool operator==(const QFileSystemWatcherPathKey &other) const { return !compare(other, Qt::CaseInsensitive); }
|
||||
};
|
||||
|
||||
Q_DECLARE_TYPEINFO(QFileSystemWatcherPathKey, Q_RELOCATABLE_TYPE);
|
||||
|
||||
inline size_t qHash(const QFileSystemWatcherPathKey &key) { return qHash(key.toCaseFolded()); }
|
||||
|
||||
class QWindowsFileSystemWatcherEngineThread : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
typedef QHash<QFileSystemWatcherPathKey, QWindowsFileSystemWatcherEngine::Handle> HandleForDirHash;
|
||||
typedef QHash<QFileSystemWatcherPathKey, QWindowsFileSystemWatcherEngine::PathInfo> PathInfoHash;
|
||||
|
||||
QWindowsFileSystemWatcherEngineThread();
|
||||
~QWindowsFileSystemWatcherEngineThread();
|
||||
void run() override;
|
||||
void stop();
|
||||
void wakeup();
|
||||
|
||||
QMutex mutex;
|
||||
QList<Qt::HANDLE> handles;
|
||||
int msg;
|
||||
|
||||
HandleForDirHash handleForDir;
|
||||
|
||||
QHash<Qt::HANDLE, PathInfoHash> pathInfoForHandle;
|
||||
|
||||
Q_SIGNALS:
|
||||
void fileChanged(const QString &path, bool removed);
|
||||
void directoryChanged(const QString &path, bool removed);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFILESYSTEMWATCHER_WIN_P_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,289 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFREELIST_P_H
|
||||
#define QFREELIST_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/qatomic.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*! \internal
|
||||
|
||||
Element in a QFreeList. ConstReferenceType and ReferenceType are used as
|
||||
the return values for QFreeList::at() and QFreeList::operator[](). Contains
|
||||
the real data storage (_t) and the id of the next free element (next).
|
||||
|
||||
Note: the t() functions should be used to access the data, not _t.
|
||||
*/
|
||||
template <typename T>
|
||||
struct QFreeListElement
|
||||
{
|
||||
typedef const T &ConstReferenceType;
|
||||
typedef T &ReferenceType;
|
||||
|
||||
T _t;
|
||||
QAtomicInt next;
|
||||
|
||||
inline ConstReferenceType t() const { return _t; }
|
||||
inline ReferenceType t() { return _t; }
|
||||
};
|
||||
|
||||
/*! \internal
|
||||
|
||||
Element in a QFreeList without a payload. ConstReferenceType and
|
||||
ReferenceType are void, the t() functions return void and are empty.
|
||||
*/
|
||||
template <>
|
||||
struct QFreeListElement<void>
|
||||
{
|
||||
typedef void ConstReferenceType;
|
||||
typedef void ReferenceType;
|
||||
|
||||
QAtomicInt next;
|
||||
|
||||
inline void t() const { }
|
||||
inline void t() { }
|
||||
};
|
||||
|
||||
/*! \internal
|
||||
|
||||
Defines default constants used by QFreeList:
|
||||
|
||||
- The initial value returned by QFreeList::next() is zero.
|
||||
|
||||
- QFreeList allows for up to 16777216 elements in QFreeList and uses the top
|
||||
8 bits to store a serial counter for ABA protection.
|
||||
|
||||
- QFreeList will make a maximum of 4 allocations (blocks), with each
|
||||
successive block larger than the previous.
|
||||
|
||||
- Sizes static int[] array to define the size of each block.
|
||||
|
||||
It is possible to define your own constants struct/class and give this to
|
||||
QFreeList to customize/tune the behavior.
|
||||
*/
|
||||
struct Q_AUTOTEST_EXPORT QFreeListDefaultConstants
|
||||
{
|
||||
// used by QFreeList, make sure to define all of when customizing
|
||||
enum {
|
||||
InitialNextValue = 0,
|
||||
IndexMask = 0x00ffffff,
|
||||
SerialMask = ~IndexMask & ~0x80000000,
|
||||
SerialCounter = IndexMask + 1,
|
||||
MaxIndex = IndexMask,
|
||||
BlockCount = 4
|
||||
};
|
||||
|
||||
static const int Sizes[BlockCount];
|
||||
};
|
||||
|
||||
/*! \internal
|
||||
|
||||
This is a generic implementation of a lock-free free list. Use next() to
|
||||
get the next free entry in the list, and release(id) when done with the id.
|
||||
|
||||
This version is templated and allows having a payload of type T which can
|
||||
be accessed using the id returned by next(). The payload is allocated and
|
||||
deallocated automatically by the free list, but *NOT* when calling
|
||||
next()/release(). Initialization should be done by code needing it after
|
||||
next() returns. Likewise, cleanup() should happen before calling release().
|
||||
It is possible to have use 'void' as the payload type, in which case the
|
||||
free list only contains indexes to the next free entry.
|
||||
|
||||
The ConstantsType type defaults to QFreeListDefaultConstants above. You can
|
||||
define your custom ConstantsType, see above for details on what needs to be
|
||||
available.
|
||||
*/
|
||||
template <typename T, typename ConstantsType = QFreeListDefaultConstants>
|
||||
class QFreeList
|
||||
{
|
||||
typedef T ValueType;
|
||||
typedef QFreeListElement<T> ElementType;
|
||||
typedef typename ElementType::ConstReferenceType ConstReferenceType;
|
||||
typedef typename ElementType::ReferenceType ReferenceType;
|
||||
|
||||
// return which block the index \a x falls in, and modify \a x to be the index into that block
|
||||
static inline int blockfor(int &x)
|
||||
{
|
||||
for (int i = 0; i < ConstantsType::BlockCount; ++i) {
|
||||
int size = ConstantsType::Sizes[i];
|
||||
if (x < size)
|
||||
return i;
|
||||
x -= size;
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// allocate a block of the given \a size, initialized starting with the given \a offset
|
||||
static inline ElementType *allocate(int offset, int size)
|
||||
{
|
||||
// qDebug("QFreeList: allocating %d elements (%ld bytes) with offset %d", size, size * sizeof(ElementType), offset);
|
||||
ElementType *v = new ElementType[size];
|
||||
for (int i = 0; i < size; ++i)
|
||||
v[i].next.storeRelaxed(offset + i + 1);
|
||||
return v;
|
||||
}
|
||||
|
||||
// take the current serial number from \a o, increment it, and store it in \a n
|
||||
static inline int incrementserial(int o, int n)
|
||||
{
|
||||
return int((uint(n) & ConstantsType::IndexMask) | ((uint(o) + ConstantsType::SerialCounter) & ConstantsType::SerialMask));
|
||||
}
|
||||
|
||||
// the blocks
|
||||
QAtomicPointer<ElementType> _v[ConstantsType::BlockCount];
|
||||
// the next free id
|
||||
QAtomicInt _next;
|
||||
|
||||
// QFreeList is not copyable
|
||||
Q_DISABLE_COPY_MOVE(QFreeList)
|
||||
|
||||
public:
|
||||
constexpr inline QFreeList();
|
||||
inline ~QFreeList();
|
||||
|
||||
// returns the payload for the given index \a x
|
||||
inline ConstReferenceType at(int x) const;
|
||||
inline ReferenceType operator[](int x);
|
||||
|
||||
/*
|
||||
Return the next free id. Use this id to access the payload (see above).
|
||||
Call release(id) when done using the id.
|
||||
*/
|
||||
inline int next();
|
||||
inline void release(int id);
|
||||
};
|
||||
|
||||
template <typename T, typename ConstantsType>
|
||||
constexpr inline QFreeList<T, ConstantsType>::QFreeList()
|
||||
:
|
||||
_v{}, // uniform initialization required
|
||||
_next(ConstantsType::InitialNextValue)
|
||||
{ }
|
||||
|
||||
template <typename T, typename ConstantsType>
|
||||
inline QFreeList<T, ConstantsType>::~QFreeList()
|
||||
{
|
||||
for (int i = 0; i < ConstantsType::BlockCount; ++i)
|
||||
delete [] _v[i].loadAcquire();
|
||||
}
|
||||
|
||||
template <typename T, typename ConstantsType>
|
||||
inline typename QFreeList<T, ConstantsType>::ConstReferenceType QFreeList<T, ConstantsType>::at(int x) const
|
||||
{
|
||||
const int block = blockfor(x);
|
||||
return (_v[block].loadRelaxed())[x].t();
|
||||
}
|
||||
|
||||
template <typename T, typename ConstantsType>
|
||||
inline typename QFreeList<T, ConstantsType>::ReferenceType QFreeList<T, ConstantsType>::operator[](int x)
|
||||
{
|
||||
const int block = blockfor(x);
|
||||
return (_v[block].loadRelaxed())[x].t();
|
||||
}
|
||||
|
||||
template <typename T, typename ConstantsType>
|
||||
inline int QFreeList<T, ConstantsType>::next()
|
||||
{
|
||||
int id, newid, at;
|
||||
ElementType *v;
|
||||
do {
|
||||
id = _next.loadAcquire();
|
||||
|
||||
at = id & ConstantsType::IndexMask;
|
||||
const int block = blockfor(at);
|
||||
v = _v[block].loadAcquire();
|
||||
|
||||
if (!v) {
|
||||
v = allocate((id & ConstantsType::IndexMask) - at, ConstantsType::Sizes[block]);
|
||||
if (!_v[block].testAndSetRelease(nullptr, v)) {
|
||||
// race with another thread lost
|
||||
delete[] v;
|
||||
v = _v[block].loadAcquire();
|
||||
Q_ASSERT(v != nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
newid = v[at].next.loadRelaxed() | (id & ~ConstantsType::IndexMask);
|
||||
} while (!_next.testAndSetRelease(id, newid));
|
||||
// qDebug("QFreeList::next(): returning %d (_next now %d, serial %d)",
|
||||
// id & ConstantsType::IndexMask,
|
||||
// newid & ConstantsType::IndexMask,
|
||||
// (newid & ~ConstantsType::IndexMask) >> 24);
|
||||
return id & ConstantsType::IndexMask;
|
||||
}
|
||||
|
||||
template <typename T, typename ConstantsType>
|
||||
inline void QFreeList<T, ConstantsType>::release(int id)
|
||||
{
|
||||
int at = id & ConstantsType::IndexMask;
|
||||
const int block = blockfor(at);
|
||||
ElementType *v = _v[block].loadRelaxed();
|
||||
|
||||
int x, newid;
|
||||
do {
|
||||
x = _next.loadAcquire();
|
||||
v[at].next.storeRelaxed(x & ConstantsType::IndexMask);
|
||||
|
||||
newid = incrementserial(x, id);
|
||||
} while (!_next.testAndSetRelease(x, newid));
|
||||
// qDebug("QFreeList::release(%d): _next now %d (was %d), serial %d",
|
||||
// id & ConstantsType::IndexMask,
|
||||
// newid & ConstantsType::IndexMask,
|
||||
// x & ConstantsType::IndexMask,
|
||||
// (newid & ~ConstantsType::IndexMask) >> 24);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QFREELIST_P_H
|
||||
@@ -1,89 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFSFILEENGINE_ITERATOR_P_H
|
||||
#define QFSFILEENGINE_ITERATOR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qabstractfileengine_p.h"
|
||||
#include "qfilesystemiterator_p.h"
|
||||
#include "qdir.h"
|
||||
|
||||
#ifndef QT_NO_FILESYSTEMITERATOR
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFSFileEngineIteratorPrivate;
|
||||
class QFSFileEngineIteratorPlatformSpecificData;
|
||||
|
||||
class QFSFileEngineIterator : public QAbstractFileEngineIterator
|
||||
{
|
||||
public:
|
||||
QFSFileEngineIterator(QDir::Filters filters, const QStringList &filterNames);
|
||||
~QFSFileEngineIterator();
|
||||
|
||||
QString next() override;
|
||||
bool hasNext() const override;
|
||||
|
||||
QString currentFileName() const override;
|
||||
QFileInfo currentFileInfo() const override;
|
||||
|
||||
private:
|
||||
void advance() const;
|
||||
mutable QScopedPointer<QFileSystemIterator> nativeIterator;
|
||||
mutable QFileInfo currentInfo;
|
||||
mutable QFileInfo nextInfo;
|
||||
mutable bool done;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILESYSTEMITERATOR
|
||||
|
||||
#endif // QFSFILEENGINE_ITERATOR_P_H
|
||||
@@ -1,263 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFSFILEENGINE_P_H
|
||||
#define QFSFILEENGINE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qplatformdefs.h"
|
||||
#include "QtCore/private/qabstractfileengine_p.h"
|
||||
#include <QtCore/private/qfilesystementry_p.h>
|
||||
#include <QtCore/private/qfilesystemmetadata_p.h>
|
||||
#include <qhash.h>
|
||||
|
||||
#include <optional>
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <sys/types.h> // for mode_t
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_FSFILEENGINE
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct ProcessOpenModeResult
|
||||
{
|
||||
bool ok;
|
||||
QIODevice::OpenMode openMode;
|
||||
QString error;
|
||||
};
|
||||
Q_CORE_EXPORT ProcessOpenModeResult processOpenModeFlags(QIODevice::OpenMode mode);
|
||||
|
||||
class QFSFileEnginePrivate;
|
||||
|
||||
class Q_CORE_EXPORT QFSFileEngine : public QAbstractFileEngine
|
||||
{
|
||||
Q_DECLARE_PRIVATE(QFSFileEngine)
|
||||
public:
|
||||
QFSFileEngine();
|
||||
explicit QFSFileEngine(const QString &file);
|
||||
~QFSFileEngine();
|
||||
|
||||
bool open(QIODevice::OpenMode openMode, std::optional<QFile::Permissions> permissions) override;
|
||||
bool open(QIODevice::OpenMode flags, FILE *fh);
|
||||
bool close() override;
|
||||
bool flush() override;
|
||||
bool syncToDisk() override;
|
||||
qint64 size() const override;
|
||||
qint64 pos() const override;
|
||||
bool seek(qint64) override;
|
||||
bool isSequential() const override;
|
||||
bool remove() override;
|
||||
bool copy(const QString &newName) override;
|
||||
bool rename(const QString &newName) override;
|
||||
bool renameOverwrite(const QString &newName) override;
|
||||
bool link(const QString &newName) override;
|
||||
bool mkdir(const QString &dirName, bool createParentDirectories,
|
||||
std::optional<QFile::Permissions> permissions) const override;
|
||||
bool rmdir(const QString &dirName, bool recurseParentDirectories) const override;
|
||||
bool setSize(qint64 size) override;
|
||||
bool caseSensitive() const override;
|
||||
bool isRelativePath() const override;
|
||||
QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override;
|
||||
FileFlags fileFlags(FileFlags type) const override;
|
||||
bool setPermissions(uint perms) override;
|
||||
QByteArray id() const override;
|
||||
QString fileName(FileName file) const override;
|
||||
uint ownerId(FileOwner) const override;
|
||||
QString owner(FileOwner) const override;
|
||||
bool setFileTime(const QDateTime &newDate, FileTime time) override;
|
||||
QDateTime fileTime(FileTime time) const override;
|
||||
void setFileName(const QString &file) override;
|
||||
int handle() const override;
|
||||
|
||||
#ifndef QT_NO_FILESYSTEMITERATOR
|
||||
Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override;
|
||||
Iterator *endEntryList() override;
|
||||
#endif
|
||||
|
||||
qint64 read(char *data, qint64 maxlen) override;
|
||||
qint64 readLine(char *data, qint64 maxlen) override;
|
||||
qint64 write(const char *data, qint64 len) override;
|
||||
bool cloneTo(QAbstractFileEngine *target) override;
|
||||
|
||||
virtual bool isUnnamedFile() const
|
||||
{ return false; }
|
||||
|
||||
bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override;
|
||||
bool supportsExtension(Extension extension) const override;
|
||||
|
||||
//FS only!!
|
||||
bool open(QIODevice::OpenMode flags, int fd);
|
||||
bool open(QIODevice::OpenMode flags, int fd, QFile::FileHandleFlags handleFlags);
|
||||
bool open(QIODevice::OpenMode flags, FILE *fh, QFile::FileHandleFlags handleFlags);
|
||||
static bool setCurrentPath(const QString &path);
|
||||
static QString currentPath(const QString &path = QString());
|
||||
static QString homePath();
|
||||
static QString rootPath();
|
||||
static QString tempPath();
|
||||
static QFileInfoList drives();
|
||||
|
||||
protected:
|
||||
QFSFileEngine(QFSFileEnginePrivate &dd);
|
||||
};
|
||||
|
||||
class Q_AUTOTEST_EXPORT QFSFileEnginePrivate : public QAbstractFileEnginePrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFSFileEngine)
|
||||
|
||||
public:
|
||||
#ifdef Q_OS_WIN
|
||||
static QString longFileName(const QString &path);
|
||||
#endif
|
||||
|
||||
QFileSystemEntry fileEntry;
|
||||
QIODevice::OpenMode openMode;
|
||||
|
||||
bool nativeOpen(QIODevice::OpenMode openMode, std::optional<QFile::Permissions> permissions);
|
||||
bool openFh(QIODevice::OpenMode flags, FILE *fh);
|
||||
bool openFd(QIODevice::OpenMode flags, int fd);
|
||||
bool nativeClose();
|
||||
bool closeFdFh();
|
||||
bool nativeFlush();
|
||||
bool nativeSyncToDisk();
|
||||
bool flushFh();
|
||||
qint64 nativeSize() const;
|
||||
#ifndef Q_OS_WIN
|
||||
qint64 sizeFdFh() const;
|
||||
#endif
|
||||
qint64 nativePos() const;
|
||||
qint64 posFdFh() const;
|
||||
bool nativeSeek(qint64);
|
||||
bool seekFdFh(qint64);
|
||||
qint64 nativeRead(char *data, qint64 maxlen);
|
||||
qint64 readFdFh(char *data, qint64 maxlen);
|
||||
qint64 nativeReadLine(char *data, qint64 maxlen);
|
||||
qint64 readLineFdFh(char *data, qint64 maxlen);
|
||||
qint64 nativeWrite(const char *data, qint64 len);
|
||||
qint64 writeFdFh(const char *data, qint64 len);
|
||||
int nativeHandle() const;
|
||||
bool nativeIsSequential() const;
|
||||
#ifndef Q_OS_WIN
|
||||
bool isSequentialFdFh() const;
|
||||
#endif
|
||||
|
||||
uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);
|
||||
bool unmap(uchar *ptr);
|
||||
void unmapAll();
|
||||
|
||||
mutable QFileSystemMetaData metaData;
|
||||
|
||||
FILE *fh;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
HANDLE fileHandle;
|
||||
HANDLE mapHandle;
|
||||
QHash<uchar *, DWORD /* offset % AllocationGranularity */> maps;
|
||||
|
||||
mutable int cachedFd;
|
||||
mutable DWORD fileAttrib;
|
||||
#else
|
||||
struct StartAndLength {
|
||||
int start; // offset % PageSize
|
||||
size_t length; // length + offset % PageSize
|
||||
};
|
||||
QHash<uchar *, StartAndLength> maps;
|
||||
#endif
|
||||
int fd;
|
||||
|
||||
enum LastIOCommand
|
||||
{
|
||||
IOFlushCommand,
|
||||
IOReadCommand,
|
||||
IOWriteCommand
|
||||
};
|
||||
LastIOCommand lastIOCommand;
|
||||
bool lastFlushFailed;
|
||||
bool closeFileHandle;
|
||||
|
||||
mutable uint is_sequential : 2;
|
||||
mutable uint tried_stat : 1;
|
||||
mutable uint need_lstat : 1;
|
||||
mutable uint is_link : 1;
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
bool doStat(QFileSystemMetaData::MetaDataFlags flags) const;
|
||||
#else
|
||||
bool doStat(QFileSystemMetaData::MetaDataFlags flags = QFileSystemMetaData::PosixStatFlags) const;
|
||||
#endif
|
||||
bool isSymlink() const;
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
int sysOpen(const QString &, int flags);
|
||||
#endif
|
||||
|
||||
static bool openModeCanCreate(QIODevice::OpenMode openMode)
|
||||
{
|
||||
// WriteOnly can create, but only when ExistingOnly isn't specified.
|
||||
// ReadOnly by itself never creates.
|
||||
return (openMode & QFile::WriteOnly) && !(openMode & QFile::ExistingOnly);
|
||||
}
|
||||
protected:
|
||||
QFSFileEnginePrivate();
|
||||
|
||||
void init();
|
||||
|
||||
QAbstractFileEngine::FileFlags getPermissions(QAbstractFileEngine::FileFlags type) const;
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
bool nativeOpenImpl(QIODevice::OpenMode openMode, mode_t mode);
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FSFILEENGINE
|
||||
|
||||
#endif // QFSFILEENGINE_P_H
|
||||
@@ -1,61 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of qfunctions_*. This header file may change from version to version
|
||||
// without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#ifndef QFUNCTIONS_P_H
|
||||
#define QFUNCTIONS_P_H
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
#if defined(Q_OS_VXWORKS)
|
||||
# include "QtCore/qfunctions_vxworks.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFUNCTIONS_WINRT_P_H
|
||||
#define QFUNCTIONS_WINRT_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(Q_OS_WIN) && defined(Q_CC_MSVC)
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QAbstractEventDispatcher>
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/qt_windows.h>
|
||||
|
||||
#include <wrl.h>
|
||||
#include <windows.foundation.h>
|
||||
|
||||
// Convenience macros for handling HRESULT values
|
||||
#define RETURN_IF_FAILED(msg, ret) \
|
||||
if (FAILED(hr)) { \
|
||||
qErrnoWarning(hr, msg); \
|
||||
ret; \
|
||||
}
|
||||
|
||||
#define RETURN_IF_FAILED_WITH_ARGS(msg, ret, ...) \
|
||||
if (FAILED(hr)) { \
|
||||
qErrnoWarning(hr, msg, __VA_ARGS__); \
|
||||
ret; \
|
||||
}
|
||||
|
||||
#define RETURN_HR_IF_FAILED(msg) RETURN_IF_FAILED(msg, return hr)
|
||||
#define RETURN_OK_IF_FAILED(msg) RETURN_IF_FAILED(msg, return S_OK)
|
||||
#define RETURN_FALSE_IF_FAILED(msg) RETURN_IF_FAILED(msg, return false)
|
||||
#define RETURN_VOID_IF_FAILED(msg) RETURN_IF_FAILED(msg, return)
|
||||
#define RETURN_HR_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return hr, __VA_ARGS__)
|
||||
#define RETURN_OK_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return S_OK, __VA_ARGS__)
|
||||
#define RETURN_FALSE_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return false, __VA_ARGS__)
|
||||
#define RETURN_VOID_IF_FAILED_WITH_ARGS(msg, ...) RETURN_IF_FAILED_WITH_ARGS(msg, return, __VA_ARGS__)
|
||||
|
||||
#define Q_ASSERT_SUCCEEDED(hr) \
|
||||
Q_ASSERT_X(SUCCEEDED(hr), Q_FUNC_INFO, qPrintable(qt_error_string(hr)));
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QWinRTFunctions {
|
||||
|
||||
// Synchronization methods
|
||||
enum AwaitStyle
|
||||
{
|
||||
YieldThread = 0,
|
||||
ProcessThreadEvents = 1,
|
||||
ProcessMainThreadEvents = 2
|
||||
};
|
||||
|
||||
using EarlyExitConditionFunction = std::function<bool(void)>;
|
||||
|
||||
template<typename T>
|
||||
static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, AwaitStyle awaitStyle,
|
||||
uint timeout, EarlyExitConditionFunction func)
|
||||
{
|
||||
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncInfo> asyncInfo;
|
||||
HRESULT hr = asyncOp.As(&asyncInfo);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
AsyncStatus status;
|
||||
QElapsedTimer t;
|
||||
if (timeout)
|
||||
t.start();
|
||||
switch (awaitStyle) {
|
||||
case ProcessMainThreadEvents:
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
|
||||
QCoreApplication::processEvents();
|
||||
if (func && func())
|
||||
return E_ABORT;
|
||||
if (timeout && t.hasExpired(timeout))
|
||||
return HRESULT_FROM_WIN32(ERROR_TIMEOUT);
|
||||
}
|
||||
break;
|
||||
case ProcessThreadEvents:
|
||||
if (QAbstractEventDispatcher *dispatcher = QThread::currentThread()->eventDispatcher()) {
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
|
||||
dispatcher->processEvents(QEventLoop::AllEvents);
|
||||
if (func && func())
|
||||
return E_ABORT;
|
||||
if (timeout && t.hasExpired(timeout))
|
||||
return HRESULT_FROM_WIN32(ERROR_TIMEOUT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
default:
|
||||
case YieldThread:
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
|
||||
QThread::yieldCurrentThread();
|
||||
if (timeout && t.hasExpired(timeout))
|
||||
return HRESULT_FROM_WIN32(ERROR_TIMEOUT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (FAILED(hr) || status != AsyncStatus::Completed) {
|
||||
HRESULT ec;
|
||||
hr = asyncInfo->get_ErrorCode(&ec);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
hr = asyncInfo->Close();
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
return ec;
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline HRESULT await(const Microsoft::WRL::ComPtr<T> &asyncOp,
|
||||
AwaitStyle awaitStyle = YieldThread, uint timeout = 0,
|
||||
EarlyExitConditionFunction func = nullptr)
|
||||
{
|
||||
HRESULT hr = _await_impl(asyncOp, awaitStyle, timeout, func);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
return asyncOp->GetResults();
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
static inline HRESULT await(const Microsoft::WRL::ComPtr<T> &asyncOp, U *results,
|
||||
AwaitStyle awaitStyle = YieldThread, uint timeout = 0,
|
||||
EarlyExitConditionFunction func = nullptr)
|
||||
{
|
||||
HRESULT hr = _await_impl(asyncOp, awaitStyle, timeout, func);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
return asyncOp->GetResults(results);
|
||||
}
|
||||
|
||||
} // QWinRTFunctions
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // Q_OS_WIN && Q_CC_MSVC
|
||||
|
||||
#endif // QFUNCTIONS_WINRT_P_H
|
||||
@@ -1,207 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFUTEX_P_H
|
||||
#define QFUTEX_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if (__has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)) && __has_include(<sanitizer/tsan_interface.h>)
|
||||
# include <sanitizer/tsan_interface.h>
|
||||
inline void _q_tsan_acquire(void *addr, void *addr2 = nullptr)
|
||||
{
|
||||
// A futex call ensures total ordering on the futex words
|
||||
// (in either success or failure of the call). Instruct TSAN accordingly,
|
||||
// as TSAN does not understand the futex(2) syscall (or equivalent).
|
||||
__tsan_acquire(addr);
|
||||
if (addr2)
|
||||
__tsan_acquire(addr2);
|
||||
}
|
||||
inline void _q_tsan_release(void *addr, void *addr2 = nullptr)
|
||||
{
|
||||
if (addr2)
|
||||
__tsan_release(addr2);
|
||||
__tsan_release(addr);
|
||||
}
|
||||
#else
|
||||
inline void _q_tsan_acquire(void *, void * = nullptr) {}
|
||||
inline void _q_tsan_release(void *, void * = nullptr) {}
|
||||
#endif // building for TSAN and __has_include(<sanitizer/tsan_interface.h>)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtDummyFutex {
|
||||
constexpr inline bool futexAvailable() { return false; }
|
||||
template <typename Atomic>
|
||||
inline bool futexWait(Atomic &, typename Atomic::Type, int = 0)
|
||||
{ Q_UNREACHABLE(); return false; }
|
||||
template <typename Atomic> inline void futexWakeOne(Atomic &)
|
||||
{ Q_UNREACHABLE(); }
|
||||
template <typename Atomic> inline void futexWakeAll(Atomic &)
|
||||
{ Q_UNREACHABLE(); }
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#if defined(Q_OS_LINUX) && !defined(QT_LINUXBASE)
|
||||
// use Linux mutexes everywhere except for LSB builds
|
||||
# include <sys/syscall.h>
|
||||
# include <errno.h>
|
||||
# include <limits.h>
|
||||
# include <unistd.h>
|
||||
# include <asm/unistd.h>
|
||||
# include <linux/futex.h>
|
||||
# define QT_ALWAYS_USE_FUTEX
|
||||
|
||||
// if not defined in linux/futex.h
|
||||
# define FUTEX_PRIVATE_FLAG 128 // added in v2.6.22
|
||||
|
||||
// RISC-V does not supply __NR_futex
|
||||
# ifndef __NR_futex
|
||||
# define __NR_futex __NR_futex_time64
|
||||
# endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace QtLinuxFutex {
|
||||
constexpr inline bool futexAvailable() { return true; }
|
||||
inline int _q_futex(int *addr, int op, int val, quintptr val2 = 0,
|
||||
int *addr2 = nullptr, int val3 = 0) noexcept
|
||||
{
|
||||
_q_tsan_release(addr, addr2);
|
||||
|
||||
// we use __NR_futex because some libcs (like Android's bionic) don't
|
||||
// provide SYS_futex etc.
|
||||
int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
|
||||
|
||||
_q_tsan_acquire(addr, addr2);
|
||||
|
||||
return result;
|
||||
}
|
||||
template <typename T> int *addr(T *ptr)
|
||||
{
|
||||
int *int_addr = reinterpret_cast<int *>(ptr);
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
if (sizeof(T) > sizeof(int))
|
||||
int_addr++; //We want a pointer to the least significant half
|
||||
#endif
|
||||
return int_addr;
|
||||
}
|
||||
|
||||
template <typename Atomic>
|
||||
inline void futexWait(Atomic &futex, typename Atomic::Type expectedValue)
|
||||
{
|
||||
_q_futex(addr(&futex), FUTEX_WAIT, qintptr(expectedValue));
|
||||
}
|
||||
template <typename Atomic>
|
||||
inline bool futexWait(Atomic &futex, typename Atomic::Type expectedValue, qint64 nstimeout)
|
||||
{
|
||||
struct timespec ts;
|
||||
ts.tv_sec = nstimeout / 1000 / 1000 / 1000;
|
||||
ts.tv_nsec = nstimeout % (1000 * 1000 * 1000);
|
||||
int r = _q_futex(addr(&futex), FUTEX_WAIT, qintptr(expectedValue), quintptr(&ts));
|
||||
return r == 0 || errno != ETIMEDOUT;
|
||||
}
|
||||
template <typename Atomic> inline void futexWakeOne(Atomic &futex)
|
||||
{
|
||||
_q_futex(addr(&futex), FUTEX_WAKE, 1);
|
||||
}
|
||||
template <typename Atomic> inline void futexWakeAll(Atomic &futex)
|
||||
{
|
||||
_q_futex(addr(&futex), FUTEX_WAKE, INT_MAX);
|
||||
}
|
||||
template <typename Atomic> inline
|
||||
void futexWakeOp(Atomic &futex1, int wake1, int wake2, Atomic &futex2, quint32 op)
|
||||
{
|
||||
_q_futex(addr(&futex1), FUTEX_WAKE_OP, wake1, wake2, addr(&futex2), op);
|
||||
}
|
||||
}
|
||||
namespace QtFutex = QtLinuxFutex;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#elif defined(Q_OS_WIN)
|
||||
# include <qt_windows.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace QtWindowsFutex {
|
||||
#define QT_ALWAYS_USE_FUTEX
|
||||
constexpr inline bool futexAvailable() { return true; }
|
||||
|
||||
template <typename Atomic>
|
||||
inline void futexWait(Atomic &futex, typename Atomic::Type expectedValue)
|
||||
{
|
||||
_q_tsan_release(&futex);
|
||||
WaitOnAddress(&futex, &expectedValue, sizeof(expectedValue), INFINITE);
|
||||
_q_tsan_acquire(&futex);
|
||||
}
|
||||
template <typename Atomic>
|
||||
inline bool futexWait(Atomic &futex, typename Atomic::Type expectedValue, qint64 nstimeout)
|
||||
{
|
||||
BOOL r = WaitOnAddress(&futex, &expectedValue, sizeof(expectedValue), DWORD(nstimeout / 1000 / 1000));
|
||||
return r || GetLastError() != ERROR_TIMEOUT;
|
||||
}
|
||||
template <typename Atomic> inline void futexWakeAll(Atomic &futex)
|
||||
{
|
||||
WakeByAddressAll(&futex);
|
||||
}
|
||||
template <typename Atomic> inline void futexWakeOne(Atomic &futex)
|
||||
{
|
||||
WakeByAddressSingle(&futex);
|
||||
}
|
||||
}
|
||||
namespace QtFutex = QtWindowsFutex;
|
||||
QT_END_NAMESPACE
|
||||
#else
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace QtFutex = QtDummyFutex;
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
#endif // QFUTEX_P_H
|
||||
@@ -1,233 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFUTUREINTERFACE_P_H
|
||||
#define QFUTUREINTERFACE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/qelapsedtimer.h>
|
||||
#include <QtCore/qcoreevent.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtCore/qwaitcondition.h>
|
||||
#include <QtCore/qrunnable.h>
|
||||
#include <QtCore/qthreadpool.h>
|
||||
#include <QtCore/qfutureinterface.h>
|
||||
#include <QtCore/qexception.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(future);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFutureCallOutEvent : public QEvent
|
||||
{
|
||||
Q_EVENT_DISABLE_COPY(QFutureCallOutEvent);
|
||||
public:
|
||||
enum CallOutType {
|
||||
Started,
|
||||
Finished,
|
||||
Canceled,
|
||||
Suspending,
|
||||
Suspended,
|
||||
Resumed,
|
||||
Progress,
|
||||
ProgressRange,
|
||||
ResultsReady
|
||||
};
|
||||
|
||||
QFutureCallOutEvent()
|
||||
: QEvent(QEvent::FutureCallOut), callOutType(CallOutType(0)), index1(-1), index2(-1)
|
||||
{ }
|
||||
explicit QFutureCallOutEvent(CallOutType callOutType, int index1 = -1)
|
||||
: QEvent(QEvent::FutureCallOut), callOutType(callOutType), index1(index1), index2(-1)
|
||||
{ }
|
||||
QFutureCallOutEvent(CallOutType callOutType, int index1, int index2)
|
||||
: QEvent(QEvent::FutureCallOut), callOutType(callOutType), index1(index1), index2(index2)
|
||||
{ }
|
||||
|
||||
QFutureCallOutEvent(CallOutType callOutType, int index1, const QString &text)
|
||||
: QEvent(QEvent::FutureCallOut),
|
||||
callOutType(callOutType),
|
||||
index1(index1),
|
||||
index2(-1),
|
||||
text(text)
|
||||
{ }
|
||||
|
||||
CallOutType callOutType;
|
||||
int index1;
|
||||
int index2;
|
||||
QString text;
|
||||
|
||||
QEvent *clone() const override
|
||||
{
|
||||
return new QFutureCallOutEvent(callOutType, index1, index2, text);
|
||||
}
|
||||
|
||||
private:
|
||||
QFutureCallOutEvent(CallOutType callOutType,
|
||||
int index1,
|
||||
int index2,
|
||||
const QString &text)
|
||||
: QEvent(QEvent::FutureCallOut),
|
||||
callOutType(callOutType),
|
||||
index1(index1),
|
||||
index2(index2),
|
||||
text(text)
|
||||
{ }
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT QFutureCallOutInterface
|
||||
{
|
||||
public:
|
||||
virtual ~QFutureCallOutInterface();
|
||||
virtual void postCallOutEvent(const QFutureCallOutEvent &) = 0;
|
||||
virtual void callOutInterfaceDisconnected() = 0;
|
||||
};
|
||||
|
||||
class QFutureInterfaceBasePrivate
|
||||
{
|
||||
public:
|
||||
QFutureInterfaceBasePrivate(QFutureInterfaceBase::State initialState);
|
||||
~QFutureInterfaceBasePrivate();
|
||||
|
||||
// When the last QFuture<T> reference is removed, we need to make
|
||||
// sure that data stored in the ResultStore is cleaned out.
|
||||
// Since QFutureInterfaceBasePrivate can be shared between QFuture<T>
|
||||
// and QFuture<void> objects, we use a separate ref. counter
|
||||
// to keep track of QFuture<T> objects.
|
||||
class RefCount
|
||||
{
|
||||
public:
|
||||
inline RefCount(int r = 0, int rt = 0)
|
||||
: m_refCount(r), m_refCountT(rt) {}
|
||||
// Default ref counter for QFIBP
|
||||
inline bool ref() { return m_refCount.ref(); }
|
||||
inline bool deref() { return m_refCount.deref(); }
|
||||
inline int load() const { return m_refCount.loadRelaxed(); }
|
||||
// Ref counter for type T
|
||||
inline bool refT() { return m_refCountT.ref(); }
|
||||
inline bool derefT() { return m_refCountT.deref(); }
|
||||
inline int loadT() const { return m_refCountT.loadRelaxed(); }
|
||||
|
||||
private:
|
||||
QAtomicInt m_refCount;
|
||||
QAtomicInt m_refCountT;
|
||||
};
|
||||
|
||||
// T: accessed from executing thread
|
||||
// Q: accessed from the waiting/querying thread
|
||||
mutable QMutex m_mutex;
|
||||
QBasicMutex continuationMutex;
|
||||
QList<QFutureCallOutInterface *> outputConnections;
|
||||
QElapsedTimer progressTime;
|
||||
QWaitCondition waitCondition;
|
||||
QWaitCondition pausedWaitCondition;
|
||||
|
||||
union Data {
|
||||
QtPrivate::ResultStoreBase m_results;
|
||||
QtPrivate::ExceptionStore m_exceptionStore;
|
||||
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
void setException(const std::exception_ptr &e)
|
||||
{
|
||||
m_results.~ResultStoreBase();
|
||||
new (&m_exceptionStore) QtPrivate::ExceptionStore();
|
||||
m_exceptionStore.setException(e);
|
||||
}
|
||||
#endif
|
||||
|
||||
~Data() { }
|
||||
};
|
||||
Data data = { QtPrivate::ResultStoreBase() };
|
||||
|
||||
QRunnable *runnable = nullptr;
|
||||
QThreadPool *m_pool = nullptr;
|
||||
// Wrapper for continuation
|
||||
std::function<void(const QFutureInterfaceBase &)> continuation;
|
||||
QFutureInterfaceBasePrivate *parentData = nullptr;
|
||||
|
||||
RefCount refCount = 1;
|
||||
QAtomicInt state; // reads and writes can happen unprotected, both must be atomic
|
||||
|
||||
int m_progressValue = 0; // TQ
|
||||
struct ProgressData
|
||||
{
|
||||
int minimum = 0; // TQ
|
||||
int maximum = 0; // TQ
|
||||
QString text;
|
||||
};
|
||||
QScopedPointer<ProgressData> m_progress;
|
||||
|
||||
int m_expectedResultCount = 0;
|
||||
bool launchAsync = false;
|
||||
bool isValid = false;
|
||||
bool hasException = false;
|
||||
|
||||
inline QThreadPool *pool() const
|
||||
{ return m_pool ? m_pool : QThreadPool::globalInstance(); }
|
||||
|
||||
// Internal functions that does not change the mutex state.
|
||||
// The mutex must be locked when calling these.
|
||||
int internal_resultCount() const;
|
||||
bool internal_isResultReadyAt(int index) const;
|
||||
bool internal_waitForNextResult();
|
||||
bool internal_updateProgressValue(int progress);
|
||||
bool internal_updateProgress(int progress, const QString &progressText = QString());
|
||||
void internal_setThrottled(bool enable);
|
||||
void sendCallOut(const QFutureCallOutEvent &callOut);
|
||||
void sendCallOuts(const QFutureCallOutEvent &callOut1, const QFutureCallOutEvent &callOut2);
|
||||
void connectOutputInterface(QFutureCallOutInterface *iface);
|
||||
void disconnectOutputInterface(QFutureCallOutInterface *iface);
|
||||
|
||||
void setState(QFutureInterfaceBase::State state);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,85 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QFUTUREWATCHER_P_H
|
||||
#define QFUTUREWATCHER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qfutureinterface_p.h"
|
||||
#include <qlist.h>
|
||||
|
||||
#include <private/qobject_p.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(future);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFutureWatcherBase;
|
||||
class QFutureWatcherBasePrivate : public QObjectPrivate,
|
||||
public QFutureCallOutInterface
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QFutureWatcherBase)
|
||||
|
||||
public:
|
||||
QFutureWatcherBasePrivate();
|
||||
|
||||
void postCallOutEvent(const QFutureCallOutEvent &callOutEvent) override;
|
||||
void callOutInterfaceDisconnected() override;
|
||||
|
||||
void sendCallOutEvent(QFutureCallOutEvent *event);
|
||||
|
||||
QAtomicInt pendingResultsReady;
|
||||
int maximumPendingResultsReady;
|
||||
|
||||
QAtomicInt resultAtConnected;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,154 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Copyright (C) 2015 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QGLOBAL_P_H
|
||||
#define QGLOBAL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qglobal.h"
|
||||
#include "qglobal_p.h" // include self to avoid syncqt warning - no-op
|
||||
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
#include <QtCore/private/qconfig_p.h>
|
||||
#include <QtCore/private/qtcore-config_p.h>
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#ifdef Q_CC_MINGW
|
||||
# include <unistd.h> // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r()
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// These behave as if they consult the environment, so need to share its locking:
|
||||
Q_CORE_EXPORT void qTzSet();
|
||||
Q_CORE_EXPORT time_t qMkTime(struct tm *when);
|
||||
|
||||
#if !defined(Q_CC_MSVC)
|
||||
Q_NORETURN
|
||||
#endif
|
||||
Q_CORE_EXPORT void qAbort();
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#if !__has_builtin(__builtin_available)
|
||||
#include <initializer_list>
|
||||
#include <QtCore/qoperatingsystemversion.h>
|
||||
#include <QtCore/qversionnumber.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct qt_clang_builtin_available_os_version_data {
|
||||
QOperatingSystemVersion::OSType type;
|
||||
const char *version;
|
||||
};
|
||||
|
||||
static inline bool qt_clang_builtin_available(
|
||||
const std::initializer_list<qt_clang_builtin_available_os_version_data> &versions)
|
||||
{
|
||||
for (auto it = versions.begin(); it != versions.end(); ++it) {
|
||||
if (QOperatingSystemVersion::currentType() == it->type) {
|
||||
const auto current = QOperatingSystemVersion::current();
|
||||
return QVersionNumber(
|
||||
current.majorVersion(),
|
||||
current.minorVersion(),
|
||||
current.microVersion()) >= QVersionNumber::fromString(
|
||||
QString::fromLatin1(it->version));
|
||||
}
|
||||
}
|
||||
|
||||
// Result is true if the platform is not any of the checked ones; this matches behavior of
|
||||
// LLVM __builtin_available and @available constructs
|
||||
return true;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#define QT_AVAILABLE_OS_VER(os, ver) \
|
||||
QT_PREPEND_NAMESPACE(qt_clang_builtin_available_os_version_data){\
|
||||
QT_PREPEND_NAMESPACE(QOperatingSystemVersion)::os, #ver}
|
||||
#define QT_AVAILABLE_CAT(L, R) QT_AVAILABLE_CAT_(L, R)
|
||||
#define QT_AVAILABLE_CAT_(L, R) L ## R
|
||||
#define QT_AVAILABLE_EXPAND(...) QT_AVAILABLE_OS_VER(__VA_ARGS__)
|
||||
#define QT_AVAILABLE_SPLIT(os_ver) QT_AVAILABLE_EXPAND(QT_AVAILABLE_CAT(QT_AVAILABLE_SPLIT_, os_ver))
|
||||
#define QT_AVAILABLE_SPLIT_macOS MacOS,
|
||||
#define QT_AVAILABLE_SPLIT_iOS IOS,
|
||||
#define QT_AVAILABLE_SPLIT_tvOS TvOS,
|
||||
#define QT_AVAILABLE_SPLIT_watchOS WatchOS,
|
||||
#define QT_BUILTIN_AVAILABLE0(e) \
|
||||
QT_PREPEND_NAMESPACE(qt_clang_builtin_available)({})
|
||||
#define QT_BUILTIN_AVAILABLE1(a, e) \
|
||||
QT_PREPEND_NAMESPACE(qt_clang_builtin_available)({QT_AVAILABLE_SPLIT(a)})
|
||||
#define QT_BUILTIN_AVAILABLE2(a, b, e) \
|
||||
QT_PREPEND_NAMESPACE(qt_clang_builtin_available)({QT_AVAILABLE_SPLIT(a), \
|
||||
QT_AVAILABLE_SPLIT(b)})
|
||||
#define QT_BUILTIN_AVAILABLE3(a, b, c, e) \
|
||||
QT_PREPEND_NAMESPACE(qt_clang_builtin_available)({QT_AVAILABLE_SPLIT(a), \
|
||||
QT_AVAILABLE_SPLIT(b), \
|
||||
QT_AVAILABLE_SPLIT(c)})
|
||||
#define QT_BUILTIN_AVAILABLE4(a, b, c, d, e) \
|
||||
QT_PREPEND_NAMESPACE(qt_clang_builtin_available)({QT_AVAILABLE_SPLIT(a), \
|
||||
QT_AVAILABLE_SPLIT(b), \
|
||||
QT_AVAILABLE_SPLIT(c), \
|
||||
QT_AVAILABLE_SPLIT(d)})
|
||||
#define QT_BUILTIN_AVAILABLE_ARG(arg0, arg1, arg2, arg3, arg4, arg5, ...) arg5
|
||||
#define QT_BUILTIN_AVAILABLE_CHOOSER(...) QT_BUILTIN_AVAILABLE_ARG(__VA_ARGS__, \
|
||||
QT_BUILTIN_AVAILABLE4, \
|
||||
QT_BUILTIN_AVAILABLE3, \
|
||||
QT_BUILTIN_AVAILABLE2, \
|
||||
QT_BUILTIN_AVAILABLE1, \
|
||||
QT_BUILTIN_AVAILABLE0, )
|
||||
#define __builtin_available(...) QT_BUILTIN_AVAILABLE_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
|
||||
#endif // !__has_builtin(__builtin_available)
|
||||
#endif // defined(__cplusplus)
|
||||
|
||||
#endif // QGLOBAL_P_H
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QGREGORIAN_CALENDAR_P_H
|
||||
#define QGREGORIAN_CALENDAR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of calendar implementations. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qromancalendar_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QGregorianCalendar : public QRomanCalendar
|
||||
{
|
||||
// TODO: provide static methods, called by the overrides, that can be called
|
||||
// directly by QDate to optimize various parts.
|
||||
public:
|
||||
// Calendar property:
|
||||
QString name() const override;
|
||||
static QStringList nameList();
|
||||
// Date queries:
|
||||
bool isLeapYear(int year) const override;
|
||||
// Julian Day conversions:
|
||||
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
|
||||
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
|
||||
|
||||
// Names of months (implemented in qlocale.cpp):
|
||||
QString monthName(const QLocale &locale, int month, int year,
|
||||
QLocale::FormatType format) const override;
|
||||
QString standaloneMonthName(const QLocale &locale, int month, int year,
|
||||
QLocale::FormatType format) const override;
|
||||
|
||||
// Static optimized versions for the benefit of QDate:
|
||||
static int weekDayOfJulian(qint64 jd);
|
||||
static bool leapTest(int year);
|
||||
static int monthLength(int month, int year);
|
||||
static bool validParts(int year, int month, int day);
|
||||
static QCalendar::YearMonthDay partsFromJulian(qint64 jd);
|
||||
static bool julianFromParts(int year, int month, int day, qint64 *jd);
|
||||
// Used internally:
|
||||
static int yearStartWeekDay(int year);
|
||||
static int yearSharingWeekDays(QDate date);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGREGORIAN_CALENDAR_P_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,80 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QHIJRI_CALENDAR_P_H
|
||||
#define QHIJRI_CALENDAR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of calendar implementations. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qcalendarbackend_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(hijricalendar);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// Base for sharing with other variants on the Islamic calendar, as needed:
|
||||
class Q_CORE_EXPORT QHijriCalendar : public QCalendarBackend
|
||||
{
|
||||
public:
|
||||
int daysInMonth(int month, int year = QCalendar::Unspecified) const override;
|
||||
int maximumDaysInMonth() const override;
|
||||
int daysInYear(int year) const override;
|
||||
|
||||
bool isLunar() const override;
|
||||
bool isLuniSolar() const override;
|
||||
bool isSolar() const override;
|
||||
|
||||
protected:
|
||||
const QCalendarLocale *localeMonthIndexData() const override;
|
||||
const char16_t *localeMonthData() const override;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QHIJRI_CALENDAR_P_H
|
||||
@@ -1,84 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Volker Krause <volker.krause@kdab.com>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef QHOOKS_H
|
||||
#define QHOOKS_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QObject;
|
||||
|
||||
namespace QHooks {
|
||||
|
||||
enum HookIndex {
|
||||
HookDataVersion = 0,
|
||||
HookDataSize = 1,
|
||||
QtVersion = 2,
|
||||
AddQObject = 3,
|
||||
RemoveQObject = 4,
|
||||
Startup = 5,
|
||||
TypeInformationVersion = 6,
|
||||
LastHookIndex
|
||||
};
|
||||
|
||||
typedef void(*AddQObjectCallback)(QObject*);
|
||||
typedef void(*RemoveQObjectCallback)(QObject*);
|
||||
typedef void(*StartupCallback)();
|
||||
|
||||
}
|
||||
|
||||
extern quintptr Q_CORE_EXPORT qtHookData[];
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,98 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QIDENTITYPROXYMODEL_P_H
|
||||
#define QIDENTITYPROXYMODEL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of QAbstractItemModel*. This header file may change from version
|
||||
// to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
//
|
||||
|
||||
#include <QtCore/private/qabstractproxymodel_p.h>
|
||||
#include <QtCore/qidentityproxymodel.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QIdentityProxyModelPrivate : public QAbstractProxyModelPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QIdentityProxyModel)
|
||||
|
||||
public:
|
||||
QIdentityProxyModelPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
QList<QPersistentModelIndex> layoutChangePersistentIndexes;
|
||||
QModelIndexList proxyIndexes;
|
||||
|
||||
void _q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceRowsInserted(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceRowsRemoved(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);
|
||||
void _q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);
|
||||
|
||||
void _q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceColumnsInserted(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end);
|
||||
void _q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);
|
||||
void _q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest);
|
||||
|
||||
void _q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int> &roles);
|
||||
void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last);
|
||||
|
||||
void _q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint);
|
||||
void _q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint);
|
||||
void _q_sourceModelAboutToBeReset();
|
||||
void _q_sourceModelReset();
|
||||
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QIDENTITYPROXYMODEL_P_H
|
||||
@@ -1,203 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QIODEVICE_P_H
|
||||
#define QIODEVICE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of QIODevice. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qbytearray.h"
|
||||
#include "QtCore/qiodevice.h"
|
||||
#include "QtCore/qobjectdefs.h"
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtCore/qvarlengtharray.h"
|
||||
#include "private/qringbuffer_p.h"
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#include "private/qobject_p.h"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QIODEVICE_BUFFERSIZE
|
||||
#define QIODEVICE_BUFFERSIZE 16384
|
||||
#endif
|
||||
|
||||
Q_CORE_EXPORT int qt_subtract_from_timeout(int timeout, int elapsed);
|
||||
|
||||
class Q_CORE_EXPORT QIODevicePrivate
|
||||
#ifndef QT_NO_QOBJECT
|
||||
: public QObjectPrivate
|
||||
#endif
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QIODevice)
|
||||
|
||||
public:
|
||||
QIODevicePrivate();
|
||||
virtual ~QIODevicePrivate();
|
||||
|
||||
// The size of this class is a subject of the library hook data.
|
||||
// When adding a new member, do not make gaps and be aware
|
||||
// about the padding. Accordingly, adjust offsets in
|
||||
// tests/auto/other/toolsupport and bump the TypeInformationVersion
|
||||
// field in src/corelib/global/qhooks.cpp, to notify the developers.
|
||||
qint64 pos = 0;
|
||||
qint64 devicePos = 0;
|
||||
qint64 transactionPos = 0;
|
||||
|
||||
class QRingBufferRef
|
||||
{
|
||||
QRingBuffer *m_buf;
|
||||
inline QRingBufferRef() : m_buf(nullptr) { }
|
||||
friend class QIODevicePrivate;
|
||||
public:
|
||||
// wrap functions from QRingBuffer
|
||||
inline void setChunkSize(int size) { Q_ASSERT(m_buf); m_buf->setChunkSize(size); }
|
||||
inline int chunkSize() const { Q_ASSERT(m_buf); return m_buf->chunkSize(); }
|
||||
inline qint64 nextDataBlockSize() const { return (m_buf ? m_buf->nextDataBlockSize() : Q_INT64_C(0)); }
|
||||
inline const char *readPointer() const { return (m_buf ? m_buf->readPointer() : nullptr); }
|
||||
inline const char *readPointerAtPosition(qint64 pos, qint64 &length) const { Q_ASSERT(m_buf); return m_buf->readPointerAtPosition(pos, length); }
|
||||
inline void free(qint64 bytes) { Q_ASSERT(m_buf); m_buf->free(bytes); }
|
||||
inline char *reserve(qint64 bytes) { Q_ASSERT(m_buf); return m_buf->reserve(bytes); }
|
||||
inline char *reserveFront(qint64 bytes) { Q_ASSERT(m_buf); return m_buf->reserveFront(bytes); }
|
||||
inline void truncate(qint64 pos) { Q_ASSERT(m_buf); m_buf->truncate(pos); }
|
||||
inline void chop(qint64 bytes) { Q_ASSERT(m_buf); m_buf->chop(bytes); }
|
||||
inline bool isEmpty() const { return !m_buf || m_buf->isEmpty(); }
|
||||
inline int getChar() { return (m_buf ? m_buf->getChar() : -1); }
|
||||
inline void putChar(char c) { Q_ASSERT(m_buf); m_buf->putChar(c); }
|
||||
inline void ungetChar(char c) { Q_ASSERT(m_buf); m_buf->ungetChar(c); }
|
||||
inline qint64 size() const { return (m_buf ? m_buf->size() : Q_INT64_C(0)); }
|
||||
inline void clear() { if (m_buf) m_buf->clear(); }
|
||||
inline qint64 indexOf(char c) const { return (m_buf ? m_buf->indexOf(c, m_buf->size()) : Q_INT64_C(-1)); }
|
||||
inline qint64 indexOf(char c, qint64 maxLength, qint64 pos = 0) const { return (m_buf ? m_buf->indexOf(c, maxLength, pos) : Q_INT64_C(-1)); }
|
||||
inline qint64 read(char *data, qint64 maxLength) { return (m_buf ? m_buf->read(data, maxLength) : Q_INT64_C(0)); }
|
||||
inline QByteArray read() { return (m_buf ? m_buf->read() : QByteArray()); }
|
||||
inline qint64 peek(char *data, qint64 maxLength, qint64 pos = 0) const { return (m_buf ? m_buf->peek(data, maxLength, pos) : Q_INT64_C(0)); }
|
||||
inline void append(const char *data, qint64 size) { Q_ASSERT(m_buf); m_buf->append(data, size); }
|
||||
inline void append(const QByteArray &qba) { Q_ASSERT(m_buf); m_buf->append(qba); }
|
||||
inline qint64 skip(qint64 length) { return (m_buf ? m_buf->skip(length) : Q_INT64_C(0)); }
|
||||
inline qint64 readLine(char *data, qint64 maxLength) { return (m_buf ? m_buf->readLine(data, maxLength) : Q_INT64_C(-1)); }
|
||||
inline bool canReadLine() const { return m_buf && m_buf->canReadLine(); }
|
||||
};
|
||||
|
||||
QRingBufferRef buffer;
|
||||
QRingBufferRef writeBuffer;
|
||||
const QByteArray *currentWriteChunk = nullptr;
|
||||
int readChannelCount = 0;
|
||||
int writeChannelCount = 0;
|
||||
int currentReadChannel = 0;
|
||||
int currentWriteChannel = 0;
|
||||
int readBufferChunkSize = QIODEVICE_BUFFERSIZE;
|
||||
int writeBufferChunkSize = 0;
|
||||
|
||||
QVarLengthArray<QRingBuffer, 2> readBuffers;
|
||||
QVarLengthArray<QRingBuffer, 1> writeBuffers;
|
||||
QString errorString;
|
||||
QIODevice::OpenMode openMode = QIODevice::NotOpen;
|
||||
|
||||
bool transactionStarted = false;
|
||||
bool baseReadLineDataCalled = false;
|
||||
|
||||
virtual bool putCharHelper(char c);
|
||||
|
||||
enum AccessMode : quint8 {
|
||||
Unset,
|
||||
Sequential,
|
||||
RandomAccess
|
||||
};
|
||||
mutable AccessMode accessMode = Unset;
|
||||
inline bool isSequential() const
|
||||
{
|
||||
if (accessMode == Unset)
|
||||
accessMode = q_func()->isSequential() ? Sequential : RandomAccess;
|
||||
return accessMode == Sequential;
|
||||
}
|
||||
|
||||
inline bool isBufferEmpty() const
|
||||
{
|
||||
return buffer.isEmpty() || (transactionStarted && isSequential()
|
||||
&& transactionPos == buffer.size());
|
||||
}
|
||||
bool allWriteBuffersEmpty() const;
|
||||
|
||||
void seekBuffer(qint64 newPos);
|
||||
|
||||
inline void setCurrentReadChannel(int channel)
|
||||
{
|
||||
buffer.m_buf = (channel < readBuffers.size() ? &readBuffers[channel] : nullptr);
|
||||
currentReadChannel = channel;
|
||||
}
|
||||
inline void setCurrentWriteChannel(int channel)
|
||||
{
|
||||
writeBuffer.m_buf = (channel < writeBuffers.size() ? &writeBuffers[channel] : nullptr);
|
||||
currentWriteChannel = channel;
|
||||
}
|
||||
void setReadChannelCount(int count);
|
||||
void setWriteChannelCount(int count);
|
||||
|
||||
qint64 read(char *data, qint64 maxSize, bool peeking = false);
|
||||
qint64 readLine(char *data, qint64 maxSize);
|
||||
virtual qint64 peek(char *data, qint64 maxSize);
|
||||
virtual QByteArray peek(qint64 maxSize);
|
||||
qint64 skipByReading(qint64 maxSize);
|
||||
void write(const char *data, qint64 size);
|
||||
|
||||
inline bool isWriteChunkCached(const char *data, qint64 size) const
|
||||
{
|
||||
return currentWriteChunk != nullptr
|
||||
&& currentWriteChunk->constData() == data
|
||||
&& currentWriteChunk->size() == size;
|
||||
}
|
||||
|
||||
#ifdef QT_NO_QOBJECT
|
||||
QIODevice *q_ptr = nullptr;
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QIODEVICE_P_H
|
||||
@@ -1,73 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QIPADDRESS_P_H
|
||||
#define QIPADDRESS_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qstring.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QIPAddressUtils {
|
||||
|
||||
typedef quint32 IPv4Address;
|
||||
typedef quint8 IPv6Address[16];
|
||||
|
||||
Q_CORE_EXPORT bool parseIp4(IPv4Address &address, const QChar *begin, const QChar *end);
|
||||
Q_CORE_EXPORT const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end);
|
||||
Q_CORE_EXPORT void toString(QString &appendTo, IPv4Address address);
|
||||
Q_CORE_EXPORT void toString(QString &appendTo, const IPv6Address address);
|
||||
|
||||
} // namespace
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QIPADDRESS_P_H
|
||||
@@ -1,75 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QISLAMIC_CIVIL_CALENDAR_P_H
|
||||
#define QISLAMIC_CIVIL_CALENDAR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of calendar implementations. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qhijricalendar_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(islamiccivilcalendar);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QIslamicCivilCalendar : public QHijriCalendar
|
||||
{
|
||||
public:
|
||||
// Calendar properties:
|
||||
QString name() const override;
|
||||
static QStringList nameList();
|
||||
// Date queries:
|
||||
bool isLeapYear(int year) const override;
|
||||
// Julian Day conversions:
|
||||
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
|
||||
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QISLAMIC_CIVIL_CALENDAR_P_H
|
||||
@@ -1,118 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QITEMSELECTIONMODEL_P_H
|
||||
#define QITEMSELECTIONMODEL_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qobject_p.h"
|
||||
#include "private/qproperty_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(itemmodel);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QItemSelectionModelPrivate: public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QItemSelectionModel)
|
||||
public:
|
||||
QItemSelectionModelPrivate()
|
||||
: currentCommand(QItemSelectionModel::NoUpdate),
|
||||
tableSelected(false), tableColCount(0), tableRowCount(0) {}
|
||||
|
||||
QItemSelection expandSelection(const QItemSelection &selection,
|
||||
QItemSelectionModel::SelectionFlags command) const;
|
||||
|
||||
void initModel(QAbstractItemModel *model);
|
||||
|
||||
void _q_rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
|
||||
void _q_columnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
|
||||
void _q_rowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
|
||||
void _q_columnsAboutToBeInserted(const QModelIndex &parent, int start, int end);
|
||||
void _q_layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
|
||||
void _q_layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
|
||||
void _q_modelDestroyed();
|
||||
|
||||
inline void remove(QList<QItemSelectionRange> &r)
|
||||
{
|
||||
QList<QItemSelectionRange>::const_iterator it = r.constBegin();
|
||||
for (; it != r.constEnd(); ++it)
|
||||
ranges.removeAll(*it);
|
||||
}
|
||||
|
||||
inline void finalize()
|
||||
{
|
||||
ranges.merge(currentSelection, currentCommand);
|
||||
if (!currentSelection.isEmpty()) // ### perhaps this should be in QList
|
||||
currentSelection.clear();
|
||||
}
|
||||
|
||||
void setModel(QAbstractItemModel *mod) { q_func()->setModel(mod); }
|
||||
void modelChanged(QAbstractItemModel *mod) { q_func()->modelChanged(mod); }
|
||||
Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QItemSelectionModelPrivate, QAbstractItemModel *, model,
|
||||
&QItemSelectionModelPrivate::setModel,
|
||||
&QItemSelectionModelPrivate::modelChanged, nullptr)
|
||||
|
||||
QItemSelection ranges;
|
||||
QItemSelection currentSelection;
|
||||
QPersistentModelIndex currentIndex;
|
||||
QItemSelectionModel::SelectionFlags currentCommand;
|
||||
QList<QPersistentModelIndex> savedPersistentIndexes;
|
||||
QList<QPersistentModelIndex> savedPersistentCurrentIndexes;
|
||||
QList<QPair<QPersistentModelIndex, uint>> savedPersistentRowLengths;
|
||||
QList<QPair<QPersistentModelIndex, uint>> savedPersistentCurrentRowLengths;
|
||||
// optimization when all indexes are selected
|
||||
bool tableSelected;
|
||||
QPersistentModelIndex tableParent;
|
||||
int tableColCount, tableRowCount;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QITEMSELECTIONMODEL_P_H
|
||||
@@ -1,78 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QITERABLE_P_H
|
||||
#define QITERABLE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QIterablePrivate {
|
||||
|
||||
template<typename Callback>
|
||||
static QVariant retrieveElement(QMetaType type, Callback callback)
|
||||
{
|
||||
QVariant v(type);
|
||||
void *dataPtr;
|
||||
if (type == QMetaType::fromType<QVariant>())
|
||||
dataPtr = &v;
|
||||
else
|
||||
dataPtr = v.data();
|
||||
callback(dataPtr);
|
||||
return v;
|
||||
}
|
||||
|
||||
} // namespace QIterablePrivate
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QITERABLE_P_H
|
||||
@@ -1,945 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QPERSIANCALENDAR_DATA_P_H
|
||||
#define QPERSIANCALENDAR_DATA_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
|
||||
// file may change from version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/private/qcalendarbackend_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// GENERATED PART STARTS HERE
|
||||
|
||||
/*
|
||||
This part of the file was generated on 2021-11-09 from the
|
||||
Common Locale Data Repository v40
|
||||
|
||||
http://www.unicode.org/cldr/
|
||||
|
||||
Do not edit this section: instead regenerate it using
|
||||
cldr2qlocalexml.py and qlocalexml2cpp.py on updated (or
|
||||
edited) CLDR data; see qtbase/util/locale_database/.
|
||||
*/
|
||||
|
||||
static const QCalendarLocale locale_data[] = {
|
||||
// lang script terr sLong long sShrt short sNarw narow Sizes...
|
||||
{ 1, 0, 0, 0, 0, 83, 83, 130, 153, 83, 83, 47, 47, 23, 26 },// C/AnyScript/AnyTerritory
|
||||
{ 2, 27, 90, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Abkhazian/Cyrillic/Georgia
|
||||
{ 3, 66, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Afar/Latin/Ethiopia
|
||||
{ 4, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Afrikaans/Latin/South Africa
|
||||
{ 4, 66, 162, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Afrikaans/Latin/Namibia
|
||||
{ 5, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Aghem/Latin/Cameroon
|
||||
{ 6, 66, 92, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Akan/Latin/Ghana
|
||||
{ 8, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Akoose/Latin/Cameroon
|
||||
{ 9, 66, 3, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Albanian/Latin/Albania
|
||||
{ 9, 66, 126, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Albanian/Latin/Kosovo
|
||||
{ 9, 66, 140, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Albanian/Latin/Macedonia
|
||||
{ 11, 33, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Amharic/Ethiopic/Ethiopia
|
||||
{ 14, 4, 71, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Egypt
|
||||
{ 14, 4, 4, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Algeria
|
||||
{ 14, 4, 19, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Bahrain
|
||||
{ 14, 4, 48, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Chad
|
||||
{ 14, 4, 55, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Comoros
|
||||
{ 14, 4, 67, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Djibouti
|
||||
{ 14, 4, 74, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Eritrea
|
||||
{ 14, 4, 113, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Iraq
|
||||
{ 14, 4, 116, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Israel
|
||||
{ 14, 4, 122, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Jordan
|
||||
{ 14, 4, 127, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Kuwait
|
||||
{ 14, 4, 132, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Lebanon
|
||||
{ 14, 4, 135, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Libya
|
||||
{ 14, 4, 149, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Mauritania
|
||||
{ 14, 4, 159, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Morocco
|
||||
{ 14, 4, 176, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Oman
|
||||
{ 14, 4, 180, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Palestinian Territories
|
||||
{ 14, 4, 190, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Qatar
|
||||
{ 14, 4, 205, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Saudi Arabia
|
||||
{ 14, 4, 215, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Somalia
|
||||
{ 14, 4, 219, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/South Sudan
|
||||
{ 14, 4, 222, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Sudan
|
||||
{ 14, 4, 227, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Syria
|
||||
{ 14, 4, 238, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Tunisia
|
||||
{ 14, 4, 245, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/United Arab Emirates
|
||||
{ 14, 4, 257, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Western Sahara
|
||||
{ 14, 4, 258, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/World
|
||||
{ 14, 4, 259, 179, 179, 179, 179, 153, 153, 67, 67, 67, 67, 26, 26 },// Arabic/Arabic/Yemen
|
||||
{ 15, 66, 220, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Aragonese/Latin/Spain
|
||||
{ 17, 5, 12, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Armenian/Armenian/Armenia
|
||||
{ 18, 9, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Assamese/Bangla/India
|
||||
{ 19, 66, 220, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Asturian/Latin/Spain
|
||||
{ 20, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Asu/Latin/Tanzania
|
||||
{ 21, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Atsam/Latin/Nigeria
|
||||
{ 25, 66, 17, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Azerbaijani/Latin/Azerbaijan
|
||||
{ 25, 4, 112, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Azerbaijani/Arabic/Iran
|
||||
{ 25, 27, 17, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Azerbaijani/Cyrillic/Azerbaijan
|
||||
{ 26, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bafia/Latin/Cameroon
|
||||
{ 28, 66, 145, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bambara/Latin/Mali
|
||||
{ 28, 90, 145, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bambara/Nko/Mali
|
||||
{ 30, 9, 20, 246, 246, 334, 334, 421, 421, 88, 88, 87, 87, 26, 26 },// Bangla/Bangla/Bangladesh
|
||||
{ 30, 9, 110, 246, 246, 334, 334, 421, 421, 88, 88, 87, 87, 26, 26 },// Bangla/Bangla/India
|
||||
{ 31, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Basaa/Latin/Cameroon
|
||||
{ 32, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bashkir/Cyrillic/Russia
|
||||
{ 33, 66, 220, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Basque/Latin/Spain
|
||||
{ 35, 27, 22, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Belarusian/Cyrillic/Belarus
|
||||
{ 36, 66, 260, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bemba/Latin/Zambia
|
||||
{ 37, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bena/Latin/Tanzania
|
||||
{ 40, 33, 74, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Blin/Ethiopic/Eritrea
|
||||
{ 41, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bodo/Devanagari/India
|
||||
{ 42, 66, 29, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bosnian/Latin/Bosnia And Herzegovina
|
||||
{ 42, 27, 29, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Bosnian/Cyrillic/Bosnia And Herzegovina
|
||||
{ 43, 66, 84, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Breton/Latin/France
|
||||
{ 45, 27, 36, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Bulgarian/Cyrillic/Bulgaria
|
||||
{ 46, 86, 161, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Burmese/Myanmar/Myanmar
|
||||
{ 47, 137, 107, 527, 527, 527, 527, 153, 153, 38, 38, 38, 38, 26, 26 },// Cantonese/Traditional Han/Hong Kong
|
||||
{ 47, 118, 50, 527, 527, 527, 527, 153, 153, 38, 38, 38, 38, 26, 26 },// Cantonese/Simplified Han/China
|
||||
{ 48, 66, 220, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Catalan/Latin/Spain
|
||||
{ 48, 66, 6, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Catalan/Latin/Andorra
|
||||
{ 48, 66, 84, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Catalan/Latin/France
|
||||
{ 48, 66, 117, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Catalan/Latin/Italy
|
||||
{ 49, 66, 185, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Cebuano/Latin/Philippines
|
||||
{ 50, 66, 159, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Central Atlas Tamazight/Latin/Morocco
|
||||
{ 51, 4, 113, 565, 565, 565, 565, 153, 153,101,101,101,101, 26, 26 },// Central Kurdish/Arabic/Iraq
|
||||
{ 51, 4, 112, 565, 666, 565, 565, 153, 153,101,100,101,101, 26, 26 },// Central Kurdish/Arabic/Iran
|
||||
{ 52, 21, 20, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Chakma/Chakma/Bangladesh
|
||||
{ 52, 21, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Chakma/Chakma/India
|
||||
{ 54, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Chechen/Cyrillic/Russia
|
||||
{ 55, 23, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Cherokee/Cherokee/United States
|
||||
{ 56, 66, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Chickasaw/Latin/United States
|
||||
{ 57, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Chiga/Latin/Uganda
|
||||
{ 58, 118, 50, 766, 766, 527, 527, 153, 153, 37, 37, 38, 38, 26, 26 },// Chinese/Simplified Han/China
|
||||
{ 58, 118, 107, 766, 766, 527, 527, 153, 153, 37, 37, 38, 38, 26, 26 },// Chinese/Simplified Han/Hong Kong
|
||||
{ 58, 118, 139, 766, 766, 527, 527, 153, 153, 37, 37, 38, 38, 26, 26 },// Chinese/Simplified Han/Macao
|
||||
{ 58, 118, 210, 766, 766, 527, 527, 153, 153, 37, 37, 38, 38, 26, 26 },// Chinese/Simplified Han/Singapore
|
||||
{ 58, 137, 107, 527, 527, 527, 527, 153, 153, 38, 38, 38, 38, 26, 26 },// Chinese/Traditional Han/Hong Kong
|
||||
{ 58, 137, 139, 527, 527, 527, 527, 153, 153, 38, 38, 38, 38, 26, 26 },// Chinese/Traditional Han/Macao
|
||||
{ 58, 137, 228, 527, 527, 527, 527, 153, 153, 38, 38, 38, 38, 26, 26 },// Chinese/Traditional Han/Taiwan
|
||||
{ 59, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Church/Cyrillic/Russia
|
||||
{ 60, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Chuvash/Cyrillic/Russia
|
||||
{ 61, 66, 91, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Colognian/Latin/Germany
|
||||
{ 63, 66, 246, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Cornish/Latin/United Kingdom
|
||||
{ 64, 66, 84, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Corsican/Latin/France
|
||||
{ 66, 66, 60, 0, 0, 0, 0, 803, 803, 83, 83, 83, 83, 38, 38 },// Croatian/Latin/Croatia
|
||||
{ 66, 66, 29, 0, 0, 0, 0, 803, 803, 83, 83, 83, 83, 38, 38 },// Croatian/Latin/Bosnia And Herzegovina
|
||||
{ 67, 66, 64, 841, 841, 841, 841, 153, 153, 81, 81, 81, 81, 26, 26 },// Czech/Latin/Czechia
|
||||
{ 68, 66, 65, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Danish/Latin/Denmark
|
||||
{ 68, 66, 95, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Danish/Latin/Greenland
|
||||
{ 69, 132, 144, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Divehi/Thaana/Maldives
|
||||
{ 70, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dogri/Devanagari/India
|
||||
{ 71, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Duala/Latin/Cameroon
|
||||
{ 72, 66, 165, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Netherlands
|
||||
{ 72, 66, 13, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Aruba
|
||||
{ 72, 66, 23, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Belgium
|
||||
{ 72, 66, 44, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Caribbean Netherlands
|
||||
{ 72, 66, 62, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Curacao
|
||||
{ 72, 66, 211, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Sint Maarten
|
||||
{ 72, 66, 223, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dutch/Latin/Suriname
|
||||
{ 73, 134, 27, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Dzongkha/Tibetan/Bhutan
|
||||
{ 74, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Embu/Latin/Kenya
|
||||
{ 75, 66, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/United States
|
||||
{ 75, 28, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Deseret/United States
|
||||
{ 75, 66, 5, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/American Samoa
|
||||
{ 75, 66, 8, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Anguilla
|
||||
{ 75, 66, 10, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Antigua And Barbuda
|
||||
{ 75, 66, 15, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Australia
|
||||
{ 75, 66, 16, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Austria
|
||||
{ 75, 66, 18, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Bahamas
|
||||
{ 75, 66, 21, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Barbados
|
||||
{ 75, 66, 23, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Belgium
|
||||
{ 75, 66, 24, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Belize
|
||||
{ 75, 66, 26, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Bermuda
|
||||
{ 75, 66, 30, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Botswana
|
||||
{ 75, 66, 33, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/British Indian Ocean Territory
|
||||
{ 75, 66, 34, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/British Virgin Islands
|
||||
{ 75, 66, 38, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Burundi
|
||||
{ 75, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Cameroon
|
||||
{ 75, 66, 41, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Canada
|
||||
{ 75, 66, 45, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Cayman Islands
|
||||
{ 75, 66, 51, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Christmas Island
|
||||
{ 75, 66, 53, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Cocos Islands
|
||||
{ 75, 66, 58, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Cook Islands
|
||||
{ 75, 66, 63, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Cyprus
|
||||
{ 75, 66, 65, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Denmark
|
||||
{ 75, 66, 66, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Diego Garcia
|
||||
{ 75, 66, 68, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Dominica
|
||||
{ 75, 66, 74, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Eritrea
|
||||
{ 75, 66, 76, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Eswatini
|
||||
{ 75, 66, 78, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Europe
|
||||
{ 75, 66, 80, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Falkland Islands
|
||||
{ 75, 66, 82, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Fiji
|
||||
{ 75, 66, 83, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Finland
|
||||
{ 75, 66, 89, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Gambia
|
||||
{ 75, 66, 91, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Germany
|
||||
{ 75, 66, 92, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Ghana
|
||||
{ 75, 66, 93, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Gibraltar
|
||||
{ 75, 66, 96, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Grenada
|
||||
{ 75, 66, 98, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Guam
|
||||
{ 75, 66, 100, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Guernsey
|
||||
{ 75, 66, 103, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Guyana
|
||||
{ 75, 66, 107, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Hong Kong
|
||||
{ 75, 66, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/India
|
||||
{ 75, 66, 114, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Ireland
|
||||
{ 75, 66, 115, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Isle Of Man
|
||||
{ 75, 66, 116, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Israel
|
||||
{ 75, 66, 119, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Jamaica
|
||||
{ 75, 66, 121, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Jersey
|
||||
{ 75, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Kenya
|
||||
{ 75, 66, 125, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Kiribati
|
||||
{ 75, 66, 133, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Lesotho
|
||||
{ 75, 66, 134, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Liberia
|
||||
{ 75, 66, 139, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Macao
|
||||
{ 75, 66, 141, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Madagascar
|
||||
{ 75, 66, 142, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Malawi
|
||||
{ 75, 66, 143, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Malaysia
|
||||
{ 75, 66, 146, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Malta
|
||||
{ 75, 66, 147, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Marshall Islands
|
||||
{ 75, 66, 150, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Mauritius
|
||||
{ 75, 66, 153, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Micronesia
|
||||
{ 75, 66, 158, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Montserrat
|
||||
{ 75, 66, 162, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Namibia
|
||||
{ 75, 66, 163, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Nauru
|
||||
{ 75, 66, 165, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Netherlands
|
||||
{ 75, 66, 167, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/New Zealand
|
||||
{ 75, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Nigeria
|
||||
{ 75, 66, 171, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Niue
|
||||
{ 75, 66, 172, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Norfolk Island
|
||||
{ 75, 66, 173, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Northern Mariana Islands
|
||||
{ 75, 66, 178, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Pakistan
|
||||
{ 75, 66, 179, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Palau
|
||||
{ 75, 66, 182, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Papua New Guinea
|
||||
{ 75, 66, 185, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Philippines
|
||||
{ 75, 66, 186, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Pitcairn
|
||||
{ 75, 66, 189, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Puerto Rico
|
||||
{ 75, 66, 194, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Rwanda
|
||||
{ 75, 66, 196, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Saint Helena
|
||||
{ 75, 66, 197, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Saint Kitts And Nevis
|
||||
{ 75, 66, 198, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Saint Lucia
|
||||
{ 75, 66, 201, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Saint Vincent And Grenadines
|
||||
{ 75, 66, 202, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Samoa
|
||||
{ 75, 66, 208, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Seychelles
|
||||
{ 75, 66, 209, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Sierra Leone
|
||||
{ 75, 66, 210, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Singapore
|
||||
{ 75, 66, 211, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Sint Maarten
|
||||
{ 75, 66, 213, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Slovenia
|
||||
{ 75, 66, 214, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Solomon Islands
|
||||
{ 75, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/South Africa
|
||||
{ 75, 66, 219, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/South Sudan
|
||||
{ 75, 66, 222, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Sudan
|
||||
{ 75, 66, 225, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Sweden
|
||||
{ 75, 66, 226, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Switzerland
|
||||
{ 75, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Tanzania
|
||||
{ 75, 66, 234, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Tokelau
|
||||
{ 75, 66, 235, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Tonga
|
||||
{ 75, 66, 236, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Trinidad And Tobago
|
||||
{ 75, 66, 241, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Turks And Caicos Islands
|
||||
{ 75, 66, 242, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Tuvalu
|
||||
{ 75, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Uganda
|
||||
{ 75, 66, 245, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/United Arab Emirates
|
||||
{ 75, 66, 246, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/United Kingdom
|
||||
{ 75, 66, 247, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/United States Outlying Islands
|
||||
{ 75, 66, 249, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/United States Virgin Islands
|
||||
{ 75, 66, 252, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Vanuatu
|
||||
{ 75, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/World
|
||||
{ 75, 66, 260, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Zambia
|
||||
{ 75, 66, 261, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// English/Latin/Zimbabwe
|
||||
{ 76, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Erzya/Cyrillic/Russia
|
||||
{ 77, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Esperanto/Latin/World
|
||||
{ 78, 66, 75, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Estonian/Latin/Estonia
|
||||
{ 79, 66, 92, 1005, 1005, 1091, 1091, 153, 153, 86, 86, 47, 47, 26, 26 },// Ewe/Latin/Ghana
|
||||
{ 79, 66, 233, 1005, 1005, 1091, 1091, 153, 153, 86, 86, 47, 47, 26, 26 },// Ewe/Latin/Togo
|
||||
{ 80, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ewondo/Latin/Cameroon
|
||||
{ 81, 66, 81, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Faroese/Latin/Faroe Islands
|
||||
{ 81, 66, 65, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Faroese/Latin/Denmark
|
||||
{ 83, 66, 185, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Filipino/Latin/Philippines
|
||||
{ 84, 66, 83, 1138, 1255, 1396, 1255, 153, 153,117,141, 81,141, 26, 26 },// Finnish/Latin/Finland
|
||||
{ 85, 66, 84, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/France
|
||||
{ 85, 66, 4, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Algeria
|
||||
{ 85, 66, 23, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Belgium
|
||||
{ 85, 66, 25, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Benin
|
||||
{ 85, 66, 37, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Burkina Faso
|
||||
{ 85, 66, 38, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Burundi
|
||||
{ 85, 66, 40, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Cameroon
|
||||
{ 85, 66, 41, 1615, 1615, 1696, 1696, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Canada
|
||||
{ 85, 66, 46, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Central African Republic
|
||||
{ 85, 66, 48, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Chad
|
||||
{ 85, 66, 55, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Comoros
|
||||
{ 85, 66, 56, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Congo Brazzaville
|
||||
{ 85, 66, 57, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Congo Kinshasa
|
||||
{ 85, 66, 67, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Djibouti
|
||||
{ 85, 66, 73, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Equatorial Guinea
|
||||
{ 85, 66, 85, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/French Guiana
|
||||
{ 85, 66, 86, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/French Polynesia
|
||||
{ 85, 66, 88, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Gabon
|
||||
{ 85, 66, 97, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Guadeloupe
|
||||
{ 85, 66, 102, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Guinea
|
||||
{ 85, 66, 104, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Haiti
|
||||
{ 85, 66, 118, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Ivory Coast
|
||||
{ 85, 66, 138, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Luxembourg
|
||||
{ 85, 66, 141, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Madagascar
|
||||
{ 85, 66, 145, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Mali
|
||||
{ 85, 66, 148, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Martinique
|
||||
{ 85, 66, 149, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Mauritania
|
||||
{ 85, 66, 150, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Mauritius
|
||||
{ 85, 66, 151, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Mayotte
|
||||
{ 85, 66, 155, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Monaco
|
||||
{ 85, 66, 159, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Morocco
|
||||
{ 85, 66, 166, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/New Caledonia
|
||||
{ 85, 66, 170, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Niger
|
||||
{ 85, 66, 191, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Reunion
|
||||
{ 85, 66, 194, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Rwanda
|
||||
{ 85, 66, 195, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Saint Barthelemy
|
||||
{ 85, 66, 199, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Saint Martin
|
||||
{ 85, 66, 200, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Saint Pierre And Miquelon
|
||||
{ 85, 66, 206, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Senegal
|
||||
{ 85, 66, 208, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Seychelles
|
||||
{ 85, 66, 226, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Switzerland
|
||||
{ 85, 66, 227, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Syria
|
||||
{ 85, 66, 233, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Togo
|
||||
{ 85, 66, 238, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Tunisia
|
||||
{ 85, 66, 252, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Vanuatu
|
||||
{ 85, 66, 256, 1477, 1477, 1558, 1558, 153, 153, 81, 81, 57, 57, 26, 26 },// French/Latin/Wallis And Futuna
|
||||
{ 86, 66, 117, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Friulian/Latin/Italy
|
||||
{ 87, 66, 206, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Senegal
|
||||
{ 87, 1, 37, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Burkina Faso
|
||||
{ 87, 1, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Cameroon
|
||||
{ 87, 1, 89, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Gambia
|
||||
{ 87, 1, 92, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Ghana
|
||||
{ 87, 1, 101, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Guinea Bissau
|
||||
{ 87, 1, 102, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Guinea
|
||||
{ 87, 1, 134, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Liberia
|
||||
{ 87, 1, 149, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Mauritania
|
||||
{ 87, 1, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Nigeria
|
||||
{ 87, 1, 170, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Niger
|
||||
{ 87, 1, 206, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Senegal
|
||||
{ 87, 1, 209, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Adlam/Sierra Leone
|
||||
{ 87, 66, 37, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Burkina Faso
|
||||
{ 87, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Cameroon
|
||||
{ 87, 66, 89, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Gambia
|
||||
{ 87, 66, 92, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Ghana
|
||||
{ 87, 66, 101, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Guinea Bissau
|
||||
{ 87, 66, 102, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Guinea
|
||||
{ 87, 66, 134, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Liberia
|
||||
{ 87, 66, 149, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Mauritania
|
||||
{ 87, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Nigeria
|
||||
{ 87, 66, 170, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Niger
|
||||
{ 87, 66, 209, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Fulah/Latin/Sierra Leone
|
||||
{ 88, 66, 246, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Gaelic/Latin/United Kingdom
|
||||
{ 89, 66, 92, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ga/Latin/Ghana
|
||||
{ 90, 66, 220, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Galician/Latin/Spain
|
||||
{ 91, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ganda/Latin/Uganda
|
||||
{ 92, 33, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Geez/Ethiopic/Ethiopia
|
||||
{ 93, 35, 90, 1753, 1753, 1753, 1753, 153, 153, 91, 91, 91, 91, 26, 26 },// Georgian/Georgian/Georgia
|
||||
{ 94, 66, 91, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Germany
|
||||
{ 94, 66, 16, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Austria
|
||||
{ 94, 66, 23, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Belgium
|
||||
{ 94, 66, 117, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Italy
|
||||
{ 94, 66, 136, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Liechtenstein
|
||||
{ 94, 66, 138, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Luxembourg
|
||||
{ 94, 66, 226, 1844, 1844, 1844, 1844, 153, 153, 86, 86, 86, 86, 26, 26 },// German/Latin/Switzerland
|
||||
{ 96, 39, 94, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Greek/Greek/Greece
|
||||
{ 96, 39, 63, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Greek/Greek/Cyprus
|
||||
{ 97, 66, 183, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Guarani/Latin/Paraguay
|
||||
{ 98, 40, 110, 1930, 1930, 1930, 1930, 153, 153, 85, 85, 85, 85, 26, 26 },// Gujarati/Gujarati/India
|
||||
{ 99, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Gusii/Latin/Kenya
|
||||
{ 101, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Hausa/Latin/Nigeria
|
||||
{ 101, 4, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Hausa/Arabic/Nigeria
|
||||
{ 101, 66, 92, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Hausa/Latin/Ghana
|
||||
{ 101, 66, 170, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Hausa/Latin/Niger
|
||||
{ 102, 66, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Hawaiian/Latin/United States
|
||||
{ 103, 47, 116, 2015, 2015, 2015, 2015, 153, 153, 68, 68, 68, 68, 26, 26 },// Hebrew/Hebrew/Israel
|
||||
{ 105, 29, 110, 2083, 2083, 2083, 2083, 153, 153, 81, 81, 81, 81, 26, 26 },// Hindi/Devanagari/India
|
||||
{ 105, 66, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Hindi/Latin/India
|
||||
{ 107, 66, 108, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Hungarian/Latin/Hungary
|
||||
{ 108, 66, 109, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Icelandic/Latin/Iceland
|
||||
{ 109, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ido/Latin/World
|
||||
{ 110, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Igbo/Latin/Nigeria
|
||||
{ 111, 66, 83, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Inari Sami/Latin/Finland
|
||||
{ 112, 66, 111, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Indonesian/Latin/Indonesia
|
||||
{ 114, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Interlingua/Latin/World
|
||||
{ 116, 18, 41, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Inuktitut/Canadian Aboriginal/Canada
|
||||
{ 116, 66, 41, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Inuktitut/Latin/Canada
|
||||
{ 118, 66, 114, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Irish/Latin/Ireland
|
||||
{ 118, 66, 246, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Irish/Latin/United Kingdom
|
||||
{ 119, 66, 117, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Italian/Latin/Italy
|
||||
{ 119, 66, 203, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Italian/Latin/San Marino
|
||||
{ 119, 66, 226, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Italian/Latin/Switzerland
|
||||
{ 119, 66, 253, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Italian/Latin/Vatican City
|
||||
{ 120, 53, 120, 2164, 2164, 2164, 2164, 153, 153, 77, 77, 77, 77, 26, 26 },// Japanese/Japanese/Japan
|
||||
{ 121, 66, 111, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Javanese/Latin/Indonesia
|
||||
{ 122, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Jju/Latin/Nigeria
|
||||
{ 123, 66, 206, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Jola Fonyi/Latin/Senegal
|
||||
{ 124, 66, 43, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kabuverdianu/Latin/Cape Verde
|
||||
{ 125, 66, 4, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kabyle/Latin/Algeria
|
||||
{ 126, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kako/Latin/Cameroon
|
||||
{ 127, 66, 95, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kalaallisut/Latin/Greenland
|
||||
{ 128, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kalenjin/Latin/Kenya
|
||||
{ 129, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kamba/Latin/Kenya
|
||||
{ 130, 56, 110, 2241, 2241, 2241, 2241, 153, 153, 92, 92, 92, 92, 26, 26 },// Kannada/Kannada/India
|
||||
{ 132, 4, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kashmiri/Arabic/India
|
||||
{ 132, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kashmiri/Devanagari/India
|
||||
{ 133, 27, 123, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kazakh/Cyrillic/Kazakhstan
|
||||
{ 134, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kenyang/Latin/Cameroon
|
||||
{ 135, 60, 39, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Khmer/Khmer/Cambodia
|
||||
{ 136, 66, 99, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kiche/Latin/Guatemala
|
||||
{ 137, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kikuyu/Latin/Kenya
|
||||
{ 138, 66, 194, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kinyarwanda/Latin/Rwanda
|
||||
{ 141, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Konkani/Devanagari/India
|
||||
{ 142, 63, 218, 2333, 2333, 2333, 2333, 153, 153, 54, 54, 54, 54, 26, 26 },// Korean/Korean/South Korea
|
||||
{ 142, 63, 174, 2333, 2333, 2333, 2333, 153, 153, 54, 54, 54, 54, 26, 26 },// Korean/Korean/North Korea
|
||||
{ 144, 66, 145, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Koyraboro Senni/Latin/Mali
|
||||
{ 145, 66, 145, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Koyra Chiini/Latin/Mali
|
||||
{ 146, 66, 134, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kpelle/Latin/Liberia
|
||||
{ 148, 66, 239, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kurdish/Latin/Turkey
|
||||
{ 149, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kwasio/Latin/Cameroon
|
||||
{ 150, 27, 128, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kyrgyz/Cyrillic/Kyrgyzstan
|
||||
{ 151, 66, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lakota/Latin/United States
|
||||
{ 152, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Langi/Latin/Tanzania
|
||||
{ 153, 65, 129, 2387, 2387, 2467, 2546, 153, 153, 80, 80, 79, 79, 26, 26 },// Lao/Lao/Laos
|
||||
{ 154, 66, 253, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Latin/Latin/Vatican City
|
||||
{ 155, 66, 131, 2625, 2625, 2625, 2625, 153, 153, 92, 92, 92, 92, 26, 26 },// Latvian/Latin/Latvia
|
||||
{ 158, 66, 57, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lingala/Latin/Congo Kinshasa
|
||||
{ 158, 66, 7, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lingala/Latin/Angola
|
||||
{ 158, 66, 46, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lingala/Latin/Central African Republic
|
||||
{ 158, 66, 56, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lingala/Latin/Congo Brazzaville
|
||||
{ 160, 66, 137, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lithuanian/Latin/Lithuania
|
||||
{ 161, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lojban/Latin/World
|
||||
{ 162, 66, 91, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lower Sorbian/Latin/Germany
|
||||
{ 163, 66, 91, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Low German/Latin/Germany
|
||||
{ 163, 66, 165, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Low German/Latin/Netherlands
|
||||
{ 164, 66, 57, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Luba Katanga/Latin/Congo Kinshasa
|
||||
{ 165, 66, 225, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Lule Sami/Latin/Sweden
|
||||
{ 166, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Luo/Latin/Kenya
|
||||
{ 167, 66, 138, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Luxembourgish/Latin/Luxembourg
|
||||
{ 168, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Luyia/Latin/Kenya
|
||||
{ 169, 27, 140, 2717, 2717, 2717, 2717, 153, 153, 79, 79, 79, 79, 26, 26 },// Macedonian/Cyrillic/Macedonia
|
||||
{ 170, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Machame/Latin/Tanzania
|
||||
{ 171, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Maithili/Devanagari/India
|
||||
{ 172, 66, 160, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Makhuwa Meetto/Latin/Mozambique
|
||||
{ 173, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Makonde/Latin/Tanzania
|
||||
{ 174, 66, 141, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Malagasy/Latin/Madagascar
|
||||
{ 175, 74, 110, 2796, 2796, 2796, 2796, 2887, 2887, 91, 91, 91, 91, 39, 39 },// Malayalam/Malayalam/India
|
||||
{ 176, 66, 143, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Malay/Latin/Malaysia
|
||||
{ 176, 4, 143, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Malay/Arabic/Malaysia
|
||||
{ 176, 66, 35, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Malay/Latin/Brunei
|
||||
{ 176, 66, 111, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Malay/Latin/Indonesia
|
||||
{ 176, 66, 210, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Malay/Latin/Singapore
|
||||
{ 177, 66, 146, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Maltese/Latin/Malta
|
||||
{ 179, 9, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Manipuri/Bangla/India
|
||||
{ 179, 78, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Manipuri/Meitei Mayek/India
|
||||
{ 180, 66, 115, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Manx/Latin/Isle Of Man
|
||||
{ 181, 66, 167, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Maori/Latin/New Zealand
|
||||
{ 182, 66, 49, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Mapuche/Latin/Chile
|
||||
{ 183, 29, 110, 2926, 2926, 2926, 2926, 3006, 3006, 80, 80, 80, 80, 26, 26 },// Marathi/Devanagari/India
|
||||
{ 185, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Masai/Latin/Kenya
|
||||
{ 185, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Masai/Latin/Tanzania
|
||||
{ 186, 4, 112, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Mazanderani/Arabic/Iran
|
||||
{ 188, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Meru/Latin/Kenya
|
||||
{ 189, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Meta/Latin/Cameroon
|
||||
{ 190, 66, 41, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Mohawk/Latin/Canada
|
||||
{ 191, 27, 156, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Mongolian/Cyrillic/Mongolia
|
||||
{ 191, 83, 50, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Mongolian/Mongolian/China
|
||||
{ 192, 66, 150, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Morisyen/Latin/Mauritius
|
||||
{ 193, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Mundang/Latin/Cameroon
|
||||
{ 194, 66, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Muscogee/Latin/United States
|
||||
{ 195, 66, 162, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nama/Latin/Namibia
|
||||
{ 197, 66, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Navajo/Latin/United States
|
||||
{ 199, 29, 164, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nepali/Devanagari/Nepal
|
||||
{ 199, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nepali/Devanagari/India
|
||||
{ 201, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ngiemboon/Latin/Cameroon
|
||||
{ 202, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ngomba/Latin/Cameroon
|
||||
{ 203, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nigerian Pidgin/Latin/Nigeria
|
||||
{ 204, 90, 102, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nko/Nko/Guinea
|
||||
{ 205, 4, 112, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Northern Luri/Arabic/Iran
|
||||
{ 205, 4, 113, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Northern Luri/Arabic/Iraq
|
||||
{ 206, 66, 175, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Northern Sami/Latin/Norway
|
||||
{ 206, 66, 83, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Northern Sami/Latin/Finland
|
||||
{ 206, 66, 225, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Northern Sami/Latin/Sweden
|
||||
{ 207, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Northern Sotho/Latin/South Africa
|
||||
{ 208, 66, 261, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// North Ndebele/Latin/Zimbabwe
|
||||
{ 209, 66, 175, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Norwegian Bokmal/Latin/Norway
|
||||
{ 209, 66, 224, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Norwegian Bokmal/Latin/Svalbard And Jan Mayen
|
||||
{ 210, 66, 175, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Norwegian Nynorsk/Latin/Norway
|
||||
{ 211, 66, 219, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nuer/Latin/South Sudan
|
||||
{ 212, 66, 142, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nyanja/Latin/Malawi
|
||||
{ 213, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nyankole/Latin/Uganda
|
||||
{ 214, 66, 84, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Occitan/Latin/France
|
||||
{ 215, 91, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Odia/Odia/India
|
||||
{ 220, 66, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Oromo/Latin/Ethiopia
|
||||
{ 220, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Oromo/Latin/Kenya
|
||||
{ 221, 101, 248, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Osage/Osage/United States
|
||||
{ 222, 27, 90, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ossetic/Cyrillic/Georgia
|
||||
{ 222, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Ossetic/Cyrillic/Russia
|
||||
{ 227, 4, 1, 3032, 3032, 3032, 3032, 3094, 3094, 62, 62, 62, 62, 26, 26 },// Pashto/Arabic/Afghanistan
|
||||
{ 227, 4, 178, 3032, 3032, 3032, 3032, 3094, 3094, 62, 62, 62, 62, 26, 26 },// Pashto/Arabic/Pakistan
|
||||
{ 228, 4, 112, 3120, 3120, 3120, 3120, 3186, 3186, 66, 66, 66, 66, 23, 23 },// Persian/Arabic/Iran
|
||||
{ 228, 4, 1, 3120, 3209, 3120, 3120, 3265, 3186, 66, 56, 66, 66, 23, 23 },// Persian/Arabic/Afghanistan
|
||||
{ 230, 66, 187, 3288, 3288, 3288, 3288, 153, 153, 83, 83, 83, 83, 26, 26 },// Polish/Latin/Poland
|
||||
{ 231, 66, 32, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Brazil
|
||||
{ 231, 66, 7, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Angola
|
||||
{ 231, 66, 43, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Cape Verde
|
||||
{ 231, 66, 73, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Equatorial Guinea
|
||||
{ 231, 66, 101, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Guinea Bissau
|
||||
{ 231, 66, 138, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Luxembourg
|
||||
{ 231, 66, 139, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Macao
|
||||
{ 231, 66, 160, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Mozambique
|
||||
{ 231, 66, 188, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Portugal
|
||||
{ 231, 66, 204, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Sao Tome And Principe
|
||||
{ 231, 66, 226, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Switzerland
|
||||
{ 231, 66, 232, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Portuguese/Latin/Timor-Leste
|
||||
{ 232, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Prussian/Latin/World
|
||||
{ 233, 41, 110, 3371, 3371, 3371, 3371, 153, 153, 77, 77, 77, 77, 26, 26 },// Punjabi/Gurmukhi/India
|
||||
{ 233, 4, 178, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Punjabi/Arabic/Pakistan
|
||||
{ 234, 66, 184, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Quechua/Latin/Peru
|
||||
{ 234, 66, 28, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Quechua/Latin/Bolivia
|
||||
{ 234, 66, 70, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Quechua/Latin/Ecuador
|
||||
{ 235, 66, 192, 3448, 3448, 3448, 3448, 153, 153, 85, 85, 85, 85, 26, 26 },// Romanian/Latin/Romania
|
||||
{ 235, 66, 154, 3448, 3448, 3448, 3448, 153, 153, 85, 85, 85, 85, 26, 26 },// Romanian/Latin/Moldova
|
||||
{ 236, 66, 226, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Romansh/Latin/Switzerland
|
||||
{ 237, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Rombo/Latin/Tanzania
|
||||
{ 238, 66, 38, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Rundi/Latin/Burundi
|
||||
{ 239, 27, 193, 3533, 3533, 3533, 3533, 153, 153, 80, 80, 80, 80, 26, 26 },// Russian/Cyrillic/Russia
|
||||
{ 239, 27, 22, 3533, 3533, 3533, 3533, 153, 153, 80, 80, 80, 80, 26, 26 },// Russian/Cyrillic/Belarus
|
||||
{ 239, 27, 123, 3533, 3533, 3533, 3533, 153, 153, 80, 80, 80, 80, 26, 26 },// Russian/Cyrillic/Kazakhstan
|
||||
{ 239, 27, 128, 3533, 3533, 3533, 3533, 153, 153, 80, 80, 80, 80, 26, 26 },// Russian/Cyrillic/Kyrgyzstan
|
||||
{ 239, 27, 154, 3533, 3533, 3533, 3533, 153, 153, 80, 80, 80, 80, 26, 26 },// Russian/Cyrillic/Moldova
|
||||
{ 239, 27, 244, 3533, 3533, 3533, 3533, 153, 153, 80, 80, 80, 80, 26, 26 },// Russian/Cyrillic/Ukraine
|
||||
{ 240, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Rwa/Latin/Tanzania
|
||||
{ 241, 66, 74, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Saho/Latin/Eritrea
|
||||
{ 242, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sakha/Cyrillic/Russia
|
||||
{ 243, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Samburu/Latin/Kenya
|
||||
{ 245, 66, 46, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sango/Latin/Central African Republic
|
||||
{ 246, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sangu/Latin/Tanzania
|
||||
{ 247, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sanskrit/Devanagari/India
|
||||
{ 248, 93, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Santali/Ol Chiki/India
|
||||
{ 248, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Santali/Devanagari/India
|
||||
{ 249, 66, 117, 922, 922, 3613, 3613, 153, 153, 83, 83, 57, 57, 26, 26 },// Sardinian/Latin/Italy
|
||||
{ 251, 66, 160, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sena/Latin/Mozambique
|
||||
{ 252, 27, 207, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Serbia
|
||||
{ 252, 27, 29, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Bosnia And Herzegovina
|
||||
{ 252, 27, 126, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Kosovo
|
||||
{ 252, 27, 157, 447, 447, 447, 447, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Cyrillic/Montenegro
|
||||
{ 252, 66, 29, 3670, 3670, 3670, 3670, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Bosnia And Herzegovina
|
||||
{ 252, 66, 126, 3670, 3670, 3670, 3670, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Kosovo
|
||||
{ 252, 66, 157, 3670, 3670, 3670, 3670, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Montenegro
|
||||
{ 252, 66, 207, 3670, 3670, 3670, 3670, 153, 153, 80, 80, 80, 80, 26, 26 },// Serbian/Latin/Serbia
|
||||
{ 253, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Shambala/Latin/Tanzania
|
||||
{ 254, 66, 261, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Shona/Latin/Zimbabwe
|
||||
{ 255, 141, 50, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sichuan Yi/Yi/China
|
||||
{ 256, 66, 117, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sicilian/Latin/Italy
|
||||
{ 257, 66, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sidamo/Latin/Ethiopia
|
||||
{ 258, 66, 187, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Silesian/Latin/Poland
|
||||
{ 259, 4, 178, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sindhi/Arabic/Pakistan
|
||||
{ 259, 29, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sindhi/Devanagari/India
|
||||
{ 260, 119, 221, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sinhala/Sinhala/Sri Lanka
|
||||
{ 261, 66, 83, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Skolt Sami/Latin/Finland
|
||||
{ 262, 66, 212, 841, 841, 841, 841, 153, 153, 81, 81, 81, 81, 26, 26 },// Slovak/Latin/Slovakia
|
||||
{ 263, 66, 213, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Slovenian/Latin/Slovenia
|
||||
{ 264, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Soga/Latin/Uganda
|
||||
{ 265, 66, 215, 3750, 3750, 3750, 3750, 153, 153, 99, 99, 99, 99, 26, 26 },// Somali/Latin/Somalia
|
||||
{ 265, 66, 67, 3750, 3750, 3750, 3750, 153, 153, 99, 99, 99, 99, 26, 26 },// Somali/Latin/Djibouti
|
||||
{ 265, 66, 77, 3750, 3750, 3750, 3750, 153, 153, 99, 99, 99, 99, 26, 26 },// Somali/Latin/Ethiopia
|
||||
{ 265, 66, 124, 3750, 3750, 3750, 3750, 153, 153, 99, 99, 99, 99, 26, 26 },// Somali/Latin/Kenya
|
||||
{ 266, 4, 112, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Southern Kurdish/Arabic/Iran
|
||||
{ 267, 66, 225, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Southern Sami/Latin/Sweden
|
||||
{ 268, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Southern Sotho/Latin/South Africa
|
||||
{ 269, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// South Ndebele/Latin/South Africa
|
||||
{ 270, 66, 220, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Spain
|
||||
{ 270, 66, 11, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Argentina
|
||||
{ 270, 66, 24, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Belize
|
||||
{ 270, 66, 28, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Bolivia
|
||||
{ 270, 66, 32, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Brazil
|
||||
{ 270, 66, 42, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Canary Islands
|
||||
{ 270, 66, 47, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Ceuta And Melilla
|
||||
{ 270, 66, 49, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Chile
|
||||
{ 270, 66, 54, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Colombia
|
||||
{ 270, 66, 59, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Costa Rica
|
||||
{ 270, 66, 61, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Cuba
|
||||
{ 270, 66, 69, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Dominican Republic
|
||||
{ 270, 66, 70, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Ecuador
|
||||
{ 270, 66, 72, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/El Salvador
|
||||
{ 270, 66, 73, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Equatorial Guinea
|
||||
{ 270, 66, 99, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Guatemala
|
||||
{ 270, 66, 106, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Honduras
|
||||
{ 270, 66, 130, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Latin America
|
||||
{ 270, 66, 152, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Mexico
|
||||
{ 270, 66, 168, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Nicaragua
|
||||
{ 270, 66, 181, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Panama
|
||||
{ 270, 66, 183, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Paraguay
|
||||
{ 270, 66, 184, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Peru
|
||||
{ 270, 66, 185, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Philippines
|
||||
{ 270, 66, 189, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Puerto Rico
|
||||
{ 270, 66, 248, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/United States
|
||||
{ 270, 66, 250, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Uruguay
|
||||
{ 270, 66, 254, 922, 922, 922, 922, 153, 153, 83, 83, 83, 83, 26, 26 },// Spanish/Latin/Venezuela
|
||||
{ 271, 135, 159, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Standard Moroccan Tamazight/Tifinagh/Morocco
|
||||
{ 272, 66, 111, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Sundanese/Latin/Indonesia
|
||||
{ 273, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swahili/Latin/Tanzania
|
||||
{ 273, 66, 57, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swahili/Latin/Congo Kinshasa
|
||||
{ 273, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swahili/Latin/Kenya
|
||||
{ 273, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swahili/Latin/Uganda
|
||||
{ 274, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swati/Latin/South Africa
|
||||
{ 275, 66, 225, 3849, 3932, 3849, 3932, 153, 153, 83, 83, 83, 83, 26, 26 },// Swedish/Latin/Sweden
|
||||
{ 275, 66, 2, 3849, 3932, 3849, 3932, 153, 153, 83, 83, 83, 83, 26, 26 },// Swedish/Latin/Aland Islands
|
||||
{ 275, 66, 83, 3849, 3932, 3849, 3932, 153, 153, 83, 83, 83, 83, 26, 26 },// Swedish/Latin/Finland
|
||||
{ 276, 66, 226, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swiss German/Latin/Switzerland
|
||||
{ 276, 66, 84, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swiss German/Latin/France
|
||||
{ 276, 66, 136, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Swiss German/Latin/Liechtenstein
|
||||
{ 277, 123, 113, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Syriac/Syriac/Iraq
|
||||
{ 278, 135, 159, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tachelhit/Tifinagh/Morocco
|
||||
{ 278, 66, 159, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tachelhit/Latin/Morocco
|
||||
{ 280, 127, 255, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tai Dam/Tai Viet/Vietnam
|
||||
{ 281, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Taita/Latin/Kenya
|
||||
{ 282, 27, 229, 4015, 4015, 4015, 4015, 153, 153, 80, 80, 80, 80, 26, 26 },// Tajik/Cyrillic/Tajikistan
|
||||
{ 283, 129, 110, 4095, 4095, 4188, 4188, 153, 153, 93, 93, 63, 63, 26, 26 },// Tamil/Tamil/India
|
||||
{ 283, 129, 143, 4095, 4095, 4188, 4188, 153, 153, 93, 93, 63, 63, 26, 26 },// Tamil/Tamil/Malaysia
|
||||
{ 283, 129, 210, 4095, 4095, 4188, 4188, 153, 153, 93, 93, 63, 63, 26, 26 },// Tamil/Tamil/Singapore
|
||||
{ 283, 129, 221, 4095, 4095, 4188, 4188, 153, 153, 93, 93, 63, 63, 26, 26 },// Tamil/Tamil/Sri Lanka
|
||||
{ 284, 66, 228, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Taroko/Latin/Taiwan
|
||||
{ 285, 66, 170, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tasawaq/Latin/Niger
|
||||
{ 286, 27, 193, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tatar/Cyrillic/Russia
|
||||
{ 287, 131, 110, 4251, 4251, 4251, 4251, 153, 153, 88, 88, 88, 88, 26, 26 },// Telugu/Telugu/India
|
||||
{ 288, 66, 243, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Teso/Latin/Uganda
|
||||
{ 288, 66, 124, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Teso/Latin/Kenya
|
||||
{ 289, 133, 231, 4339, 4339, 4339, 4339, 153, 153, 98, 98, 98, 98, 26, 26 },// Thai/Thai/Thailand
|
||||
{ 290, 134, 50, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tibetan/Tibetan/China
|
||||
{ 290, 134, 110, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tibetan/Tibetan/India
|
||||
{ 291, 33, 74, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tigre/Ethiopic/Eritrea
|
||||
{ 292, 33, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tigrinya/Ethiopic/Ethiopia
|
||||
{ 292, 33, 74, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tigrinya/Ethiopic/Eritrea
|
||||
{ 294, 66, 182, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tok Pisin/Latin/Papua New Guinea
|
||||
{ 295, 66, 235, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tongan/Latin/Tonga
|
||||
{ 296, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tsonga/Latin/South Africa
|
||||
{ 297, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tswana/Latin/South Africa
|
||||
{ 298, 66, 239, 4437, 4437, 4437, 4437, 153, 153, 80, 80, 80, 80, 26, 26 },// Turkish/Latin/Turkey
|
||||
{ 298, 66, 63, 4437, 4437, 4437, 4437, 153, 153, 80, 80, 80, 80, 26, 26 },// Turkish/Latin/Cyprus
|
||||
{ 299, 66, 240, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Turkmen/Latin/Turkmenistan
|
||||
{ 301, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Tyap/Latin/Nigeria
|
||||
{ 303, 27, 244, 4517, 4517, 4597, 4646, 153, 153, 80, 80, 49, 57, 26, 26 },// Ukrainian/Cyrillic/Ukraine
|
||||
{ 304, 66, 91, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Upper Sorbian/Latin/Germany
|
||||
{ 305, 4, 178, 4703, 4703, 4703, 4703, 153, 153, 66, 66, 66, 66, 26, 26 },// Urdu/Arabic/Pakistan
|
||||
{ 305, 4, 110, 4703, 4703, 4703, 4703, 153, 153, 66, 66, 66, 66, 26, 26 },// Urdu/Arabic/India
|
||||
{ 306, 4, 50, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Uyghur/Arabic/China
|
||||
{ 307, 66, 251, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Uzbek/Latin/Uzbekistan
|
||||
{ 307, 4, 1, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Uzbek/Arabic/Afghanistan
|
||||
{ 307, 27, 251, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Uzbek/Cyrillic/Uzbekistan
|
||||
{ 308, 139, 134, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Vai/Vai/Liberia
|
||||
{ 308, 66, 134, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Vai/Latin/Liberia
|
||||
{ 309, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Venda/Latin/South Africa
|
||||
{ 310, 66, 255, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Vietnamese/Latin/Vietnam
|
||||
{ 311, 66, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Volapuk/Latin/World
|
||||
{ 312, 66, 230, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Vunjo/Latin/Tanzania
|
||||
{ 313, 66, 23, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Walloon/Latin/Belgium
|
||||
{ 314, 66, 226, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Walser/Latin/Switzerland
|
||||
{ 315, 66, 15, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Warlpiri/Latin/Australia
|
||||
{ 316, 66, 246, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Welsh/Latin/United Kingdom
|
||||
{ 317, 4, 178, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Western Balochi/Arabic/Pakistan
|
||||
{ 318, 66, 165, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Western Frisian/Latin/Netherlands
|
||||
{ 319, 33, 77, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Wolaytta/Ethiopic/Ethiopia
|
||||
{ 320, 66, 206, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Wolof/Latin/Senegal
|
||||
{ 321, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Xhosa/Latin/South Africa
|
||||
{ 322, 66, 40, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Yangben/Latin/Cameroon
|
||||
{ 323, 47, 258, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Yiddish/Hebrew/World
|
||||
{ 324, 66, 169, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Yoruba/Latin/Nigeria
|
||||
{ 324, 66, 25, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Yoruba/Latin/Benin
|
||||
{ 325, 66, 170, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Zarma/Latin/Niger
|
||||
{ 327, 66, 216, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Zulu/Latin/South Africa
|
||||
{ 328, 66, 32, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Kaingang/Latin/Brazil
|
||||
{ 329, 66, 32, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nheengatu/Latin/Brazil
|
||||
{ 329, 66, 54, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nheengatu/Latin/Colombia
|
||||
{ 329, 66, 254, 0, 0, 0, 0, 153, 153, 83, 83, 83, 83, 26, 26 },// Nheengatu/Latin/Venezuela
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },// trailing zeros
|
||||
};
|
||||
|
||||
static const char16_t months_data[] = {
|
||||
0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68,
|
||||
0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64,
|
||||
0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e,
|
||||
0x3b, 0x41, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66,
|
||||
0x61, 0x6e, 0x64, 0x46, 0x61, 0x72, 0x3b, 0x4f, 0x72, 0x64, 0x3b, 0x4b, 0x68, 0x6f, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d,
|
||||
0x6f, 0x72, 0x3b, 0x53, 0x68, 0x61, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x41, 0x62, 0x61, 0x3b, 0x41, 0x7a, 0x61, 0x3b, 0x44,
|
||||
0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x3b, 0x45, 0x73, 0x66, 0x46, 0x3b, 0x4f, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x4d, 0x3b,
|
||||
0x53, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x42, 0x3b, 0x45, 0x31, 0x3b, 0x32, 0x3b, 0x33, 0x3b, 0x34,
|
||||
0x3b, 0x35, 0x3b, 0x36, 0x3b, 0x37, 0x3b, 0x38, 0x3b, 0x39, 0x3b, 0x31, 0x30, 0x3b, 0x31, 0x31, 0x3b, 0x31, 0x32, 0x641,
|
||||
0x631, 0x641, 0x631, 0x62f, 0x646, 0x3b, 0x623, 0x630, 0x631, 0x628, 0x64a, 0x647, 0x634, 0x62a, 0x3b, 0x62e, 0x631, 0x62f, 0x627, 0x62f,
|
||||
0x3b, 0x62a, 0x627, 0x631, 0x3b, 0x645, 0x631, 0x62f, 0x627, 0x62f, 0x3b, 0x634, 0x647, 0x631, 0x641, 0x627, 0x631, 0x3b, 0x645, 0x647,
|
||||
0x631, 0x3b, 0x622, 0x64a, 0x627, 0x646, 0x3b, 0x622, 0x630, 0x631, 0x3b, 0x62f, 0x64a, 0x3b, 0x628, 0x647, 0x645, 0x646, 0x3b, 0x627,
|
||||
0x633, 0x641, 0x646, 0x62f, 0x627, 0x631, 0x9ab, 0x9cd, 0x9af, 0x9be, 0x9ad, 0x9be, 0x9b0, 0x9cd, 0x9a1, 0x9bf, 0x9a8, 0x3b, 0x985, 0x9b0,
|
||||
0x9a1, 0x9bf, 0x9ac, 0x9c7, 0x9b9, 0x9c7, 0x9b6, 0x9cd, 0x9a4, 0x3b, 0x996, 0x9cb, 0x9b0, 0x9cd, 0x9a6, 0x9cd, 0x9a6, 0x3b, 0x9a4, 0x9c0,
|
||||
0x9b0, 0x3b, 0x9ae, 0x9b0, 0x9cd, 0x9af, 0x9be, 0x9a6, 0x3b, 0x9b6, 0x9be, 0x9b9, 0x9b0, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae, 0x9c7,
|
||||
0x9b9, 0x9c7, 0x9b0, 0x3b, 0x986, 0x9ac, 0x9be, 0x9a8, 0x3b, 0x9ac, 0x9be, 0x99c, 0x9be, 0x9b0, 0x3b, 0x9a6, 0x9c7, 0x3b, 0x9ac, 0x9be,
|
||||
0x9b9, 0x9ae, 0x9be, 0x9a8, 0x3b, 0x98f, 0x9b8, 0x9ab, 0x9cd, 0x9af, 0x9be, 0x9a8, 0x9cd, 0x9a1, 0x9ab, 0x9cd, 0x9af, 0x9be, 0x9ad, 0x9be,
|
||||
0x9b0, 0x9cd, 0x9a1, 0x9bf, 0x9a8, 0x3b, 0x985, 0x9b0, 0x9a1, 0x9bf, 0x9ac, 0x9c7, 0x9b9, 0x9c7, 0x9b6, 0x9cd, 0x9a4, 0x3b, 0x996, 0x9cb,
|
||||
0x9b0, 0x9cd, 0x9a6, 0x9cd, 0x9a6, 0x3b, 0x9a4, 0x9c0, 0x9b0, 0x3b, 0x9ae, 0x9b0, 0x9cd, 0x9af, 0x9be, 0x9a6, 0x3b, 0x9b6, 0x9be, 0x9b9,
|
||||
0x9b0, 0x9bf, 0x9ac, 0x9be, 0x9b0, 0x3b, 0x9ae, 0x9c7, 0x9b9, 0x9c7, 0x9b0, 0x3b, 0x986, 0x9ac, 0x9be, 0x9a8, 0x3b, 0x986, 0x99c, 0x9be,
|
||||
0x9b0, 0x3b, 0x9a6, 0x9c7, 0x3b, 0x9ac, 0x9be, 0x9b9, 0x9ae, 0x9be, 0x9a8, 0x3b, 0x98f, 0x9b8, 0x9ab, 0x9cd, 0x9af, 0x9be, 0x9a8, 0x9cd,
|
||||
0x9a1, 0x9e7, 0x3b, 0x9e8, 0x3b, 0x9e9, 0x3b, 0x9ea, 0x3b, 0x9eb, 0x3b, 0x9ec, 0x3b, 0x9ed, 0x3b, 0x9ee, 0x3b, 0x9ef, 0x3b, 0x9e7,
|
||||
0x9e6, 0x3b, 0x9e7, 0x9e7, 0x3b, 0x9e7, 0x9e8, 0x424, 0x430, 0x440, 0x430, 0x432, 0x430, 0x434, 0x438, 0x43d, 0x3b, 0x41e, 0x440, 0x434,
|
||||
0x438, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x41a, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x422, 0x438, 0x440, 0x3b, 0x41c,
|
||||
0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x428, 0x430, 0x445, 0x440, 0x438, 0x432, 0x430, 0x440, 0x3b, 0x41c, 0x435, 0x445, 0x440, 0x3b,
|
||||
0x410, 0x431, 0x430, 0x43d, 0x3b, 0x410, 0x437, 0x430, 0x440, 0x3b, 0x414, 0x435, 0x458, 0x3b, 0x411, 0x430, 0x445, 0x43c, 0x430, 0x43d,
|
||||
0x3b, 0x415, 0x441, 0x444, 0x430, 0x43d, 0x434, 0x31, 0x6708, 0x3b, 0x32, 0x6708, 0x3b, 0x33, 0x6708, 0x3b, 0x34, 0x6708, 0x3b, 0x35,
|
||||
0x6708, 0x3b, 0x36, 0x6708, 0x3b, 0x37, 0x6708, 0x3b, 0x38, 0x6708, 0x3b, 0x39, 0x6708, 0x3b, 0x31, 0x30, 0x6708, 0x3b, 0x31, 0x31,
|
||||
0x6708, 0x3b, 0x31, 0x32, 0x6708, 0x62e, 0x627, 0x6a9, 0x6d5, 0x644, 0x6ce, 0x648, 0x6d5, 0x3b, 0x628, 0x627, 0x646, 0x6d5, 0x645, 0x6d5,
|
||||
0x695, 0x3b, 0x62c, 0x6c6, 0x632, 0x6d5, 0x631, 0x62f, 0x627, 0x646, 0x3b, 0x67e, 0x648, 0x648, 0x634, 0x67e, 0x6d5, 0x695, 0x3b, 0x6af,
|
||||
0x6d5, 0x644, 0x627, 0x648, 0x6ce, 0x698, 0x3b, 0x62e, 0x6d5, 0x631, 0x645, 0x627, 0x646, 0x627, 0x646, 0x3b, 0x695, 0x6d5, 0x632, 0x628,
|
||||
0x6d5, 0x631, 0x3b, 0x62e, 0x6d5, 0x632, 0x6d5, 0x6b5, 0x648, 0x6d5, 0x631, 0x3b, 0x633, 0x6d5, 0x631, 0x645, 0x627, 0x648, 0x6d5, 0x632,
|
||||
0x3b, 0x628, 0x6d5, 0x641, 0x631, 0x627, 0x646, 0x628, 0x627, 0x631, 0x3b, 0x695, 0x6ce, 0x628, 0x6d5, 0x646, 0x62f, 0x627, 0x646, 0x3b,
|
||||
0x631, 0x6d5, 0x634, 0x6d5, 0x645, 0x6ce, 0x62e, 0x627, 0x6a9, 0x6d5, 0x644, 0x6ce, 0x648, 0x6d5, 0x3b, 0x6af, 0x648, 0x6b5, 0x627, 0x646,
|
||||
0x3b, 0x62c, 0x6c6, 0x632, 0x6d5, 0x631, 0x62f, 0x627, 0x646, 0x3b, 0x67e, 0x648, 0x648, 0x634, 0x67e, 0x6d5, 0x695, 0x3b, 0x6af, 0x6d5,
|
||||
0x644, 0x627, 0x648, 0x6ce, 0x698, 0x3b, 0x62e, 0x6d5, 0x631, 0x645, 0x627, 0x646, 0x627, 0x646, 0x3b, 0x695, 0x6d5, 0x632, 0x628, 0x6d5,
|
||||
0x631, 0x3b, 0x6af, 0x6d5, 0x6b5, 0x627, 0x695, 0x6ce, 0x632, 0x627, 0x646, 0x3b, 0x633, 0x6d5, 0x631, 0x645, 0x627, 0x648, 0x6d5, 0x632,
|
||||
0x3b, 0x628, 0x6d5, 0x641, 0x631, 0x627, 0x646, 0x628, 0x627, 0x631, 0x3b, 0x695, 0x6ce, 0x628, 0x6d5, 0x646, 0x62f, 0x627, 0x646, 0x3b,
|
||||
0x695, 0x6d5, 0x634, 0x6d5, 0x645, 0x6d5, 0x4e00, 0x6708, 0x3b, 0x4e8c, 0x6708, 0x3b, 0x4e09, 0x6708, 0x3b, 0x56db, 0x6708, 0x3b, 0x4e94, 0x6708,
|
||||
0x3b, 0x516d, 0x6708, 0x3b, 0x4e03, 0x6708, 0x3b, 0x516b, 0x6708, 0x3b, 0x4e5d, 0x6708, 0x3b, 0x5341, 0x6708, 0x3b, 0x5341, 0x4e00, 0x6708, 0x3b,
|
||||
0x5341, 0x4e8c, 0x6708, 0x31, 0x2e, 0x3b, 0x32, 0x2e, 0x3b, 0x33, 0x2e, 0x3b, 0x34, 0x2e, 0x3b, 0x35, 0x2e, 0x3b, 0x36, 0x2e,
|
||||
0x3b, 0x37, 0x2e, 0x3b, 0x38, 0x2e, 0x3b, 0x39, 0x2e, 0x3b, 0x31, 0x30, 0x2e, 0x3b, 0x31, 0x31, 0x2e, 0x3b, 0x31, 0x32,
|
||||
0x2e, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161,
|
||||
0x74, 0x3b, 0x63, 0x68, 0x6f, 0x72, 0x64, 0xe1, 0x64, 0x3b, 0x74, 0xed, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0xe1, 0x64,
|
||||
0x3b, 0x161, 0x61, 0x68, 0x72, 0xed, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0xe1, 0x62, 0xe1, 0x6e, 0x3b,
|
||||
0xe1, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x69, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65, 0x73, 0x66, 0x61,
|
||||
0x6e, 0x64, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65,
|
||||
0x73, 0x68, 0x74, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64,
|
||||
0x61, 0x64, 0x3b, 0x73, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0x61, 0x62,
|
||||
0x61, 0x6e, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65,
|
||||
0x73, 0x66, 0x61, 0x6e, 0x64, 0x64, 0x7a, 0x6f, 0x76, 0x65, 0x3b, 0x64, 0x7a, 0x6f, 0x64, 0x7a, 0x65, 0x3b, 0x74, 0x65,
|
||||
0x64, 0x6f, 0x78, 0x65, 0x3b, 0x61, 0x66, 0x254, 0x66, 0x69, 0x1ebd, 0x3b, 0x64, 0x61, 0x6d, 0x25b, 0x3b, 0x6d, 0x61, 0x73,
|
||||
0x61, 0x3b, 0x73, 0x69, 0x61, 0x6d, 0x6c, 0x254, 0x6d, 0x3b, 0x64, 0x65, 0x61, 0x73, 0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65,
|
||||
0x3b, 0x61, 0x6e, 0x79, 0x254, 0x6e, 0x79, 0x254, 0x3b, 0x6b, 0x65, 0x6c, 0x65, 0x3b, 0x61, 0x64, 0x65, 0x25b, 0x6d, 0x65,
|
||||
0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0x64, 0x7a, 0x76, 0x3b, 0x64, 0x7a, 0x64, 0x3b, 0x74,
|
||||
0x65, 0x64, 0x3b, 0x61, 0x66, 0x254, 0x3b, 0x64, 0x61, 0x6d, 0x3b, 0x6d, 0x61, 0x73, 0x3b, 0x73, 0x69, 0x61, 0x3b, 0x64,
|
||||
0x65, 0x61, 0x3b, 0x61, 0x6e, 0x79, 0x3b, 0x6b, 0x65, 0x6c, 0x3b, 0x61, 0x64, 0x65, 0x3b, 0x64, 0x7a, 0x6d, 0x66, 0x61,
|
||||
0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x6b, 0x75, 0x75, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161,
|
||||
0x74, 0x6b, 0x75, 0x75, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x6b, 0x75, 0x75, 0x3b, 0x74, 0x69, 0x72, 0x6b,
|
||||
0x75, 0x75, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x6b, 0x75, 0x75, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61,
|
||||
0x72, 0x6b, 0x75, 0x75, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x6b, 0x75, 0x75, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x6b, 0x75, 0x75,
|
||||
0x3b, 0x61, 0x7a, 0x61, 0x72, 0x6b, 0x75, 0x75, 0x3b, 0x64, 0x65, 0x79, 0x6b, 0x75, 0x75, 0x3b, 0x62, 0x61, 0x68, 0x6d,
|
||||
0x61, 0x6e, 0x6b, 0x75, 0x75, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x6b, 0x75, 0x75, 0x66, 0x61, 0x72, 0x76, 0x61,
|
||||
0x72, 0x64, 0x69, 0x6e, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74,
|
||||
0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x74,
|
||||
0x69, 0x72, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b,
|
||||
0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x6b, 0x75,
|
||||
0x75, 0x74, 0x61, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x6b, 0x75,
|
||||
0x75, 0x74, 0x61, 0x3b, 0x64, 0x65, 0x79, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x6b,
|
||||
0x75, 0x75, 0x74, 0x61, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x6b, 0x75, 0x75, 0x74, 0x61, 0x66, 0x61, 0x72, 0x76,
|
||||
0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x6b, 0x68, 0x6f,
|
||||
0x72, 0x64, 0x61, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x161, 0x61, 0x68, 0x72,
|
||||
0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x3b,
|
||||
0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x66, 0x61, 0x72,
|
||||
0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x6b, 0x68,
|
||||
0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x161, 0x61, 0x68,
|
||||
0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0xe2, 0x62, 0xe2, 0x6e, 0x3b, 0xe2, 0x7a, 0x61, 0x72,
|
||||
0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x66, 0x61,
|
||||
0x72, 0x2e, 0x3b, 0x6f, 0x72, 0x64, 0x2e, 0x3b, 0x6b, 0x68, 0x6f, 0x2e, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72,
|
||||
0x2e, 0x3b, 0x161, 0x61, 0x68, 0x2e, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0xe2, 0x62, 0xe2, 0x6e, 0x3b, 0xe2, 0x7a, 0x61,
|
||||
0x72, 0x3b, 0x64, 0x65, 0x79, 0x3b, 0x62, 0x61, 0x68, 0x2e, 0x3b, 0x65, 0x73, 0x66, 0x2e, 0x46, 0x61, 0x72, 0x76, 0x61,
|
||||
0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72,
|
||||
0x64, 0xe2, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0xe2, 0x64, 0x3b, 0x160, 0x61, 0x68, 0x72, 0x69,
|
||||
0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0xc2, 0x62, 0xe2, 0x6e, 0x3b, 0xc2, 0x7a, 0x61, 0x72, 0x3b, 0x44,
|
||||
0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x46, 0x61, 0x72, 0x2e,
|
||||
0x3b, 0x4f, 0x72, 0x64, 0x2e, 0x3b, 0x4b, 0x68, 0x6f, 0x2e, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x2e, 0x3b,
|
||||
0x160, 0x61, 0x68, 0x2e, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0xc2, 0x62, 0xe2, 0x2e, 0x3b, 0xc2, 0x7a, 0x61, 0x72, 0x3b,
|
||||
0x44, 0x65, 0x79, 0x3b, 0x42, 0x61, 0x68, 0x2e, 0x3b, 0x45, 0x73, 0x66, 0x2e, 0x10e4, 0x10d0, 0x10e0, 0x10d5, 0x10d0, 0x10e0, 0x10d3,
|
||||
0x10d8, 0x10dc, 0x10d8, 0x3b, 0x10dd, 0x10e0, 0x10d3, 0x10d8, 0x10d1, 0x10d4, 0x10f0, 0x10d4, 0x10e8, 0x10d7, 0x10d8, 0x3b, 0x10ee, 0x10dd, 0x10e0, 0x10d3,
|
||||
0x10d0, 0x10d3, 0x10d8, 0x3b, 0x10d7, 0x10d8, 0x10e0, 0x10d8, 0x3b, 0x10db, 0x10dd, 0x10e0, 0x10d3, 0x10d0, 0x10d3, 0x10d8, 0x3b, 0x10e8, 0x10d0, 0x10f0,
|
||||
0x10e0, 0x10d8, 0x10d5, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x10db, 0x10d4, 0x10f0, 0x10e0, 0x10d8, 0x3b, 0x10d0, 0x10d1, 0x10d0, 0x10dc, 0x10d8, 0x3b, 0x10d0,
|
||||
0x10d6, 0x10d0, 0x10e0, 0x10d8, 0x3b, 0x10d3, 0x10d4, 0x10d8, 0x3b, 0x10d1, 0x10d0, 0x10f0, 0x10db, 0x10d0, 0x10dc, 0x10d8, 0x3b, 0x10d4, 0x10e1, 0x10e4,
|
||||
0x10d0, 0x10dc, 0x10d3, 0x10d8, 0x46, 0x61, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65,
|
||||
0x68, 0x65, 0x73, 0x63, 0x68, 0x74, 0x3b, 0x43, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d,
|
||||
0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x53, 0x63, 0x68, 0x61, 0x68, 0x72, 0x69, 0x77, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x68,
|
||||
0x72, 0x3b, 0x100, 0x62, 0x101, 0x6e, 0x3b, 0x100, 0x73, 0x61, 0x72, 0x3b, 0x44, 0xe9, 0x69, 0x3b, 0x42, 0x61, 0x68, 0x6d,
|
||||
0x61, 0x6e, 0x3b, 0x45, 0x73, 0x73, 0x66, 0x61, 0x6e, 0x64, 0xaab, 0xabe, 0xab0, 0xacd, 0xab5, 0xabe, 0xab0, 0xacd, 0xaa6, 0xabf,
|
||||
0xaa8, 0x3b, 0xa93, 0xab0, 0xaa1, 0xac0, 0xaac, 0xac7, 0xab9, 0xac7, 0xab6, 0xacd, 0xa9f, 0x3b, 0xa96, 0xacb, 0xab0, 0xaa6, 0xabe, 0xaa6,
|
||||
0x3b, 0xaa4, 0xabf, 0xab0, 0x3b, 0xaae, 0xacb, 0xab0, 0xacd, 0xaa6, 0xabe, 0xaa6, 0x3b, 0xab6, 0xabe, 0xab9, 0xab0, 0xabf, 0xab5, 0xab0,
|
||||
0x3b, 0xaae, 0xac7, 0xab9, 0xab0, 0x3b, 0xa85, 0xaac, 0xabe, 0xaa8, 0x3b, 0xa85, 0xa9d, 0xabe, 0xab0, 0x3b, 0xaa1, 0xac7, 0xaaf, 0x3b,
|
||||
0xaac, 0xabe, 0xab9, 0xaae, 0xac7, 0xaa8, 0x3b, 0xa8f, 0xab8, 0xacd, 0xaab, 0xabe, 0xaa8, 0xacd, 0xaa1, 0x5e4, 0x5e8, 0x5d5, 0x5e8, 0x5d3,
|
||||
0x5d9, 0x5df, 0x3b, 0x5d0, 0x5e8, 0x5d3, 0x5d9, 0x5d1, 0x5d4, 0x5e9, 0x5ea, 0x3b, 0x5d7, 0x5f3, 0x5e8, 0x5d3, 0x5d0, 0x5d3, 0x3b, 0x5ea,
|
||||
0x5d9, 0x5e8, 0x3b, 0x5de, 0x5e8, 0x5d3, 0x5d0, 0x5d3, 0x3b, 0x5e9, 0x5d4, 0x5e8, 0x5d9, 0x5d5, 0x5e8, 0x3b, 0x5de, 0x5d4, 0x5e8, 0x3b,
|
||||
0x5d0, 0x5d1, 0x5d0, 0x5df, 0x3b, 0x5d0, 0x5d3, 0x5f3, 0x5e8, 0x3b, 0x5d3, 0x5d9, 0x3b, 0x5d1, 0x5d4, 0x5de, 0x5df, 0x3b, 0x5d0, 0x5e1,
|
||||
0x5e4, 0x5e0, 0x5d3, 0x92b, 0x930, 0x94d, 0x935, 0x93e, 0x926, 0x93f, 0x928, 0x3b, 0x913, 0x930, 0x94d, 0x926, 0x93f, 0x935, 0x947, 0x939,
|
||||
0x947, 0x938, 0x94d, 0x91f, 0x3b, 0x916, 0x94b, 0x930, 0x930, 0x94d, 0x926, 0x93e, 0x926, 0x3b, 0x91f, 0x93f, 0x930, 0x3b, 0x92e, 0x94b,
|
||||
0x930, 0x926, 0x93e, 0x926, 0x3b, 0x936, 0x93e, 0x939, 0x930, 0x940, 0x935, 0x930, 0x94d, 0x3b, 0x92e, 0x947, 0x939, 0x930, 0x3b, 0x905,
|
||||
0x935, 0x928, 0x3b, 0x905, 0x91c, 0x93c, 0x930, 0x3b, 0x921, 0x947, 0x3b, 0x92c, 0x939, 0x92e, 0x928, 0x3b, 0x908, 0x938, 0x94d, 0x92b,
|
||||
0x928, 0x94d, 0x926, 0x94d, 0x30d5, 0x30a1, 0x30eb, 0x30f4, 0x30a1, 0x30eb, 0x30c7, 0x30a3, 0x30fc, 0x30f3, 0x3b, 0x30aa, 0x30eb, 0x30c7, 0x30a3, 0x30fc,
|
||||
0x30d9, 0x30d8, 0x30b7, 0x30e5, 0x30c8, 0x3b, 0x30db, 0x30eb, 0x30c0, 0x30fc, 0x30c9, 0x3b, 0x30c6, 0x30a3, 0x30fc, 0x30eb, 0x3b, 0x30e2, 0x30eb, 0x30c0,
|
||||
0x30fc, 0x30c9, 0x3b, 0x30b7, 0x30e3, 0x30cf, 0x30ea, 0x30fc, 0x30f4, 0x30a1, 0x30eb, 0x3b, 0x30e1, 0x30d5, 0x30eb, 0x3b, 0x30a2, 0x30fc, 0x30d0, 0x30fc,
|
||||
0x30f3, 0x3b, 0x30a2, 0x30fc, 0x30b6, 0x30eb, 0x3b, 0x30c7, 0x30a4, 0x3b, 0x30d0, 0x30d5, 0x30de, 0x30f3, 0x3b, 0x30a8, 0x30b9, 0x30d5, 0x30a1, 0x30f3,
|
||||
0x30c9, 0xcab, 0xcb0, 0xccd, 0xcb5, 0xcb0, 0xccd, 0xca6, 0xcbf, 0xca8, 0xccd, 0x3b, 0xc93, 0xcb0, 0xccd, 0xca6, 0xcbf, 0xcac, 0xcc6, 0xcb9,
|
||||
0xcc6, 0xcb6, 0xccd, 0xc9f, 0xccd, 0x3b, 0xc96, 0xccb, 0xcb0, 0xccd, 0xca1, 0xcbe, 0xca6, 0xccd, 0x3b, 0xc9f, 0xcbf, 0xcb0, 0xccd, 0x3b,
|
||||
0xcae, 0xcca, 0xcb0, 0xccd, 0xca6, 0xcbe, 0xca6, 0xccd, 0x3b, 0xcb6, 0xcb9, 0xcb0, 0xcbf, 0xcb5, 0xcbe, 0xcb0, 0xccd, 0x3b, 0xcae, 0xcc6,
|
||||
0xcb9, 0xccd, 0xcb0, 0xccd, 0x3b, 0xc85, 0xcac, 0xca8, 0xccd, 0x3b, 0xc85, 0xc9d, 0xcb0, 0xccd, 0x3b, 0xca1, 0xcc7, 0x3b, 0xcac, 0xcb9,
|
||||
0xccd, 0xcae, 0xca8, 0xccd, 0x3b, 0xc8e, 0xcb8, 0xccd, 0xcab, 0xcbe, 0xc82, 0xca1, 0xccd, 0xd654, 0xb974, 0xbc14, 0xb518, 0x3b, 0xc624, 0xb974,
|
||||
0xb514, 0xbca0, 0xd5e4, 0xc26c, 0xd2b8, 0x3b, 0xd638, 0xb974, 0xb2e4, 0xb4dc, 0x3b, 0xd2f0, 0xb974, 0x3b, 0xbaa8, 0xb974, 0xb2e4, 0xb4dc, 0x3b, 0xc0e4,
|
||||
0xd750, 0xb9ac, 0xbc14, 0xb974, 0x3b, 0xba54, 0xd750, 0xb974, 0x3b, 0xc544, 0xbc18, 0x3b, 0xc544, 0xc790, 0xb974, 0x3b, 0xb2e4, 0xc774, 0x3b, 0xbc14,
|
||||
0xd750, 0xb9cc, 0x3b, 0xc5d0, 0xc2a4, 0xd310, 0xb4dc, 0xe9f, 0xea3, 0xeb2, 0xea7, 0xeb2, 0xe94, 0xeb4, 0xe99, 0x3b, 0xead, 0xecd, 0xea3, 0xe94,
|
||||
0xeb5, 0xe9a, 0xeb5, 0xec0, 0xeab, 0xea3, 0xe94, 0x3b, 0xe84, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xec1, 0xe95, 0xea3, 0x3b, 0xea1,
|
||||
0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xe8a, 0xeb2, 0xea3, 0xeab, 0xeb4, 0xea7, 0xeb2, 0x3b, 0xec0, 0xea1, 0xeb5, 0x3b, 0xead, 0xeb2,
|
||||
0xe9a, 0xeb2, 0xe99, 0x3b, 0xead, 0xeb2, 0xe8a, 0xeb2, 0xea3, 0x3b, 0xe94, 0xeb5, 0xea3, 0x3b, 0xe9a, 0xea3, 0xeb2, 0xec1, 0xea1, 0xe99,
|
||||
0x3b, 0xec0, 0xead, 0xeaa, 0xe9f, 0xeb2, 0xe99, 0xe9f, 0xea3, 0xeb2, 0xea7, 0xeb2, 0xe94, 0xeb4, 0xe99, 0x3b, 0xead, 0xecd, 0xea3, 0xe94,
|
||||
0xeb5, 0xe9a, 0xeb5, 0xec0, 0xeab, 0xeae, 0xe94, 0x3b, 0xe84, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xec1, 0xe95, 0xea3, 0x3b, 0xea1,
|
||||
0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xe8a, 0xeb2, 0xea3, 0xea5, 0xeb4, 0xea7, 0xeb2, 0x3b, 0xec0, 0xea1, 0xeb5, 0x3b, 0xead, 0xeb2,
|
||||
0xe9a, 0xeb2, 0xe99, 0x3b, 0xead, 0xeb2, 0xe8a, 0xeb2, 0x3b, 0xe94, 0xeb5, 0xea3, 0x3b, 0xe9a, 0xea3, 0xeb2, 0xea1, 0xeb2, 0xe99, 0x3b,
|
||||
0xec0, 0xead, 0xeaa, 0xe9f, 0xeb2, 0xe99, 0xe9f, 0xeb2, 0xea3, 0xea7, 0xeb2, 0xe94, 0xeb4, 0xe99, 0x3b, 0xead, 0xecd, 0xea3, 0xe94, 0xeb5,
|
||||
0xe9a, 0xeb5, 0xec0, 0xeab, 0xea3, 0xe94, 0x3b, 0xe84, 0xecd, 0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xec1, 0xe95, 0xea3, 0x3b, 0xea1, 0xecd,
|
||||
0xea3, 0xec0, 0xe94, 0xe94, 0x3b, 0xe8a, 0xeb2, 0xea3, 0xeab, 0xeb4, 0xea7, 0xeb2, 0x3b, 0xec0, 0xea1, 0xeb5, 0x3b, 0xead, 0xeb2, 0xe9a,
|
||||
0xeb2, 0xe99, 0x3b, 0xead, 0xeb2, 0xe8a, 0xeb2, 0x3b, 0xe94, 0xeb5, 0xea3, 0x3b, 0xe9a, 0xea3, 0xeb2, 0xea1, 0xeb2, 0xe99, 0x3b, 0xec0,
|
||||
0xead, 0xeaa, 0xe9f, 0xeb2, 0xe99, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x12b, 0x6e, 0x73, 0x3b, 0x6f, 0x72, 0x64, 0x69,
|
||||
0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x73, 0x3b, 0x74, 0x12b, 0x72, 0x73,
|
||||
0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x73, 0x3b, 0x161, 0x61, 0x68, 0x72, 0x69, 0x76, 0x113, 0x72, 0x73, 0x3b, 0x6d,
|
||||
0x65, 0x68, 0x72, 0x73, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x73, 0x3b, 0x61, 0x7a, 0x65, 0x72, 0x73, 0x3b, 0x64, 0x65, 0x6a,
|
||||
0x73, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x73, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x73, 0x444, 0x430, 0x440,
|
||||
0x432, 0x430, 0x440, 0x434, 0x438, 0x43d, 0x3b, 0x43e, 0x440, 0x434, 0x438, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x43a, 0x43e,
|
||||
0x440, 0x434, 0x430, 0x434, 0x3b, 0x442, 0x438, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x448, 0x430, 0x445, 0x440,
|
||||
0x438, 0x432, 0x430, 0x440, 0x3b, 0x43c, 0x435, 0x440, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x430, 0x440, 0x3b, 0x434,
|
||||
0x435, 0x458, 0x3b, 0x431, 0x430, 0x445, 0x43c, 0x430, 0x43d, 0x3b, 0x435, 0x441, 0x444, 0x430, 0x43d, 0x434, 0xd2b, 0xd7c, 0xd35, 0xd3e,
|
||||
0xd7c, 0xd26, 0xd3f, 0xd7b, 0x3b, 0xd13, 0xd7c, 0xd21, 0xd3f, 0xd2c, 0xd46, 0xd39, 0xd46, 0xd37, 0xd4d, 0x200c, 0xd31, 0xd4d, 0xd31, 0xd4d,
|
||||
0x3b, 0xd16, 0xd4b, 0xd7c, 0xd26, 0xd3e, 0xd26, 0xd4d, 0x3b, 0xd1f, 0xd3f, 0xd7c, 0x3b, 0xd2e, 0xd4b, 0xd7c, 0xd26, 0xd3e, 0xd26, 0xd4d,
|
||||
0x3b, 0xd37, 0xd39, 0xd4d, 0x200c, 0xd30, 0xd3f, 0xd35, 0xd3e, 0xd7c, 0x3b, 0xd2e, 0xd46, 0xd39, 0xd7c, 0x3b, 0xd05, 0xd2c, 0xd3e, 0xd7b,
|
||||
0x3b, 0xd05, 0xd38, 0xd7c, 0x3b, 0xd21, 0xd46, 0xd2f, 0xd4d, 0x3b, 0xd2c, 0xd39, 0xd4d, 0x200c, 0xd2e, 0xd3e, 0xd7b, 0x3b, 0xd0e, 0xd38,
|
||||
0xd4d, 0x200c, 0xd2b, 0xd3e, 0xd7b, 0xd21, 0xd4d, 0xd2b, 0x2e, 0x3b, 0xd13, 0x2e, 0x3b, 0xd16, 0xd4b, 0x3b, 0xd1f, 0xd3f, 0x2e, 0x3b,
|
||||
0xd2e, 0xd4b, 0x2e, 0x3b, 0xd37, 0x2e, 0x3b, 0xd2e, 0xd46, 0x2e, 0x3b, 0xd05, 0x2e, 0x3b, 0xd05, 0x2e, 0x3b, 0xd21, 0xd46, 0x2e,
|
||||
0x3b, 0xd2c, 0x2e, 0x3b, 0xd0e, 0x2e, 0x92b, 0x930, 0x935, 0x930, 0x926, 0x93f, 0x928, 0x3b, 0x913, 0x930, 0x94d, 0x926, 0x93f, 0x92c,
|
||||
0x947, 0x939, 0x947, 0x936, 0x94d, 0x924, 0x3b, 0x916, 0x94b, 0x930, 0x926, 0x93e, 0x926, 0x3b, 0x924, 0x93f, 0x930, 0x3b, 0x92e, 0x94b,
|
||||
0x930, 0x926, 0x93e, 0x926, 0x3b, 0x936, 0x93e, 0x939, 0x930, 0x940, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x947, 0x939, 0x947, 0x930, 0x3b,
|
||||
0x905, 0x92c, 0x93e, 0x928, 0x3b, 0x905, 0x91d, 0x93e, 0x930, 0x3b, 0x926, 0x947, 0x3b, 0x92c, 0x93e, 0x939, 0x92e, 0x93e, 0x928, 0x3b,
|
||||
0x90f, 0x938, 0x92b, 0x93e, 0x902, 0x926, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b,
|
||||
0x96e, 0x3b, 0x96f, 0x3b, 0x967, 0x966, 0x3b, 0x967, 0x967, 0x3b, 0x967, 0x968, 0x648, 0x631, 0x6cc, 0x3b, 0x63a, 0x648, 0x6cc, 0x6cc,
|
||||
0x3b, 0x63a, 0x628, 0x631, 0x6af, 0x648, 0x644, 0x6cc, 0x3b, 0x686, 0x646, 0x6af, 0x627, 0x69a, 0x3b, 0x632, 0x645, 0x631, 0x6cc, 0x3b,
|
||||
0x648, 0x696, 0x6cc, 0x3b, 0x62a, 0x644, 0x647, 0x3b, 0x644, 0x693, 0x645, 0x3b, 0x644, 0x6cc, 0x646, 0x62f, 0x6cd, 0x3b, 0x645, 0x631,
|
||||
0x63a, 0x648, 0x645, 0x6cc, 0x3b, 0x633, 0x644, 0x648, 0x627, 0x63a, 0x647, 0x3b, 0x6a9, 0x628, 0x6f1, 0x3b, 0x6f2, 0x3b, 0x6f3, 0x3b,
|
||||
0x6f4, 0x3b, 0x6f5, 0x3b, 0x6f6, 0x3b, 0x6f7, 0x3b, 0x6f8, 0x3b, 0x6f9, 0x3b, 0x6f1, 0x6f0, 0x3b, 0x6f1, 0x6f1, 0x3b, 0x6f1, 0x6f2,
|
||||
0x641, 0x631, 0x648, 0x631, 0x62f, 0x6cc, 0x646, 0x3b, 0x627, 0x631, 0x62f, 0x6cc, 0x628, 0x647, 0x634, 0x62a, 0x3b, 0x62e, 0x631, 0x62f,
|
||||
0x627, 0x62f, 0x3b, 0x62a, 0x6cc, 0x631, 0x3b, 0x645, 0x631, 0x62f, 0x627, 0x62f, 0x3b, 0x634, 0x647, 0x631, 0x6cc, 0x648, 0x631, 0x3b,
|
||||
0x645, 0x647, 0x631, 0x3b, 0x622, 0x628, 0x627, 0x646, 0x3b, 0x622, 0x630, 0x631, 0x3b, 0x62f, 0x6cc, 0x3b, 0x628, 0x647, 0x645, 0x646,
|
||||
0x3b, 0x627, 0x633, 0x641, 0x646, 0x62f, 0x641, 0x3b, 0x627, 0x3b, 0x62e, 0x3b, 0x62a, 0x3b, 0x645, 0x3b, 0x634, 0x3b, 0x645, 0x3b,
|
||||
0x622, 0x3b, 0x622, 0x3b, 0x62f, 0x3b, 0x628, 0x3b, 0x627, 0x62d, 0x645, 0x644, 0x3b, 0x62b, 0x648, 0x631, 0x3b, 0x62c, 0x648, 0x632,
|
||||
0x627, 0x3b, 0x633, 0x631, 0x637, 0x627, 0x646, 0x3b, 0x627, 0x633, 0x62f, 0x3b, 0x633, 0x646, 0x628, 0x644, 0x647, 0x654, 0x3b, 0x645,
|
||||
0x6cc, 0x632, 0x627, 0x646, 0x3b, 0x639, 0x642, 0x631, 0x628, 0x3b, 0x642, 0x648, 0x633, 0x3b, 0x62c, 0x62f, 0x6cc, 0x3b, 0x62f, 0x644,
|
||||
0x648, 0x3b, 0x62d, 0x648, 0x62a, 0x62d, 0x3b, 0x62b, 0x3b, 0x62c, 0x3b, 0x633, 0x3b, 0x627, 0x3b, 0x633, 0x3b, 0x645, 0x3b, 0x639,
|
||||
0x3b, 0x642, 0x3b, 0x62c, 0x3b, 0x62f, 0x3b, 0x62d, 0x46, 0x61, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72,
|
||||
0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x7a, 0x74, 0x3b, 0x43, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x54, 0x69,
|
||||
0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x53, 0x7a, 0x61, 0x68, 0x72, 0x69, 0x77, 0x61, 0x72, 0x3b, 0x4d,
|
||||
0x65, 0x68, 0x72, 0x3b, 0x100, 0x62, 0x101, 0x6e, 0x3b, 0x100, 0x73, 0x61, 0x72, 0x3b, 0x44, 0xe9, 0x69, 0x3b, 0x42, 0x61,
|
||||
0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0xa2b, 0xa3e, 0xa30, 0xa35, 0xa30, 0xa21, 0xa40, 0xa28, 0x3b,
|
||||
0xa14, 0xa30, 0xa21, 0xa3e, 0xa08, 0xa2c, 0xa39, 0xa48, 0xa38, 0xa3c, 0xa1f, 0x3b, 0xa16, 0xa4b, 0xa21, 0xa30, 0xa21, 0x3b, 0xa1f, 0xa3f,
|
||||
0xa30, 0x3b, 0xa2e, 0xa4b, 0xa30, 0xa21, 0xa3e, 0xa26, 0x3b, 0xa38, 0xa3c, 0xa30, 0xa3e, 0xa07, 0xa35, 0xa30, 0x3b, 0xa2e, 0xa47, 0xa39,
|
||||
0xa30, 0x3b, 0xa05, 0xa2c, 0xa3e, 0xa28, 0x3b, 0xa05, 0xa1c, 0xa3c, 0xa3e, 0xa30, 0x3b, 0xa21, 0xa47, 0xa05, 0x3b, 0xa2c, 0xa3e, 0xa39,
|
||||
0xa2e, 0xa28, 0x3b, 0xa10, 0xa38, 0xa2b, 0xa70, 0xa21, 0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72,
|
||||
0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69,
|
||||
0x72, 0x3b, 0x41, 0x2d, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72,
|
||||
0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b,
|
||||
0x42, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x444, 0x430, 0x440, 0x432, 0x430, 0x440, 0x434,
|
||||
0x438, 0x43d, 0x3b, 0x43e, 0x440, 0x434, 0x438, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x445, 0x43e, 0x440, 0x434, 0x430, 0x434,
|
||||
0x3b, 0x442, 0x438, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x448, 0x430, 0x445, 0x440, 0x438, 0x432, 0x435, 0x440,
|
||||
0x3b, 0x43c, 0x435, 0x445, 0x440, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b, 0x434, 0x435, 0x439, 0x3b,
|
||||
0x431, 0x430, 0x445, 0x43c, 0x430, 0x43d, 0x3b, 0x44d, 0x441, 0x444, 0x430, 0x43d, 0x434, 0x66, 0x61, 0x72, 0x2e, 0x3b, 0x6f, 0x72,
|
||||
0x64, 0x2e, 0x3b, 0x6b, 0x68, 0x6f, 0x2e, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x2e, 0x3b, 0x73, 0x68, 0x61,
|
||||
0x2e, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0x61, 0x62, 0x61, 0x6e, 0x3b, 0x61, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x79,
|
||||
0x3b, 0x62, 0x61, 0x68, 0x2e, 0x3b, 0x65, 0x73, 0x66, 0x2e, 0x46, 0x61, 0x72, 0x61, 0x76, 0x61, 0x64, 0x69, 0x6e, 0x3b,
|
||||
0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x161, 0x74, 0x3b, 0x4b, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69,
|
||||
0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x160, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b, 0x4d, 0x65,
|
||||
0x68, 0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e, 0x3b, 0x41, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x6a, 0x3b, 0x42, 0x61, 0x68,
|
||||
0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x4a, 0x61, 0x6e, 0x61, 0x61, 0x79, 0x6f, 0x3b, 0x46, 0x65,
|
||||
0x65, 0x62, 0x72, 0x61, 0x61, 0x79, 0x6f, 0x3b, 0x4d, 0x61, 0x61, 0x72, 0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c,
|
||||
0x3b, 0x4d, 0x61, 0x61, 0x79, 0x6f, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4c, 0x75, 0x75, 0x6c, 0x69, 0x79, 0x6f, 0x3b,
|
||||
0x41, 0x67, 0x6f, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x61, 0x62, 0x74, 0x65, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f,
|
||||
0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x6f, 0x66, 0x65, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44,
|
||||
0x69, 0x69, 0x73, 0x65, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x46, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f,
|
||||
0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68, 0x74, 0x3b, 0x4b, 0x68, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x54,
|
||||
0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76, 0x61, 0x72, 0x3b,
|
||||
0x4d, 0x65, 0x68, 0x72, 0x3b, 0x100, 0x62, 0x101, 0x6e, 0x3b, 0x100, 0x7a, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x79, 0x3b, 0x42,
|
||||
0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x66, 0x61, 0x72, 0x76, 0x61, 0x72, 0x64, 0x69,
|
||||
0x6e, 0x3b, 0x6f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x73, 0x68, 0x74, 0x3b, 0x6b, 0x68, 0x6f, 0x72, 0x64, 0x101,
|
||||
0x64, 0x3b, 0x74, 0x69, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x64, 0x101, 0x64, 0x3b, 0x73, 0x68, 0x61, 0x68, 0x72, 0x69, 0x76,
|
||||
0x61, 0x72, 0x3b, 0x6d, 0x65, 0x68, 0x72, 0x3b, 0x101, 0x62, 0x101, 0x6e, 0x3b, 0x101, 0x7a, 0x61, 0x72, 0x3b, 0x64, 0x65,
|
||||
0x79, 0x3b, 0x62, 0x61, 0x68, 0x6d, 0x61, 0x6e, 0x3b, 0x65, 0x73, 0x66, 0x61, 0x6e, 0x64, 0x444, 0x430, 0x440, 0x432, 0x430,
|
||||
0x440, 0x434, 0x438, 0x43d, 0x3b, 0x443, 0x440, 0x434, 0x438, 0x431, 0x438, 0x4b3, 0x438, 0x448, 0x442, 0x3b, 0x445, 0x443, 0x440, 0x434,
|
||||
0x43e, 0x434, 0x3b, 0x442, 0x438, 0x440, 0x3b, 0x43c, 0x443, 0x440, 0x434, 0x43e, 0x434, 0x3b, 0x448, 0x430, 0x4b3, 0x440, 0x438, 0x432,
|
||||
0x430, 0x440, 0x3b, 0x43c, 0x435, 0x4b3, 0x440, 0x3b, 0x43e, 0x431, 0x43e, 0x43d, 0x3b, 0x43e, 0x437, 0x430, 0x440, 0x3b, 0x434, 0x435,
|
||||
0x439, 0x3b, 0x431, 0x430, 0x4b3, 0x43c, 0x430, 0x43d, 0x3b, 0x438, 0x441, 0x444, 0x430, 0x43d, 0x434, 0xb83, 0xbaa, 0xbb0, 0xbcd, 0xbb5,
|
||||
0xbbe, 0xba4, 0xbbf, 0xba9, 0xbcd, 0x3b, 0xb86, 0xbb0, 0xbcd, 0xb9f, 0xbbf, 0xbaa, 0xbc6, 0xbb9, 0xbc6, 0xbb7, 0xbcd, 0xba4, 0xbcd, 0x3b,
|
||||
0xb95, 0xbca, 0xbb0, 0xbcd, 0xba4, 0xbbe, 0xba4, 0xbcd, 0x3b, 0xba4, 0xbbf, 0xbb0, 0xbcd, 0x3b, 0xbae, 0xbca, 0xbb0, 0xbcd, 0xba4, 0xbbe,
|
||||
0xba4, 0xbcd, 0x3b, 0xbb7, 0xbbe, 0xbb0, 0xbbf, 0xbb5, 0xbbe, 0xbb0, 0xbcd, 0x3b, 0xbae, 0xbc6, 0xbb9, 0xbcd, 0xbb0, 0xbcd, 0x3b, 0xb85,
|
||||
0xbaa, 0xbbe, 0xba9, 0xbcd, 0x3b, 0xb85, 0xb9a, 0xbbe, 0xbb0, 0xbcd, 0x3b, 0xba4, 0xbc7, 0x3b, 0xbaa, 0xbb9, 0xbcd, 0xbae, 0xbbe, 0xba9,
|
||||
0xbcd, 0x3b, 0xb8e, 0xb83, 0xbaa, 0xbbe, 0xba9, 0xbcd, 0xb83, 0xbaa, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xb86, 0xbb0, 0xbcd, 0xb9f, 0xbbf, 0x2e,
|
||||
0x3b, 0xb95, 0xbca, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xba4, 0xbbf, 0xbb0, 0xbcd, 0x3b, 0xbae, 0xbca, 0xbb0, 0xbcd, 0x2e, 0x3b, 0xbb7, 0xbbe,
|
||||
0xbb0, 0xbbf, 0x2e, 0x3b, 0xbae, 0xbc6, 0xbb9, 0xbcd, 0x2e, 0x3b, 0xb85, 0xbaa, 0xbbe, 0x2e, 0x3b, 0xb85, 0xb9a, 0xbbe, 0x2e, 0x3b,
|
||||
0xba4, 0xbc7, 0x3b, 0xbaa, 0xbb9, 0xbcd, 0x2e, 0x3b, 0xb8e, 0xb83, 0x2e, 0xc2b, 0xc3e, 0xc35, 0xc30, 0xc4d, 0xc21, 0xc3f, 0xc28, 0xc4d,
|
||||
0x3b, 0xc0a, 0xc21, 0xc3e, 0xc2c, 0xc39, 0xc37, 0xc4d, 0xc1f, 0xc4d, 0x3b, 0xc16, 0xc4b, 0xc30, 0xc4d, 0xc21, 0xc3e, 0xc21, 0xc4d, 0x3b,
|
||||
0xc1f, 0xc3f, 0xc30, 0xc4d, 0x3b, 0xc2e, 0xc46, 0xc30, 0xc4d, 0xc21, 0xc3e, 0xc21, 0xc4d, 0x3b, 0xc36, 0xc36, 0xc3f, 0xc35, 0xc30, 0xc4d,
|
||||
0x3b, 0xc2e, 0xc46, 0xc39, 0xc30, 0xc4d, 0x3b, 0xc05, 0xc2c, 0xc28, 0xc4d, 0x3b, 0xc05, 0xc1c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc47, 0x3b,
|
||||
0xc2c, 0xc3e, 0xc39, 0xc4d, 0x200c, 0xc2e, 0xc3e, 0xc28, 0xc4d, 0x3b, 0xc0e, 0xc38, 0xc4d, 0x200c, 0xc2b, 0xc3e, 0xc02, 0xc21, 0xc4d, 0xe1f,
|
||||
0xe32, 0xe23, 0xe4c, 0xe27, 0xe32, 0xe23, 0xe4c, 0xe14, 0xe34, 0xe19, 0x3b, 0xe2d, 0xe2d, 0xe23, 0xe4c, 0xe14, 0xe34, 0xe40, 0xe1a, 0xe40,
|
||||
0xe2e, 0xe0a, 0xe15, 0xe4c, 0x3b, 0xe04, 0xe2d, 0xe23, 0xe4c, 0xe41, 0xe14, 0xe14, 0x3b, 0xe40, 0xe15, 0xe2d, 0xe23, 0xe4c, 0x3b, 0xe21,
|
||||
0xe2d, 0xe23, 0xe4c, 0xe41, 0xe14, 0xe14, 0x3b, 0xe0a, 0xe32, 0xe2b, 0xe23, 0xe34, 0xe27, 0xe32, 0xe23, 0xe4c, 0x3b, 0xe40, 0xe21, 0xe2e,
|
||||
0xe23, 0xe4c, 0x3b, 0xe2d, 0xe30, 0xe1a, 0xe32, 0xe19, 0x3b, 0xe2d, 0xe30, 0xe0b, 0xe32, 0xe23, 0xe4c, 0x3b, 0xe40, 0xe14, 0xe22, 0xe4c,
|
||||
0x3b, 0xe1a, 0xe32, 0xe2e, 0xe4c, 0xe21, 0xe32, 0xe19, 0x3b, 0xe40, 0xe2d, 0xe2a, 0xe1f, 0xe32, 0xe19, 0xe14, 0xe4c, 0x46, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x64, 0x69, 0x6e, 0x3b, 0x4f, 0x72, 0x64, 0x69, 0x62, 0x65, 0x68, 0x65, 0x15f, 0x74, 0x3b, 0x48, 0x6f,
|
||||
0x72, 0x64, 0x61, 0x64, 0x3b, 0x54, 0x69, 0x72, 0x3b, 0x4d, 0x6f, 0x72, 0x64, 0x61, 0x64, 0x3b, 0x15e, 0x65, 0x68, 0x72,
|
||||
0x69, 0x76, 0x65, 0x72, 0x3b, 0x4d, 0x65, 0x68, 0x72, 0x3b, 0x41, 0x62, 0x61, 0x6e, 0x3b, 0x41, 0x7a, 0x65, 0x72, 0x3b,
|
||||
0x44, 0x65, 0x79, 0x3b, 0x42, 0x65, 0x68, 0x6d, 0x65, 0x6e, 0x3b, 0x45, 0x73, 0x66, 0x65, 0x6e, 0x64, 0x444, 0x430, 0x440,
|
||||
0x432, 0x430, 0x440, 0x434, 0x456, 0x43d, 0x3b, 0x43e, 0x440, 0x434, 0x456, 0x431, 0x435, 0x445, 0x435, 0x448, 0x442, 0x3b, 0x445, 0x43e,
|
||||
0x440, 0x434, 0x430, 0x434, 0x3b, 0x442, 0x456, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x434, 0x430, 0x434, 0x3b, 0x448, 0x430, 0x445, 0x440,
|
||||
0x456, 0x432, 0x435, 0x440, 0x3b, 0x43c, 0x435, 0x445, 0x440, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b,
|
||||
0x434, 0x435, 0x439, 0x3b, 0x431, 0x430, 0x445, 0x43c, 0x430, 0x43d, 0x3b, 0x435, 0x441, 0x444, 0x430, 0x43d, 0x434, 0x444, 0x430, 0x440,
|
||||
0x3b, 0x43e, 0x440, 0x434, 0x3b, 0x445, 0x43e, 0x440, 0x3b, 0x442, 0x456, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x3b, 0x448, 0x430, 0x445,
|
||||
0x3b, 0x43c, 0x435, 0x445, 0x3b, 0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b, 0x434, 0x435, 0x439, 0x3b, 0x431,
|
||||
0x430, 0x445, 0x3b, 0x435, 0x441, 0x444, 0x444, 0x430, 0x440, 0x2e, 0x3b, 0x43e, 0x440, 0x434, 0x2e, 0x3b, 0x445, 0x43e, 0x440, 0x2e,
|
||||
0x3b, 0x442, 0x456, 0x440, 0x3b, 0x43c, 0x43e, 0x440, 0x2e, 0x3b, 0x448, 0x430, 0x445, 0x2e, 0x3b, 0x43c, 0x435, 0x445, 0x2e, 0x3b,
|
||||
0x430, 0x431, 0x430, 0x43d, 0x3b, 0x430, 0x437, 0x435, 0x440, 0x3b, 0x434, 0x435, 0x439, 0x3b, 0x431, 0x430, 0x445, 0x2e, 0x3b, 0x435,
|
||||
0x441, 0x444, 0x2e, 0x641, 0x631, 0x648, 0x631, 0x62f, 0x646, 0x3b, 0x622, 0x631, 0x688, 0x628, 0x627, 0x626, 0x634, 0x3b, 0x62e, 0x62f,
|
||||
0x627, 0x62f, 0x627, 0x62f, 0x3b, 0x62a, 0x6cc, 0x631, 0x3b, 0x645, 0x631, 0x62f, 0x627, 0x62f, 0x3b, 0x634, 0x6c1, 0x631, 0x6cc, 0x648,
|
||||
0x627, 0x631, 0x3b, 0x645, 0x6c1, 0x631, 0x3b, 0x627, 0x628, 0x627, 0x646, 0x3b, 0x622, 0x632, 0x631, 0x3b, 0x688, 0x6d2, 0x3b, 0x628,
|
||||
0x6c1, 0x645, 0x646, 0x3b, 0x627, 0x633, 0x641, 0x646, 0x62f
|
||||
};
|
||||
// GENERATED PART ENDS HERE
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,85 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QJALALI_CALENDAR_P_H
|
||||
#define QJALALI_CALENDAR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of calendar implementations. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qcalendarbackend_p.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(jalalicalendar);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QJalaliCalendar : public QCalendarBackend
|
||||
{
|
||||
public:
|
||||
// Calendar properties:
|
||||
QString name() const override;
|
||||
static QStringList nameList();
|
||||
// Date queries:
|
||||
int daysInMonth(int month, int year = QCalendar::Unspecified) const override;
|
||||
bool isLeapYear(int year) const override;
|
||||
// Properties of the calendar
|
||||
bool isLunar() const override;
|
||||
bool isLuniSolar() const override;
|
||||
bool isSolar() const override;
|
||||
// Julian Day conversions:
|
||||
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
|
||||
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
|
||||
|
||||
protected:
|
||||
// locale support:
|
||||
const QCalendarLocale *localeMonthIndexData() const override;
|
||||
const char16_t *localeMonthData() const override;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QJALALI_CALENDAR_P_H
|
||||
@@ -1,186 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QJNIHELPERS_H
|
||||
#define QJNIHELPERS_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <jni.h>
|
||||
#include <functional>
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtAndroidPrivate
|
||||
{
|
||||
class Q_CORE_EXPORT ActivityResultListener
|
||||
{
|
||||
public:
|
||||
virtual ~ActivityResultListener();
|
||||
virtual bool handleActivityResult(jint requestCode, jint resultCode, jobject data) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT NewIntentListener
|
||||
{
|
||||
public:
|
||||
virtual ~NewIntentListener();
|
||||
virtual bool handleNewIntent(JNIEnv *env, jobject intent) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT ResumePauseListener
|
||||
{
|
||||
public:
|
||||
virtual ~ResumePauseListener();
|
||||
virtual void handlePause();
|
||||
virtual void handleResume();
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT GenericMotionEventListener
|
||||
{
|
||||
public:
|
||||
virtual ~GenericMotionEventListener();
|
||||
virtual bool handleGenericMotionEvent(jobject event) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT KeyEventListener
|
||||
{
|
||||
public:
|
||||
virtual ~KeyEventListener();
|
||||
virtual bool handleKeyEvent(jobject event) = 0;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT OnBindListener
|
||||
{
|
||||
public:
|
||||
virtual ~OnBindListener() {}
|
||||
virtual jobject onBind(jobject intent) = 0;
|
||||
};
|
||||
|
||||
Q_CORE_EXPORT jobject activity();
|
||||
Q_CORE_EXPORT jobject service();
|
||||
Q_CORE_EXPORT jobject context();
|
||||
Q_CORE_EXPORT JavaVM *javaVM();
|
||||
Q_CORE_EXPORT jint initJNI(JavaVM *vm, JNIEnv *env);
|
||||
Q_CORE_EXPORT jclass findClass(const char *className, JNIEnv *env);
|
||||
jobject classLoader();
|
||||
Q_CORE_EXPORT jint androidSdkVersion();
|
||||
|
||||
bool registerPermissionNatives();
|
||||
bool registerNativeInterfaceNatives();
|
||||
|
||||
Q_CORE_EXPORT void handleActivityResult(jint requestCode, jint resultCode, jobject data);
|
||||
Q_CORE_EXPORT void registerActivityResultListener(ActivityResultListener *listener);
|
||||
Q_CORE_EXPORT void unregisterActivityResultListener(ActivityResultListener *listener);
|
||||
|
||||
Q_CORE_EXPORT void handleNewIntent(JNIEnv *env, jobject intent);
|
||||
Q_CORE_EXPORT void registerNewIntentListener(NewIntentListener *listener);
|
||||
Q_CORE_EXPORT void unregisterNewIntentListener(NewIntentListener *listener);
|
||||
|
||||
Q_CORE_EXPORT void handlePause();
|
||||
Q_CORE_EXPORT void handleResume();
|
||||
Q_CORE_EXPORT void registerResumePauseListener(ResumePauseListener *listener);
|
||||
Q_CORE_EXPORT void unregisterResumePauseListener(ResumePauseListener *listener);
|
||||
|
||||
Q_CORE_EXPORT void registerGenericMotionEventListener(GenericMotionEventListener *listener);
|
||||
Q_CORE_EXPORT void unregisterGenericMotionEventListener(GenericMotionEventListener *listener);
|
||||
|
||||
Q_CORE_EXPORT void registerKeyEventListener(KeyEventListener *listener);
|
||||
Q_CORE_EXPORT void unregisterKeyEventListener(KeyEventListener *listener);
|
||||
|
||||
Q_CORE_EXPORT void waitForServiceSetup();
|
||||
Q_CORE_EXPORT int acuqireServiceSetup(int flags);
|
||||
Q_CORE_EXPORT void setOnBindListener(OnBindListener *listener);
|
||||
Q_CORE_EXPORT jobject callOnBindListener(jobject intent);
|
||||
|
||||
Q_CORE_EXPORT bool acquireAndroidDeadlockProtector();
|
||||
Q_CORE_EXPORT void releaseAndroidDeadlockProtector();
|
||||
}
|
||||
|
||||
#define Q_JNI_FIND_AND_CHECK_CLASS(CLASS_NAME) \
|
||||
clazz = env.findClass(CLASS_NAME); \
|
||||
if (!clazz) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, m_qtTag, QtAndroid::classErrorMsgFmt(), CLASS_NAME);\
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
#define Q_JNI_GET_AND_CHECK_METHOD(ID, CLASS, METHOD_NAME, METHOD_SIGNATURE) \
|
||||
ID = env.findMethod(CLASS, METHOD_NAME, METHOD_SIGNATURE); \
|
||||
if (!ID) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, m_qtTag, QtAndroid::methodErrorMsgFmt(), \
|
||||
METHOD_NAME, METHOD_SIGNATURE); \
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
#define Q_JNI_GET_AND_CHECK_STATIC_METHOD(ID, CLASS, METHOD_NAME, METHOD_SIGNATURE) \
|
||||
ID = env.findStaticMethod(CLASS, METHOD_NAME, METHOD_SIGNATURE); \
|
||||
if (!ID) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, m_qtTag, QtAndroid::methodErrorMsgFmt(), \
|
||||
METHOD_NAME, METHOD_SIGNATURE); \
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
#define Q_JNI_GET_AND_CHECK_FIELD(ID, CLASS, FIELD_NAME, FIELD_SIGNATURE) \
|
||||
ID = env.findField(CLASS, FIELD_NAME, FIELD_SIGNATURE); \
|
||||
if (!ID) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, m_qtTag, QtAndroid::fieldErrorMsgFmt(), \
|
||||
FIELD_NAME, FIELD_SIGNATURE); \
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
#define Q_JNI_GET_AND_CHECK_STATIC_FIELD(ID, CLASS, FIELD_NAME, FIELD_SIGNATURE) \
|
||||
ID = env.findStaticField(CLASS, FIELD_NAME, FIELD_SIGNATURE); \
|
||||
if (!ID) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, m_qtTag, QtAndroid::fieldErrorMsgFmt(), \
|
||||
FIELD_NAME, FIELD_SIGNATURE); \
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QJNIHELPERS_H
|
||||
@@ -1,228 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QJSON_P_H
|
||||
#define QJSON_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <qjsonvalue.h>
|
||||
#include <qcborvalue.h>
|
||||
#include <private/qcborvalue_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QJsonPrivate {
|
||||
|
||||
template<typename Element, typename ElementsIterator>
|
||||
struct ObjectIterator
|
||||
{
|
||||
using pointer = Element *;
|
||||
|
||||
struct value_type;
|
||||
struct reference {
|
||||
reference(Element &ref) : m_key(&ref) {}
|
||||
|
||||
reference() = delete;
|
||||
~reference() = default;
|
||||
|
||||
reference(const reference &other) = default;
|
||||
reference(reference &&other) = default;
|
||||
|
||||
reference &operator=(const value_type &value);
|
||||
reference &operator=(const reference &other)
|
||||
{
|
||||
if (m_key != other.m_key) {
|
||||
key() = other.key();
|
||||
value() = other.value();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
reference &operator=(reference &&other)
|
||||
{
|
||||
key() = other.key();
|
||||
value() = other.value();
|
||||
return *this;
|
||||
}
|
||||
|
||||
Element &key() { return *m_key; }
|
||||
Element &value() { return *(m_key + 1); }
|
||||
|
||||
const Element &key() const { return *m_key; }
|
||||
const Element &value() const { return *(m_key + 1); }
|
||||
|
||||
|
||||
private:
|
||||
Element *m_key;
|
||||
};
|
||||
|
||||
struct value_type {
|
||||
value_type(reference ref) : m_key(ref.key()), m_value(ref.value()) {}
|
||||
|
||||
Element key() const { return m_key; }
|
||||
Element value() const { return m_value; }
|
||||
private:
|
||||
Element m_key;
|
||||
Element m_value;
|
||||
};
|
||||
|
||||
using difference_type = typename QList<Element>::difference_type;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
||||
ObjectIterator() = default;
|
||||
ObjectIterator(ElementsIterator it) : it(it) {}
|
||||
ElementsIterator elementsIterator() { return it; }
|
||||
|
||||
ObjectIterator operator++(int) { ObjectIterator ret(it); it += 2; return ret; }
|
||||
ObjectIterator &operator++() { it += 2; return *this; }
|
||||
ObjectIterator &operator+=(difference_type n) { it += 2 * n; return *this; }
|
||||
|
||||
ObjectIterator operator--(int) { ObjectIterator ret(it); it -= 2; return ret; }
|
||||
ObjectIterator &operator--() { it -= 2; return *this; }
|
||||
ObjectIterator &operator-=(difference_type n) { it -= 2 * n; return *this; }
|
||||
|
||||
reference operator*() const { return *it; }
|
||||
reference operator[](qsizetype n) const { return it[n * 2]; }
|
||||
|
||||
bool operator<(ObjectIterator other) const { return it < other.it; }
|
||||
bool operator>(ObjectIterator other) const { return it > other.it; }
|
||||
bool operator<=(ObjectIterator other) const { return it <= other.it; }
|
||||
bool operator>=(ObjectIterator other) const { return it >= other.it; }
|
||||
|
||||
private:
|
||||
ElementsIterator it;
|
||||
};
|
||||
|
||||
template<typename Element, typename ElementsIterator>
|
||||
inline ObjectIterator<Element, ElementsIterator> operator+(
|
||||
ObjectIterator<Element, ElementsIterator> a,
|
||||
typename ObjectIterator<Element, ElementsIterator>::difference_type n)
|
||||
{
|
||||
return {a.elementsIterator() + 2 * n};
|
||||
}
|
||||
template<typename Element, typename ElementsIterator>
|
||||
inline ObjectIterator<Element, ElementsIterator> operator+(
|
||||
qsizetype n, ObjectIterator<Element, ElementsIterator> a)
|
||||
{
|
||||
return {a.elementsIterator() + 2 * n};
|
||||
}
|
||||
template<typename Element, typename ElementsIterator>
|
||||
inline ObjectIterator<Element, ElementsIterator> operator-(
|
||||
ObjectIterator<Element, ElementsIterator> a,
|
||||
typename ObjectIterator<Element, ElementsIterator>::difference_type n)
|
||||
{
|
||||
return {a.elementsIterator() - 2 * n};
|
||||
}
|
||||
template<typename Element, typename ElementsIterator>
|
||||
inline qsizetype operator-(
|
||||
ObjectIterator<Element, ElementsIterator> a,
|
||||
ObjectIterator<Element, ElementsIterator> b)
|
||||
{
|
||||
return (a.elementsIterator() - b.elementsIterator()) / 2;
|
||||
}
|
||||
template<typename Element, typename ElementsIterator>
|
||||
inline bool operator!=(
|
||||
ObjectIterator<Element, ElementsIterator> a,
|
||||
ObjectIterator<Element, ElementsIterator> b)
|
||||
{
|
||||
return a.elementsIterator() != b.elementsIterator();
|
||||
}
|
||||
template<typename Element, typename ElementsIterator>
|
||||
inline bool operator==(
|
||||
ObjectIterator<Element, ElementsIterator> a,
|
||||
ObjectIterator<Element, ElementsIterator> b)
|
||||
{
|
||||
return a.elementsIterator() == b.elementsIterator();
|
||||
}
|
||||
|
||||
using KeyIterator = ObjectIterator<QtCbor::Element, QList<QtCbor::Element>::iterator>;
|
||||
using ConstKeyIterator = ObjectIterator<const QtCbor::Element, QList<QtCbor::Element>::const_iterator>;
|
||||
|
||||
template<>
|
||||
inline KeyIterator::reference &KeyIterator::reference::operator=(const KeyIterator::value_type &value)
|
||||
{
|
||||
*m_key = value.key();
|
||||
*(m_key + 1) = value.value();
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline void swap(KeyIterator::reference a, KeyIterator::reference b)
|
||||
{
|
||||
KeyIterator::value_type t = a;
|
||||
a = b;
|
||||
b = t;
|
||||
}
|
||||
|
||||
class Value
|
||||
{
|
||||
public:
|
||||
static QCborContainerPrivate *container(const QCborValue &v) { return v.container; }
|
||||
static qint64 valueHelper(const QCborValue &v) { return v.n; }
|
||||
|
||||
static QJsonValue fromTrustedCbor(const QCborValue &v)
|
||||
{
|
||||
QJsonValue result;
|
||||
result.value = v;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
class Variant
|
||||
{
|
||||
public:
|
||||
static QJsonObject toJsonObject(const QVariantMap &map);
|
||||
static QJsonArray toJsonArray(const QVariantList &list);
|
||||
};
|
||||
|
||||
} // namespace QJsonPrivate
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QJSON_P_H
|
||||
@@ -1,93 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QJSONPARSER_P_H
|
||||
#define QJSONPARSER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/private/qcborvalue_p.h>
|
||||
#include <QtCore/qjsondocument.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QJsonPrivate {
|
||||
|
||||
class Parser
|
||||
{
|
||||
public:
|
||||
Parser(const char *json, int length);
|
||||
|
||||
QCborValue parse(QJsonParseError *error);
|
||||
|
||||
private:
|
||||
inline void eatBOM();
|
||||
inline bool eatSpace();
|
||||
inline char nextToken();
|
||||
|
||||
bool parseObject();
|
||||
bool parseArray();
|
||||
bool parseMember();
|
||||
bool parseString();
|
||||
bool parseValue();
|
||||
bool parseNumber();
|
||||
const char *head;
|
||||
const char *json;
|
||||
const char *end;
|
||||
|
||||
int nestingLevel;
|
||||
QJsonParseError::ParseError lastError;
|
||||
QExplicitlySharedDataPointer<QCborContainerPrivate> container;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,73 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QJSONWRITER_P_H
|
||||
#define QJSONWRITER_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <qjsonvalue.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QJsonPrivate
|
||||
{
|
||||
|
||||
class Writer
|
||||
{
|
||||
public:
|
||||
static void objectToJson(const QCborContainerPrivate *o, QByteArray &json, int indent, bool compact = false);
|
||||
static void arrayToJson(const QCborContainerPrivate *a, QByteArray &json, int indent, bool compact = false);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,73 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QJULIAN_CALENDAR_P_H
|
||||
#define QJULIAN_CALENDAR_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of calendar implementations. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qromancalendar_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QJulianCalendar : public QRomanCalendar
|
||||
{
|
||||
public:
|
||||
// Calendar properties:
|
||||
QString name() const override;
|
||||
static QStringList nameList();
|
||||
// Date queries:
|
||||
bool isLeapYear(int year) const override;
|
||||
// Julian Day conversions:
|
||||
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override;
|
||||
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QJULIAN_CALENDAR_P_H
|
||||
@@ -1,144 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLIBRARY_P_H
|
||||
#define QLIBRARY_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of the QLibrary class. This header file may change from
|
||||
// version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qlibrary.h"
|
||||
|
||||
#include "QtCore/private/qfactoryloader_p.h"
|
||||
#include "QtCore/qloggingcategory.h"
|
||||
#include "QtCore/qmutex.h"
|
||||
#include "QtCore/qplugin.h"
|
||||
#include "QtCore/qpointer.h"
|
||||
#include "QtCore/qstringlist.h"
|
||||
#ifdef Q_OS_WIN
|
||||
# include "QtCore/qt_windows.h"
|
||||
#endif
|
||||
|
||||
QT_REQUIRE_CONFIG(library);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(qt_lcDebugPlugins)
|
||||
|
||||
struct QLibraryScanResult
|
||||
{
|
||||
qsizetype pos;
|
||||
qsizetype length;
|
||||
};
|
||||
|
||||
class QLibraryStore;
|
||||
class QLibraryPrivate
|
||||
{
|
||||
public:
|
||||
#ifdef Q_OS_WIN
|
||||
using Handle = HINSTANCE;
|
||||
#else
|
||||
using Handle = void *;
|
||||
#endif
|
||||
enum UnloadFlag { UnloadSys, NoUnloadSys };
|
||||
|
||||
const QString fileName;
|
||||
const QString fullVersion;
|
||||
|
||||
bool load();
|
||||
QtPluginInstanceFunction loadPlugin(); // loads and resolves instance
|
||||
bool unload(UnloadFlag flag = UnloadSys);
|
||||
void release();
|
||||
QFunctionPointer resolve(const char *);
|
||||
|
||||
QLibrary::LoadHints loadHints() const
|
||||
{ return QLibrary::LoadHints(loadHintsInt.loadRelaxed()); }
|
||||
void setLoadHints(QLibrary::LoadHints lh);
|
||||
QObject *pluginInstance();
|
||||
|
||||
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString(),
|
||||
QLibrary::LoadHints loadHints = { });
|
||||
static QStringList suffixes_sys(const QString &fullVersion);
|
||||
static QStringList prefixes_sys();
|
||||
|
||||
QAtomicPointer<std::remove_pointer<QtPluginInstanceFunction>::type> instanceFactory;
|
||||
QAtomicPointer<std::remove_pointer<Handle>::type> pHnd;
|
||||
|
||||
// the mutex protects the fields below
|
||||
QMutex mutex;
|
||||
QPointer<QObject> inst; // used by QFactoryLoader
|
||||
QPluginParsedMetaData metaData;
|
||||
QString errorString;
|
||||
QString qualifiedFileName;
|
||||
|
||||
void updatePluginState();
|
||||
bool isPlugin();
|
||||
|
||||
private:
|
||||
explicit QLibraryPrivate(const QString &canonicalFileName, const QString &version, QLibrary::LoadHints loadHints);
|
||||
~QLibraryPrivate();
|
||||
void mergeLoadHints(QLibrary::LoadHints loadHints);
|
||||
|
||||
bool load_sys();
|
||||
bool unload_sys();
|
||||
QFunctionPointer resolve_sys(const char *);
|
||||
|
||||
QAtomicInt loadHintsInt;
|
||||
|
||||
/// counts how many QLibrary or QPluginLoader are attached to us, plus 1 if it's loaded
|
||||
QAtomicInt libraryRefCount;
|
||||
/// counts how many times load() or loadPlugin() were called
|
||||
QAtomicInt libraryUnloadCount;
|
||||
|
||||
enum { IsAPlugin, IsNotAPlugin, MightBeAPlugin } pluginState;
|
||||
friend class QLibraryStore;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QLIBRARY_P_H
|
||||
@@ -1,85 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLIBRARYINFO_P_H
|
||||
#define QLIBRARYINFO_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of a number of Qt sources files. This header file may change from
|
||||
// version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "QtCore/qlibraryinfo.h"
|
||||
|
||||
#if QT_CONFIG(settings)
|
||||
# include "QtCore/qsettings.h"
|
||||
#endif
|
||||
#include "QtCore/qstring.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_CORE_EXPORT QLibraryInfoPrivate final
|
||||
{
|
||||
public:
|
||||
#if QT_CONFIG(settings)
|
||||
static QSettings *configuration();
|
||||
static void reload();
|
||||
static const QString *qtconfManualPath;
|
||||
#endif
|
||||
|
||||
struct LocationInfo
|
||||
{
|
||||
QString key;
|
||||
QString defaultValue;
|
||||
QString fallbackKey;
|
||||
};
|
||||
|
||||
static LocationInfo locationInfo(QLibraryInfo::LibraryPath loc);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QLIBRARYINFO_P_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,552 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLOCALE_P_H
|
||||
#define QLOCALE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of internal files. This header file may change from version to version
|
||||
// without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtCore/qvarlengtharray.h"
|
||||
#include "QtCore/qvariant.h"
|
||||
#include "QtCore/qnumeric.h"
|
||||
#include <QtCore/qcalendar.h>
|
||||
|
||||
#include "qlocale.h"
|
||||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_SYSTEMLOCALE
|
||||
struct QLocaleData;
|
||||
// Subclassed by Android platform plugin:
|
||||
class Q_CORE_EXPORT QSystemLocale
|
||||
{
|
||||
public:
|
||||
QSystemLocale();
|
||||
virtual ~QSystemLocale();
|
||||
|
||||
struct CurrencyToStringArgument
|
||||
{
|
||||
CurrencyToStringArgument() { }
|
||||
CurrencyToStringArgument(const QVariant &v, const QString &s)
|
||||
: value(v), symbol(s) { }
|
||||
QVariant value;
|
||||
QString symbol;
|
||||
};
|
||||
|
||||
enum QueryType {
|
||||
LanguageId, // uint
|
||||
TerritoryId, // uint
|
||||
DecimalPoint, // QString
|
||||
GroupSeparator, // QString (empty QString means: don't group digits)
|
||||
ZeroDigit, // QString
|
||||
NegativeSign, // QString
|
||||
DateFormatLong, // QString
|
||||
DateFormatShort, // QString
|
||||
TimeFormatLong, // QString
|
||||
TimeFormatShort, // QString
|
||||
DayNameLong, // QString, in: int
|
||||
DayNameShort, // QString, in: int
|
||||
DayNameNarrow, // QString, in: int
|
||||
MonthNameLong, // QString, in: int
|
||||
MonthNameShort, // QString, in: int
|
||||
MonthNameNarrow, // QString, in: int
|
||||
DateToStringLong, // QString, in: QDate
|
||||
DateToStringShort, // QString in: QDate
|
||||
TimeToStringLong, // QString in: QTime
|
||||
TimeToStringShort, // QString in: QTime
|
||||
DateTimeFormatLong, // QString
|
||||
DateTimeFormatShort, // QString
|
||||
DateTimeToStringLong, // QString in: QDateTime
|
||||
DateTimeToStringShort, // QString in: QDateTime
|
||||
MeasurementSystem, // uint
|
||||
PositiveSign, // QString
|
||||
AMText, // QString
|
||||
PMText, // QString
|
||||
FirstDayOfWeek, // Qt::DayOfWeek
|
||||
Weekdays, // QList<Qt::DayOfWeek>
|
||||
CurrencySymbol, // QString in: CurrencyToStringArgument
|
||||
CurrencyToString, // QString in: qlonglong, qulonglong or double
|
||||
Collation, // QString
|
||||
UILanguages, // QStringList
|
||||
StringToStandardQuotation, // QString in: QStringView to quote
|
||||
StringToAlternateQuotation, // QString in: QStringView to quote
|
||||
ScriptId, // uint
|
||||
ListToSeparatedString, // QString
|
||||
LocaleChanged, // system locale changed
|
||||
NativeLanguageName, // QString
|
||||
NativeTerritoryName, // QString
|
||||
StandaloneMonthNameLong, // QString, in: int
|
||||
StandaloneMonthNameShort, // QString, in: int
|
||||
StandaloneMonthNameNarrow, // QString, in: int
|
||||
StandaloneDayNameLong, // QString, in: int
|
||||
StandaloneDayNameShort, // QString, in: int
|
||||
StandaloneDayNameNarrow // QString, in: int
|
||||
};
|
||||
virtual QVariant query(QueryType type, QVariant in = QVariant()) const;
|
||||
|
||||
virtual QLocale fallbackLocale() const;
|
||||
inline uint fallbackLocaleIndex() const;
|
||||
private:
|
||||
QSystemLocale(bool);
|
||||
friend class QSystemLocaleSingleton;
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QSystemLocale::QueryType, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(QSystemLocale::CurrencyToStringArgument, Q_RELOCATABLE_TYPE);
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(icu)
|
||||
namespace QIcu {
|
||||
QString toUpper(const QByteArray &localeId, const QString &str, bool *ok);
|
||||
QString toLower(const QByteArray &localeId, const QString &str, bool *ok);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
struct QLocaleId
|
||||
{
|
||||
[[nodiscard]] static QLocaleId fromName(QStringView name);
|
||||
[[nodiscard]] inline bool operator==(QLocaleId other) const
|
||||
{ return language_id == other.language_id && script_id == other.script_id && territory_id == other.territory_id; }
|
||||
[[nodiscard]] inline bool operator!=(QLocaleId other) const
|
||||
{ return !operator==(other); }
|
||||
[[nodiscard]] inline bool isValid() const
|
||||
{
|
||||
return language_id <= QLocale::LastLanguage && script_id <= QLocale::LastScript
|
||||
&& territory_id <= QLocale::LastTerritory;
|
||||
}
|
||||
[[nodiscard]] inline bool matchesAll() const
|
||||
{
|
||||
return !language_id && !script_id && !territory_id;
|
||||
}
|
||||
// Use as: filter.accept...(candidate)
|
||||
[[nodiscard]] inline bool acceptLanguage(quint16 lang) const
|
||||
{
|
||||
// Always reject AnyLanguage (only used for last entry in locale_data array).
|
||||
// So, when searching for AnyLanguage, accept everything *but* AnyLanguage.
|
||||
return language_id ? lang == language_id : lang;
|
||||
}
|
||||
[[nodiscard]] inline bool acceptScriptTerritory(QLocaleId other) const
|
||||
{
|
||||
return (!territory_id || other.territory_id == territory_id)
|
||||
&& (!script_id || other.script_id == script_id);
|
||||
}
|
||||
|
||||
[[nodiscard]] QLocaleId withLikelySubtagsAdded() const;
|
||||
[[nodiscard]] QLocaleId withLikelySubtagsRemoved() const;
|
||||
|
||||
[[nodiscard]] QByteArray name(char separator = '-') const;
|
||||
|
||||
ushort language_id = 0, script_id = 0, territory_id = 0;
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QLocaleId, Q_PRIMITIVE_TYPE);
|
||||
|
||||
struct QLocaleData
|
||||
{
|
||||
public:
|
||||
// Having an index for each locale enables us to have diverse sources of
|
||||
// data, e.g. calendar locales, as well as the main CLDR-derived data.
|
||||
[[nodiscard]] static int findLocaleIndex(QLocaleId localeId);
|
||||
[[nodiscard]] static const QLocaleData *c();
|
||||
|
||||
enum DoubleForm {
|
||||
DFExponent = 0,
|
||||
DFDecimal,
|
||||
DFSignificantDigits,
|
||||
_DFMax = DFSignificantDigits
|
||||
};
|
||||
|
||||
enum Flags {
|
||||
NoFlags = 0,
|
||||
AddTrailingZeroes = 0x01,
|
||||
ZeroPadded = 0x02,
|
||||
LeftAdjusted = 0x04,
|
||||
BlankBeforePositive = 0x08,
|
||||
AlwaysShowSign = 0x10,
|
||||
GroupDigits = 0x20,
|
||||
CapitalEorX = 0x40,
|
||||
|
||||
ShowBase = 0x80,
|
||||
UppercaseBase = 0x100,
|
||||
ZeroPadExponent = 0x200,
|
||||
ForcePoint = 0x400
|
||||
};
|
||||
|
||||
enum NumberMode { IntegerMode, DoubleStandardMode, DoubleScientificMode };
|
||||
|
||||
typedef QVarLengthArray<char, 256> CharBuff;
|
||||
|
||||
private:
|
||||
enum PrecisionMode {
|
||||
PMDecimalDigits = 0x01,
|
||||
PMSignificantDigits = 0x02,
|
||||
PMChopTrailingZeros = 0x03
|
||||
};
|
||||
|
||||
[[nodiscard]] QString decimalForm(QString &&digits, int decpt, int precision,
|
||||
PrecisionMode pm, bool mustMarkDecimal,
|
||||
bool groupDigits) const;
|
||||
[[nodiscard]] QString exponentForm(QString &&digits, int decpt, int precision,
|
||||
PrecisionMode pm, bool mustMarkDecimal,
|
||||
int minExponentDigits) const;
|
||||
[[nodiscard]] QString signPrefix(bool negative, unsigned flags) const;
|
||||
[[nodiscard]] QString applyIntegerFormatting(QString &&numStr, bool negative, int precision,
|
||||
int base, int width, unsigned flags) const;
|
||||
|
||||
public:
|
||||
[[nodiscard]] QString doubleToString(double d,
|
||||
int precision = -1,
|
||||
DoubleForm form = DFSignificantDigits,
|
||||
int width = -1,
|
||||
unsigned flags = NoFlags) const;
|
||||
[[nodiscard]] QString longLongToString(qint64 l, int precision = -1,
|
||||
int base = 10,
|
||||
int width = -1,
|
||||
unsigned flags = NoFlags) const;
|
||||
[[nodiscard]] QString unsLongLongToString(quint64 l, int precision = -1,
|
||||
int base = 10,
|
||||
int width = -1,
|
||||
unsigned flags = NoFlags) const;
|
||||
|
||||
// this function is meant to be called with the result of stringToDouble or bytearrayToDouble
|
||||
[[nodiscard]] static float convertDoubleToFloat(double d, bool *ok)
|
||||
{
|
||||
if (qIsInf(d))
|
||||
return float(d);
|
||||
if (std::fabs(d) > (std::numeric_limits<float>::max)()) {
|
||||
if (ok)
|
||||
*ok = false;
|
||||
const float huge = std::numeric_limits<float>::infinity();
|
||||
return d < 0 ? -huge : huge;
|
||||
}
|
||||
if (d != 0 && float(d) == 0) {
|
||||
// Values that underflow double already failed. Match them:
|
||||
if (ok)
|
||||
*ok = false;
|
||||
return 0;
|
||||
}
|
||||
return float(d);
|
||||
}
|
||||
|
||||
[[nodiscard]] double stringToDouble(QStringView str, bool *ok,
|
||||
QLocale::NumberOptions options) const;
|
||||
[[nodiscard]] qint64 stringToLongLong(QStringView str, int base, bool *ok,
|
||||
QLocale::NumberOptions options) const;
|
||||
[[nodiscard]] quint64 stringToUnsLongLong(QStringView str, int base, bool *ok,
|
||||
QLocale::NumberOptions options) const;
|
||||
|
||||
// this function is used in QIntValidator (QtGui)
|
||||
[[nodiscard]] Q_CORE_EXPORT static qint64 bytearrayToLongLong(QByteArrayView num, int base,
|
||||
bool *ok);
|
||||
[[nodiscard]] static quint64 bytearrayToUnsLongLong(QByteArrayView num, int base, bool *ok);
|
||||
|
||||
[[nodiscard]] bool numberToCLocale(QStringView s, QLocale::NumberOptions number_options,
|
||||
CharBuff *result) const;
|
||||
[[nodiscard]] inline char numericToCLocale(QStringView in) const;
|
||||
|
||||
// this function is used in QIntValidator (QtGui)
|
||||
[[nodiscard]] Q_CORE_EXPORT bool validateChars(
|
||||
QStringView str, NumberMode numMode, QByteArray *buff, int decDigits = -1,
|
||||
QLocale::NumberOptions number_options = QLocale::DefaultNumberOptions) const;
|
||||
|
||||
// Access to assorted data members:
|
||||
[[nodiscard]] QLocaleId id() const
|
||||
{ return QLocaleId { m_language_id, m_script_id, m_territory_id }; }
|
||||
|
||||
[[nodiscard]] QString decimalPoint() const;
|
||||
[[nodiscard]] QString groupSeparator() const;
|
||||
[[nodiscard]] QString listSeparator() const;
|
||||
[[nodiscard]] QString percentSign() const;
|
||||
[[nodiscard]] QString zeroDigit() const;
|
||||
[[nodiscard]] char32_t zeroUcs() const;
|
||||
[[nodiscard]] QString positiveSign() const;
|
||||
[[nodiscard]] QString negativeSign() const;
|
||||
[[nodiscard]] QString exponentSeparator() const;
|
||||
|
||||
struct DataRange
|
||||
{
|
||||
quint16 offset;
|
||||
quint16 size;
|
||||
[[nodiscard]] QString getData(const char16_t *table) const
|
||||
{
|
||||
return size > 0
|
||||
? QString::fromRawData(reinterpret_cast<const QChar *>(table + offset), size)
|
||||
: QString();
|
||||
}
|
||||
[[nodiscard]] QStringView viewData(const char16_t *table) const
|
||||
{
|
||||
return { reinterpret_cast<const QChar *>(table + offset), size };
|
||||
}
|
||||
[[nodiscard]] QString getListEntry(const char16_t *table, int index) const
|
||||
{
|
||||
return listEntry(table, index).getData(table);
|
||||
}
|
||||
[[nodiscard]] QStringView viewListEntry(const char16_t *table, int index) const
|
||||
{
|
||||
return listEntry(table, index).viewData(table);
|
||||
}
|
||||
[[nodiscard]] char32_t ucsFirst(const char16_t *table) const
|
||||
{
|
||||
if (size && !QChar::isSurrogate(table[offset]))
|
||||
return table[offset];
|
||||
if (size > 1 && QChar::isHighSurrogate(table[offset]))
|
||||
return QChar::surrogateToUcs4(table[offset], table[offset + 1]);
|
||||
return 0;
|
||||
}
|
||||
private:
|
||||
[[nodiscard]] DataRange listEntry(const char16_t *table, int index) const
|
||||
{
|
||||
const char16_t separator = ';';
|
||||
quint16 i = 0;
|
||||
while (index > 0 && i < size) {
|
||||
if (table[offset + i] == separator)
|
||||
index--;
|
||||
i++;
|
||||
}
|
||||
quint16 end = i;
|
||||
while (end < size && table[offset + end] != separator)
|
||||
end++;
|
||||
return { quint16(offset + i), quint16(end - i) };
|
||||
}
|
||||
};
|
||||
|
||||
#define ForEachQLocaleRange(X) \
|
||||
X(startListPattern) X(midListPattern) X(endListPattern) X(pairListPattern) X(listDelimit) \
|
||||
X(decimalSeparator) X(groupDelim) X(percent) X(zero) X(minus) X(plus) X(exponential) \
|
||||
X(quoteStart) X(quoteEnd) X(quoteStartAlternate) X(quoteEndAlternate) \
|
||||
X(longDateFormat) X(shortDateFormat) X(longTimeFormat) X(shortTimeFormat) \
|
||||
X(longDayNamesStandalone) X(longDayNames) \
|
||||
X(shortDayNamesStandalone) X(shortDayNames) \
|
||||
X(narrowDayNamesStandalone) X(narrowDayNames) \
|
||||
X(anteMeridiem) X(postMeridiem) \
|
||||
X(byteCount) X(byteAmountSI) X(byteAmountIEC) \
|
||||
X(currencySymbol) X(currencyDisplayName) \
|
||||
X(currencyFormat) X(currencyFormatNegative) \
|
||||
X(endonymLanguage) X(endonymTerritory)
|
||||
|
||||
#define rangeGetter(name) \
|
||||
[[nodiscard]] DataRange name() const { return { m_ ## name ## _idx, m_ ## name ## _size }; }
|
||||
ForEachQLocaleRange(rangeGetter)
|
||||
#undef rangeGetter
|
||||
|
||||
public:
|
||||
quint16 m_language_id, m_script_id, m_territory_id;
|
||||
|
||||
// Offsets, then sizes, for each range:
|
||||
#define rangeIndex(name) quint16 m_ ## name ## _idx;
|
||||
ForEachQLocaleRange(rangeIndex)
|
||||
#undef rangeIndex
|
||||
#define Size(name) quint8 m_ ## name ## _size;
|
||||
ForEachQLocaleRange(Size)
|
||||
#undef Size
|
||||
|
||||
#undef ForEachQLocaleRange
|
||||
|
||||
// Strays:
|
||||
char m_currency_iso_code[3];
|
||||
quint8 m_currency_digits : 2;
|
||||
quint8 m_currency_rounding : 3; // (not yet used !)
|
||||
quint8 m_first_day_of_week : 3;
|
||||
quint8 m_weekend_start : 3;
|
||||
quint8 m_weekend_end : 3;
|
||||
quint8 m_grouping_top : 2; // Must have this many before the first grouping separator
|
||||
quint8 m_grouping_higher : 3; // Number of digits between grouping separators
|
||||
quint8 m_grouping_least : 3; // Number of digits after last grouping separator (before decimal).
|
||||
};
|
||||
|
||||
class QLocalePrivate
|
||||
{
|
||||
public:
|
||||
constexpr QLocalePrivate(const QLocaleData *data, const uint index,
|
||||
QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions,
|
||||
int refs = 0)
|
||||
: m_data(data), ref Q_BASIC_ATOMIC_INITIALIZER(refs),
|
||||
m_index(index), m_numberOptions(numberOptions) {}
|
||||
|
||||
[[nodiscard]] quint16 languageId() const { return m_data->m_language_id; }
|
||||
[[nodiscard]] quint16 territoryId() const { return m_data->m_territory_id; }
|
||||
|
||||
[[nodiscard]] QByteArray bcp47Name(char separator = '-') const;
|
||||
|
||||
[[nodiscard]] inline QLatin1String
|
||||
languageCode(QLocale::LanguageCodeTypes codeTypes = QLocale::AnyLanguageCode) const
|
||||
{
|
||||
return languageToCode(QLocale::Language(m_data->m_language_id), codeTypes);
|
||||
}
|
||||
[[nodiscard]] inline QLatin1String scriptCode() const
|
||||
{ return scriptToCode(QLocale::Script(m_data->m_script_id)); }
|
||||
[[nodiscard]] inline QLatin1String territoryCode() const
|
||||
{ return territoryToCode(QLocale::Territory(m_data->m_territory_id)); }
|
||||
|
||||
[[nodiscard]] static const QLocalePrivate *get(const QLocale &l) { return l.d; }
|
||||
[[nodiscard]] static QLatin1String
|
||||
languageToCode(QLocale::Language language,
|
||||
QLocale::LanguageCodeTypes codeTypes = QLocale::AnyLanguageCode);
|
||||
[[nodiscard]] static QLatin1String scriptToCode(QLocale::Script script);
|
||||
[[nodiscard]] static QLatin1String territoryToCode(QLocale::Territory territory);
|
||||
[[nodiscard]] static QLocale::Language
|
||||
codeToLanguage(QStringView code,
|
||||
QLocale::LanguageCodeTypes codeTypes = QLocale::AnyLanguageCode) noexcept;
|
||||
[[nodiscard]] static QLocale::Script codeToScript(QStringView code) noexcept;
|
||||
[[nodiscard]] static QLocale::Territory codeToTerritory(QStringView code) noexcept;
|
||||
|
||||
[[nodiscard]] QLocale::MeasurementSystem measurementSystem() const;
|
||||
|
||||
// System locale has an m_data all its own; all others have m_data = locale_data + m_index
|
||||
const QLocaleData *const m_data;
|
||||
QBasicAtomicInt ref;
|
||||
const uint m_index;
|
||||
QLocale::NumberOptions m_numberOptions;
|
||||
|
||||
static QBasicAtomicInt s_generation;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_SYSTEMLOCALE
|
||||
uint QSystemLocale::fallbackLocaleIndex() const { return fallbackLocale().d->m_index; }
|
||||
#endif
|
||||
|
||||
template <>
|
||||
inline QLocalePrivate *QSharedDataPointer<QLocalePrivate>::clone()
|
||||
{
|
||||
// cannot use QLocalePrivate's copy constructor
|
||||
// since it is deleted in C++11
|
||||
return new QLocalePrivate(d->m_data, d->m_index, d->m_numberOptions);
|
||||
}
|
||||
|
||||
inline char QLocaleData::numericToCLocale(QStringView in) const
|
||||
{
|
||||
Q_ASSERT(in.size() == 1 || (in.size() == 2 && in.at(0).isHighSurrogate()));
|
||||
|
||||
if (in == positiveSign() || in == u"+")
|
||||
return '+';
|
||||
|
||||
if (in == negativeSign() || in == u"-" || in == u"\x2212")
|
||||
return '-';
|
||||
|
||||
if (in == decimalPoint())
|
||||
return '.';
|
||||
|
||||
if (in.compare(exponentSeparator(), Qt::CaseInsensitive) == 0)
|
||||
return 'e';
|
||||
|
||||
const QString group = groupSeparator();
|
||||
if (in == group)
|
||||
return ',';
|
||||
|
||||
// In several languages group() is a non-breaking space (U+00A0) or its thin
|
||||
// version (U+202f), which look like spaces. People (and thus some of our
|
||||
// tests) use a regular space instead and complain if it doesn't work.
|
||||
// Should this be extended generally to any case where group is a space ?
|
||||
if ((group == u"\xa0" || group == u"\x202f") && in == u" ")
|
||||
return ',';
|
||||
|
||||
const char32_t inUcs4 = in.size() == 2
|
||||
? QChar::surrogateToUcs4(in.at(0), in.at(1)) : in.at(0).unicode();
|
||||
const char32_t zeroUcs4 = zeroUcs();
|
||||
// Must match qlocale_tools.h's unicodeForDigit()
|
||||
if (zeroUcs4 == u'\u3007') {
|
||||
// QTBUG-85409: Suzhou's digits aren't contiguous !
|
||||
if (inUcs4 == zeroUcs4)
|
||||
return '0';
|
||||
if (inUcs4 > u'\u3020' && inUcs4 <= u'\u3029')
|
||||
return inUcs4 - u'\u3020';
|
||||
} else if (zeroUcs4 <= inUcs4 && inUcs4 < zeroUcs4 + 10) {
|
||||
return '0' + inUcs4 - zeroUcs4;
|
||||
}
|
||||
if ('0' <= inUcs4 && inUcs4 <= '9')
|
||||
return inUcs4;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Also used to merely skip over an escape in a format string, advancint idx to
|
||||
// point after it (so not [[nodiscard]]):
|
||||
QString qt_readEscapedFormatString(QStringView format, int *idx);
|
||||
[[nodiscard]] bool qt_splitLocaleName(QStringView name, QStringView *lang = nullptr,
|
||||
QStringView *script = nullptr, QStringView *cntry = nullptr);
|
||||
[[nodiscard]] int qt_repeatCount(QStringView s);
|
||||
|
||||
enum { AsciiSpaceMask = (1u << (' ' - 1)) |
|
||||
(1u << ('\t' - 1)) | // 9: HT - horizontal tab
|
||||
(1u << ('\n' - 1)) | // 10: LF - line feed
|
||||
(1u << ('\v' - 1)) | // 11: VT - vertical tab
|
||||
(1u << ('\f' - 1)) | // 12: FF - form feed
|
||||
(1u << ('\r' - 1)) }; // 13: CR - carriage return
|
||||
[[nodiscard]] constexpr inline bool ascii_isspace(uchar c)
|
||||
{
|
||||
return c >= 1u && c <= 32u && (AsciiSpaceMask >> uint(c - 1)) & 1u;
|
||||
}
|
||||
|
||||
static_assert(ascii_isspace(' '));
|
||||
static_assert(ascii_isspace('\t'));
|
||||
static_assert(ascii_isspace('\n'));
|
||||
static_assert(ascii_isspace('\v'));
|
||||
static_assert(ascii_isspace('\f'));
|
||||
static_assert(ascii_isspace('\r'));
|
||||
static_assert(!ascii_isspace('\0'));
|
||||
static_assert(!ascii_isspace('\a'));
|
||||
static_assert(!ascii_isspace('a'));
|
||||
static_assert(!ascii_isspace('\177'));
|
||||
static_assert(!ascii_isspace(uchar('\200')));
|
||||
static_assert(!ascii_isspace(uchar('\xA0')));
|
||||
static_assert(!ascii_isspace(uchar('\377')));
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Q_DECLARE_METATYPE(QStringView)
|
||||
Q_DECLARE_METATYPE(QList<Qt::DayOfWeek>)
|
||||
#ifndef QT_NO_SYSTEMLOCALE
|
||||
Q_DECLARE_METATYPE(QSystemLocale::CurrencyToStringArgument)
|
||||
#endif
|
||||
|
||||
#endif // QLOCALE_P_H
|
||||
@@ -1,126 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLOCALE_TOOLS_P_H
|
||||
#define QLOCALE_TOOLS_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of internal files. This header file may change from version to version
|
||||
// without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qlocale_p.h"
|
||||
#include "qstring.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum StrayCharacterMode {
|
||||
TrailingJunkProhibited,
|
||||
TrailingJunkAllowed,
|
||||
WhitespacesAllowed
|
||||
};
|
||||
|
||||
// API note: this function can't process a number with more than 2.1 billion digits
|
||||
[[nodiscard]] double qt_asciiToDouble(const char *num, qsizetype numLen, bool &ok, int &processed,
|
||||
StrayCharacterMode strayCharMode = TrailingJunkProhibited);
|
||||
void qt_doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char *buf, int bufSize,
|
||||
bool &sign, int &length, int &decpt);
|
||||
|
||||
[[nodiscard]] QString qulltoBasicLatin(qulonglong l, int base, bool negative);
|
||||
[[nodiscard]] QString qulltoa(qulonglong l, int base, const QStringView zero);
|
||||
[[nodiscard]] Q_CORE_EXPORT QString qdtoa(qreal d, int *decpt, int *sign);
|
||||
[[nodiscard]] QString qdtoBasicLatin(double d, QLocaleData::DoubleForm form,
|
||||
int precision, bool uppercase);
|
||||
[[nodiscard]] QByteArray qdtoAscii(double d, QLocaleData::DoubleForm form,
|
||||
int precision, bool uppercase);
|
||||
|
||||
[[nodiscard]] constexpr inline bool isZero(double d)
|
||||
{
|
||||
return d == 0; // Amusingly, compilers do not grumble.
|
||||
}
|
||||
|
||||
// Enough space for the digits before the decimal separator:
|
||||
[[nodiscard]] inline int wholePartSpace(double d)
|
||||
{
|
||||
Q_ASSERT(d >= 0); // caller should call qAbs() if needed
|
||||
// Optimize for numbers between -512k and 512k - otherwise, use the
|
||||
// maximum number of digits in the whole number part of a double:
|
||||
return d > (1 << 19) ? std::numeric_limits<double>::max_exponent10 + 1 : 6;
|
||||
}
|
||||
|
||||
// Returns code-point of same kind (UCS2 or UCS4) as zero; digit is 0 through 9
|
||||
template <typename UcsInt>
|
||||
[[nodiscard]] inline UcsInt unicodeForDigit(uint digit, UcsInt zero)
|
||||
{
|
||||
// Must match QLocaleData::numericToCLocale()'s digit-digestion.
|
||||
Q_ASSERT(digit < 10);
|
||||
if (!digit)
|
||||
return zero;
|
||||
|
||||
// See QTBUG-85409: Suzhou's digits are U+3007, U+3021, ..., U+3029
|
||||
if (zero == u'\u3007')
|
||||
return u'\u3020' + digit;
|
||||
// In util/locale_database/ldml.py, LocaleScanner.numericData() asserts no
|
||||
// other number system in CLDR has discontinuous digits.
|
||||
|
||||
return zero + digit;
|
||||
}
|
||||
|
||||
[[nodiscard]] Q_CORE_EXPORT double qstrntod(const char *s00, qsizetype len,
|
||||
char const **se, bool *ok);
|
||||
[[nodiscard]] inline double qstrtod(const char *s00, char const **se, bool *ok)
|
||||
{
|
||||
qsizetype len = qsizetype(strlen(s00));
|
||||
return qstrntod(s00, len, se, ok);
|
||||
}
|
||||
|
||||
[[nodiscard]] qlonglong qstrntoll(const char *nptr, qsizetype size, const char **endptr,
|
||||
int base, bool *ok);
|
||||
[[nodiscard]] qulonglong qstrntoull(const char *nptr, qsizetype size, const char **endptr,
|
||||
int base, bool *ok);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -1,119 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 David Faure <faure+bluesystems@kde.org>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLOCKFILE_P_H
|
||||
#define QLOCKFILE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include <QtCore/qlockfile.h>
|
||||
#include <QtCore/qfile.h>
|
||||
|
||||
#include <qplatformdefs.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <io.h>
|
||||
#include <qt_windows.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QLockFilePrivate
|
||||
{
|
||||
public:
|
||||
QLockFilePrivate(const QString &fn)
|
||||
: fileName(fn),
|
||||
#ifdef Q_OS_WIN
|
||||
fileHandle(INVALID_HANDLE_VALUE),
|
||||
#else
|
||||
fileHandle(-1),
|
||||
#endif
|
||||
staleLockTime(30 * 1000), // 30 seconds
|
||||
lockError(QLockFile::NoError),
|
||||
isLocked(false)
|
||||
{
|
||||
}
|
||||
QLockFile::LockError tryLock_sys();
|
||||
bool removeStaleLock();
|
||||
QByteArray lockFileContents() const;
|
||||
// Returns \c true if the lock belongs to dead PID, or is old.
|
||||
// The attempt to delete it will tell us if it was really stale or not, though.
|
||||
bool isApparentlyStale() const;
|
||||
|
||||
// used in dbusmenu
|
||||
Q_CORE_EXPORT static QString processNameByPid(qint64 pid);
|
||||
static bool isProcessRunning(qint64 pid, const QString &appname);
|
||||
|
||||
QString fileName;
|
||||
#ifdef Q_OS_WIN
|
||||
Qt::HANDLE fileHandle;
|
||||
#else
|
||||
int fileHandle;
|
||||
#endif
|
||||
int staleLockTime; // "int milliseconds" is big enough for 24 days
|
||||
QLockFile::LockError lockError;
|
||||
bool isLocked;
|
||||
|
||||
static int getLockFileHandle(QLockFile *f)
|
||||
{
|
||||
int fd;
|
||||
#ifdef Q_OS_WIN
|
||||
// Use of this function on Windows WILL leak a file descriptor.
|
||||
fd = _open_osfhandle(intptr_t(f->d_func()->fileHandle), 0);
|
||||
#else
|
||||
fd = f->d_func()->fileHandle;
|
||||
#endif
|
||||
QT_LSEEK(fd, 0, SEEK_SET);
|
||||
return fd;
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif /* QLOCKFILE_P_H */
|
||||
@@ -1,115 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLOCKING_P_H
|
||||
#define QLOCKING_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header
|
||||
// file may change from version to version without notice, or even be
|
||||
// removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/qmutex.h>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
//
|
||||
// This API is bridging the time until we can depend on C++17:
|
||||
//
|
||||
// - qt_scoped_lock returns a lock that cannot be unlocked again before the end of the scope
|
||||
// - qt_unique_lock returns a lock that can be unlock()ed and moved around
|
||||
// - for compat with QMutexLocker, qt_unique_lock supports passing by pointer.
|
||||
// Do NOT use this overload lightly; it's only for cases such as where a Q_GLOBAL_STATIC
|
||||
// may have already been deleted. In particular, do NOT port from
|
||||
// QMutexLocker locker(&mutex);
|
||||
// to
|
||||
// auto locker = qt_unique_lock(&mutex);
|
||||
// as this will not port automatically to std::unique_lock come C++17!
|
||||
//
|
||||
// The intent, come C++17, is to replace
|
||||
// qt_scoped_lock(mutex);
|
||||
// qt_unique_lock(mutex); // except qt_unique_lock(&mutex)
|
||||
// with
|
||||
// std::scoped_lock(mutex);
|
||||
// std::unique_lock(mutex);
|
||||
// resp. (C++17 meaning CTAD, guaranteed copy elision + scoped_lock available on all platforms),
|
||||
// so please use these functions only in ways which don't break this mechanical search & replace.
|
||||
//
|
||||
|
||||
namespace {
|
||||
|
||||
template <typename Mutex, typename Lock =
|
||||
# if defined(__cpp_lib_scoped_lock) && __cpp_lib_scoped_lock >= 201703L
|
||||
std::scoped_lock
|
||||
# else
|
||||
std::lock_guard
|
||||
# endif
|
||||
<typename std::decay<Mutex>::type>
|
||||
>
|
||||
Lock qt_scoped_lock(Mutex &mutex)
|
||||
{
|
||||
return Lock(mutex);
|
||||
}
|
||||
|
||||
template <typename Mutex, typename Lock = std::unique_lock<typename std::decay<Mutex>::type>>
|
||||
Lock qt_unique_lock(Mutex &mutex)
|
||||
{
|
||||
return Lock(mutex);
|
||||
}
|
||||
|
||||
template <typename Mutex, typename Lock = std::unique_lock<typename std::decay<Mutex>::type>>
|
||||
Lock qt_unique_lock(Mutex *mutex)
|
||||
{
|
||||
return mutex ? Lock(*mutex) : Lock() ;
|
||||
}
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QLOCKING_P_H
|
||||
@@ -1,64 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QLOGGING_P_H
|
||||
#define QLOGGING_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of a number of Qt sources files. This header file may change from
|
||||
// version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtPrivate {
|
||||
|
||||
Q_CORE_EXPORT bool shouldLogToStderr();
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QLOGGING_P_H
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user