Fix build on Windows.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-11-13 12:59:25 +02:00
parent d5cd6095e5
commit f71b0fd328
6 changed files with 72 additions and 8 deletions

View file

@ -33,7 +33,7 @@
#include "qmuparserdef.h"
#include "qmuparsererror.h"
#include "../vmisc/vmath.h"
#include "../vmisc/def.h"
#include "../vmisc/defglobal.h"
/**
* @file

View file

@ -239,8 +239,6 @@ void SetItemOverrideCursor(QGraphicsItem *item, const QString &pixmapPath, int h
#endif
}
const qreal PrintDPI = PRINTDPI;
//---------------------------------------------------------------------------------------------------------------------
double ToPixel(double val, const Unit &unit)
{

View file

@ -41,6 +41,7 @@
#endif /* Q_OS_WIN */
#include "debugbreak.h"
#include "defglobal.h"
template <class T> class QSharedPointer;
@ -421,9 +422,6 @@ extern const QString unitPX;
void SetItemOverrideCursor(QGraphicsItem *item, const QString & pixmapPath, int hotX = -1, int hotY = -1);
#define PRINTDPI 96.0
extern const qreal PrintDPI;
Q_REQUIRED_RESULT double ToPixel(double val, const Unit &unit);
Q_REQUIRED_RESULT double FromPixel(double pix, const Unit &unit);

View file

@ -0,0 +1,30 @@
/************************************************************************
**
** @file global.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 13 11, 2017
**
** @brief
** @copyright
** This source code is part of the Valentina project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2017 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina 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 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#include "defglobal.h"
const qreal PrintDPI = PRINTDPI;

View file

@ -0,0 +1,36 @@
/************************************************************************
**
** @file defglobal.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 13 11, 2017
**
** @brief
** @copyright
** This source code is part of the Valentina project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2017 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina 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 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef DEFGLOBAL_H
#define DEFGLOBAL_H
#include <QtGlobal>
#define PRINTDPI 96.0
extern const qreal PrintDPI;
#endif // DEFGLOBAL_H

View file

@ -11,7 +11,8 @@ SOURCES += \
$$PWD/commandoptions.cpp \
$$PWD/qxtcsvmodel.cpp \
$$PWD/vtablesearch.cpp \
$$PWD/dialogs/dialogexporttocsv.cpp
$$PWD/dialogs/dialogexporttocsv.cpp \
$$PWD/defglobal.cpp
*msvc*:SOURCES += $$PWD/stable.cpp
@ -33,7 +34,8 @@ HEADERS += \
$$PWD/vtablesearch.h \
$$PWD/diagnostic.h \
$$PWD/dialogs/dialogexporttocsv.h \
$$PWD/customevents.h
$$PWD/customevents.h \
$$PWD/defglobal.h
# Qt's versions
# 5.2.0, 5.2.1