windows build fixed

This commit is contained in:
Arin Alexander 2017-11-30 21:23:11 +03:00
parent 911eb1102a
commit ff55e10e9d
11 changed files with 37 additions and 11 deletions

View File

@ -12,6 +12,6 @@ LimeReport::ReportDesignWindowInterface* ReportDesignerFactoryPlugin::getDesigne
} }
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2( LimeReportPluginInterface, DesignerFactoryPlugin ) Q_EXPORT_PLUGIN2(LimeReportPluginInterface, ReportDesignerFactoryPlugin)
#endif #endif

View File

@ -6,7 +6,9 @@
class ReportDesignerFactoryPlugin : public QObject, public LimeReportPluginInterface { class ReportDesignerFactoryPlugin : public QObject, public LimeReportPluginInterface {
Q_OBJECT Q_OBJECT
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "ru.limereport.DersignerFactoryInterface") Q_PLUGIN_METADATA(IID "ru.limereport.DersignerFactoryInterface")
#endif
Q_INTERFACES( LimeReportPluginInterface ) Q_INTERFACES( LimeReportPluginInterface )
public: public:

View File

@ -0,0 +1,23 @@
#ifndef LRREPORTDESIGNWINDOWINTRERFACE_H
#define LRREPORTDESIGNWINDOWINTRERFACE_H
#include <QMainWindow>
#include <QSettings>
namespace LimeReport {
class ReportDesignWindowInterface: public QMainWindow{
public:
ReportDesignWindowInterface(QWidget* parent = 0): QMainWindow(parent){}
virtual bool checkNeedToSave() = 0;
virtual void showModal() = 0;
virtual void showNonModal() = 0;
virtual void setSettings(QSettings* value) = 0;
virtual QSettings* settings() = 0;
virtual void restoreSetting() = 0;
virtual void setShowProgressDialog(bool value) = 0;
};
} // namespace LimeReport
#endif // LRREPORTDESIGNWINDOWINTRERFACE_H

View File

@ -277,7 +277,7 @@ QSettings *DataBrowser::settings()
if (m_settings){ if (m_settings){
return m_settings; return m_settings;
} else { } else {
m_settings = new QSettings("LimeReport",QApplication::applicationName()); m_settings = new QSettings("LimeReport",QCoreApplication::applicationName());
m_ownedSettings = true; m_ownedSettings = true;
return m_settings; return m_settings;
} }

View File

@ -78,7 +78,7 @@ QSettings *SQLEditDialog::settings(){
if (m_settings){ if (m_settings){
return m_settings; return m_settings;
} else { } else {
m_settings = new QSettings("LimeReport",QApplication::applicationName()); m_settings = new QSettings("LimeReport",QCoreApplication::applicationName());
m_ownedSettings = true; m_ownedSettings = true;
return m_settings; return m_settings;
} }

View File

@ -483,7 +483,6 @@ TextItem::TextPtr TextItem::textDocument() const
QTextOption to; QTextOption to;
to.setAlignment(m_alignment); to.setAlignment(m_alignment);
to.setTextDirection(m_textLayoutDirection); to.setTextDirection(m_textLayoutDirection);
//to.setTextDirection(QApplication::layoutDirection());
if (m_autoWidth!=MaxStringLength) if (m_autoWidth!=MaxStringLength)
if (m_adaptFontToSize && (!(m_autoHeight || m_autoWidth))) if (m_adaptFontToSize && (!(m_autoHeight || m_autoWidth)))

View File

@ -76,7 +76,7 @@ QSettings*TextItemEditor::settings()
if (m_settings){ if (m_settings){
return m_settings; return m_settings;
} else { } else {
m_settings = new QSettings("LimeReport",QApplication::applicationName()); m_settings = new QSettings("LimeReport",QCoreApplication::applicationName());
m_ownedSettings = true; m_ownedSettings = true;
return m_settings; return m_settings;
} }

View File

@ -183,7 +183,7 @@ QSettings*PreviewReportWindow::settings()
if (m_settings){ if (m_settings){
return m_settings; return m_settings;
} else { } else {
m_settings = new QSettings("LimeReport",QApplication::applicationName()); m_settings = new QSettings("LimeReport",QCoreApplication::applicationName());
m_ownedSettings = true; m_ownedSettings = true;
return m_settings; return m_settings;
} }

View File

@ -92,11 +92,15 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
connect(m_datasources,SIGNAL(loadCollectionFinished(QString)),this,SLOT(slotDataSourceCollectionLoaded(QString))); connect(m_datasources,SIGNAL(loadCollectionFinished(QString)),this,SLOT(slotDataSourceCollectionLoaded(QString)));
connect(m_fileWatcher,SIGNAL(fileChanged(const QString &)),this,SLOT(slotLoadFromFile(const QString &))); connect(m_fileWatcher,SIGNAL(fileChanged(const QString &)),this,SLOT(slotLoadFromFile(const QString &)));
QDir pluginsDir( "./lib" ); QDir pluginsDir = QCoreApplication::applicationDirPath();
pluginsDir.cd("../lib" );
if (!pluginsDir.exists()){ if (!pluginsDir.exists()){
pluginsDir.setPath("../lib"); pluginsDir.cd("./lib");
if (!pluginsDir.exists()) pluginsDir.setPath(QCoreApplication::applicationDirPath());
} }
qDebug()<<pluginsDir.path();
foreach( const QString& pluginName, pluginsDir.entryList( QDir::Files ) ) { foreach( const QString& pluginName, pluginsDir.entryList( QDir::Files ) ) {
QPluginLoader loader( pluginsDir.absoluteFilePath( pluginName ) ); QPluginLoader loader( pluginsDir.absoluteFilePath( pluginName ) );
if( loader.load() ) { if( loader.load() ) {

View File

@ -29,7 +29,6 @@
****************************************************************************/ ****************************************************************************/
#include <stdexcept> #include <stdexcept>
#include <QMessageBox> #include <QMessageBox>
#include <QApplication>
#include "lrglobal.h" #include "lrglobal.h"
#include "lrreportrender.h" #include "lrreportrender.h"
@ -411,7 +410,7 @@ void ReportRender::replaceGroupsFunction(BandDesignIntf *band)
BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesignIntf* bandData, ReportRender::DataRenderMode mode, bool isLast) BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesignIntf* bandData, ReportRender::DataRenderMode mode, bool isLast)
{ {
QApplication::processEvents(); QCoreApplication::processEvents();
if (patternBand){ if (patternBand){
BandDesignIntf* bandClone = 0; BandDesignIntf* bandClone = 0;

View File

@ -35,7 +35,6 @@
#include <QIcon> #include <QIcon>
#include <QImage> #include <QImage>
#include <QPainter> #include <QPainter>
#include <QApplication>
#include <QStyle> #include <QStyle>
#include <QStylePainter> #include <QStylePainter>