diff --git a/designer_plugin/lrdesignerplugin.cpp b/designer_plugin/lrdesignerplugin.cpp index e832213..96b6f4a 100644 --- a/designer_plugin/lrdesignerplugin.cpp +++ b/designer_plugin/lrdesignerplugin.cpp @@ -12,6 +12,6 @@ LimeReport::ReportDesignWindowInterface* ReportDesignerFactoryPlugin::getDesigne } #if QT_VERSION < 0x050000 -Q_EXPORT_PLUGIN2( LimeReportPluginInterface, DesignerFactoryPlugin ) +Q_EXPORT_PLUGIN2(LimeReportPluginInterface, ReportDesignerFactoryPlugin) #endif diff --git a/designer_plugin/lrdesignerplugin.h b/designer_plugin/lrdesignerplugin.h index 0a7b8f3..7f17491 100644 --- a/designer_plugin/lrdesignerplugin.h +++ b/designer_plugin/lrdesignerplugin.h @@ -6,7 +6,9 @@ class ReportDesignerFactoryPlugin : public QObject, public LimeReportPluginInterface { Q_OBJECT +#if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID "ru.limereport.DersignerFactoryInterface") +#endif Q_INTERFACES( LimeReportPluginInterface ) public: diff --git a/include/lrreportdesignwindowintrerface.h b/include/lrreportdesignwindowintrerface.h new file mode 100644 index 0000000..858881e --- /dev/null +++ b/include/lrreportdesignwindowintrerface.h @@ -0,0 +1,23 @@ +#ifndef LRREPORTDESIGNWINDOWINTRERFACE_H +#define LRREPORTDESIGNWINDOWINTRERFACE_H + +#include +#include + +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 diff --git a/limereport/databrowser/lrdatabrowser.cpp b/limereport/databrowser/lrdatabrowser.cpp index 4452df1..3dcd795 100644 --- a/limereport/databrowser/lrdatabrowser.cpp +++ b/limereport/databrowser/lrdatabrowser.cpp @@ -277,7 +277,7 @@ QSettings *DataBrowser::settings() if (m_settings){ return m_settings; } else { - m_settings = new QSettings("LimeReport",QApplication::applicationName()); + m_settings = new QSettings("LimeReport",QCoreApplication::applicationName()); m_ownedSettings = true; return m_settings; } diff --git a/limereport/databrowser/lrsqleditdialog.cpp b/limereport/databrowser/lrsqleditdialog.cpp index 05e3267..f74ae6c 100644 --- a/limereport/databrowser/lrsqleditdialog.cpp +++ b/limereport/databrowser/lrsqleditdialog.cpp @@ -78,7 +78,7 @@ QSettings *SQLEditDialog::settings(){ if (m_settings){ return m_settings; } else { - m_settings = new QSettings("LimeReport",QApplication::applicationName()); + m_settings = new QSettings("LimeReport",QCoreApplication::applicationName()); m_ownedSettings = true; return m_settings; } diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index 4689ebb..5750988 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -483,7 +483,6 @@ TextItem::TextPtr TextItem::textDocument() const QTextOption to; to.setAlignment(m_alignment); to.setTextDirection(m_textLayoutDirection); - //to.setTextDirection(QApplication::layoutDirection()); if (m_autoWidth!=MaxStringLength) if (m_adaptFontToSize && (!(m_autoHeight || m_autoWidth))) diff --git a/limereport/items/lrtextitemeditor.cpp b/limereport/items/lrtextitemeditor.cpp index 37ac44d..8b2e28b 100644 --- a/limereport/items/lrtextitemeditor.cpp +++ b/limereport/items/lrtextitemeditor.cpp @@ -76,7 +76,7 @@ QSettings*TextItemEditor::settings() if (m_settings){ return m_settings; } else { - m_settings = new QSettings("LimeReport",QApplication::applicationName()); + m_settings = new QSettings("LimeReport",QCoreApplication::applicationName()); m_ownedSettings = true; return m_settings; } diff --git a/limereport/lrpreviewreportwindow.cpp b/limereport/lrpreviewreportwindow.cpp index 32b0b5d..02dd372 100644 --- a/limereport/lrpreviewreportwindow.cpp +++ b/limereport/lrpreviewreportwindow.cpp @@ -183,7 +183,7 @@ QSettings*PreviewReportWindow::settings() if (m_settings){ return m_settings; } else { - m_settings = new QSettings("LimeReport",QApplication::applicationName()); + m_settings = new QSettings("LimeReport",QCoreApplication::applicationName()); m_ownedSettings = true; return m_settings; } diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 41c3f41..f5acdfb 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -92,11 +92,15 @@ 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( "./lib" ); + QDir pluginsDir = QCoreApplication::applicationDirPath(); + pluginsDir.cd("../lib" ); if (!pluginsDir.exists()){ - pluginsDir.setPath("../lib"); + pluginsDir.cd("./lib"); + if (!pluginsDir.exists()) pluginsDir.setPath(QCoreApplication::applicationDirPath()); } + qDebug()< #include -#include #include "lrglobal.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) { - QApplication::processEvents(); + QCoreApplication::processEvents(); if (patternBand){ BandDesignIntf* bandClone = 0; diff --git a/limereport/objectinspector/propertyItems/lrflagspropitem.cpp b/limereport/objectinspector/propertyItems/lrflagspropitem.cpp index 5b56e85..784d2ac 100644 --- a/limereport/objectinspector/propertyItems/lrflagspropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrflagspropitem.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include