File indexing completed on 2024-12-22 04:56:51

0001 /*
0002  * SPDX-FileCopyrightText: 2013 Christian Mollekopf <mollekopf@kolabsys.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  *
0006  */
0007 
0008 #pragma once
0009 
0010 #include "migration/migratorbase.h"
0011 
0012 /**
0013  * Dummy migrator that simply completes after 10s and always autostarts.
0014  * Add to the scheduler to play with the migrationagent.
0015  */
0016 class DummyMigrator : public MigratorBase
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit DummyMigrator(const QString &identifier);
0021 
0022     QString displayName() const override;
0023     void startWork() override;
0024 
0025     bool shouldAutostart() const override;
0026     bool canStart() override;
0027     void pause() override;
0028 
0029     void abort() override;
0030 private Q_SLOTS:
0031     void onTimerElapsed();
0032 };