FolderMan access to a somehow singleton was awkward make it behaves a bt more like a common singleton but also enables it to be reset when needed for automated tests will enable access ot it from nextcloducmd while doing that discover and fix access to private members of FolderMan from unexpected places Signed-off-by: Matthieu Gallien <[email protected]>
26 lines
500 B
C++
26 lines
500 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include "gui/folderman.h"
|
|
|
|
using namespace OCC;
|
|
|
|
/// Helper class to enable usage of FolderMan::instance() from within the
|
|
/// tested code.
|
|
class FolderManTestHelper : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FolderManTestHelper(QObject *parent = nullptr);
|
|
~FolderManTestHelper() override;
|
|
|
|
FolderMan *fm = nullptr;
|
|
};
|