mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 12:12:59 +03:00
Redundant item creator registration has been fixed
This commit is contained in:
parent
caf9f3867d
commit
8a09d5adcd
@ -3,7 +3,7 @@ project(limereport)
|
||||
|
||||
set(LIMEREPORT_VERSION_MAJOR 1)
|
||||
set(LIMEREPORT_VERSION_MINOR 7)
|
||||
set(LIMEREPORT_VERSION_RELEASE 5)
|
||||
set(LIMEREPORT_VERSION_RELEASE 7)
|
||||
|
||||
option(ENABLE_ZINT "Enable libzint build for barcode support" OFF)
|
||||
option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF)
|
||||
@ -393,7 +393,6 @@ endif(ENABLE_ZINT)
|
||||
|
||||
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DHAVE_QT${QT_VERSION_MAJOR} -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -D_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
|
||||
target_include_directories( ${PROJECT_NAME} PRIVATE
|
||||
limereport/
|
||||
limereport/base
|
||||
|
@ -141,7 +141,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
||||
|
||||
LIMEREPORT_VERSION_MAJOR = 1
|
||||
LIMEREPORT_VERSION_MINOR = 7
|
||||
LIMEREPORT_VERSION_RELEASE = 5
|
||||
LIMEREPORT_VERSION_RELEASE = 7
|
||||
|
||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||
|
@ -54,6 +54,7 @@ private:
|
||||
friend class Singleton< AttribsAbstractFactory< AbstractProduct,IdentifierType,ProductCreator,Attribs > >;
|
||||
public:
|
||||
bool registerCreator(const IdentifierType& id, Attribs attribs, ProductCreator creator){
|
||||
if (m_factoryMap.contains(id)) return true;
|
||||
return (m_factoryMap.insert(id,creator).value() == creator) &&
|
||||
(m_attribsMap.insert(id,attribs).value() == attribs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user