forked from qt-creator/qt-creator
Todo: Move TodoPlugin class definition to .cpp
Change-Id: I5b82b14bf86655f0dab9379effb4ff156900b610 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -18,7 +18,7 @@ add_qtc_plugin(Todo
|
||||
todooutputpane.cpp todooutputpane.h
|
||||
todooutputtreeview.cpp todooutputtreeview.h
|
||||
todooutputtreeviewdelegate.cpp todooutputtreeviewdelegate.h
|
||||
todoplugin.cpp todoplugin.h
|
||||
todoplugin.cpp
|
||||
todoplugin.qrc
|
||||
todoprojectsettingswidget.cpp todoprojectsettingswidget.h
|
||||
todotr.h
|
||||
|
||||
@@ -46,7 +46,6 @@ QtcPlugin {
|
||||
"todooutputtreeviewdelegate.cpp",
|
||||
"todooutputtreeviewdelegate.h",
|
||||
"todoplugin.cpp",
|
||||
"todoplugin.h",
|
||||
"todoplugin.qrc",
|
||||
"todotr.h",
|
||||
]
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// Copyright (C) 2016 Vasiliy Sorokin
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "todoplugin.h"
|
||||
|
||||
#include "optionsdialog.h"
|
||||
#include "todooutputpane.h"
|
||||
#include "todoitemsprovider.h"
|
||||
@@ -14,11 +12,11 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <projectexplorer/projectpanelfactory.h>
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
#include <utils/link.h>
|
||||
|
||||
namespace Todo {
|
||||
namespace Internal {
|
||||
namespace Todo::Internal {
|
||||
|
||||
class TodoPluginPrivate : public QObject
|
||||
{
|
||||
@@ -87,20 +85,31 @@ void TodoPluginPrivate::createTodoOutputPane()
|
||||
this, &TodoPluginPrivate::todoItemClicked);
|
||||
}
|
||||
|
||||
TodoPlugin::TodoPlugin()
|
||||
class TodoPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Todo.json")
|
||||
|
||||
public:
|
||||
TodoPlugin()
|
||||
{
|
||||
qRegisterMetaType<TodoItem>("TodoItem");
|
||||
}
|
||||
}
|
||||
|
||||
TodoPlugin::~TodoPlugin()
|
||||
{
|
||||
~TodoPlugin() final
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
}
|
||||
|
||||
void TodoPlugin::initialize()
|
||||
{
|
||||
void initialize() final
|
||||
{
|
||||
d = new TodoPluginPrivate;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Todo
|
||||
private:
|
||||
TodoPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // Todo::Internal
|
||||
|
||||
#include "todoplugin.moc"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
// Copyright (C) 2016 Dmitry Savchenko
|
||||
// Copyright (C) 2016 Vasiliy Sorokin
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace Todo {
|
||||
namespace Internal {
|
||||
|
||||
class TodoPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Todo.json")
|
||||
|
||||
public:
|
||||
TodoPlugin();
|
||||
~TodoPlugin() final;
|
||||
|
||||
void initialize() final;
|
||||
|
||||
private:
|
||||
class TodoPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Todo
|
||||
Reference in New Issue
Block a user