Commit 8d930473 authored by Laurent Montel's avatar Laurent Montel
Browse files

Allow to clear list

parent b6477328
Pipeline #46556 passed with stage
in 46 minutes and 8 seconds
......@@ -28,6 +28,8 @@ void RemoteContentManagerTest::shouldIsBlocked_data()
QTest::addColumn<bool>("blocked");
QTest::addColumn<bool>("contains");
QTest::newRow("empty") << QUrl() << false << false;
//QTest::newRow("empty") << QUrl() << false << false;
//TODO add elment + clear;
}
......
......@@ -27,6 +27,11 @@ RemoteContentManager *RemoteContentManager::self()
return &s_self;
}
void RemoteContentManager::clear()
{
mRemoveContentInfo.clear();
}
bool RemoteContentManager::isAutorized(const QString &url) const
{
for (const RemoteContentInfo &info : qAsConst(mRemoveContentInfo)) {
......
......@@ -20,6 +20,7 @@ public:
explicit RemoteContentManager(QObject *parent = nullptr);
~RemoteContentManager() override;
static RemoteContentManager *self();
void clear();
Q_REQUIRED_RESULT bool isAutorized(const QString &url) const;
Q_REQUIRED_RESULT bool isAutorized(const QUrl &url, bool &contains) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment