From efdc947768aac3aba270a40b0fa0dac89b59364d Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 10 Jun 2014 12:49:14 +0300 Subject: [PATCH] GCC warnings. --HG-- branch : develop --- src/app/dialogs/app/dialogpatternxmledit.cpp | 6 +++--- src/app/dialogs/app/dialogpatternxmledit.h | 2 +- src/app/dialogs/tools/dialogalongline.cpp | 4 ++-- src/app/dialogs/tools/dialogarc.cpp | 3 ++- src/app/dialogs/tools/dialogbisector.cpp | 4 ++-- src/app/dialogs/tools/dialogcutarc.cpp | 5 +++-- src/app/dialogs/tools/dialogendline.cpp | 4 ++-- src/app/dialogs/tools/dialognormal.cpp | 4 ++-- src/app/dialogs/tools/dialognormal.h | 3 ++- src/app/dialogs/tools/dialogpointofcontact.cpp | 4 ++-- src/app/dialogs/tools/dialogshoulderpoint.cpp | 2 +- 11 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/app/dialogs/app/dialogpatternxmledit.cpp b/src/app/dialogs/app/dialogpatternxmledit.cpp index 21044fd26..87ef3a882 100644 --- a/src/app/dialogs/app/dialogpatternxmledit.cpp +++ b/src/app/dialogs/app/dialogpatternxmledit.cpp @@ -1196,9 +1196,9 @@ const short int VXMLTreeElement::TypeRoot=3; //TODO warning: conversion to 'short int' from 'int' may alter its value [-Wconversion] //treeNodeValueSet(false), treeNodeName(name) // ^ -VXMLTreeElement::VXMLTreeElement(QString name, int nodetype, QDomNode source, bool editor) - : QStandardItem(name), DocNode(source), addedNode(editor), elementType(nodetype), treeNodeValue(""), - treeNodeValueSet(false), treeNodeName(name), selectable(true), parentnode(nullptr) +VXMLTreeElement::VXMLTreeElement(QString name, short int nodetype, QDomNode source, bool editor) + : QStandardItem(name), DocNode(source), parentnode(nullptr), addedNode(editor), elementType(nodetype), + treeNodeValue(""), treeNodeValueSet(false), treeNodeName(name), selectable(true) { if (editor == false) { diff --git a/src/app/dialogs/app/dialogpatternxmledit.h b/src/app/dialogs/app/dialogpatternxmledit.h index 51e3e316f..498701075 100644 --- a/src/app/dialogs/app/dialogpatternxmledit.h +++ b/src/app/dialogs/app/dialogpatternxmledit.h @@ -51,7 +51,7 @@ public: * @param nodetype : node type (node, attribute, root) * @param source : the source dom node */ - explicit VXMLTreeElement (QString name, int nodetype, QDomNode source, bool editor); + explicit VXMLTreeElement (QString name, short int nodetype, QDomNode source, bool editor); explicit VXMLTreeElement (QString name, int nodetype); diff --git a/src/app/dialogs/tools/dialogalongline.cpp b/src/app/dialogs/tools/dialogalongline.cpp index fa58cf61c..f5491a0d8 100644 --- a/src/app/dialogs/tools/dialogalongline.cpp +++ b/src/app/dialogs/tools/dialogalongline.cpp @@ -38,8 +38,8 @@ * @param parent parent widget */ DialogAlongLine::DialogAlongLine(const VContainer *data, QWidget *parent) - :DialogTool(data, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0) + :DialogTool(data, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()), typeLine(QString()), + formula(QString()), firstPointId(0), secondPointId(0), formulaBaseHeight(0) { ui->setupUi(this); labelResultCalculation = ui->labelResultCalculation; diff --git a/src/app/dialogs/tools/dialogarc.cpp b/src/app/dialogs/tools/dialogarc.cpp index c03425285..725a5b917 100644 --- a/src/app/dialogs/tools/dialogarc.cpp +++ b/src/app/dialogs/tools/dialogarc.cpp @@ -40,7 +40,8 @@ */ DialogArc::DialogArc(const VContainer *data, QWidget *parent) :DialogTool(data, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false), - timerRadius(nullptr), timerF1(nullptr), timerF2(nullptr), center(0), radius(QString()), f1(QString()), f2(QString()) + timerRadius(nullptr), timerF1(nullptr), timerF2(nullptr), center(0), radius(QString()), f1(QString()), + f2(QString()), formulaBaseHeight(0) { ui->setupUi(this); diff --git a/src/app/dialogs/tools/dialogbisector.cpp b/src/app/dialogs/tools/dialogbisector.cpp index 30afe5795..70caa9363 100644 --- a/src/app/dialogs/tools/dialogbisector.cpp +++ b/src/app/dialogs/tools/dialogbisector.cpp @@ -38,8 +38,8 @@ * @param parent parent widget */ DialogBisector::DialogBisector(const VContainer *data, QWidget *parent) - :DialogTool(data, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0) + :DialogTool(data, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()), typeLine(QString()), + formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0), formulaBaseHeight(0) { ui->setupUi(this); InitVariables(ui); diff --git a/src/app/dialogs/tools/dialogcutarc.cpp b/src/app/dialogs/tools/dialogcutarc.cpp index bf7e0f873..337c8aadd 100644 --- a/src/app/dialogs/tools/dialogcutarc.cpp +++ b/src/app/dialogs/tools/dialogcutarc.cpp @@ -35,8 +35,9 @@ * @param data container with data * @param parent parent widget */ -DialogCutArc::DialogCutArc(const VContainer *data, QWidget *parent) : - DialogTool(data, parent), ui(new Ui::DialogCutArc), pointName(QString()), formula(QString()), arcId(0) +DialogCutArc::DialogCutArc(const VContainer *data, QWidget *parent) + : DialogTool(data, parent), ui(new Ui::DialogCutArc), pointName(QString()), formula(QString()), arcId(0), + formulaBaseHeight(0) { ui->setupUi(this); InitVariables(ui); diff --git a/src/app/dialogs/tools/dialogendline.cpp b/src/app/dialogs/tools/dialogendline.cpp index 6fc808beb..ff79155c8 100644 --- a/src/app/dialogs/tools/dialogendline.cpp +++ b/src/app/dialogs/tools/dialogendline.cpp @@ -38,8 +38,8 @@ * @param parent parent widget */ DialogEndLine::DialogEndLine(const VContainer *data, QWidget *parent) - :DialogTool(data, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()), - formula(QString()), angle(0), basePointId(0) + :DialogTool(data, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()), formula(QString()), + angle(0), basePointId(0), formulaBaseHeight(0) { ui->setupUi(this); InitVariables(ui); diff --git a/src/app/dialogs/tools/dialognormal.cpp b/src/app/dialogs/tools/dialognormal.cpp index dfe72aa7f..00d83ef1e 100644 --- a/src/app/dialogs/tools/dialognormal.cpp +++ b/src/app/dialogs/tools/dialognormal.cpp @@ -38,8 +38,8 @@ * @param parent parent widget */ DialogNormal::DialogNormal(const VContainer *data, QWidget *parent) - :DialogTool(data, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), angle(0), firstPointId(0), secondPointId(0) + :DialogTool(data, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()), typeLine(QString()), + formula(QString()), angle(0), firstPointId(0), secondPointId(0), formulaBaseHeight(0) { ui->setupUi(this); InitVariables(ui); diff --git a/src/app/dialogs/tools/dialognormal.h b/src/app/dialogs/tools/dialognormal.h index f575fd33f..a2e8f7336 100644 --- a/src/app/dialogs/tools/dialognormal.h +++ b/src/app/dialogs/tools/dialognormal.h @@ -105,8 +105,9 @@ private: /** @brief secondPointId id second point of line */ quint32 secondPointId; + /** @brief formulaBaseHeight base height defined by dialogui */ - int formulaBaseHeight; + int formulaBaseHeight; /** * @brief SaveData Put dialog data in local variables diff --git a/src/app/dialogs/tools/dialogpointofcontact.cpp b/src/app/dialogs/tools/dialogpointofcontact.cpp index cd99125d5..123f491f3 100644 --- a/src/app/dialogs/tools/dialogpointofcontact.cpp +++ b/src/app/dialogs/tools/dialogpointofcontact.cpp @@ -37,8 +37,8 @@ * @param parent parent widget */ DialogPointOfContact::DialogPointOfContact(const VContainer *data, QWidget *parent) - :DialogTool(data, parent), ui(new Ui::DialogPointOfContact), number(0), pointName(QString()), radius(QString()), center(0), - firstPoint(0), secondPoint(0) + :DialogTool(data, parent), ui(new Ui::DialogPointOfContact), number(0), pointName(QString()), radius(QString()), + center(0), firstPoint(0), secondPoint(0), formulaBaseHeight(0) { ui->setupUi(this); InitVariables(ui); diff --git a/src/app/dialogs/tools/dialogshoulderpoint.cpp b/src/app/dialogs/tools/dialogshoulderpoint.cpp index 36aef56d5..1f349d0cf 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/app/dialogs/tools/dialogshoulderpoint.cpp @@ -39,7 +39,7 @@ */ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, QWidget *parent) :DialogTool(data, parent), ui(new Ui::DialogShoulderPoint), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0) + typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0), formulaBaseHeight(0) { ui->setupUi(this); number = 0;