mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +03:00
Loading designer plugin strategy has been changed
This commit is contained in:
parent
e1d7d7b8ef
commit
5c7b40c0a0
11
common.pri
11
common.pri
@ -1,15 +1,7 @@
|
||||
#BINARY_RESULT_DIR = $${TOP_BUILD_DIR}
|
||||
|
||||
isEmpty(BINARY_RESULT_DIR) {
|
||||
BINARY_RESULT_DIR = $${PWD}
|
||||
}
|
||||
|
||||
message(TOP_BUILD_DIR: $$TOP_BUILD_DIR)
|
||||
|
||||
#!contains(CONFIG, config_build_dir){
|
||||
# TOP_BUILD_DIR = $${PWD}
|
||||
#}
|
||||
|
||||
!contains(CONFIG, no_build_translations){
|
||||
CONFIG += build_translations
|
||||
}
|
||||
@ -64,6 +56,7 @@ contains(CONFIG, qtscriptengine){
|
||||
!contains(CONFIG, no_embedded_designer){
|
||||
CONFIG *= embedded_designer
|
||||
DEFINES += HAVE_REPORT_DESIGNER
|
||||
message(embedded designer)
|
||||
}
|
||||
|
||||
ZINT_PATH = $$PWD/3rdparty/zint-2.6.1
|
||||
@ -133,7 +126,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
||||
|
||||
LIMEREPORT_VERSION_MAJOR = 1
|
||||
LIMEREPORT_VERSION_MINOR = 5
|
||||
LIMEREPORT_VERSION_RELEASE = 84
|
||||
LIMEREPORT_VERSION_RELEASE = 85
|
||||
|
||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||
|
@ -2,6 +2,7 @@ include(../common.pri)
|
||||
|
||||
contains(CONFIG, embedded_designer){
|
||||
include(designer.pri)
|
||||
message(embedded designer)
|
||||
}
|
||||
|
||||
DEFINES += INSPECT_BASEDESIGN
|
||||
|
@ -110,25 +110,28 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
||||
connect(m_datasources,SIGNAL(loadCollectionFinished(QString)),this,SLOT(slotDataSourceCollectionLoaded(QString)));
|
||||
connect(m_fileWatcher,SIGNAL(fileChanged(const QString &)),this,SLOT(slotLoadFromFile(const QString &)));
|
||||
|
||||
#ifndef HAVE_REPORT_DESIGNER
|
||||
|
||||
QDir pluginsDir = QCoreApplication::applicationDirPath();
|
||||
pluginsDir.cd("../lib" );
|
||||
if (!pluginsDir.exists()){
|
||||
if (!pluginsDir.cd("../lib" )){
|
||||
pluginsDir.cd("./lib");
|
||||
if (!pluginsDir.exists()) pluginsDir.setPath(QCoreApplication::applicationDirPath());
|
||||
}
|
||||
|
||||
foreach( const QString& pluginName, pluginsDir.entryList( QDir::Files ) ) {
|
||||
QPluginLoader loader( pluginsDir.absoluteFilePath( pluginName ) );
|
||||
if( loader.load() ) {
|
||||
#ifndef HAVE_REPORT_DESIGNER
|
||||
if( LimeReportDesignerPluginInterface* designerPlugin = qobject_cast< LimeReportDesignerPluginInterface* >( loader.instance() ) ) {
|
||||
m_designerFactory = designerPlugin;
|
||||
break;
|
||||
if (pluginsDir != QCoreApplication::applicationDirPath()){
|
||||
foreach( const QString& pluginName, pluginsDir.entryList( QDir::Files ) ) {
|
||||
QPluginLoader loader( pluginsDir.absoluteFilePath( pluginName ) );
|
||||
if( loader.load() ) {
|
||||
|
||||
if( LimeReportDesignerPluginInterface* designerPlugin = qobject_cast< LimeReportDesignerPluginInterface* >( loader.instance() ) ) {
|
||||
m_designerFactory = designerPlugin;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
ReportEnginePrivate::~ReportEnginePrivate()
|
||||
|
Loading…
Reference in New Issue
Block a user