diff --git a/common.pri b/common.pri index d12df1b..05621cc 100644 --- a/common.pri +++ b/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}\\\" diff --git a/limereport/limereport.pri b/limereport/limereport.pri index 4b219e9..83879ba 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -2,6 +2,7 @@ include(../common.pri) contains(CONFIG, embedded_designer){ include(designer.pri) + message(embedded designer) } DEFINES += INSPECT_BASEDESIGN diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 5042f8c..70fda8e 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -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 &))); - QDir pluginsDir = QCoreApplication::applicationDirPath(); - pluginsDir.cd("../lib" ); - if (!pluginsDir.exists()){ - 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; - } -#endif - } + + QDir pluginsDir = QCoreApplication::applicationDirPath(); + if (!pluginsDir.cd("../lib" )){ + pluginsDir.cd("./lib"); } + 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 } ReportEnginePrivate::~ReportEnginePrivate()