Merged in ValentinaZhuravska/valentina/feature (pull request #70)

Several fixes for building with MSVC. Still a lot errors. No successful build yet.

--HG--
branch : develop
This commit is contained in:
Roman Telezhinskyi 2015-10-22 15:21:33 +03:00
commit b02b890486
7 changed files with 73 additions and 61 deletions

View File

@ -31,6 +31,10 @@
#include <QtGlobal>
#ifdef Q_CC_MSVC
#include <ciso646>
#endif /* Q_CC_MSVC */
enum class VarMeasurement : unsigned char { English=0, Metric=1 };
//Default drawing units for AutoCAD DesignCenter blocks:

View File

@ -29,6 +29,10 @@
#ifndef VLAYOUTDEF_H
#define VLAYOUTDEF_H
#ifdef Q_CC_MSVC
#include <ciso646>
#endif /* Q_CC_MSVC */
enum class EquidistantType : char { OpenEquidistant, CloseEquidistant };
enum class LayoutErrors : char

View File

@ -38,6 +38,10 @@
#include "debugbreak.h"
#ifdef Q_CC_MSVC
#include <ciso646>
#endif /* Q_CC_MSVC */
class QComboBox;
#define SceneSize 50000

View File

@ -74,6 +74,62 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
VAbstractApplication::~VAbstractApplication()
{}
//---------------------------------------------------------------------------------------------------------------------
MeasurementsType VAbstractApplication::patternType() const
{
return _patternType;
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractApplication::setPatternType(const MeasurementsType &patternType)
{
_patternType = patternType;
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractApplication::setCurrentDocument(VAbstractPattern *doc)
{
this->doc = doc;
}
//---------------------------------------------------------------------------------------------------------------------
VAbstractPattern *VAbstractApplication::getCurrentDocument() const
{
SCASSERT(doc != nullptr)
return doc;
}
//---------------------------------------------------------------------------------------------------------------------
bool VAbstractApplication::getOpeningPattern() const
{
return openingPattern;
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractApplication::setOpeningPattern()
{
openingPattern = !openingPattern;
}
//---------------------------------------------------------------------------------------------------------------------
QWidget *VAbstractApplication::getMainWindow() const
{
return mainWindow;
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractApplication::setMainWindow(QWidget *value)
{
SCASSERT(value != nullptr)
mainWindow = value;
}
//---------------------------------------------------------------------------------------------------------------------
QUndoStack *VAbstractApplication::getUndoStack() const
{
return undoStack;
}
//---------------------------------------------------------------------------------------------------------------------
Unit VAbstractApplication::patternUnit() const
{

View File

@ -36,9 +36,9 @@
#include "def.h"
#include "vsettings.h"
#include "vlockguard.h"
#include "../vpatterndb/vtranslatevars.h"
class VAbstractApplication;// use in define
class VTranslateVars;
class VAbstractPattern;
class VMainGraphicsView;
class QUndoStack;
@ -137,17 +137,6 @@ private:
void ClearTranslation();
};
//---------------------------------------------------------------------------------------------------------------------
inline MeasurementsType VAbstractApplication::patternType() const
{
return _patternType;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractApplication::setPatternType(const MeasurementsType &patternType)
{
_patternType = patternType;
}
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
@ -158,48 +147,4 @@ inline QString VAbstractApplication::LocaleToString(const T &value)
return loc.toString(value);
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractApplication::setCurrentDocument(VAbstractPattern *doc)
{
this->doc = doc;
}
//---------------------------------------------------------------------------------------------------------------------
inline VAbstractPattern *VAbstractApplication::getCurrentDocument() const
{
SCASSERT(doc != nullptr)
return doc;
}
//---------------------------------------------------------------------------------------------------------------------
inline bool VAbstractApplication::getOpeningPattern() const
{
return openingPattern;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractApplication::setOpeningPattern()
{
openingPattern = !openingPattern;
}
//---------------------------------------------------------------------------------------------------------------------
inline QWidget *VAbstractApplication::getMainWindow() const
{
return mainWindow;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractApplication::setMainWindow(QWidget *value)
{
SCASSERT(value != nullptr)
mainWindow = value;
}
//---------------------------------------------------------------------------------------------------------------------
inline QUndoStack *VAbstractApplication::getUndoStack() const
{
return undoStack;
}
#endif // VABSTRACTAPPLICATION_H

View File

@ -1024,17 +1024,17 @@ delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points) {
qsort(del.points, num_points, sizeof(point2d_t*), cmp_points);
if( num_points >= 3 ) {
del_divide_and_conquer( &del, 0, num_points - 1 );
unsigned int fbuff_size = 0;
unsigned int j = 0;
del_divide_and_conquer( &del, 0, num_points - 1 );
del_build_faces( &del );
unsigned int fbuff_size = 0;
for( i = 0; i < del.num_faces; i++ )
fbuff_size += del.faces[i].num_verts + 1;
faces = (unsigned int*)malloc(sizeof(unsigned int) * fbuff_size);
unsigned int j = 0;
for( i = 0; i < del.num_faces; i++ )
{
halfedge_t *curr;

View File

@ -34,14 +34,13 @@
#include "../vgeometry/vgobject.h"
#include "../ifc/exception/vexceptionbadid.h"
#include "../vgeometry/vabstractcurve.h"
#include "vtranslatevars.h"
#include <QCoreApplication>
#include <QHash>
#include <QSet>
#include <QSharedPointer>
class VTranslateVars;
#if defined(Q_CC_INTEL)
#pragma warning( push )
#pragma warning( disable: 2021 )