forked from qt-creator/qt-creator
Utils: Inline rootinjectfsengine.h into its only user
Change-Id: Iac02bdf550ed313fec3a1c113583cd6ef1581d3e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -270,7 +270,6 @@ extend_qtc_library(Utils
|
||||
fsengine/fsengine_impl.h
|
||||
fsengine/diriterator.h
|
||||
fsengine/fileiteratordevicesappender.h
|
||||
fsengine/rootinjectfsengine.h
|
||||
fsengine/fixedlistfsengine.h
|
||||
fsengine/fsenginehandler.cpp
|
||||
fsengine/fsenginehandler.h
|
||||
|
||||
@@ -3,17 +3,42 @@
|
||||
|
||||
#include "fsenginehandler.h"
|
||||
|
||||
#include "fileiteratordevicesappender.h"
|
||||
#include "fixedlistfsengine.h"
|
||||
#include "fsengine_impl.h"
|
||||
#include "rootinjectfsengine.h"
|
||||
|
||||
#include "fsengine.h"
|
||||
#include "fsengine_impl.h"
|
||||
|
||||
#include "../algorithm.h"
|
||||
#include "../hostosinfo.h"
|
||||
|
||||
#include <QtCore/private/qfsfileengine_p.h>
|
||||
|
||||
namespace Utils::Internal {
|
||||
|
||||
class RootInjectFSEngine final : public QFSFileEngine
|
||||
{
|
||||
public:
|
||||
using QFSFileEngine::QFSFileEngine;
|
||||
|
||||
public:
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
IteratorUniquePtr beginEntryList(const QString &path,
|
||||
QDir::Filters filters,
|
||||
const QStringList &filterNames) override
|
||||
{
|
||||
return std::make_unique<FileIteratorWrapper>(
|
||||
QFSFileEngine::beginEntryList(path, filters, filterNames));
|
||||
}
|
||||
#else
|
||||
Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override
|
||||
{
|
||||
std::unique_ptr<QAbstractFileEngineIterator> baseIterator(
|
||||
QFSFileEngine::beginEntryList(filters, filterNames));
|
||||
return new FileIteratorWrapper(std::move(baseIterator));
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
static FilePath removeDoubleSlash(const QString &fileName)
|
||||
{
|
||||
// Reduce every two or more slashes to a single slash.
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fileiteratordevicesappender.h"
|
||||
|
||||
#include <QtCore/private/qfsfileengine_p.h>
|
||||
|
||||
namespace Utils {
|
||||
namespace Internal {
|
||||
|
||||
class RootInjectFSEngine : public QFSFileEngine
|
||||
{
|
||||
public:
|
||||
using QFSFileEngine::QFSFileEngine;
|
||||
|
||||
public:
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
IteratorUniquePtr beginEntryList(const QString &path,
|
||||
QDir::Filters filters,
|
||||
const QStringList &filterNames) override
|
||||
{
|
||||
return std::make_unique<FileIteratorWrapper>(
|
||||
QFSFileEngine::beginEntryList(path, filters, filterNames));
|
||||
}
|
||||
#else
|
||||
Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override
|
||||
{
|
||||
std::unique_ptr<QAbstractFileEngineIterator> baseIterator(
|
||||
QFSFileEngine::beginEntryList(filters, filterNames));
|
||||
return new FileIteratorWrapper(std::move(baseIterator));
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Utils
|
||||
@@ -374,8 +374,7 @@ QtcLibrary {
|
||||
"fsenginehandler.cpp",
|
||||
"fsenginehandler.h",
|
||||
"fsengine_impl.cpp",
|
||||
"fsengine_impl.h",
|
||||
"rootinjectfsengine.h",
|
||||
"fsengine_impl.h"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user