2014-10-07 12:30:54 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2015-02-19 08:09:02 +01:00
|
|
|
** Copyright (C) 2015 The Qt Company Ltd
|
2014-10-07 12:30:54 +02:00
|
|
|
** All rights reserved.
|
2015-02-19 08:09:02 +01:00
|
|
|
** For any questions to The Qt Company, please use contact form at
|
|
|
|
|
** http://www.qt.io/contact-us
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of the Qt Creator Enterprise Auto Test Add-on.
|
|
|
|
|
**
|
|
|
|
|
** Licensees holding valid Qt Enterprise licenses may use this file in
|
|
|
|
|
** accordance with the Qt Enterprise License Agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2015-02-19 08:09:02 +01:00
|
|
|
** a written agreement between you and The Qt Company.
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
|
|
|
|
** If you have questions regarding the use of this file, please use
|
2015-02-19 08:09:02 +01:00
|
|
|
** contact form at http://www.qt.io/contact-us
|
2014-10-07 12:30:54 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef AUTOTESTPLUGIN_H
|
|
|
|
|
#define AUTOTESTPLUGIN_H
|
|
|
|
|
|
|
|
|
|
#include "autotest_global.h"
|
|
|
|
|
|
|
|
|
|
#include <extensionsystem/iplugin.h>
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
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;
|
2014-10-07 12:30:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|
|
|
|
|
|
|
|
|
|
#endif // AUTOTESTPLUGIN_H
|
|
|
|
|
|