Commit 3bbc0525 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Rename kritaundo2 library into kritacommand

Now it includes KisCommandUtils, so it is not just a fork of
QUndoStack.
parent 776f1cf2
......@@ -8,7 +8,7 @@ add_subdirectory( odf )
add_subdirectory( flake )
add_subdirectory( basicflakes )
add_subdirectory( pigment )
add_subdirectory( kundo2 )
add_subdirectory( command )
add_subdirectory( brush )
add_subdirectory( psd )
add_subdirectory( color )
......
set(kritaundo2_LIB_SRCS
set(kritacommand_LIB_SRCS
kundo2stack.cpp
kundo2group.cpp
kundo2view.cpp
......@@ -10,10 +10,10 @@ set(kritaundo2_LIB_SRCS
kis_command_utils.cpp
)
add_library(kritaundo2 SHARED ${kritaundo2_LIB_SRCS})
generate_export_header(kritaundo2 BASE_NAME kritaundo2)
add_library(kritacommand SHARED ${kritacommand_LIB_SRCS})
generate_export_header(kritacommand BASE_NAME kritacommand)
target_link_libraries(kritaundo2
target_link_libraries(kritacommand
PUBLIC
kritawidgetutils
KF5::I18n
......@@ -22,7 +22,7 @@ target_link_libraries(kritaundo2
Qt5::Widgets
)
set_target_properties(kritaundo2 PROPERTIES
set_target_properties(kritacommand PROPERTIES
VERSION ${GENERIC_KRITA_LIB_VERSION} SOVERSION ${GENERIC_KRITA_LIB_SOVERSION}
)
install(TARGETS kritaundo2 ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kritacommand ${INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -21,11 +21,11 @@
#include "kundo2command.h"
#include "kis_undo_stores.h"
#include "kritaundo2_export.h"
#include "kritacommand_export.h"
namespace KisCommandUtils
{
struct KRITAUNDO2_EXPORT AggregateCommand : public KUndo2Command {
struct KRITACOMMAND_EXPORT AggregateCommand : public KUndo2Command {
AggregateCommand();
void redo();
......@@ -40,7 +40,7 @@ namespace KisCommandUtils
KisSurrogateUndoStore m_store;
};
struct KRITAUNDO2_EXPORT SkipFirstRedoWrapper : public KUndo2Command {
struct KRITACOMMAND_EXPORT SkipFirstRedoWrapper : public KUndo2Command {
SkipFirstRedoWrapper(KUndo2Command *child = 0, KUndo2Command *parent = 0);
void redo();
void undo();
......@@ -50,7 +50,7 @@ namespace KisCommandUtils
QScopedPointer<KUndo2Command> m_child;
};
struct KRITAUNDO2_EXPORT FlipFlopCommand : public KUndo2Command {
struct KRITACOMMAND_EXPORT FlipFlopCommand : public KUndo2Command {
FlipFlopCommand(bool finalize, KUndo2Command *parent = 0);
void redo();
......@@ -67,7 +67,7 @@ namespace KisCommandUtils
bool m_firstRedo;
};
struct KRITAUNDO2_EXPORT CompositeCommand : public KUndo2Command {
struct KRITACOMMAND_EXPORT CompositeCommand : public KUndo2Command {
CompositeCommand(KUndo2Command *parent = 0);
~CompositeCommand();
......
......@@ -22,7 +22,7 @@
#include <QString>
#include <QVector>
#include <kritaundo2_export.h>
#include <kritacommand_export.h>
class KUndo2Command;
class KUndo2MagicString;
......@@ -54,7 +54,7 @@ class KUndo2MagicString;
* KisDocument::createUndoStore() is just a factory method, the document
* doesn't store the undo store itself.
*/
class KRITAUNDO2_EXPORT KisUndoStore
class KRITACOMMAND_EXPORT KisUndoStore
{
public:
KisUndoStore();
......
......@@ -30,7 +30,7 @@ class KUndo2MagicString;
* internal stack. Used for wrapping around legacy code into
* a single command.
*/
class KRITAUNDO2_EXPORT KisSurrogateUndoStore : public KisUndoStore
class KRITACOMMAND_EXPORT KisSurrogateUndoStore : public KisUndoStore
{
public:
KisSurrogateUndoStore();
......@@ -60,7 +60,7 @@ private:
* @brief The KisDumbUndoStore class doesn't actually save commands,
* so you cannot undo or redo!
*/
class KRITAUNDO2_EXPORT KisDumbUndoStore : public KisUndoStore
class KRITACOMMAND_EXPORT KisDumbUndoStore : public KisUndoStore
{
public:
const KUndo2Command* presentCommand();
......
......@@ -19,10 +19,10 @@
#ifndef __KUNDO2COMMANDEXTRADATA_H
#define __KUNDO2COMMANDEXTRADATA_H
#include "kritaundo2_export.h"
#include "kritacommand_export.h"
class KRITAUNDO2_EXPORT KUndo2CommandExtraData
class KRITACOMMAND_EXPORT KUndo2CommandExtraData
{
public:
virtual ~KUndo2CommandExtraData();
......
......@@ -45,7 +45,7 @@
#include <QObject>
#include <QString>
#include "kritaundo2_export.h"
#include "kritacommand_export.h"
class KUndo2GroupPrivate;
class KUndo2QStack;
......@@ -53,7 +53,7 @@ class QAction;
#ifndef QT_NO_UNDOGROUP
class KRITAUNDO2_EXPORT KUndo2Group : public QObject
class KRITACOMMAND_EXPORT KUndo2Group : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(KUndo2Group)
......
......@@ -26,7 +26,7 @@
#include <klocalizedstring.h>
#include "kritaundo2_export.h"
#include "kritacommand_export.h"
/**
* \class KUndo2MagicString is a special wrapper for a string that is
......@@ -48,7 +48,7 @@
* because in many languages you cannot combine words without
* knowing the proper case.
*/
class KRITAUNDO2_EXPORT KUndo2MagicString
class KRITACOMMAND_EXPORT KUndo2MagicString
{
public:
/**
......
......@@ -68,7 +68,7 @@
#include <QVector>
#include "kritaundo2_export.h"
#include "kritacommand_export.h"
class QAction;
class KUndo2CommandPrivate;
......@@ -94,7 +94,7 @@ class KActionCollection;
* from QObject only for the sake of signal/slots capabilities.
* Nothing else.
*/
class KRITAUNDO2_EXPORT KUndo2Command
class KRITACOMMAND_EXPORT KUndo2Command
{
KUndo2CommandPrivate *d;
int timedID;
......@@ -162,7 +162,7 @@ private:
#ifndef QT_NO_UNDOSTACK
class KRITAUNDO2_EXPORT KUndo2QStack : public QObject
class KRITACOMMAND_EXPORT KUndo2QStack : public QObject
{
Q_OBJECT
// Q_DECLARE_PRIVATE(KUndo2QStack)
......@@ -256,7 +256,7 @@ private:
friend class KUndo2Group;
};
class KRITAUNDO2_EXPORT KUndo2Stack : public KUndo2QStack
class KRITACOMMAND_EXPORT KUndo2Stack : public KUndo2QStack
{
public:
explicit KUndo2Stack(QObject *parent = 0);
......
......@@ -62,7 +62,7 @@
#include <QListView>
#include <QString>
#include "kritaundo2_export.h"
#include "kritacommand_export.h"
#ifndef QT_NO_UNDOVIEW
......@@ -71,7 +71,7 @@ class KUndo2QStack;
class KUndo2Group;
class QIcon;
class KRITAUNDO2_EXPORT KUndo2View : public QListView
class KRITACOMMAND_EXPORT KUndo2View : public QListView
{
Q_OBJECT
Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
......
......@@ -219,7 +219,7 @@ target_include_directories(kritaflake
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/svg>
)
target_link_libraries(kritaflake kritapigment kritawidgetutils kritaodf kritaundo2 KF5::WidgetsAddons Qt5::Svg)
target_link_libraries(kritaflake kritapigment kritawidgetutils kritaodf kritacommand KF5::WidgetsAddons Qt5::Svg)
set_target_properties(kritaflake PROPERTIES
VERSION ${GENERIC_KRITA_LIB_VERSION} SOVERSION ${GENERIC_KRITA_LIB_SOVERSION}
......
......@@ -333,7 +333,7 @@ target_link_libraries(kritaimage
kritawidgets
kritaglobal kritapsd
kritaodf kritapigment
kritaundo2
kritacommand
kritawidgetutils
Qt5::Concurrent
)
......
......@@ -135,7 +135,7 @@ ecm_add_test(kis_layer_style_filter_environment_test.cpp
ecm_add_test(kis_asl_parser_test.cpp
TEST_NAME kritalibpsd-asl_parser_test
LINK_LIBRARIES kritapsd kritapigment kritawidgetutils kritaundo2 Qt5::Xml Qt5::Test)
LINK_LIBRARIES kritapsd kritapigment kritawidgetutils kritacommand Qt5::Xml Qt5::Test)
# ecm_add_test(kis_dom_utils_test.cpp
# TEST_NAME krita-image-DomUtils-Test
......
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