From 05f6eb9284f6e15be4117930b9b55c74d6e7de5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Skowro=C5=84ski?= Date: Sun, 5 Nov 2017 00:32:25 +0100 Subject: [PATCH] Fix some GCC warnings. --- limereport/items/lrchartitemeditor.ui | 2 +- limereport/lrscriptenginemanager.cpp | 4 ++-- limereport/objectinspector/lrpropertydelegate.cpp | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/limereport/items/lrchartitemeditor.ui b/limereport/items/lrchartitemeditor.ui index 99a1676..f32e269 100644 --- a/limereport/items/lrchartitemeditor.ui +++ b/limereport/items/lrchartitemeditor.ui @@ -59,7 +59,7 @@ - + QFormLayout::AllNonFixedFieldsGrow diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index bb5aa16..775c163 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -354,7 +354,7 @@ void ScriptEngineManager::setDataManager(DataSourceManager *dataManager){ } } -QString ScriptEngineManager::expandUserVariables(QString context, RenderPass pass, ExpandType expandType, QVariant &varValue) +QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /* pass */, ExpandType expandType, QVariant &varValue) { QRegExp rx(Const::VARIABLE_RX); if (context.contains(rx)){ @@ -829,7 +829,7 @@ bool ScriptEngineManager::createReopenDatasourceFunction() } ScriptEngineManager::ScriptEngineManager() - :m_model(0), m_dataManager(0), m_context(0) + :m_model(0), m_context(0), m_dataManager(0) { m_scriptEngine = new ScriptEngineType; m_functionManager = new ScriptFunctionsManager(this); diff --git a/limereport/objectinspector/lrpropertydelegate.cpp b/limereport/objectinspector/lrpropertydelegate.cpp index e1808eb..80bd4d0 100644 --- a/limereport/objectinspector/lrpropertydelegate.cpp +++ b/limereport/objectinspector/lrpropertydelegate.cpp @@ -43,7 +43,12 @@ void LimeReport::PropertyDelegate::paint(QPainter *painter, const QStyleOptionVi { if (!index.isValid()) return; +#if QT_VERSION >= 0x050000 + QStyleOptionViewItem opt = option; +#else QStyleOptionViewItemV4 opt = option; +#endif + QStyle *style = opt.widget ? opt.widget->style() : QApplication::style(); LimeReport::ObjectPropItem *node = static_cast(index.internalPointer());