Turn TextDocument Inspector into an own plugin and blacklist it for Krita

parent b2a7ff2b
......@@ -154,6 +154,7 @@ Collapsed=false
QuickShapes=ArtisticText,TextShapeID,DivineProportionShapeID,EllipseShape,RectangleShape
[calligra]
DockerPluginsDisabled=textdocumentinspection
FlakePluginsDisabled=formulashape,divineproportionshape,kexirelationdesignshape,vectorshape
ShapePluginsDisabled=musicshape,pictureshape,videoshape,chartshape,spreadsheetshape,pluginshape,treeshape,commentshape,stateshape,webshape
TextEditingPluginsDisabled=thesaurustool,changecase,autocorrect,spellcheck
......
......@@ -112,6 +112,7 @@ if(BUILD_TEXTDOCUMENT_INSPECTOR)
TextDocumentStructureModel.cpp
TextDocumentInspectionDocker.cpp
TextDocumentInspectionDockerFactory.cpp
TextDocumentInspectionPlugin.cpp
)
endif(BUILD_TEXTDOCUMENT_INSPECTOR)
......@@ -164,3 +165,10 @@ install(TARGETS textshape DESTINATION ${PLUGIN_INSTALL_DIR})
install( FILES textshape.desktop DESTINATION ${SERVICES_INSTALL_DIR})
#kde4_install_icons( ${DATA_INSTALL_DIR}/calligra/icons )
if(BUILD_TEXTDOCUMENT_INSPECTOR)
# workaround: to avoid translations the real desktop file is only generated
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/textdocumentinspection.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/textdocumentinspection.desktop)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/textdocumentinspection.desktop DESTINATION ${SERVICES_INSTALL_DIR})
endif(BUILD_TEXTDOCUMENT_INSPECTOR)
/* This file is part of the KDE project
* Copyright (C) 2013 Friedrich W. H. Kossebau <kossebau@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "TextDocumentInspectionPlugin.h"
#include "TextDocumentInspectionDockerFactory.h"
#include <KoDockRegistry.h>
TextDocumentInspectionPlugin::TextDocumentInspectionPlugin(QObject *parent, const QVariantList &)
: QObject(parent)
{
KoDockRegistry::instance()->add(new TextDocumentInspectionDockerFactory());
}
/* This file is part of the KDE project
* Copyright (C) 2013 Friedrich W. H. Kossebau <kossebau@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef TEXTDOCUMENTINSPECTIONPLUGIN_H
#define TEXTDOCUMENTINSPECTIONPLUGIN_H
#include <QVariantList>
#include <QObject>
class TextDocumentInspectionPlugin : public QObject
{
Q_OBJECT
public:
TextDocumentInspectionPlugin(QObject *parent, const QVariantList &);
~TextDocumentInspectionPlugin() {}
};
#endif
......@@ -21,7 +21,7 @@
#include "ReferencesToolFactory.h"
#include "ReviewToolFactory.h"
#ifdef CREATE_TEXTDOCUMENT_INSPECTOR
#include "TextDocumentInspectionDockerFactory.h"
#include "TextDocumentInspectionPlugin.h"
#endif
#include "TextShapeFactory.h"
......@@ -31,7 +31,12 @@
#include <kpluginfactory.h>
K_PLUGIN_FACTORY(TextPluginFactory, registerPlugin<TextPlugin>();)
K_PLUGIN_FACTORY(TextPluginFactory,
registerPlugin<TextPlugin>();
#ifdef CREATE_TEXTDOCUMENT_INSPECTOR
registerPlugin<TextDocumentInspectionPlugin>(QLatin1String("TextDocumentInspection"));
#endif
)
K_EXPORT_PLUGIN(TextPluginFactory("TextShape"))
TextPlugin::TextPlugin(QObject * parent, const QVariantList &)
......@@ -40,9 +45,6 @@ TextPlugin::TextPlugin(QObject * parent, const QVariantList &)
KoToolRegistry::instance()->add(new TextToolFactory());
KoToolRegistry::instance()->add(new ReviewToolFactory());
KoToolRegistry::instance()->add(new ReferencesToolFactory());
#ifdef CREATE_TEXTDOCUMENT_INSPECTOR
KoDockRegistry::instance()->add(new TextDocumentInspectionDockerFactory());
#endif
KoShapeRegistry::instance()->add(new TextShapeFactory());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment