forked from qt-creator/qt-creator
Subversion: Move plugin class definition to .cpp
Change-Id: Idfbb9d59b6106054ee3541ab7b5cf393be285e21 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
#include <coreplugin/locator/commandlocator.h>
|
#include <coreplugin/locator/commandlocator.h>
|
||||||
#include <coreplugin/messagemanager.h>
|
#include <coreplugin/messagemanager.h>
|
||||||
|
|
||||||
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
#include <texteditor/textdocument.h>
|
#include <texteditor/textdocument.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -63,8 +65,7 @@ using namespace Utils;
|
|||||||
using namespace VcsBase;
|
using namespace VcsBase;
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
namespace Subversion {
|
namespace Subversion::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
const char CMD_ID_SUBVERSION_MENU[] = "Subversion.Menu";
|
const char CMD_ID_SUBVERSION_MENU[] = "Subversion.Menu";
|
||||||
const char CMD_ID_ADD[] = "Subversion.Add";
|
const char CMD_ID_ADD[] = "Subversion.Add";
|
||||||
@@ -313,12 +314,6 @@ public:
|
|||||||
|
|
||||||
static SubversionPluginPrivate *dd = nullptr;
|
static SubversionPluginPrivate *dd = nullptr;
|
||||||
|
|
||||||
SubversionPlugin::~SubversionPlugin()
|
|
||||||
{
|
|
||||||
delete dd;
|
|
||||||
dd = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
SubversionPluginPrivate::~SubversionPluginPrivate()
|
SubversionPluginPrivate::~SubversionPluginPrivate()
|
||||||
{
|
{
|
||||||
cleanCommitMessageFile();
|
cleanCommitMessageFile();
|
||||||
@@ -339,16 +334,6 @@ bool SubversionPluginPrivate::isCommitEditorOpen() const
|
|||||||
return !m_commitMessageFileName.isEmpty();
|
return !m_commitMessageFileName.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubversionPlugin::initialize()
|
|
||||||
{
|
|
||||||
dd = new SubversionPluginPrivate;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SubversionPlugin::extensionsInitialized()
|
|
||||||
{
|
|
||||||
dd->extensionsInitialized();
|
|
||||||
}
|
|
||||||
|
|
||||||
SubversionPluginPrivate::SubversionPluginPrivate()
|
SubversionPluginPrivate::SubversionPluginPrivate()
|
||||||
: VcsBasePluginPrivate(Context(Constants::SUBVERSION_CONTEXT)),
|
: VcsBasePluginPrivate(Context(Constants::SUBVERSION_CONTEXT)),
|
||||||
m_svnDirectories(svnDirectories())
|
m_svnDirectories(svnDirectories())
|
||||||
@@ -1209,7 +1194,16 @@ QString SubversionTopicCache::refreshTopic(const FilePath &repository)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
void SubversionPlugin::testLogResolving()
|
|
||||||
|
class SubversionTest final : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void testLogResolving();
|
||||||
|
};
|
||||||
|
|
||||||
|
void SubversionTest::testLogResolving()
|
||||||
{
|
{
|
||||||
QByteArray data(
|
QByteArray data(
|
||||||
"------------------------------------------------------------------------\n"
|
"------------------------------------------------------------------------\n"
|
||||||
@@ -1232,5 +1226,32 @@ void SubversionPlugin::testLogResolving()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // Internal
|
class SubversionPlugin final : public ExtensionSystem::IPlugin
|
||||||
} // Subversion
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Subversion.json")
|
||||||
|
|
||||||
|
~SubversionPlugin() final
|
||||||
|
{
|
||||||
|
delete dd;
|
||||||
|
dd = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void initialize() final
|
||||||
|
{
|
||||||
|
dd = new SubversionPluginPrivate;
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
addTest<SubversionTest>();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void extensionsInitialized() final
|
||||||
|
{
|
||||||
|
dd->extensionsInitialized();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // Subversion::Internal
|
||||||
|
|
||||||
|
#include "subversionplugin.moc"
|
||||||
|
@@ -3,32 +3,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
namespace Subversion::Internal {
|
||||||
|
|
||||||
namespace Subversion {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
const char FileAddedC[] = "A";
|
const char FileAddedC[] = "A";
|
||||||
const char FileConflictedC[] = "C";
|
const char FileConflictedC[] = "C";
|
||||||
const char FileDeletedC[] = "D";
|
const char FileDeletedC[] = "D";
|
||||||
const char FileModifiedC[] = "M";
|
const char FileModifiedC[] = "M";
|
||||||
|
|
||||||
class SubversionPlugin final : public ExtensionSystem::IPlugin
|
} // SubVersion::Internal
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Subversion.json")
|
|
||||||
|
|
||||||
~SubversionPlugin() final;
|
|
||||||
|
|
||||||
void initialize() final;
|
|
||||||
void extensionsInitialized() final;
|
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
|
||||||
private slots:
|
|
||||||
void testLogResolving();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Subversion
|
|
||||||
} // namespace Internal
|
|
||||||
|
Reference in New Issue
Block a user