File indexing completed on 2024-05-19 05:50:50

0001 /*
0002     SPDX-FileCopyrightText: 2016 Vladyslav Batyrenko <mvlabat@gmail.com>
0003     SPDX-FileCopyrightText: 2016 Elvis Angelaccio <elvis.angelaccio@kde.org>
0004 
0005     SPDX-License-Identifier: BSD-2-Clause
0006 */
0007 
0008 #include "testhelper.h"
0009 
0010 #include <KJob>
0011 
0012 #include <QEventLoop>
0013 
0014 void TestHelper::startAndWaitForResult(KJob *job)
0015 {
0016     QEventLoop eventLoop;
0017     QObject::connect(job, &KJob::result, &eventLoop, &QEventLoop::quit);
0018     job->start();
0019     eventLoop.exec(); // krazy:exclude=crashy
0020 }
0021 
0022 QStringList TestHelper::testFormats()
0023 {
0024     return {QStringLiteral("7z"), QStringLiteral("rar"), QStringLiteral("tar.bz2"), QStringLiteral("zip")};
0025 }