Commit 1adea061 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Removed layerstyles plugin

Now layer styles are split into three parts:

1) rendering -> kritaimage
2) basic xml parsing and loading -> libkispsd
3) loading a Krita resource -> kritaui
parent 1b4941a1
......@@ -88,6 +88,7 @@ set(KRITA_INCLUDES
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/image
${CMAKE_SOURCE_DIR}/krita/libglobal
${CMAKE_SOURCE_DIR}/krita/libpsd
${CMAKE_SOURCE_DIR}/krita/image
${CMAKE_SOURCE_DIR}/krita/image/brushengine
......@@ -127,6 +128,7 @@ if(HAVE_OPENGL)
endif()
endif()
add_subdirectory( libglobal )
add_subdirectory( libpsd )
add_subdirectory( image )
add_subdirectory( libbrush )
......
......@@ -58,7 +58,6 @@ endif()
set(kritaimage_LIB_SRCS
${libkritatile_SRCS}
kis_debug.cpp
kis_assert.cpp
kis_distance_information.cpp
kis_painter.cc
kis_progress_updater.cpp
......@@ -272,7 +271,6 @@ set(kritaimage_LIB_SRCS
recorder/kis_recorded_shape_paint_action.cpp
kis_psd_layer_style.cpp
kis_layer_style_serializer.cpp
layerstyles/kis_layer_style_filter.cpp
layerstyles/kis_layer_style_filter_environment.cpp
......@@ -298,8 +296,8 @@ set(einspline_SRCS
kde4_add_library(kritaimage SHARED ${kritaimage_LIB_SRCS} ${einspline_SRCS})
target_link_libraries(kritaimage ${KDE4_KDEUI_LIBS} libkispsd koodf pigmentcms kundo2 kowidgetutils)
target_link_libraries(kritaimage LINK_INTERFACE_LIBRARIES libkispsd koodf pigmentcms kundo2 kowidgetutils)
target_link_libraries(kritaimage ${KDE4_KDEUI_LIBS} libglobal libkispsd koodf pigmentcms kundo2 kowidgetutils)
target_link_libraries(kritaimage LINK_INTERFACE_LIBRARIES libglobal libkispsd koodf pigmentcms kundo2 kowidgetutils)
target_link_libraries(kritaimage ${Boost_SYSTEM_LIBRARY})
message("DEBUG_BOOST_LIBRARIES = " ${Boost_LIBRARIES})
......
/*
* Copyright (c) 2015 Dmitry Kazakov <dimula73@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __KIS_EXTERNAL_FACTORY_BASE_H
#define __KIS_EXTERNAL_FACTORY_BASE_H
#include <kglobal.h>
#include "kis_debug.h"
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <QScopedPointer>
#include "krita_export.h"
template <class FactoryObject, typename FactoryParam, class FactoryClass>
class KRITAIMAGE_EXPORT KisExternalFactoryBase
{
public:
typedef boost::function<FactoryObject (FactoryParam)> Factory;
public:
void setFactory(Factory factory) {
KIS_ASSERT_RECOVER_NOOP(!m_factory);
m_factory = factory;
}
FactoryObject create(FactoryParam param) const {
KIS_ASSERT_RECOVER(m_factory) {
return FactoryObject();
}
return m_factory(param);
}
protected:
static FactoryClass* instanceImpl() {
K_GLOBAL_STATIC(FactoryClass , s_instance);
return s_instance;
}
private:
Factory m_factory;
};
#endif /* __KIS_EXTERNAL_FACTORY_BASE_H */
/*
* Copyright (c) 2015 Dmitry Kazakov <dimula73@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_layer_style_serializer.h"
KisLayerStyleSerializerFactory* KisLayerStyleSerializerFactory::instance() {
return instanceImpl();
}
/*
* Copyright (c) 2015 Dmitry Kazakov <dimula73@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __KIS_LAYER_STYLE_SERIALIZER_H
#define __KIS_LAYER_STYLE_SERIALIZER_H
class QIODevice;
#include "krita_export.h"
#include "kis_external_factory_base.h"
struct KRITAIMAGE_EXPORT KisLayerStyleSerializer {
virtual ~KisLayerStyleSerializer() {}
virtual void saveToDevice(QIODevice *device) = 0;
virtual void readFromDevice(QIODevice *device) = 0;
};
typedef QSharedPointer<KisLayerStyleSerializer> KisLayerStyleSerializerSP;
class KRITAIMAGE_EXPORT KisLayerStyleSerializerFactory
: public KisExternalFactoryBase<KisLayerStyleSerializerSP, KisPSDLayerStyle*,
KisLayerStyleSerializerFactory>
{
public:
static KisLayerStyleSerializerFactory* instance();
};
#endif /* __KIS_LAYER_STYLE_SERIALIZER_H */
......@@ -278,24 +278,3 @@ psd_layer_effects_bevel_emboss* KisPSDLayerStyle::bevelAndEmboss()
{
return &d->bevel_emboss;
}
bool KisPSDLayerStyle::writeASL(QIODevice *io, StylesVector )
{
Q_UNUSED(io);
return false;
}
KisPSDLayerStyle::StylesVector KisPSDLayerStyle::readASL(QIODevice *io)
{
return StylesVector();
}
bool KisPSDLayerStyle::write(QIODevice *io) const
{
return false;
}
bool KisPSDLayerStyle::read(QIODevice *io)
{
return false;
}
......@@ -86,24 +86,6 @@ public:
psd_layer_effects_stroke* stroke();
psd_layer_effects_bevel_emboss* bevelAndEmboss();
/**
* Save given styles to the ASL style format. All patterns references in the
* contained styles will also be saved.
*/
static bool writeASL(QIODevice *io, StylesVector styles);
/**
* Load all style objects in the ASL style format. All patterns contained in the
* asl file will be added to the global pattern server.
*/
static StylesVector readASL(QIODevice *io);
/// Save this style object
bool write(QIODevice *io) const;
/// Load this style object
bool read(QIODevice *io);
private:
struct Private;
Private * const d;
......
......@@ -624,10 +624,10 @@ target_link_libraries(KisDomUtilsTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST
set(kis_layer_styles_test_SRCS kis_layer_styles_test.cpp )
kde4_add_unit_test(KisLayerStylesTest TESTNAME krita-plugins-kis_layer_styles_test ${kis_layer_styles_test_SRCS})
target_link_libraries(KisLayerStylesTest ${KDE4_KDEUI_LIBS} kritaimage kritalayerstylesfilter ${QT_QTTEST_LIBRARY})
target_link_libraries(KisLayerStylesTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
########### next target ###############
set(kis_layer_style_projection_plane_test_SRCS kis_layer_style_projection_plane_test.cpp )
kde4_add_unit_test(KisLayerStyleProjectionPlaneTest TESTNAME krita-plugins-layer_style_projection_plane_test ${kis_layer_style_projection_plane_test_SRCS})
target_link_libraries(KisLayerStyleProjectionPlaneTest ${KDE4_KDEUI_LIBS} kritaimage kritalayerstylesfilter ${QT_QTTEST_LIBRARY})
kde4_add_unit_test(KisLayerStyleProjectionPlaneTest TESTNAME kritaimage-layer_style_projection_plane_test ${kis_layer_style_projection_plane_test_SRCS})
target_link_libraries(KisLayerStyleProjectionPlaneTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
......@@ -28,7 +28,7 @@
void KisPSDLayerStyleTest::testRoundTrip()
{
KisPSDLayerStyle layerStyle;
/* KisPSDLayerStyle layerStyle;
QFile f(FILES_DATA_DIR + QDir::separator() + "teststyles.asl");
bool res = f.open(QIODevice::ReadOnly);
Q_ASSERT(res);
......@@ -42,7 +42,7 @@ void KisPSDLayerStyleTest::testRoundTrip()
QByteArray ba2;
QBuffer out(&ba2);
res = layerStyle.writeASL(&out, styles);
Q_ASSERT(res);
Q_ASSERT(res);*/
}
QTEST_KDEMAIN(KisPSDLayerStyleTest, GUI)
set(libglobal_LIB_SRCS
kis_assert.cpp
)
kde4_add_library(libglobal SHARED ${libglobal_LIB_SRCS} )
target_link_libraries(libglobal ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBS})
target_link_libraries(libglobal LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
set_target_properties(libglobal PROPERTIES
VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION}
)
install(TARGETS libglobal ${INSTALL_TARGETS_DEFAULT_ARGS})
add_subdirectory( tests )
set(libkispsd_LIB_SRCS
psd_utils.cpp
psd.cpp
compression.cpp
psd_pattern.cpp
asl/kis_asl_reader.cpp
asl/kis_asl_xml_parser.cpp
asl/kis_asl_object_catcher.cpp
asl/kis_asl_callback_object_catcher.cpp
asl/kis_asl_xml_writer.cpp
asl/kis_asl_writer_utils.cpp
asl/kis_asl_patterns_writer.cpp
asl/kis_asl_writer.cpp
)
kde4_add_library(libkispsd SHARED ${libkispsd_LIB_SRCS} )
if (WIN32)
target_link_libraries(libkispsd pigmentcms ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${WIN32_PLATFORM_NET_LIBS})
target_link_libraries(libkispsd pigmentcms libglobal ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${WIN32_PLATFORM_NET_LIBS})
else (WIN32)
target_link_libraries(libkispsd pigmentcms ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
target_link_libraries(libkispsd pigmentcms libglobal ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
endif (WIN32)
target_link_libraries(libkispsd LINK_INTERFACE_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
......
......@@ -24,6 +24,8 @@
#include <boost/function.hpp>
#include <QScopedPointer>
#include "libkispsd_export.h"
class KoPattern;
typedef boost::function<void (double)> ASLCallbackDouble;
......@@ -39,7 +41,7 @@ typedef boost::function<void (const KoAbstractGradient *)> ASLCallbackGradient;
typedef boost::function<void ()> ASLCallbackNewStyle;
class KRITAIMAGE_EXPORT KisAslCallbackObjectCatcher : public KisAslObjectCatcher
class LIBKISPSD_EXPORT KisAslCallbackObjectCatcher : public KisAslObjectCatcher
{
public:
KisAslCallbackObjectCatcher();
......
......@@ -20,7 +20,7 @@
#define __KIS_ASL_OBJECT_CATCHER_H
#include <QVector>
#include "krita_export.h"
#include "libkispsd_export.h"
class QString;
class QColor;
......@@ -29,7 +29,7 @@ class KoPattern;
class KoAbstractGradient;
class KRITAIMAGE_EXPORT KisAslObjectCatcher
class LIBKISPSD_EXPORT KisAslObjectCatcher
{
public:
KisAslObjectCatcher();
......
......@@ -19,13 +19,13 @@
#ifndef __KIS_ASL_READER_H
#define __KIS_ASL_READER_H
#include "krita_export.h"
#include "libkispsd_export.h"
class QDomDocument;
class QIODevice;
class KRITAIMAGE_EXPORT KisAslReader
class LIBKISPSD_EXPORT KisAslReader
{
public:
QDomDocument readFile(QIODevice *device);
......
......@@ -19,13 +19,13 @@
#ifndef __KIS_ASL_WRITER_H
#define __KIS_ASL_WRITER_H
#include "krita_export.h"
#include "libkispsd_export.h"
class QDomDocument;
class QIODevice;
class KRITAIMAGE_EXPORT KisAslWriter
class LIBKISPSD_EXPORT KisAslWriter
{
public:
void writeFile(QIODevice *device, const QDomDocument &doc);
......
......@@ -26,6 +26,7 @@
#include "psd_utils.h"
#include "kis_debug.h"
#include "libkispsd_export.h"
namespace KisAslWriterUtils {
......@@ -49,13 +50,14 @@ struct ASLWriteException : public std::runtime_error
throw KisAslWriterUtils::ASLWriteException(msg); \
}
namespace KisAslWriterUtils {
void writeUnicodeString(const QString &value, QIODevice *device);
void writeVarString(const QString &value, QIODevice *device);
void writePascalString(const QString &value, QIODevice *device);
void writeFixedString(const QString &value, QIODevice *device);
QString getPatternUuidLazy(const KoPattern *pattern);
LIBKISPSD_EXPORT void writeUnicodeString(const QString &value, QIODevice *device);
LIBKISPSD_EXPORT void writeVarString(const QString &value, QIODevice *device);
LIBKISPSD_EXPORT void writePascalString(const QString &value, QIODevice *device);
LIBKISPSD_EXPORT void writeFixedString(const QString &value, QIODevice *device);
LIBKISPSD_EXPORT QString getPatternUuidLazy(const KoPattern *pattern);
/**
* Align the pointer \p pos by alignment. Grow the pointer
......
......@@ -19,14 +19,14 @@
#ifndef __KIS_ASL_XML_PARSER_H
#define __KIS_ASL_XML_PARSER_H
#include "krita_export.h"
#include "libkispsd_export.h"
class QDomDocument;
class QIODevice;
class KisAslObjectCatcher;
class KRITAIMAGE_EXPORT KisAslXmlParser
class LIBKISPSD_EXPORT KisAslXmlParser
{
public:
void parseXML(const QDomDocument &doc, KisAslObjectCatcher &catcher);
......
......@@ -22,7 +22,7 @@
#include <QScopedPointer>
#include <QVector>
#include "krita_export.h"
#include "libkispsd_export.h"
class QString;
class QColor;
......@@ -32,7 +32,7 @@ class KoPattern;
class KoSegmentGradient;
class KRITAIMAGE_EXPORT KisAslXmlWriter
class LIBKISPSD_EXPORT KisAslXmlWriter
{
public:
KisAslXmlWriter();
......
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KOMAIN_INCLUDES} ${CMAKE_SOURCE_DIR}/krita/sdk/tests )
macro_add_unittest_definitions()
########### next target ###############
set(kis_asl_parser_test_SRCS kis_asl_parser_test.cpp )
kde4_add_unit_test(KisAslParserTest TESTNAME kritalibpsd-asl_parser_test ${kis_asl_parser_test_SRCS})
target_link_libraries(KisAslParserTest libkispsd pigmentcms ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY})
......@@ -28,15 +28,15 @@
#include "KoPattern.h"
#include "../kis_asl_reader.h"
#include "../kis_asl_xml_parser.h"
#include "../kis_asl_object_catcher.h"
#include "../kis_asl_callback_object_catcher.h"
#include <asl/kis_asl_reader.h>
#include <asl/kis_asl_xml_parser.h>
#include <asl/kis_asl_object_catcher.h>
#include <asl/kis_asl_callback_object_catcher.h>
void KisAslParserTest::test()
{
QString fileName(TestUtil::fetchDataFileLazy("freebie.asl"));
QString fileName(TestUtil::fetchDataFileLazy("asl/freebie.asl"));
QFile aslFile(fileName);
aslFile.open(QIODevice::ReadOnly);
......@@ -98,7 +98,7 @@ struct CallbackVerifier {
void KisAslParserTest::testWithCallbacks()
{
QString fileName(TestUtil::fetchDataFileLazy("freebie.asl"));
QString fileName(TestUtil::fetchDataFileLazy("asl/freebie.asl"));
QFile aslFile(fileName);
aslFile.open(QIODevice::ReadOnly);
......@@ -123,7 +123,7 @@ void KisAslParserTest::testWithCallbacks()
QCOMPARE(verifier.m_numCallsHappened, 6);
}
#include "../kis_asl_xml_writer.h"
#include <asl/kis_asl_xml_writer.h>
void KisAslParserTest::testASLXMLWriter()
{
......@@ -186,12 +186,12 @@ void KisAslParserTest::testASLXMLWriter()
}
#include "../kis_asl_writer.h"
#include <asl/kis_asl_writer.h>
void KisAslParserTest::testASLWriter()
{
//QString srcFileName(TestUtil::fetchDataFileLazy("testset/freebie_with_pattern.asl"));
QString srcFileName(TestUtil::fetchDataFileLazy("freebie.asl"));
//QString srcFileName(TestUtil::fetchDataFileLazy("asl/testset/freebie_with_pattern.asl"));
QString srcFileName(TestUtil::fetchDataFileLazy("asl/freebie.asl"));
QDomDocument srcDoc;
......
......@@ -22,4 +22,3 @@ add_subdirectory( dodgeburn )
add_subdirectory( phongbumpmap )
add_subdirectory( posterize )
add_subdirectory( indexcolors )
add_subdirectory( layerstyles )
add_subdirectory( tests )
set(kritalayerstylesfilter_PART_SRCS
layerstyles.cpp
kis_asl_reader.cpp
kis_asl_xml_parser.cpp
kis_asl_object_catcher.cpp
kis_asl_callback_object_catcher.cpp
kis_asl_xml_writer.cpp
kis_asl_writer_utils.cpp
kis_asl_patterns_writer.cpp
kis_asl_writer.cpp
kis_asl_layer_style_serializer.cpp
)
kde4_add_plugin(kritalayerstylesfilter ${kritalayerstylesfilter_PART_SRCS})
target_link_libraries(kritalayerstylesfilter kritaui libkispsd)
install(TARGETS kritalayerstylesfilter DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install( FILES kritalayerstylesfilter.desktop DESTINATION ${SERVICES_INSTALL_DIR}/calligra)
[Desktop Entry]
Icon=
Name=Layer Styles Filter (Extension)
X-KDE-ServiceTypes=Krita/Filter
Type=Service
X-KDE-Library=kritalayerstylesfilter
X-Krita-Version=28
/*
* Copyright (c) 2014 Dmitry Kazakov <dimula73@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "layerstyles.h"
#include <kpluginfactory.h>
#include "kis_layer_style_serializer.h"
#include "kis_asl_layer_style_serializer.h"
K_PLUGIN_FACTORY(LayerStylesPluginFactory, registerPlugin<LayerStylesPlugin>();)
K_EXPORT_PLUGIN(LayerStylesPluginFactory("krita"))
LayerStylesPlugin::LayerStylesPlugin(QObject *parent, const QVariantList &)
: QObject(parent)
{
{
KisLayerStyleSerializerFactory::Factory f(KisAslLayerStyleSerializer::factoryObject);
KisLayerStyleSerializerFactory::instance()->setFactory(f);
}
}
LayerStylesPlugin::~LayerStylesPlugin()
{
}
/*
* Copyright (c) 2014 Dmitry Kazakov <dimula73@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _LAYERSTYLES_PLUGIN_H_
#define _LAYERSTYLES_PLUGIN_H_
#include <QObject>
#include <QVariant>
class LayerStylesPlugin : public QObject
{
Q_OBJECT
public:
LayerStylesPlugin(QObject *parent, const QVariantList &);
virtual ~LayerStylesPlugin();
};
#endif
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KOMAIN_INCLUDES} ${CMAKE_SOURCE_DIR}/krita/sdk/tests )
macro_add_unittest_definitions()
########### next target ###############
set(kis_asl_parser_test_SRCS kis_asl_parser_test.cpp )
kde4_add_unit_test(KisAslParserTest TESTNAME krita-plugins-asl_parser_test ${kis_asl_parser_test_SRCS})
target_link_libraries(KisAslParserTest ${KDE4_KDEUI_LIBS} kritaimage kritalayerstylesfilter ${QT_QTTEST_LIBRARY})
########### next target ###############
set(kis_asl_layer_style_serializer_test_SRCS kis_asl_layer_style_serializer_test.cpp )
kde4_add_unit_test(KisAslLayerStyleSerializerTest TESTNAME krita-plugins-asl_layer_style_serializer_test ${kis_asl_layer_style_serializer_test_SRCS})
target_link_libraries(KisAslLayerStyleSerializerTest ${KDE4_KDEUI_LIBS} kritaimage kritalayerstylesfilter kowidgets ${QT_QTTEST_LIBRARY})
......@@ -273,6 +273,7 @@ set(kritaui_LIB_SRCS
input/config/kis_wheel_input_editor.cpp
input/config/kis_key_input_editor.cpp
processing/fill_processing_visitor.cpp
kis_asl_layer_style_serializer.cpp
kis_psd_layer_style_resource.cpp
canvas/kis_mirror_axis.cpp
......
......@@ -41,7 +41,7 @@
#include "kis_canvas_resource_provider.h"
#include <KoFileDialog.h>
#include "kis_layer_style_serializer.h"
KoAbstractGradient* fetchGradientLazy(KoAbstractGradient *gradient,
......@@ -176,16 +176,16 @@ void KisDlgLayerStyle::slotLoadStyle()
if (file.exists()) {
file.open(QIODevice::ReadOnly);
KisLayerStyleSerializerSP serializer;
// KisLayerStyleSerializerSP serializer;
serializer = KisLayerStyleSerializerFactory::instance()->create(m_layerStyle.data());
KIS_ASSERT_RECOVER_RETURN(serializer);
// serializer = KisLayerStyleSerializerFactory::instance()->create(m_layerStyle.data());
// KIS_ASSERT_RECOVER_RETURN(serializer);
serializer->readFromDevice(&file);
// serializer->readFromDevice(&file);