2014-10-07 12:30:54 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** This file is part of Qt Creator.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
2014-10-07 12:30:54 +02:00
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-22 10:37:55 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-10-07 12:30:54 +02:00
|
|
|
|
|
|
|
|
#include "autotest_global.h"
|
|
|
|
|
|
|
|
|
|
#include <extensionsystem/iplugin.h>
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2016-06-01 16:22:50 +02:00
|
|
|
class TestFrameworkManager;
|
2014-12-04 14:05:19 +01:00
|
|
|
struct TestSettings;
|
|
|
|
|
|
2014-10-07 12:30:54 +02:00
|
|
|
class AutotestPlugin : public ExtensionSystem::IPlugin
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "AutoTest.json")
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
AutotestPlugin();
|
|
|
|
|
~AutotestPlugin();
|
|
|
|
|
|
2014-12-04 14:05:19 +01:00
|
|
|
static AutotestPlugin *instance();
|
|
|
|
|
|
2015-01-06 15:24:31 +01:00
|
|
|
QSharedPointer<TestSettings> settings() const;
|
|
|
|
|
|
2014-10-07 12:30:54 +02:00
|
|
|
bool initialize(const QStringList &arguments, QString *errorString);
|
|
|
|
|
void extensionsInitialized();
|
|
|
|
|
ShutdownFlag aboutToShutdown();
|
|
|
|
|
|
2014-12-04 14:05:19 +01:00
|
|
|
private:
|
2014-12-18 17:35:25 +01:00
|
|
|
bool checkLicense();
|
2014-12-19 11:25:05 +01:00
|
|
|
void initializeMenuEntries();
|
2015-03-30 07:47:07 +02:00
|
|
|
void onRunAllTriggered();
|
|
|
|
|
void onRunSelectedTriggered();
|
|
|
|
|
void updateMenuItemsEnabledState();
|
2015-02-10 14:20:43 +01:00
|
|
|
QList<QObject *> createTestObjects() const;
|
2014-12-04 14:05:19 +01:00
|
|
|
const QSharedPointer<TestSettings> m_settings;
|
2016-06-01 16:22:50 +02:00
|
|
|
TestFrameworkManager *m_frameworkManager = 0;
|
2014-10-07 12:30:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|