Fixed GCC warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-02 08:37:31 +03:00
parent ad7928248c
commit c65f554a8d
7 changed files with 43 additions and 101 deletions

View File

@ -365,7 +365,7 @@ public:
}
private:
Q_DISABLE_COPY(DL_CreationInterface);
Q_DISABLE_COPY(DL_CreationInterface)
protected:
DL_Extrusion *extrusion;

View File

@ -457,7 +457,7 @@ public:
}
private:
Q_DISABLE_COPY(DL_Dxf);
Q_DISABLE_COPY(DL_Dxf)
DL_Codes::version version;
std::string polylineLayer;

View File

@ -30,6 +30,7 @@
#include <string>
#include <vector>
#include <QtGlobal>
/**
* Layer Data.
@ -65,7 +66,7 @@ struct DXFLIB_EXPORT DL_BlockData
DL_BlockData(const std::string& bName, int bFlags,
double bbpx, double bbpy, double bbpz)
: name(bName), flags(bFlags), bpx(bbpx), bpy(bbpy), bpz(bbpz)
{
{
}
/** Block name. */
@ -125,7 +126,7 @@ struct DXFLIB_EXPORT DL_LinetypeData
double* pattern;
private:
Q_DISABLE_COPY(DL_LinetypeData);
Q_DISABLE_COPY(DL_LinetypeData)
};
@ -331,7 +332,7 @@ struct DXFLIB_EXPORT DL_ArcData
double aRadius,
double aAngle1, double aAngle2)
: cx(acx), cy(acy), cz(acz), radius(aRadius), angle1(aAngle1), angle2(aAngle2)
{
{
}
/*! X Coordinate of center point. */
@ -839,6 +840,8 @@ struct DXFLIB_EXPORT DL_TextData
{
}
virtual ~DL_TextData(){}
/*! X Coordinate of insertion point. */
double ipx;
/*! Y Coordinate of insertion point. */
@ -1043,7 +1046,7 @@ struct DXFLIB_EXPORT DL_DimAlignedData
double depx2, double depy2, double depz2)
: epx1(depx1), epy1(depy1), epz1(depz1),
epx2(depx2), epy2(depy2), epz2(depz2)
{
{
}
/*! X Coordinate of Extension point 1. */
@ -1704,7 +1707,7 @@ struct DXFLIB_EXPORT DL_ImageDefData
DL_ImageDefData(const std::string& iref,
const std::string& ifile)
: ref(iref), file(ifile)
{
{
}
/*! Reference to the image file

View File

@ -1,58 +0,0 @@
/****************************************************************************
** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
** Copyright (C) 2001 Robert J. Campbell Jr.
**
** This file is part of the dxflib project.
**
** This file is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** Licensees holding valid dxflib Professional Edition licenses may use
** this file in accordance with the dxflib Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.ribbonsoft.com for further details.
**
** Contact info@ribbonsoft.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef DL_EXCEPTION_H
#define DL_EXCEPTION_H
#include "dl_global.h"
#if defined(Q_CC_MSVC)
#if (_MSC_VER > 1000)
#pragma once
#endif // _MSC_VER > 1000
#endif // Q_CC_MSVC
/**
* Used for exception handling.
*/
class DXFLIB_EXPORT DL_Exception {}
;
/**
* Used for exception handling.
*/
class DXFLIB_EXPORT DL_NullStrExc : public DL_Exception {}
;
/**
* Used for exception handling.
*/
class DXFLIB_EXPORT DL_GroupCodeExc : public DL_Exception
{
DL_GroupCodeExc(int gc=0) : groupCode(gc) {}
int groupCode;
};
#endif

View File

@ -33,8 +33,6 @@
#include <string.h>
#include "dl_writer_ascii.h"
#include "dl_exception.h"
/**
* Closes the output file.
@ -133,12 +131,6 @@ void DL_WriterA::dxfHex(int gc, int value) const
*/
void DL_WriterA::dxfString(int gc, const char* value) const
{
if (value==NULL)
{
#ifndef __GCC2x__
//throw DL_NullStrExc();
#endif
}
m_ofile << (gc<10 ? " " : (gc<100 ? " " : "")) << gc << "\n"
<< value << "\n";
}

View File

@ -1,26 +1,25 @@
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
# This need for corect working file translations.pro
SOURCES += \
$$PWD/stable.cpp \
$$PWD/dxflib/dl_dxf.cpp \
$$PWD/dxflib/dl_writer_ascii.cpp \
$$PWD/vdxfengine.cpp \
$$PWD/vdxfpaintdevice.cpp
HEADERS += \
$$PWD/stable.h \
$$PWD/dxflib/dl_attributes.h \
$$PWD/dxflib/dl_codes.h \
$$PWD/dxflib/dl_creationadapter.h \
$$PWD/dxflib/dl_creationinterface.h \
$$PWD/dxflib/dl_dxf.h \
$$PWD/dxflib/dl_entities.h \
$$PWD/dxflib/dl_exception.h \
$$PWD/dxflib/dl_extrusion.h \
$$PWD/dxflib/dl_global.h \
$$PWD/dxflib/dl_writer.h \
$$PWD/dxflib/dl_writer_ascii.h \
$$PWD/vdxfengine.h \
$$PWD/vdxfpaintdevice.h \
$$PWD/dxfdef.h
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
# This need for corect working file translations.pro
SOURCES += \
$$PWD/stable.cpp \
$$PWD/dxflib/dl_dxf.cpp \
$$PWD/dxflib/dl_writer_ascii.cpp \
$$PWD/vdxfengine.cpp \
$$PWD/vdxfpaintdevice.cpp
HEADERS += \
$$PWD/stable.h \
$$PWD/dxflib/dl_attributes.h \
$$PWD/dxflib/dl_codes.h \
$$PWD/dxflib/dl_creationadapter.h \
$$PWD/dxflib/dl_creationinterface.h \
$$PWD/dxflib/dl_dxf.h \
$$PWD/dxflib/dl_entities.h \
$$PWD/dxflib/dl_extrusion.h \
$$PWD/dxflib/dl_global.h \
$$PWD/dxflib/dl_writer.h \
$$PWD/dxflib/dl_writer_ascii.h \
$$PWD/vdxfengine.h \
$$PWD/vdxfpaintdevice.h \
$$PWD/dxfdef.h

View File

@ -54,8 +54,14 @@ static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures()
//---------------------------------------------------------------------------------------------------------------------
VDxfEngine::VDxfEngine()
:QPaintEngine(svgEngineFeatures()),
size(), resolution(PrintDPI), fileName(), matrix(), dxf(nullptr), dw(nullptr),
varMeasurement(VarMeasurement::Metric), varInsunits(VarInsunits::Centimeters)
size(),
resolution(static_cast<int>(PrintDPI)),
fileName(),
matrix(),
dxf(nullptr),
dw(nullptr),
varMeasurement(VarMeasurement::Metric),
varInsunits(VarInsunits::Centimeters)
{
}