Disable copy and move of QAbstractFileEngineHandler
They're not wanted and Axivion (SV71) grumbles about the lack of copy and move operators and constructors otherwise. Do the same in all derived classes. Some of these needed their default constructors made overt as a result. Similar for QAbstractFileEngineHandlerList. Task-number: QTBUG-122619 Change-Id: Iff016940f8c4884bd65dd781354b9bcda9b7cdd8 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>bb10
parent
4e1a1f3697
commit
a256e574f1
|
|
@ -88,7 +88,10 @@ Q_GLOBAL_STATIC(QReadWriteLock, fileEngineHandlerMutex, QReadWriteLock::Recursiv
|
|||
Q_CONSTINIT static bool qt_abstractfileenginehandlerlist_shutDown = false;
|
||||
class QAbstractFileEngineHandlerList : public QList<QAbstractFileEngineHandler *>
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(QAbstractFileEngineHandlerList)
|
||||
public:
|
||||
QAbstractFileEngineHandlerList() = default;
|
||||
|
||||
~QAbstractFileEngineHandlerList()
|
||||
{
|
||||
QWriteLocker locker(fileEngineHandlerMutex());
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags)
|
|||
|
||||
class Q_CORE_EXPORT QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(QAbstractFileEngineHandler)
|
||||
public:
|
||||
QAbstractFileEngineHandler();
|
||||
virtual ~QAbstractFileEngineHandler();
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ private:
|
|||
|
||||
class AndroidContentFileEngineHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(AndroidContentFileEngineHandler)
|
||||
public:
|
||||
AndroidContentFileEngineHandler();
|
||||
~AndroidContentFileEngineHandler();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class AndroidAssetsFileEngineHandler: public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(AndroidAssetsFileEngineHandler)
|
||||
public:
|
||||
AndroidAssetsFileEngineHandler();
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QIOSFileEngineFactory : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(QIOSFileEngineFactory)
|
||||
public:
|
||||
QIOSFileEngineFactory() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const
|
||||
{
|
||||
Q_CONSTINIT static QLatin1StringView assetsScheme("assets-library:");
|
||||
|
|
|
|||
|
|
@ -490,6 +490,7 @@ QHash<QString, QSharedPointer<ReferenceFileEngine::File> > ReferenceFileEngine::
|
|||
class FileEngineHandler
|
||||
: QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(FileEngineHandler)
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override
|
||||
{
|
||||
if (fileName.endsWith(".tar") || fileName.contains(".tar/"))
|
||||
|
|
@ -508,6 +509,8 @@ class FileEngineHandler
|
|||
|
||||
return nullptr;
|
||||
}
|
||||
public:
|
||||
FileEngineHandler() = default;
|
||||
};
|
||||
|
||||
void tst_QAbstractFileEngine::initTestCase()
|
||||
|
|
|
|||
|
|
@ -443,7 +443,10 @@ public:
|
|||
|
||||
class EngineWithNoIteratorHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(EngineWithNoIteratorHandler)
|
||||
public:
|
||||
EngineWithNoIteratorHandler() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override
|
||||
{
|
||||
return std::make_unique<EngineWithNoIterator>(fileName);
|
||||
|
|
@ -462,7 +465,10 @@ void tst_QDirIterator::engineWithNoIterator()
|
|||
|
||||
class CustomEngineHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(CustomEngineHandler)
|
||||
public:
|
||||
CustomEngineHandler() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override
|
||||
{
|
||||
// We want to test QFSFileEngine specifically, so force QDirIterator to use it
|
||||
|
|
|
|||
|
|
@ -427,7 +427,10 @@ public:
|
|||
|
||||
class EngineWithNoIteratorHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(EngineWithNoIteratorHandler)
|
||||
public:
|
||||
EngineWithNoIteratorHandler() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override
|
||||
{
|
||||
return std::make_unique<EngineWithNoIterator>(fileName);
|
||||
|
|
@ -446,7 +449,10 @@ void tst_QDirListing::engineWithNoIterator()
|
|||
|
||||
class CustomEngineHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(CustomEngineHandler)
|
||||
public:
|
||||
CustomEngineHandler() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override
|
||||
{
|
||||
// We want to test QFSFileEngine specifically, so force QDirListing to use it
|
||||
|
|
|
|||
|
|
@ -2334,7 +2334,9 @@ private:
|
|||
|
||||
class MyHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(MyHandler)
|
||||
public:
|
||||
MyHandler() = default;
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &) const override
|
||||
{
|
||||
return std::make_unique<MyEngine>(1);
|
||||
|
|
@ -2343,7 +2345,10 @@ public:
|
|||
|
||||
class MyHandler2 : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(MyHandler2)
|
||||
public:
|
||||
MyHandler2() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &) const override
|
||||
{
|
||||
return std::make_unique<MyEngine>(2);
|
||||
|
|
@ -2374,7 +2379,10 @@ void tst_QFile::fileEngineHandler()
|
|||
#ifdef QT_BUILD_INTERNAL
|
||||
class MyRecursiveHandler : public QAbstractFileEngineHandler
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(MyRecursiveHandler)
|
||||
public:
|
||||
MyRecursiveHandler() = default;
|
||||
|
||||
std::unique_ptr<QAbstractFileEngine> create(const QString &fileName) const override
|
||||
{
|
||||
if (fileName.startsWith(":!")) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue