From fbbf6af33dbd6cec2b4175b35ad517f272c107f1 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 22 Mar 2018 23:00:51 +0300 Subject: [PATCH] Build has been fixed --- common.pri | 3 ++- demo_r1/mainwindow.cpp | 10 ++++++++++ limereport/lrdatasourcemanager.cpp | 5 +++++ limereport/lrreportengine.cpp | 5 +++++ limereport/scripteditor/lrscripteditor.cpp | 4 ++++ limereport/serializators/lrxmlreader.cpp | 5 +++++ 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/common.pri b/common.pri index 0fc4cca..fda2b99 100644 --- a/common.pri +++ b/common.pri @@ -16,9 +16,10 @@ contains(CONFIG, easy_profiler){ !contains(CONFIG, qtscriptengine){ greaterThan(QT_MAJOR_VERSION, 4){ -greaterThan(QT_MINOR_VERSION, 5){ CONFIG *= qjsengine } +lessThan(QT_MAJOR_VERSION, 5){ + CONFIG *= qtscriptengine } } diff --git a/demo_r1/mainwindow.cpp b/demo_r1/mainwindow.cpp index 6771e4b..48da52f 100644 --- a/demo_r1/mainwindow.cpp +++ b/demo_r1/mainwindow.cpp @@ -38,7 +38,13 @@ #include #include +#ifndef HAVE_QT4 #include "easy/profiler.h" +#else +# define EASY_BLOCK(...) +# define EASY_END_BLOCK +# define EASY_PROFILER_ENABLE +#endif MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -121,7 +127,9 @@ void MainWindow::on_pushButton_clicked() report->setShowProgressDialog(false); report->designReport(); EASY_END_BLOCK; +#ifndef HAVE_QT4 profiler::dumpBlocksToFile("test.prof"); +#endif } void MainWindow::on_pushButton_2_clicked() @@ -137,7 +145,9 @@ void MainWindow::on_pushButton_2_clicked() report->dataManager()->setReportVariable(ui->leVariableName->text(), ui->leVariableValue->text()); } EASY_END_BLOCK; +#ifndef HAVE_QT4 profiler::dumpBlocksToFile("test.prof"); +#endif report->previewReport(); } } diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp index a95a309..60a61fe 100644 --- a/limereport/lrdatasourcemanager.cpp +++ b/limereport/lrdatasourcemanager.cpp @@ -37,7 +37,12 @@ #include #include +#ifndef HAVE_QT4 #include "easy/profiler.h" +#else +# define EASY_BLOCK(...) +# define EASY_END_BLOCK +#endif namespace LimeReport{ diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 2b60610..d938b2e 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -56,7 +56,12 @@ #include "lrpreviewreportwidget.h" #include "lrpreviewreportwidget_p.h" +#ifndef HAVE_QT4 #include "easy/profiler.h" +#else +# define EASY_BLOCK(...) +# define EASY_END_BLOCK +#endif #ifdef HAVE_STATIC_BUILD diff --git a/limereport/scripteditor/lrscripteditor.cpp b/limereport/scripteditor/lrscripteditor.cpp index 1b84f25..61eacf5 100644 --- a/limereport/scripteditor/lrscripteditor.cpp +++ b/limereport/scripteditor/lrscripteditor.cpp @@ -312,7 +312,11 @@ QStringList ReportStructureCompleater::extractSlotNames(BaseDesignIntf *item) for(int i = mo->methodOffset(); i < mo->methodCount(); ++i) { if (mo->method(i).methodType() == QMetaMethod::Signal) { +#ifndef HAVE_QT4 result.append(QString::fromLatin1(mo->method(i).name())); +#else + result.append(QString::fromLatin1(mo->method(i).signature())); +#endif } } mo = mo->superClass(); diff --git a/limereport/serializators/lrxmlreader.cpp b/limereport/serializators/lrxmlreader.cpp index 4bd26e8..8748ae5 100644 --- a/limereport/serializators/lrxmlreader.cpp +++ b/limereport/serializators/lrxmlreader.cpp @@ -36,7 +36,12 @@ #include "lrreporttranslation.h" #include +#ifndef HAVE_QT4 #include "easy/profiler.h" +#else +# define EASY_BLOCK(...) +# define EASY_END_BLOCK +#endif namespace LimeReport{