Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsavefile_p.h
Go to the documentation of this file.
1// Copyright (C) 2013 David Faure <faure@kde.org>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:header-decls-only
4
5#ifndef QSAVEFILE_P_H
6#define QSAVEFILE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/qsavefile.h>
20
21#if QT_CONFIG(temporaryfile)
22
23#include "private/qfiledevice_p.h"
24#include <optional>
25
26QT_BEGIN_NAMESPACE
27
28class QSaveFilePrivate : public QFileDevicePrivate
29{
30 Q_DECLARE_PUBLIC(QSaveFile)
31
32protected:
33 QSaveFilePrivate();
34 ~QSaveFilePrivate();
35
36 QString fileName;
37 QString finalFileName; // fileName with symbolic links resolved
38 // Optional permissions to set on eventual commit():
39 std::optional<QFileDevice::Permissions> finalPermissions;
40
41 QFileDevice::FileError writeError;
42
43 bool useTemporaryFile;
44 bool directWriteFallback;
45
46public:
47 bool open(QIODevice::OpenMode mode);
48};
49
50QT_END_NAMESPACE
51
52#endif // QT_CONFIG(temporaryfile)
53
54#endif // QSAVEFILE_P_H