2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2016-02-03 12:15:21 +01:00
|
|
|
#pragma once
|
2009-12-08 14:30:47 +01:00
|
|
|
|
|
|
|
|
#include <extensionsystem/iplugin.h>
|
|
|
|
|
|
2021-06-01 16:00:54 +02:00
|
|
|
#include <QFuture>
|
|
|
|
|
|
2009-12-08 14:30:47 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QStandardItemModel;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2022-12-12 14:40:56 +01:00
|
|
|
namespace Utils { class FutureSynchronizer; }
|
|
|
|
|
|
2012-01-07 12:31:48 +01:00
|
|
|
namespace VcsBase {
|
2015-08-26 14:39:15 +02:00
|
|
|
|
|
|
|
|
class VcsBaseSubmitEditor;
|
|
|
|
|
|
2009-12-08 14:30:47 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2011-12-08 16:25:44 +01:00
|
|
|
class CommonVcsSettings;
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2012-01-07 12:31:48 +01:00
|
|
|
class VcsPlugin : public ExtensionSystem::IPlugin
|
2009-12-08 14:30:47 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2012-02-21 16:52:28 +01:00
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "VcsBase.json")
|
2009-12-08 14:30:47 +01:00
|
|
|
|
|
|
|
|
public:
|
2012-01-07 12:31:48 +01:00
|
|
|
VcsPlugin();
|
2016-02-03 12:15:21 +01:00
|
|
|
~VcsPlugin() override;
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2016-02-03 12:15:21 +01:00
|
|
|
bool initialize(const QStringList &arguments, QString *errorMessage) override;
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2012-01-07 12:31:48 +01:00
|
|
|
static VcsPlugin *instance();
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2021-03-23 13:57:54 +01:00
|
|
|
CommonVcsSettings &settings() const;
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2022-12-12 14:40:56 +01:00
|
|
|
static Utils::FutureSynchronizer *futureSynchronizer();
|
|
|
|
|
|
2009-12-08 14:30:47 +01:00
|
|
|
// Model of user nick names used for the submit
|
|
|
|
|
// editor. Stored centrally here to achieve delayed
|
|
|
|
|
// initialization and updating on settings change.
|
|
|
|
|
QStandardItemModel *nickNameModel();
|
|
|
|
|
|
|
|
|
|
signals:
|
2021-03-23 13:57:54 +01:00
|
|
|
void settingsChanged();
|
2015-08-26 14:39:15 +02:00
|
|
|
void submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *e, bool *result);
|
2009-12-08 14:30:47 +01:00
|
|
|
|
2016-02-03 12:15:21 +01:00
|
|
|
private:
|
2009-12-08 14:30:47 +01:00
|
|
|
void slotSettingsChanged();
|
|
|
|
|
void populateNickNameModel();
|
|
|
|
|
|
2018-02-19 14:15:05 +01:00
|
|
|
class VcsPluginPrivate *d = nullptr;
|
2009-12-08 14:30:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
2012-01-07 12:31:48 +01:00
|
|
|
} // namespace VcsBase
|