diff options
| -rw-r--r-- | src/corelib/compat/removed_api.cpp | 7 | ||||
| -rw-r--r-- | src/corelib/io/qsavefile.cpp | 10 | ||||
| -rw-r--r-- | src/corelib/io/qsavefile.h | 5 |
3 files changed, 10 insertions, 12 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index f7587f1b446..6303a455491 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -1516,6 +1516,13 @@ void QReadWriteLock::unlock() } #endif // QT_CONFIG(thread) +#include "qsavefile.h" + +QSaveFile::QSaveFile(const QString &name) + : QSaveFile(name, nullptr) +{ +} + #include "qtimer.h" void QTimer::singleShotImpl(int msec, Qt::TimerType timerType, diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp index a5108710614..e6204ffc6ce 100644 --- a/src/corelib/io/qsavefile.cpp +++ b/src/corelib/io/qsavefile.cpp @@ -72,16 +72,6 @@ QSaveFilePrivate::~QSaveFilePrivate() */ /*! - Constructs a new file object to represent the file with the given \a name. -*/ -QSaveFile::QSaveFile(const QString &name) - : QFileDevice(*new QSaveFilePrivate, nullptr) -{ - Q_D(QSaveFile); - d->fileName = name; -} - -/*! Constructs a new file object with the given \a parent. You need to call setFileName() before open(). */ diff --git a/src/corelib/io/qsavefile.h b/src/corelib/io/qsavefile.h index cc35901f75c..1738969ffa1 100644 --- a/src/corelib/io/qsavefile.h +++ b/src/corelib/io/qsavefile.h @@ -27,10 +27,11 @@ class Q_CORE_EXPORT QSaveFile : public QFileDevice Q_DECLARE_PRIVATE(QSaveFile) public: - +#if QT_CORE_REMOVED_SINCE(6, 11) explicit QSaveFile(const QString &name); +#endif explicit QSaveFile(QObject *parent = nullptr); - explicit QSaveFile(const QString &name, QObject *parent); + explicit QSaveFile(const QString &name, QObject *parent = nullptr); ~QSaveFile(); QString fileName() const override; |
