Used new compilator GCC 4.8 and key -Og. Optimization included files. Deleted

key -Wsign-conversion.

--HG--
branch : feature
This commit is contained in:
dismine 2013-10-01 21:15:59 +03:00
parent 1a678ab2e2
commit aa6778427c
57 changed files with 37 additions and 143 deletions

View File

@ -6,7 +6,7 @@
# Use out-of-source builds (shadow builds)
QT += core gui widgets xml svg printsupport
QT += core gui widgets xml svg
TARGET = Valentina
TEMPLATE = app
@ -234,10 +234,10 @@ CONFIG(debug, debug|release){
# Debug
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
-isystem "/usr/include/qt5/QtCore" -O0 -Wall -Wextra -pedantic -Weffc++ \
-isystem "$$OUT_PWD/uic" \
-Woverloaded-virtual -Wctor-dtor-privacy -Wnon-virtual-dtor -Wold-style-cast \
-Wconversion -Wsign-conversion -Winit-self -Wunreachable-code
-isystem "/usr/include/qt5/QtCore" -isystem "$$OUT_PWD/uic" -isystem "$$OUT_PWD/moc/" \
-Og -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self \
-Wunreachable-code
}else{
# Release
QMAKE_CXXFLAGS += -O1
@ -249,6 +249,17 @@ CONFIG(debug, debug|release){
lrelease.CONFIG += no_link target_predeps
}
message(Qt version: $$[QT_VERSION])
message(Qt is installed in $$[QT_INSTALL_PREFIX])
message(Qt resources can be found in the following locations:)
message(Documentation: $$[QT_INSTALL_DOCS])
message(Header files: $$[QT_INSTALL_HEADERS])
message(Libraries: $$[QT_INSTALL_LIBS])
message(Binary files (executables): $$[QT_INSTALL_BINS])
message(Plugins: $$[QT_INSTALL_PLUGINS])
message(Data files: $$[QT_INSTALL_DATA])
message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
message(Settings: $$[QT_INSTALL_SETTINGS])
message(Examples: $$[QT_INSTALL_EXAMPLES])

View File

@ -22,13 +22,9 @@
#ifndef VCONTAINER_H
#define VCONTAINER_H
#include <QMap>
#include <QTableWidget>
#include "options.h"
#include "vpointf.h"
#include "vstandarttablecell.h"
#include "vincrementtablerow.h"
#include "geometry/vspline.h"
#include "geometry/varc.h"
#include "geometry/vsplinepath.h"
#include "geometry/vdetail.h"

View File

@ -23,8 +23,6 @@
#define DIALOGALONGLINE_H
#include "dialogtool.h"
#include "options.h"
#include "container/vcontainer.h"
#include "container/calculator.h"
namespace Ui {

View File

@ -23,7 +23,6 @@
#define DIALOGARC_H
#include "dialogtool.h"
#include "container/vcontainer.h"
namespace Ui {
class DialogArc;

View File

@ -23,11 +23,7 @@
#define DIALOGBISECTOR_H
#include "dialogtool.h"
#include <QPushButton>
#include <QListWidgetItem>
#include <QTimer>
#include "options.h"
#include "container/vcontainer.h"
#include "container/calculator.h"
namespace Ui {

View File

@ -24,11 +24,9 @@
#include "ui_dialogdetail.h"
#include "dialogtool.h"
#include "container/vcontainer.h"
#include "geometry/vdetail.h"
class DialogDetail : public DialogTool
{
class DialogDetail : public DialogTool{
Q_OBJECT
public:
explicit DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0);

View File

@ -23,11 +23,7 @@
#define DIALOGENDLINE_H
#include "dialogtool.h"
#include <QPushButton>
#include <QListWidgetItem>
#include <QTimer>
#include "options.h"
#include "container/vcontainer.h"
#include "container/calculator.h"
namespace Ui {

View File

@ -23,9 +23,7 @@
#define DIALOGINCREMENTS_H
#include "dialogtool.h"
#include <QPushButton>
#include "xml/vdomdocument.h"
#include "container/vcontainer.h"
namespace Ui {
class DialogIncrements;

View File

@ -23,10 +23,6 @@
#define DIALOGLINE_H
#include "dialogtool.h"
#include <QComboBox>
#include "container/vcontainer.h"
#include "options.h"
namespace Ui {
class DialogLine;

View File

@ -23,11 +23,7 @@
#define DIALOGNORMAL_H
#include "dialogtool.h"
#include <QPushButton>
#include <QListWidgetItem>
#include <QTimer>
#include "options.h"
#include "container/vcontainer.h"
#include "container/calculator.h"
namespace Ui {

View File

@ -24,8 +24,6 @@
#include "ui_dialogpointofcontact.h"
#include "dialogtool.h"
#include "options.h"
#include "container/vcontainer.h"
#include "container/calculator.h"
class DialogPointOfContact : public DialogTool

View File

@ -23,8 +23,6 @@
#define DIALOGSHOULDERPOINT_H
#include "dialogtool.h"
#include "options.h"
#include "container/vcontainer.h"
#include "container/calculator.h"
namespace Ui {

View File

@ -23,7 +23,6 @@
#define DIALOGSINGLEPOINT_H
#include "dialogtool.h"
#include "container/vcontainer.h"
namespace Ui {
class DialogSinglePoint;

View File

@ -23,7 +23,6 @@
#define DIALOGSPLINE_H
#include "dialogtool.h"
#include "container/vcontainer.h"
namespace Ui {
class DialogSpline;

View File

@ -23,7 +23,6 @@
#define DIALOGSPLINEPATH_H
#include "dialogtool.h"
#include "container/vcontainer.h"
#include "geometry/vsplinepath.h"
namespace Ui {

View File

@ -32,10 +32,8 @@
#include <QRadioButton>
#include <QTimer>
#include "container/vcontainer.h"
#include "options.h"
class DialogTool : public QDialog
{
class DialogTool : public QDialog{
Q_OBJECT
public:
DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation,

View File

@ -23,7 +23,7 @@
#define VEXCEPTIONEMPTYPARAMETER_H
#include "vexception.h"
#include "QDomElement"
#include <QDomElement>
class VExceptionEmptyParameter : public VException
{

View File

@ -22,10 +22,6 @@
#ifndef VARC_H
#define VARC_H
#include <QPainterPath>
#include <QVector>
#include <QMap>
#include "container/vpointf.h"
#include "vspline.h"
/**

View File

@ -28,7 +28,6 @@
#include <QVector>
#include <QMap>
#include "container/vpointf.h"
#include "options.h"
/**
* @brief VSpline клас, що реалізує сплайн.

View File

@ -24,7 +24,6 @@
#include "vsplinepoint.h"
#include "vspline.h"
#include "options.h"
#include <QCoreApplication>
namespace SplinePoint{

View File

@ -20,7 +20,7 @@
****************************************************************************/
#include "mainwindow.h"
#include <QApplication>
#include "widgets/vapplication.h"
#include <QTextCodec>
#include "tablewindow.h"
@ -48,7 +48,7 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
int main(int argc, char *argv[]){
qInstallMessageHandler(myMessageOutput);
QApplication app(argc, argv);
VApplication app(argc, argv);
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),

View File

@ -35,8 +35,6 @@
#include "tools/drawTools/drawtools.h"
#include "tools/modelingTools/modelingtools.h"
#include "xml/vdomdocument.h"
#include "container/vcontainer.h"
#include "options.h"
#include "tools/vtooldetail.h"
namespace Ui {

View File

@ -27,8 +27,6 @@
#include <QFileDialog>
#include "options.h"
#include <QtSvg/QtSvg>
#undef PaperSize
#include <QtPrintSupport/QPrinter>
TableWindow::TableWindow(QWidget *parent) :
QMainWindow(parent), numberDetal(0), colission(0), ui(new Ui::TableWindow),
@ -143,7 +141,7 @@ void TableWindow::StopTable(){
}
void TableWindow::saveScene(){
QString name = QFileDialog::getSaveFileName(0, "Зберегти розкладку", "", "Images (*.png);;Svg files (*.svg);;Ps files (*.ps)");
QString name = QFileDialog::getSaveFileName(0, "Зберегти розкладку", "", "Images (*.png);;Svg files (*.svg)");
if(name.isNull()){
return;
}
@ -164,8 +162,6 @@ void TableWindow::saveScene(){
SvgFile(name);
} else if(fi.suffix() == "png"){
PngFile(name);
} else if(fi.suffix() == "ps"){
PsFile(name);
}
// if(name.indexOf(".svg",name.size()-4)<0){
// name.append(".svg");
@ -348,28 +344,3 @@ void TableWindow::PngFile(const QString &name) const{
currentScene->render(&painter);
image.save(name);
}
void TableWindow::PsFile(const QString &name) const{
QPrinter printer(QPrinter::HighResolution);
//printer.setOutputFormat(QPrinter::PostScriptFormat);
printer.setOutputFileName(name);
QRectF r = paper->rect();
qreal x=0, y=0, w=0, h=0;
r.getRect(&x,&y,&w,&h);
printer.setResolution(PrintDPI);
qDebug()<<printer.resolution();
printer.setPaperSize ( QSizeF(w/printer.resolution()*25.4, h/printer.resolution()*25.4), QPrinter::Millimeter );
QPainter painter;
if (! painter.begin( &printer )) { // failed to open file
qCritical("Не можу відкрити файл %s",qPrintable(name));
return;
}
painter.setFont( QFont( "Arial", 8, QFont::Normal ) );
painter.setRenderHint(QPainter::Antialiasing, true);
painter.setPen(QPen(Qt::black, widthMainLine, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
painter.setBrush ( QBrush ( Qt::NoBrush ) );
currentScene->render(&painter);
painter.end();
}

View File

@ -50,7 +50,7 @@ protected:
if(!ignoreContextMenuEvent){
QMenu menu;
QAction *actionOption = menu.addAction(tr("Options"));
QAction *actionRemove;
QAction *actionRemove = 0;
if(showRemove){
actionRemove = menu.addAction(tr("Delete"));
if(_referens > 1){

View File

@ -21,7 +21,6 @@
#include "vtoolalongline.h"
#include <QDialog>
#include <QMenu>
#include <QDebug>
#include "container/calculator.h"

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vtoolarc.h"
#include <QMenu>
#include "container/calculator.h"
VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,

View File

@ -23,24 +23,23 @@
#define VTOOLARC_H
#include "vdrawtool.h"
#include "xml/vdomdocument.h"
#include <QGraphicsPathItem>
#include "dialogs/dialogarc.h"
#include "widgets/vcontrolpointspline.h"
#include "container/vcontainer.h"
class VToolArc :public VDrawTool, public QGraphicsPathItem
{
class VToolArc :public VDrawTool, public QGraphicsPathItem{
Q_OBJECT
public:
VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
QGraphicsItem * parent = 0);
VToolArc(VDomDocument *doc, VContainer *data, qint64 id,
Tool::Sources typeCreation, QGraphicsItem * parent = 0);
virtual void setDialog();
static void Create(QSharedPointer<DialogArc> &dialog, VMainGraphicsScene *scene, VDomDocument *doc,
static void Create(QSharedPointer<DialogArc> &dialog, VMainGraphicsScene *scene,
VDomDocument *doc,
VContainer *data);
static void Create(const qint64 _id, const qint64 &center, const QString &radius,
const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc,
VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation);
const QString &f1, const QString &f2, VMainGraphicsScene *scene,
VDomDocument *doc, VContainer *data, const Document::Documents &parse,
Tool::Sources typeCreation);
public slots:
virtual void FullUpdateFromFile();
virtual void FullUpdateFromGui(int result);

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vtoolbisector.h"
#include <QMenu>
VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &firstPointId,

View File

@ -22,12 +22,10 @@
#ifndef VTOOLBISECTOR_H
#define VTOOLBISECTOR_H
#include <QSharedPointer>
#include "vtoollinepoint.h"
#include "dialogs/dialogbisector.h"
class VToolBisector : public VToolLinePoint
{
class VToolBisector : public VToolLinePoint{
public:
VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &firstPointId,

View File

@ -22,12 +22,10 @@
#ifndef VTOOLENDLINE_H
#define VTOOLENDLINE_H
#include <QSharedPointer>
#include "vtoollinepoint.h"
#include "dialogs/dialogendline.h"
class VToolEndLine : public VToolLinePoint
{
class VToolEndLine : public VToolLinePoint{
Q_OBJECT
public:
VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id,

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vtoolline.h"
#include <QMenu>
#include <QDebug>
VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint,

View File

@ -26,8 +26,7 @@
#include "QGraphicsLineItem"
#include "dialogs/dialogline.h"
class VToolLine: public VDrawTool, public QGraphicsLineItem
{
class VToolLine: public VDrawTool, public QGraphicsLineItem{
Q_OBJECT
public:
VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vtoolnormal.h"
#include <QMenu>
VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine,

View File

@ -22,7 +22,6 @@
#ifndef VTOOLNORMAL_H
#define VTOOLNORMAL_H
#include <QSharedPointer>
#include "vtoollinepoint.h"
#include "dialogs/dialognormal.h"

View File

@ -24,7 +24,6 @@
#include <QBrush>
#include <QDebug>
#include <QGraphicsItem>
#include "container/vpointf.h"
VToolPoint::VToolPoint(VDomDocument *doc, VContainer *data, qint64 id,

View File

@ -24,7 +24,6 @@
#include "vdrawtool.h"
#include "widgets/vgraphicssimpletextitem.h"
#include "options.h"
class VToolPoint: public VDrawTool, public QGraphicsEllipseItem{
Q_OBJECT

View File

@ -21,7 +21,6 @@
#include "vtoolshoulderpoint.h"
#include <QDebug>
#include <QMenu>
VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &p1Line,

View File

@ -24,11 +24,7 @@
#include <QBrush>
#include <QDebug>
#include <QGraphicsItem>
#include <QMenu>
#include <QGraphicsSceneContextMenuEvent>
#include <cmath>
#include "options.h"
#include "container/vpointf.h"
VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation,
QGraphicsItem * parent ):VToolPoint(doc, data, id, parent),

View File

@ -22,8 +22,6 @@
#ifndef VTOOLSINGLEPOINT_H
#define VTOOLSINGLEPOINT_H
#include "container/vcontainer.h"
#include "xml/vdomdocument.h"
#include "dialogs/dialogsinglepoint.h"
#include "vtoolpoint.h"

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vtoolspline.h"
#include <QMenu>
#include <QDebug>
#include "geometry/vspline.h"

View File

@ -23,11 +23,9 @@
#define VTOOLSPLINE_H
#include "vdrawtool.h"
#include "xml/vdomdocument.h"
#include <QGraphicsPathItem>
#include "dialogs/dialogspline.h"
#include "widgets/vcontrolpointspline.h"
#include "container/vcontainer.h"
#include "geometry/vsplinepath.h"
class VToolSpline:public VDrawTool, public QGraphicsPathItem

View File

@ -23,11 +23,9 @@
#define VTOOLSPLINEPATH_H
#include "vdrawtool.h"
#include "xml/vdomdocument.h"
#include <QGraphicsPathItem>
#include "dialogs/dialogsplinepath.h"
#include "widgets/vcontrolpointspline.h"
#include "container/vcontainer.h"
class VToolSplinePath:public VDrawTool, public QGraphicsPathItem{
Q_OBJECT

View File

@ -21,7 +21,6 @@
#include "vmodelingalongline.h"
#include <QDialog>
#include <QMenu>
#include <QDebug>
#include "container/calculator.h"

View File

@ -23,11 +23,9 @@
#define VMODELINGARC_H
#include "vmodelingtool.h"
#include "xml/vdomdocument.h"
#include <QGraphicsPathItem>
#include "dialogs/dialogarc.h"
#include "widgets/vcontrolpointspline.h"
#include "container/vcontainer.h"
class VModelingArc :public VModelingTool, public QGraphicsPathItem{
Q_OBJECT

View File

@ -22,7 +22,6 @@
#ifndef VMODELINGBISECTOR_H
#define VMODELINGBISECTOR_H
#include <QSharedPointer>
#include "vmodelinglinepoint.h"
#include "dialogs/dialogbisector.h"

View File

@ -22,7 +22,6 @@
#ifndef VMODELINGENDLINE_H
#define VMODELINGENDLINE_H
#include <QSharedPointer>
#include "vmodelinglinepoint.h"
#include "dialogs/dialogendline.h"

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vmodelingline.h"
#include <QMenu>
#include <QDebug>
VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint,

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vmodelinglineintersect.h"
#include <QMenu>
VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id,
const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,

View File

@ -20,7 +20,6 @@
****************************************************************************/
#include "vmodelingnormal.h"
#include <QMenu>
VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine,

View File

@ -22,7 +22,6 @@
#ifndef VMODELINGNORMAL_H
#define VMODELINGNORMAL_H
#include <QSharedPointer>
#include "vmodelinglinepoint.h"
#include "dialogs/dialognormal.h"

View File

@ -24,7 +24,6 @@
#include "vmodelingtool.h"
#include "widgets/vgraphicssimpletextitem.h"
#include "options.h"
class VModelingPoint: public VModelingTool, public QGraphicsEllipseItem{
Q_OBJECT

View File

@ -21,7 +21,6 @@
#include "vmodelingshoulderpoint.h"
#include <QDebug>
#include <QMenu>
VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id,
const QString &typeLine, const QString &formula, const qint64 &p1Line,

View File

@ -23,11 +23,9 @@
#define VMODELINGSPLINE_H
#include "vmodelingtool.h"
#include "xml/vdomdocument.h"
#include <QGraphicsPathItem>
#include "dialogs/dialogspline.h"
#include "widgets/vcontrolpointspline.h"
#include "container/vcontainer.h"
#include "geometry/vsplinepath.h"
class VModelingSpline:public VModelingTool, public QGraphicsPathItem{

View File

@ -23,11 +23,9 @@
#define VMODELINGSPLINEPATH_H
#include "vmodelingtool.h"
#include "xml/vdomdocument.h"
#include <QGraphicsPathItem>
#include "dialogs/dialogsplinepath.h"
#include "widgets/vcontrolpointspline.h"
#include "container/vcontainer.h"
class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem{
Q_OBJECT

View File

@ -24,7 +24,6 @@
#include "xml/vdomdocument.h"
#include "vdatatool.h"
#include "container/vcontainer.h"
class VAbstractTool: public VDataTool{
Q_OBJECT

View File

@ -25,7 +25,6 @@
#include <QGraphicsEllipseItem>
#include <QGraphicsLineItem>
#include <QObject>
#include "options.h"
#include "geometry/vsplinepath.h"
class VControlPointSpline : public QObject, public QGraphicsEllipseItem

View File

@ -25,7 +25,6 @@
#include <QDomDocument>
#include <QMap>
#include <QComboBox>
#include "container/vcontainer.h"
#include "widgets/vmaingraphicsscene.h"
#include "tools/vdatatool.h"
#include "vtoolrecord.h"