Increase required Qt version up to 5.4.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-04-05 15:42:22 +03:00
parent 5f181e3a54
commit 0987428a93
108 changed files with 85 additions and 1179 deletions

View File

@ -1,13 +1,12 @@
Pattern making program
Author Roman Telezhynskyi <dismine(at)gmail.com>
Copyright (C) 2013-2017 Valentina project
Copyright (C) 2013-2019 Valentina project
Valentina Web page: https://valentinaproject.bitbucket.io/
Wiki: https://wiki.valentinaproject.org
Valentina main repository: https://bitbucket.org/dismine/valentina/overview
Forum http://valentinaproject.forumotion.me/
PPA for Ubuntu (develop): https://launchpad.net/~dismine/+archive/valentina-dev
Help translate https://www.transifex.com/organization/valentina
IRC channel: #valentina on irc.freenode.net.
Valentina
==========
@ -17,26 +16,13 @@ creation, using either standard sizing tables or an individuals set of
measurements. It blends new technologies with traditional methods to create
a unique pattern making tool.
Supported Platforms
===================
The standalone binary packages support the following platforms:
Windows XP SP2 (32-bit) or later
Ubuntu Linux 14.04 (32-bit/64-bit) or later
OpenSUSE 13.02 (32-bit/64-bit) or later
Fedora 24 (32-bit/64-bit) or later
Mac OS X 10.8 (64-bit) or later
Building the sources requires Qt 5.2.0 or later.
Compiling Valentina
====================
Prerequisites:
* Qt 5.2.0 or later (On Unix development packages needed)
* Qt 5.4.0 or later (On Unix development packages needed)
* mercurial (only for working with repository)
* On Unix:
- g++ (at least GCC 4.7 is needed and GCC 4.8 is recommended) or
clang (clang 3.4 recommended)
- g++ 4.8 or clang 3.4
- xpdf package (tool pdftops).
* On Windows:
- MinGW

View File

@ -1,9 +1,9 @@
include(common.pri)
#Check if Qt version >= 5.2.0
!minQtVersion(5, 2, 0) {
#Check if Qt version >= 5.4.0
!minQtVersion(5, 4, 0) {
message("Cannot build Valentina with Qt version $${QT_VERSION}.")
error("Use at least Qt 5.2.0.")
error("Use at least Qt 5.4.0.")
}
#These checks need because we can quote all paths that contain space.

View File

@ -272,11 +272,6 @@ ISYSTEM += \
-isystem "$$[QT_INSTALL_HEADERS]/QtTest" \
-isystem "$$[QT_INSTALL_HEADERS]/QtConcurrent"
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]/QtOpenGL"
}
} else {
ISYSTEM += \
-isystem "$$[QT_INSTALL_LIBS]/QtWidgets.framework/Headers/" \
@ -299,14 +294,6 @@ ISYSTEM += \
-isystem "$$[QT_INSTALL_LIBS]/QtTest.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtConcurrent.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtConcurrent.framework/Versions/5/Headers/"
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
ISYSTEM += \
-isystem "$$[QT_INSTALL_LIBS]/QtOpenGL.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtOpenGL.framework/Versions/5/Headers/"
}
}
# Usefull GCC warnings keys.

View File

@ -3,20 +3,20 @@ Section: graphics
Priority: optional
Maintainer: Roman Telezhynskyi <dismine@gmail.com>
Build-Depends: debhelper (>= 8.0.0),
qtbase5-dev (>= 5.2.0),
libqt5svg5-dev (>= 5.2.0),
g++ (>= 4.7.0),
qt5-default (>= 5.2.0),
qttools5-dev-tools (>= 5.2.0),
libqt5xmlpatterns5-dev (>= 5.2.0),
libqt5opengl5-dev (>= 5.2.0)
qtbase5-dev (>= 5.4.0),
libqt5svg5-dev (>= 5.4.0),
g++ (>= 4.8.0),
qt5-default (>= 5.4.0),
qttools5-dev-tools (>= 5.4.0),
libqt5xmlpatterns5-dev (>= 5.4.0),
libqt5opengl5-dev (>= 5.4.0)
Standards-Version: 3.9.5
Homepage: https://valentinaproject.bitbucket.io/
Vcs-Browser: https://bitbucket.org/dismine/valentina
Package: valentina
Architecture: i386 amd64
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.2.0) | libqt5core5 (>= 5.2.0), libqt5gui5 (>= 5.2.0) | libqt5gui5-gles (>= 5.2.0), libqt5printsupport5 (>= 5.2.0), libqt5svg5 (>= 5.2.0), libqt5widgets5 (>= 5.2.0), libqt5xml5 (>= 5.2.0), libqt5xmlpatterns5 (>= 5.2.0), libqt5concurrent5(>= 5.2.0), libqt5opengl5 (>= 5.2.0), libstdc++6 (>= 4.6), xpdf
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0) | libqt5core5 (>= 5.4.0), libqt5gui5 (>= 5.4.0) | libqt5gui5-gles (>= 5.4.0), libqt5printsupport5 (>= 5.4.0), libqt5svg5 (>= 5.4.0), libqt5widgets5 (>= 5.4.0), libqt5xml5 (>= 5.4.0), libqt5xmlpatterns5 (>= 5.4.0), libqt5concurrent5(>= 5.4.0), libqt5opengl5 (>= 5.4.0), libstdc++6 (>= 4.8), xpdf
Conflicts: seamly2d
Description: Pattern making program.
Valentina is a cross-platform patternmaking program which allows designers

16
dist/debian/control vendored
View File

@ -3,20 +3,20 @@ Section: graphics
Priority: optional
Maintainer: Roman Telezhynskyi <dismine@gmail.com>
Build-Depends: debhelper (>= 8.0.0),
qtbase5-dev (>= 5.2.0),
libqt5svg5-dev (>= 5.2.0),
g++ (>= 4.7.0),
qt5-default (>= 5.2.0),
qttools5-dev-tools (>= 5.2.0),
libqt5xmlpatterns5-dev (>= 5.2.0),
libqt5opengl5-dev (>= 5.2.0)
qtbase5-dev (>= 5.4.0),
libqt5svg5-dev (>= 5.4.0),
g++ (>= 4.8.0),
qt5-default (>= 5.4.0),
qttools5-dev-tools (>= 5.4.0),
libqt5xmlpatterns5-dev (>= 5.4.0),
libqt5opengl5-dev (>= 5.4.0)
Standards-Version: 3.9.5
Homepage: https://valentinaproject.bitbucket.io/
Vcs-Browser: https://bitbucket.org/dismine/valentina
Package: valentina
Architecture: i386 amd64
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.2.0) | libqt5core5 (>= 5.2.0), libqt5gui5 (>= 5.2.0) | libqt5gui5-gles (>= 5.2.0), libqt5printsupport5 (>= 5.2.0), libqt5svg5 (>= 5.2.0), libqt5widgets5 (>= 5.2.0), libqt5xml5 (>= 5.2.0), libqt5xmlpatterns5 (>= 5.2.0), libqt5concurrent5(>= 5.2.0), libqt5opengl5 (>= 5.2.0), libstdc++6 (>= 4.6), xpdf
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0) | libqt5core5 (>= 5.4.0), libqt5gui5 (>= 5.4.0) | libqt5gui5-gles (>= 5.4.0), libqt5printsupport5 (>= 5.4.0), libqt5svg5 (>= 5.4.0), libqt5widgets5 (>= 5.4.0), libqt5xml5 (>= 5.4.0), libqt5xmlpatterns5 (>= 5.4.0), libqt5concurrent5(>= 5.4.0), libqt5opengl5 (>= 5.4.0), libstdc++6 (>= 4.8), xpdf
Conflicts: seamly2d
Description: Pattern making program.
Valentina is a cross-platform patternmaking program which allows designers

View File

@ -9,7 +9,7 @@ Requires(postun): desktop-file-utils
Conflicts: seamly2d
%if 0%{?fedora_version} > 0 || 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700
BuildRequires: qt5-qtbase-devel >= 5.2.0
BuildRequires: qt5-qtbase-devel >= 5.4.0
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
@ -20,17 +20,17 @@ BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: qt5-qtxmlpatterns-devel >= 5.2.0
BuildRequires: qt5-qtsvg-devel >= 5.2.0
BuildRequires: qt5-qttools-devel >= 5.2.0
BuildRequires: qt5-qtxmlpatterns-devel >= 5.4.0
BuildRequires: qt5-qtsvg-devel >= 5.4.0
BuildRequires: qt5-qttools-devel >= 5.4.0
Requires: qt5-qtsvg >= 5.2.0
Requires: qt5-qtbase-gui >= 5.2.0
Requires: qt5-qtxmlpatterns >= 5.2.0
Requires: qt5-qtsvg >= 5.4.0
Requires: qt5-qtbase-gui >= 5.4.0
Requires: qt5-qtxmlpatterns >= 5.4.0
%endif
%if 0%{?mageia} > 0
BuildRequires: libqt5-devel >= 5.2.0
BuildRequires: libqt5-devel >= 5.4.0
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
@ -43,7 +43,7 @@ BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: libproxy-pacrunner
BuildRequires: qttools5
BuildRequires: qtbase5-common-devel >= 5.2.0
BuildRequires: qtbase5-common-devel >= 5.4.0
%if 0%{?mageia} == 6
BuildRequires: pkgconfig(openssl)

View File

@ -42,7 +42,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(flags);
Q_INIT_RESOURCE(style);
QT_REQUIRE_VERSION(argc, argv, "5.2.0")// clazy:exclude=qstring-arg
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations
#if defined(Q_OS_WIN)
VAbstractApplication::WinAttachConsole();
@ -55,11 +55,7 @@ int main(int argc, char *argv[])
MApplication app(argc, argv);
app.InitOptions();
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QTimer::singleShot(0, &app, &MApplication::ProcessCMD);
#else
QTimer::singleShot(0, &app, SLOT(ProcessCMD()));
#endif
return app.exec();
}

View File

@ -34,7 +34,6 @@
#include "../ifc/exception/vexceptionconversionerror.h"
#include "../ifc/exception/vexceptionemptyparameter.h"
#include "../ifc/exception/vexceptionwrongid.h"
#include "../vmisc/logging.h"
#include "../vmisc/vsysexits.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/qt_dispatch/qt_dispatch.h"
@ -160,7 +159,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
case QtFatalMsg:
vStdErr() << QApplication::translate("mNoisyHandler", "FATAL:") << msg << "\n";
break;
#if QT_VERSION > QT_VERSION_CHECK(5, 4, 2)
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
case QtInfoMsg:
vStdOut() << QApplication::translate("mNoisyHandler", "INFO:") << msg << "\n";
break;
@ -193,7 +192,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Fatal error"));
messageBox.setIcon(QMessageBox::Critical);
break;
#if QT_VERSION > QT_VERSION_CHECK(5, 4, 2)
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
case QtInfoMsg:
messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Information"));
messageBox.setIcon(QMessageBox::Information);

View File

@ -9,11 +9,6 @@ include(../../../common.pri)
QT += core gui widgets network xml xmlpatterns printsupport svg concurrent
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
QT += opengl
}
# Name of binary file
TARGET = tape
@ -23,13 +18,7 @@ TEMPLATE = app
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
@ -335,11 +324,6 @@ noRunPath{ # For enable run qmake with CONFIG+=noRunPath
}
}
win32:greaterThan(QT_MAJOR_VERSION, 4) {
# Link with library uxtheme to enable new style since WindowsXP or later
LIBS += -luxtheme
}
# When the GNU linker sees a library, it discards all symbols that it doesn't need.
# Dependent library go first.

View File

@ -35,7 +35,6 @@
#include "../ifc/exception/vexceptioninvalidnotch.h"
#include "../vwidgets/vmaingraphicsview.h"
#include "../version.h"
#include "../vmisc/logging.h"
#include "../vmisc/vmath.h"
#include "../qmuparser/qmuparsererror.h"
#include "../mainwindow.h"
@ -171,7 +170,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
.arg(context.function, context.category, msg);
vStdErr() << QApplication::translate("vNoisyHandler", "FATAL:") << msg << "\n";
break;
#if QT_VERSION > QT_VERSION_CHECK(5, 4, 2)
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
case QtInfoMsg:
debugdate += QString(":INFO:%1(%2)] %3: %4: %5").arg(context.file).arg(context.line)
.arg(context.function, context.category, msg);
@ -209,7 +208,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
messageBox.setWindowTitle(QApplication::translate("vNoisyHandler", "Fatal error"));
messageBox.setIcon(QMessageBox::Critical);
break;
#if QT_VERSION > QT_VERSION_CHECK(5, 4, 2)
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
case QtInfoMsg:
messageBox.setWindowTitle(QApplication::translate("vNoisyHandler", "Information"));
messageBox.setIcon(QMessageBox::Information);

View File

@ -738,22 +738,7 @@ void DialogLayoutSettings::InitLayoutUnits()
void DialogLayoutSettings::InitPrinter()
{
ui->comboBoxPrinter->clear();
QStringList printerNames;
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
const QList<QPrinterInfo> printers = QPrinterInfo::availablePrinters();
for(auto printer : printers)
{
const QString name = printer.printerName();
if (not name.isEmpty())
{
printerNames.append(name);
}
}
#else
printerNames = QPrinterInfo::availablePrinterNames();
#endif
ui->comboBoxPrinter->addItems(printerNames);
ui->comboBoxPrinter->addItems(QPrinterInfo::availablePrinterNames());
if (ui->comboBoxPrinter->count() == 0)
{
@ -761,17 +746,7 @@ void DialogLayoutSettings::InitPrinter()
}
else
{
QString defPrinterName;
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
const QPrinterInfo def = QPrinterInfo::defaultPrinter();
if(not def.isNull())
{
defPrinterName = def.printerName();
}
#else
defPrinterName = QPrinterInfo::defaultPrinterName();
#endif
const int index = ui->comboBoxPrinter->findText(defPrinterName);
const int index = ui->comboBoxPrinter->findText(QPrinterInfo::defaultPrinterName());
if(index != -1)
{
ui->comboBoxPrinter->setCurrentIndex(index);

View File

@ -30,17 +30,12 @@
#define DIALOGLAYOUTSETTINGS_H
#include <QCloseEvent>
#include "vabstractlayoutdialog.h"
#include <QMargins>
#include "vabstractlayoutdialog.h"
#include "../vlayout/vbank.h"
#include "../ifc/ifcdef.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
# include "../vmisc/backport/qmarginsf.h"
#else
# include <QMargins>
#endif
namespace Ui
{
class DialogLayoutSettings;

View File

@ -47,7 +47,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(toolicon);
Q_INIT_RESOURCE(style);
QT_REQUIRE_VERSION(argc, argv, "5.2.0")// clazy:exclude=qstring-arg,qstring-allocations
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations
#if defined(Q_OS_WIN)
VAbstractApplication::WinAttachConsole();
@ -89,11 +89,7 @@ int main(int argc, char *argv[])
msec = 15; // set delay for correct the first fitbest zoom
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QTimer::singleShot(msec, &w, &MainWindow::ProcessCMD);
#else
QTimer::singleShot(msec, &w, SLOT(ProcessCMD()));
#endif
return app.exec();
}

View File

@ -45,7 +45,6 @@
#include "core/vtooloptionspropertybrowser.h"
#include "options.h"
#include "../ifc/xml/vpatternconverter.h"
#include "../vmisc/logging.h"
#include "../vformat/vmeasurements.h"
#include "../ifc/xml/vvstconverter.h"
#include "../ifc/xml/vvitconverter.h"
@ -4723,11 +4722,7 @@ bool MainWindow::LoadPattern(QString fileName, const QString& customMeasureFile)
{
/* Collect garbage only after successfully parse. This way wrongly accused items have one more time to restore
* a reference. */
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QTimer::singleShot(100, Qt::CoarseTimer, this, [this](){doc->GarbageCollector(true);});
#else
doc->GarbageCollector(true);
#endif
}
patternReadOnly = doc->IsReadOnly();

View File

@ -882,16 +882,9 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer)
qreal x,y;
if(printer->fullPage())
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
QMarginsF printerMargins = printer->pageLayout().margins();
x = qFloor(ToPixel(printerMargins.left(),Unit::Mm));
y = qFloor(ToPixel(printerMargins.top(),Unit::Mm));
#else
qreal left = 0, top = 0, right = 0, bottom = 0;
printer->getPageMargins(&left, &top, &right, &bottom, QPrinter::Millimeter);
x = qFloor(ToPixel(left,Unit::Mm));
y = qFloor(ToPixel(top,Unit::Mm));
#endif
QMarginsF printerMargins = printer->pageLayout().margins();
x = qFloor(ToPixel(printerMargins.left(),Unit::Mm));
y = qFloor(ToPixel(printerMargins.top(),Unit::Mm));
}
else
{
@ -1173,15 +1166,12 @@ void MainWindowsNoGUI::PdfFile(const QString &name, QGraphicsRectItem *paper, QG
const qreal top = FromPixel(margins.top(), Unit::Mm);
const qreal right = FromPixel(margins.right(), Unit::Mm);
const qreal bottom = FromPixel(margins.bottom(), Unit::Mm);
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
const bool success = printer.setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter);
if (not success)
{
qWarning() << tr("Cannot set printer margins");
}
#else
printer.setPageMargins(left, top, right, bottom, QPrinter::Millimeter);
#endif //QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
QPainter painter;
if (painter.begin( &printer ) == false)
@ -1592,16 +1582,12 @@ void MainWindowsNoGUI::SetPrinterSettings(QPrinter *printer, const PrintType &pr
bottom = pageMargin.bottom();
}
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
const bool success = printer->setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter);
const bool success = printer->setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter);
if (not success)
{
qWarning() << tr("Cannot set printer margins");
}
#else
printer->setPageMargins(left, top, right, bottom, QPrinter::Millimeter);
#endif //QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
switch(printType)
{

View File

@ -13,11 +13,6 @@ include(../../../common.pri)
# library in installer.
QT += core gui widgets xml svg printsupport xmlpatterns concurrent
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
QT += opengl
}
# Use winextras only for Windows 7+
win32:greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 6) {
QT += winextras
@ -36,13 +31,7 @@ macx{
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
@ -313,11 +302,6 @@ win32:*g++* {
$$[QT_INSTALL_BINS]/libstdc++-6.dll \
$$[QT_INSTALL_BINS]/libwinpthread-1.dll
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
package.files += $$[QT_INSTALL_BINS]/Qt5OpenGL.dll
}
# For support Windows 7+
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 6) {
package.files += $$[QT_INSTALL_BINS]/Qt5WinExtras.dll
@ -476,11 +460,6 @@ noRunPath{ # For enable run qmake with CONFIG+=noRunPath
}
}
win32:greaterThan(QT_MAJOR_VERSION, 4) {
# Link with library uxtheme to enable new style since WindowsXP or later
LIBS += -luxtheme
}
# When the GNU linker sees a library, it discards all symbols that it doesn't need.
# Dependent library go first.

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -21,13 +21,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -37,7 +37,6 @@
#include "../exception/vexceptionemptyparameter.h"
#include "../exception/vexceptionwrongid.h"
#include "../exception/vexception.h"
#include "../vmisc/logging.h"
#include "../ifcdef.h"
#include <QAbstractMessageHandler>

View File

@ -41,11 +41,11 @@
#include <QStringDataPtr>
#include <QtGlobal>
#include <QLocale>
#include <QLoggingCategory>
#include "../ifc/ifcdef.h"
#include "../vmisc/def.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
class QDomElement;
class QDomNode;

View File

@ -19,13 +19,7 @@ TEMPLATE = lib
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -855,13 +855,7 @@ DRW_Entity *VDxfEngine::AAMAText(const QPointF &pos, const QString &text, const
//---------------------------------------------------------------------------------------------------------------------
std::string VDxfEngine::FromUnicodeToCodec(const QString &str, QTextCodec *codec)
{
const QByteArray encodedString = codec->fromUnicode(str);
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
return encodedString.toStdString();
#else
return std::string(encodedString.constData(), static_cast<std::string::size_type>(encodedString.length()));
#endif
return codec->fromUnicode(str).toStdString();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -21,13 +21,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -31,7 +31,6 @@
#include <climits>
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "vlayoutpiece.h"

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -38,18 +38,11 @@
#include <QtGlobal>
#include <memory>
#include <atomic>
#include <QMargins>
#include "vbank.h"
#include "vlayoutdef.h"
class QMarginsF;
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
# include "../vmisc/backport/qmarginsf.h"
#else
# include <QMargins>
#endif
class QGraphicsItem;
class VLayoutPaper;
class QElapsedTimer;

View File

@ -262,19 +262,10 @@ QRect VPoster::PageRect() const
if(printer->fullPage())
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
QMarginsF pMargins = printer->pageLayout().margins();
QRectF newRect = rect.marginsRemoved(pMargins);
const QRect pageRectFP(0, 0, qFloor(ToPixel(newRect.width())), qFloor(ToPixel(newRect.height())));
return pageRectFP;
#else
qreal left = 0 , top = 0, right = 0, bottom = 0;
printer->getPageMargins(&left, &top, &right, &bottom, QPrinter::Millimeter);
qreal newWidth = rect.width()-left-right;
qreal newHeight = rect.height()-top-bottom;
const QRect pageRectFP(0, 0, qFloor(ToPixel(newWidth)), qFloor(ToPixel(newHeight)));
return pageRectFP;
#endif
QMarginsF pMargins = printer->pageLayout().margins();
QRectF newRect = rect.marginsRemoved(pMargins);
const QRect pageRectFP(0, 0, qFloor(ToPixel(newRect.width())), qFloor(ToPixel(newRect.height())));
return pageRectFP;
}
else
{

View File

@ -1,377 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmarginsf.h"
#include <QDebugStateSaver>
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
#include <QDataStream>
#include <QtDebug>
/*!
\class QMarginsF
\inmodule QtCore
\ingroup painting
\since 5.3
\brief The QMarginsF class defines the four margins of a rectangle.
QMarginsF defines a set of four margins; left, top, right and bottom,
that describe the size of the borders surrounding a rectangle.
The isNull() function returns \c true only if all margins are set to zero.
QMarginsF objects can be streamed as well as compared.
*/
/*****************************************************************************
QMarginsF member functions
*****************************************************************************/
/*!
\fn QMarginsF::QMarginsF()
Constructs a margins object with all margins set to 0.
\sa isNull()
*/
/*!
\fn QMarginsF::QMarginsF(qreal left, qreal top, qreal right, qreal bottom)
Constructs margins with the given \a left, \a top, \a right, \a bottom
\sa setLeft(), setRight(), setTop(), setBottom()
*/
/*!
\fn QMarginsF::QMarginsF(const QMargins &margins)
Constructs margins copied from the given \a margins
*/
/*!
\fn bool QMarginsF::isNull() const
Returns \c true if all margins are 0; otherwise returns
false.
*/
/*!
\fn qreal QMarginsF::left() const
Returns the left margin.
\sa setLeft()
*/
/*!
\fn qreal QMarginsF::top() const
Returns the top margin.
\sa setTop()
*/
/*!
\fn qreal QMarginsF::right() const
Returns the right margin.
*/
/*!
\fn qreal QMarginsF::bottom() const
Returns the bottom margin.
*/
/*!
\fn void QMarginsF::setLeft(qreal left)
Sets the left margin to \a left.
*/
/*!
\fn void QMarginsF::setTop(qreal Top)
Sets the Top margin to \a Top.
*/
/*!
\fn void QMarginsF::setRight(qreal right)
Sets the right margin to \a right.
*/
/*!
\fn void QMarginsF::setBottom(qreal bottom)
Sets the bottom margin to \a bottom.
*/
/*!
\fn bool operator==(const QMarginsF &lhs, const QMarginsF &rhs)
\relates QMarginsF
Returns \c true if \a lhs and \a rhs are equal; otherwise returns \c false.
*/
/*!
\fn bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs)
\relates QMarginsF
Returns \c true if \a lhs and \a rhs are different; otherwise returns \c false.
*/
/*!
\fn const QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs)
\relates QMarginsF
Returns a QMarginsF object that is the sum of the given margins, \a lhs
and \a rhs; each component is added separately.
\sa QMarginsF::operator+=(), QMarginsF::operator-=()
*/
/*!
\fn const QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs)
\relates QMarginsF
Returns a QMarginsF object that is formed by subtracting \a rhs from
\a lhs; each component is subtracted separately.
\sa QMarginsF::operator+=(), QMarginsF::operator-=()
*/
/*!
\fn const QMarginsF operator+(const QMarginsF &lhs, qreal rhs)
\relates QMarginsF
Returns a QMarginsF object that is formed by adding \a rhs to
\a lhs.
\sa QMarginsF::operator+=(), QMarginsF::operator-=()
*/
/*!
\fn const QMarginsF operator+(qreal lhs, const QMarginsF &rhs)
\relates QMarginsF
Returns a QMarginsF object that is formed by adding \a lhs to
\a rhs.
\sa QMarginsF::operator+=(), QMarginsF::operator-=()
*/
/*!
\fn const QMarginsF operator-(const QMarginsF &lhs, qreal rhs)
\relates QMarginsF
Returns a QMarginsF object that is formed by subtracting \a rhs from
\a lhs.
\sa QMarginsF::operator+=(), QMarginsF::operator-=()
*/
/*!
\fn const QMarginsF operator*(const QMarginsF &lhs, qreal rhs)
\relates QMarginsF
\overload
Returns a QMarginsF object that is formed by multiplying each component
of the given \a lhs margins by \a rhs factor.
\sa QMarginsF::operator*=(), QMarginsF::operator/=()
*/
/*!
\fn const QMarginsF operator*(qreal lhs, const QMarginsF &rhs)
\relates QMarginsF
\overload
Returns a QMarginsF object that is formed by multiplying each component
of the given \a lhs margins by \a rhs factor.
\sa QMarginsF::operator*=(), QMarginsF::operator/=()
*/
/*!
\fn const QMarginsF operator/(const QMarginsF &lhs, qreal rhs)
\relates QMarginsF
\overload
Returns a QMarginsF object that is formed by dividing the components of
the given \a lhs margins by the given \a rhs divisor.
\sa QMarginsF::operator*=(), QMarginsF::operator/=()
*/
/*!
\fn QMarginsF operator+(const QMarginsF &margins)
\relates QMarginsF
Returns a QMargin object that is formed from all components of \a margins.
*/
/*!
\fn QMarginsF operator-(const QMarginsF &margins)
\relates QMarginsF
Returns a QMargin object that is formed by negating all components of \a margins.
*/
/*!
\fn QMarginsF &QMarginsF::operator+=(const QMarginsF &margins)
Add each component of \a margins to the respective component of this object
and returns a reference to it.
\sa operator-=()
*/
/*!
\fn QMarginsF &QMarginsF::operator-=(const QMarginsF &margins)
Subtract each component of \a margins from the respective component of this object
and returns a reference to it.
\sa operator+=()
*/
/*!
\fn QMarginsF &QMarginsF::operator+=(qreal addend)
\overload
Adds the \a addend to each component of this object
and returns a reference to it.
\sa operator-=()
*/
/*!
\fn QMarginsF &QMarginsF::operator-=(qreal subtrahend)
\overload
Subtracts the \a subtrahend from each component of this object
and returns a reference to it.
\sa operator+=()
*/
/*!
\fn QMarginsF &QMarginsF::operator*=(qreal factor)
Multiplies each component of this object by \a factor
and returns a reference to it.
\sa operator/=()
*/
/*!
\fn QMarginsF &QMarginsF::operator/=(qreal divisor)
Divides each component of this object by \a divisor
and returns a reference to it.
\sa operator*=()
*/
/*!
\fn QMargins QMarginsF::toMargins() const
Returns an integer based copy of this margins object.
Note that the components in the returned margins will be rounded to
the nearest integer.
\sa QMarginsF()
*/
/*****************************************************************************
QMarginsF stream functions
*****************************************************************************/
#ifndef QT_NO_DATASTREAM
/*!
\fn QDataStream &operator<<(QDataStream &stream, const QMarginsF &m)
\relates QMarginsF
Writes margin \a m to the given \a stream and returns a
reference to the stream.
\sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QMarginsF &m)
{
s << double(m.left()) << double(m.top()) << double(m.right()) << double(m.bottom());
return s;
}
/*!
\fn QDataStream &operator>>(QDataStream &stream, QMarginsF &m)
\relates QMarginsF
Reads a margin from the given \a stream into margin \a m
and returns a reference to the stream.
\sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QMarginsF &m)
{
double left = 0, top = 0, right = 0, bottom = 0;
s >> left;
s >> top;
s >> right;
s >> bottom;
m = QMarginsF(qreal(left), qreal(top), qreal(right), qreal(bottom));
return s;
}
#endif // QT_NO_DATASTREAM
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QMarginsF &m)
{
QDebugStateSaver saver(dbg);
dbg.nospace();
dbg << "QMarginsF" << '(';
dbg << m.left() << ", " << m.top() << ", " << m.right() << ", " << m.bottom();
dbg << ')';
return dbg;
}
#endif
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)

View File

@ -1,253 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMARGINSF_H
#define QMARGINSF_H
#include <qcompilerdetection.h>
#include <QTypeInfo>
#include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
#include <QMargins>
/*****************************************************************************
QMarginsF class
*****************************************************************************/
class QMarginsF
{
public:
Q_DECL_CONSTEXPR QMarginsF() Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR QMarginsF(qreal left, qreal top, qreal right, qreal bottom) Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR explicit QMarginsF(const QMargins &margins) Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR bool isNull() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR qreal left() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR qreal top() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR qreal right() const Q_DECL_NOTHROW;
Q_DECL_CONSTEXPR qreal bottom() const Q_DECL_NOTHROW;
void setLeft(qreal left) Q_DECL_NOTHROW;
void setTop(qreal top) Q_DECL_NOTHROW;
void setRight(qreal right) Q_DECL_NOTHROW;
void setBottom(qreal bottom) Q_DECL_NOTHROW;
QMarginsF &operator+=(const QMarginsF &margins) Q_DECL_NOTHROW;
QMarginsF &operator-=(const QMarginsF &margins) Q_DECL_NOTHROW;
QMarginsF &operator+=(qreal addend) Q_DECL_NOTHROW;
QMarginsF &operator-=(qreal subtrahend) Q_DECL_NOTHROW;
QMarginsF &operator*=(qreal factor) Q_DECL_NOTHROW;
QMarginsF &operator/=(qreal divisor);
Q_DECL_CONSTEXPR QMargins toMargins() const Q_DECL_NOTHROW;
private:
qreal m_left;
qreal m_top;
qreal m_right;
qreal m_bottom;
};
Q_DECLARE_TYPEINFO(QMarginsF, Q_MOVABLE_TYPE);
/*****************************************************************************
QMarginsF stream functions
*****************************************************************************/
#ifndef QT_NO_DATASTREAM
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QMarginsF &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QMarginsF &);
#endif
/*****************************************************************************
QMarginsF inline functions
*****************************************************************************/
Q_DECL_CONSTEXPR inline QMarginsF::QMarginsF() Q_DECL_NOTHROW
: m_left(0), m_top(0), m_right(0), m_bottom(0) {}
Q_DECL_CONSTEXPR inline QMarginsF::QMarginsF(qreal aleft, qreal atop, qreal aright, qreal abottom) Q_DECL_NOTHROW
: m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}
Q_DECL_CONSTEXPR inline QMarginsF::QMarginsF(const QMargins &margins) Q_DECL_NOTHROW
: m_left(margins.left()), m_top(margins.top()), m_right(margins.right()), m_bottom(margins.bottom()) {}
Q_DECL_CONSTEXPR inline bool QMarginsF::isNull() const Q_DECL_NOTHROW
{ return qFuzzyIsNull(m_left) && qFuzzyIsNull(m_top) && qFuzzyIsNull(m_right) && qFuzzyIsNull(m_bottom); }
Q_DECL_CONSTEXPR inline qreal QMarginsF::left() const Q_DECL_NOTHROW
{ return m_left; }
Q_DECL_CONSTEXPR inline qreal QMarginsF::top() const Q_DECL_NOTHROW
{ return m_top; }
Q_DECL_CONSTEXPR inline qreal QMarginsF::right() const Q_DECL_NOTHROW
{ return m_right; }
Q_DECL_CONSTEXPR inline qreal QMarginsF::bottom() const Q_DECL_NOTHROW
{ return m_bottom; }
inline void QMarginsF::setLeft(qreal aleft) Q_DECL_NOTHROW
{ m_left = aleft; }
inline void QMarginsF::setTop(qreal atop) Q_DECL_NOTHROW
{ m_top = atop; }
inline void QMarginsF::setRight(qreal aright) Q_DECL_NOTHROW
{ m_right = aright; }
inline void QMarginsF::setBottom(qreal abottom) Q_DECL_NOTHROW
{ m_bottom = abottom; }
Q_DECL_CONSTEXPR inline bool operator==(const QMarginsF &lhs, const QMarginsF &rhs) Q_DECL_NOTHROW
{
return qFuzzyCompare(lhs.left(), rhs.left())
&& qFuzzyCompare(lhs.top(), rhs.top())
&& qFuzzyCompare(lhs.right(), rhs.right())
&& qFuzzyCompare(lhs.bottom(), rhs.bottom());
}
Q_DECL_CONSTEXPR inline bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs) Q_DECL_NOTHROW
{
return !operator==(lhs, rhs);
}
Q_DECL_CONSTEXPR inline QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs) Q_DECL_NOTHROW
{
return QMarginsF(lhs.left() + rhs.left(), lhs.top() + rhs.top(),
lhs.right() + rhs.right(), lhs.bottom() + rhs.bottom());
}
Q_DECL_CONSTEXPR inline QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs) Q_DECL_NOTHROW
{
return QMarginsF(lhs.left() - rhs.left(), lhs.top() - rhs.top(),
lhs.right() - rhs.right(), lhs.bottom() - rhs.bottom());
}
Q_DECL_CONSTEXPR inline QMarginsF operator+(const QMarginsF &lhs, qreal rhs) Q_DECL_NOTHROW
{
return QMarginsF(lhs.left() + rhs, lhs.top() + rhs,
lhs.right() + rhs, lhs.bottom() + rhs);
}
Q_DECL_CONSTEXPR inline QMarginsF operator+(qreal lhs, const QMarginsF &rhs) Q_DECL_NOTHROW
{
return QMarginsF(rhs.left() + lhs, rhs.top() + lhs,
rhs.right() + lhs, rhs.bottom() + lhs);
}
Q_DECL_CONSTEXPR inline QMarginsF operator-(const QMarginsF &lhs, qreal rhs) Q_DECL_NOTHROW
{
return QMarginsF(lhs.left() - rhs, lhs.top() - rhs,
lhs.right() - rhs, lhs.bottom() - rhs);
}
Q_DECL_CONSTEXPR inline QMarginsF operator*(const QMarginsF &lhs, qreal rhs) Q_DECL_NOTHROW
{
return QMarginsF(lhs.left() * rhs, lhs.top() * rhs,
lhs.right() * rhs, lhs.bottom() * rhs);
}
Q_DECL_CONSTEXPR inline QMarginsF operator*(qreal lhs, const QMarginsF &rhs) Q_DECL_NOTHROW
{
return QMarginsF(rhs.left() * lhs, rhs.top() * lhs,
rhs.right() * lhs, rhs.bottom() * lhs);
}
Q_DECL_CONSTEXPR inline QMarginsF operator/(const QMarginsF &lhs, qreal divisor)
{
return QMarginsF(lhs.left() / divisor, lhs.top() / divisor,
lhs.right() / divisor, lhs.bottom() / divisor);
}
inline QMarginsF &QMarginsF::operator+=(const QMarginsF &margins) Q_DECL_NOTHROW
{
return *this = *this + margins;
}
inline QMarginsF &QMarginsF::operator-=(const QMarginsF &margins) Q_DECL_NOTHROW
{
return *this = *this - margins;
}
inline QMarginsF &QMarginsF::operator+=(qreal addend) Q_DECL_NOTHROW
{
m_left += addend;
m_top += addend;
m_right += addend;
m_bottom += addend;
return *this;
}
inline QMarginsF &QMarginsF::operator-=(qreal subtrahend) Q_DECL_NOTHROW
{
m_left -= subtrahend;
m_top -= subtrahend;
m_right -= subtrahend;
m_bottom -= subtrahend;
return *this;
}
inline QMarginsF &QMarginsF::operator*=(qreal factor) Q_DECL_NOTHROW
{
return *this = *this * factor;
}
inline QMarginsF &QMarginsF::operator/=(qreal divisor)
{
return *this = *this / divisor;
}
Q_DECL_CONSTEXPR inline QMarginsF operator+(const QMarginsF &margins) Q_DECL_NOTHROW
{
return margins;
}
Q_DECL_CONSTEXPR inline QMarginsF operator-(const QMarginsF &margins) Q_DECL_NOTHROW
{
return QMarginsF(-margins.left(), -margins.top(), -margins.right(), -margins.bottom());
}
Q_DECL_CONSTEXPR inline QMargins QMarginsF::toMargins() const Q_DECL_NOTHROW
{
return QMargins(qRound(m_left), qRound(m_top), qRound(m_right), qRound(m_bottom));
}
#ifndef QT_NO_DEBUG_STREAM
Q_CORE_EXPORT QDebug operator<<(QDebug, const QMarginsF &);
#endif
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
#endif // QMARGINSF_H

View File

@ -307,27 +307,15 @@ QSharedPointer<QPrinter> PreparePrinter(const QPrinterInfo &info, QPrinter::Prin
QPrinterInfo tmpInfo = info;
if(tmpInfo.isNull() || tmpInfo.printerName().isEmpty())
{
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
const QList<QPrinterInfo> list = QPrinterInfo::availablePrinters();
const QStringList list = QPrinterInfo::availablePrinterNames();
if(list.isEmpty())
{
return QSharedPointer<QPrinter>();
}
else
{
tmpInfo = list.first();
tmpInfo = QPrinterInfo::printerInfo(list.first());
}
#else
const QStringList list = QPrinterInfo::availablePrinterNames();
if(list.isEmpty())
{
return QSharedPointer<QPrinter>();
}
else
{
tmpInfo = QPrinterInfo::printerInfo(list.first());
}
#endif
}
auto printer = QSharedPointer<QPrinter>(new QPrinter(tmpInfo, mode));
@ -338,7 +326,6 @@ QSharedPointer<QPrinter> PreparePrinter(const QPrinterInfo &info, QPrinter::Prin
//---------------------------------------------------------------------------------------------------------------------
QMarginsF GetMinPrinterFields(const QSharedPointer<QPrinter> &printer)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
QPageLayout layout = printer->pageLayout();
layout.setUnits(QPageLayout::Millimeter);
const QMarginsF minMargins = layout.minimumMargins();
@ -349,12 +336,6 @@ QMarginsF GetMinPrinterFields(const QSharedPointer<QPrinter> &printer)
min.setTop(UnitConvertor(minMargins.top(), Unit::Mm, Unit::Px));
min.setBottom(UnitConvertor(minMargins.bottom(), Unit::Mm, Unit::Px));
return min;
#else
auto tempPrinter = QSharedPointer<QPrinter>(new QPrinter(QPrinterInfo(* printer)));
tempPrinter->setFullPage(false);
tempPrinter->setPageMargins(0, 0, 0, 0, QPrinter::Millimeter);
return GetPrinterFields(tempPrinter);
#endif //QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -36,6 +36,7 @@
#include <Qt>
#include <QtGlobal>
#include <csignal>
#include <QMargins>
#ifdef Q_OS_WIN
#include <windows.h>
#endif /* Q_OS_WIN */
@ -44,12 +45,6 @@
#include "debugbreak.h"
#include "defglobal.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
# include "backport/qmarginsf.h"
#else
# include <QMargins>
#endif
template <class T> class QSharedPointer;
#include <ciso646>

View File

@ -1,49 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc.
** Contact: http://www.qt-project.org/legal
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
****************************************************************************/
#ifndef LOGGING_H
#define LOGGING_H
#include <QtGlobal>
// Backport useful macros
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
# ifndef qUtf8Printable
# define qUtf8Printable(string) QString(string).toUtf8().constData()
# endif
#endif
#include <QLoggingCategory>
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
// printf style for qCDebug was only added in Qt 5.3
#undef qCDebug
#undef qCWarning
#undef qCCritical
#define qCDebug(category, ...) \
for (bool q_category_enabled = category().isDebugEnabled(); q_category_enabled; q_category_enabled = false) \
QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, category().categoryName()).debug(__VA_ARGS__)
#define qCWarning(category, ...) \
for (bool q_category_enabled = category().isWarningEnabled(); q_category_enabled; q_category_enabled = false) \
QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, category().categoryName()).warning(__VA_ARGS__)
#define qCCritical(category, ...) \
for (bool q_category_enabled = category().isCriticalEnabled(); q_category_enabled; q_category_enabled = false) \
QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, category().categoryName()).critical(__VA_ARGS__)
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
#endif // LOGGING_H

View File

@ -15,8 +15,6 @@
#include <functional>
#include <cassert>
#include "logging.h"
typedef std::function<void()> voidBlock;
class WorkerClass : public QObject

View File

@ -30,6 +30,7 @@
#include <QDir>
#include <QLibraryInfo>
#include <QLoggingCategory>
#include <QMessageLogger>
#include <QStaticStringData>
#include <QStringData>
@ -40,7 +41,6 @@
#include <QtDebug>
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
//---------------------------------------------------------------------------------------------------------------------
VAbstractApplication::VAbstractApplication(int &argc, char **argv)
@ -66,15 +66,6 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
{
QString rules;
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
// In Qt 5.2 need manualy enable debug information for categories. This work
// because Qt doesn't provide debug information for categories itself. And in this
// case will show our messages. Another situation with Qt 5.3 that has many debug
// messages itself. We don't need this information and can turn on later if need.
// But here Qt already show our debug messages without enabling.
rules += QLatin1String("*.debug=true\n");
#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 1)
#if defined(V_NO_ASSERT)
// Ignore SSL-related warnings

View File

@ -20,7 +20,6 @@ SOURCES += \
HEADERS += \
$$PWD/stable.h \
$$PWD/def.h \
$$PWD/logging.h \
$$PWD/vmath.h \
$$PWD/vsettings.h \
$$PWD/vabstractapplication.h \
@ -51,11 +50,9 @@ HEADERS += \
contains(QT_VERSION, ^5\\.[0-2]\\.[0-2]$) { # Since Qt 5.3.0
HEADERS += \
$$PWD/backport/qmarginsf.h
HEADERS +=
SOURCES += \
$$PWD/backport/qmarginsf.cpp
SOURCES +=
}
FORMS += \

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -34,6 +34,7 @@
#include <QSettings>
#include <QString>
#include <QtGlobal>
#include <QMargins>
#include "../vmisc/def.h"
#include "../vlayout/vbank.h"
@ -41,12 +42,6 @@
template <class T> class QSharedPointer;
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
# include "../vmisc/backport/qmarginsf.h"
#else
# include <QMargins>
#endif
class VSettings : public VCommonSettings
{
Q_OBJECT

View File

@ -15,13 +15,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -32,6 +32,7 @@
#include <QVector>
#include <QtDebug>
#include <QUuid>
#include <QLoggingCategory>
#include "../ifc/exception/vexception.h"
#include "../vgeometry/vabstractcubicbezierpath.h"
@ -43,7 +44,6 @@
#include "../vgeometry/varc.h"
#include "../vgeometry/vellipticalarc.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "variables/varcradius.h"
#include "variables/vcurveangle.h"

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -19,13 +19,7 @@ TARGET = vpropertyexplorer
# We want create library
TEMPLATE = lib
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings

View File

@ -25,13 +25,7 @@
#include <QKeyEvent>
#include <QLayout>
#include <QLayoutItem>
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
# include "../vmisc/backport/qmarginsf.h"
#else
# include <QMargins>
#endif
#include <QMargins>
#include <QStyleOptionViewItem>
#include <QVariant>
#include <QWidget>

View File

@ -47,7 +47,6 @@
#include <QtGlobal>
#include <QLineF>
#include "logging.h"
#include "vsysexits.h"
#include "../vgeometry/vgobject.h"

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -54,7 +54,6 @@
#include "../ifc/ifcdef.h"
#include "../vgeometry/vgeometrydef.h"
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/vcommonsettings.h"
#include "../vwidgets/vmaingraphicsscene.h"

View File

@ -51,7 +51,6 @@
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/vcommonsettings.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vformula.h"
#include "../ifc/ifcdef.h"

View File

@ -51,7 +51,6 @@
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/vcommonsettings.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vformula.h"
#include "../ifc/ifcdef.h"

View File

@ -59,7 +59,6 @@
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/vcommonsettings.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vformula.h"
#include "../ifc/ifcdef.h"

View File

@ -59,7 +59,6 @@
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/vcommonsettings.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vformula.h"
#include "../ifc/ifcdef.h"

View File

@ -45,7 +45,6 @@
#include "../vgeometry/vgobject.h"
#include "../vgeometry/vpointf.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vwidgets/../ifc/ifcdef.h"
#include "../vwidgets/vsimplepoint.h"

View File

@ -62,7 +62,6 @@
#include "../vwidgets/vgraphicssimpletextitem.h"
#include "../vwidgets/vmaingraphicsscene.h"
#include "../vwidgets/vmaingraphicsview.h"
#include "../vmisc/logging.h"
#include "../../../vabstracttool.h"
#include "../../../vdatatool.h"
#include "../../vdrawtool.h"

View File

@ -50,7 +50,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vgeometry/vgobject.h"
#include "../vgeometry/vpointf.h"
#include "../vmisc/vabstractapplication.h"

View File

@ -45,7 +45,6 @@
#include "../../undocommands/savetooloptions.h"
#include "../qmuparser/qmuparsererror.h"
#include "../vpatterndb/vcontainer.h"
#include "../vmisc/logging.h"
#include "../vabstracttool.h"
template <class T> class QSharedPointer;

View File

@ -70,7 +70,6 @@
#include "../vgeometry/varc.h"
#include "../vgeometry/vellipticalarc.h"
#include "../vmisc/vcommonsettings.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vpiecenode.h"
#include "../vpatterndb/calculator.h"

View File

@ -34,8 +34,8 @@
#include <QObject>
#include <QString>
#include <QtGlobal>
#include <QLoggingCategory>
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
Q_DECLARE_LOGGING_CATEGORY(vTool)

View File

@ -1348,7 +1348,6 @@ void VToolSeamAllowance::RefreshGeometry(bool updateChildren)
m_seamAllowance->setPath(QPainterPath());
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
if (qApp->IsAppInGUIMode())
{
QTimer::singleShot(100, Qt::CoarseTimer, this, [this, updateChildren]()
@ -1376,16 +1375,6 @@ void VToolSeamAllowance::RefreshGeometry(bool updateChildren)
UpdateInternalPaths();
}
}
#else
UpdateDetailLabel();
UpdatePatternInfo();
UpdateGrainline();
UpdateExcludeState();
if (updateChildren)
{
UpdateInternalPaths();
}
#endif
m_passmarks->setPath(futurePassmarks.result());

View File

@ -57,7 +57,6 @@
#include "../vgeometry/vsplinepoint.h"
#include "../vgeometry/vplacelabelitem.h"
#include "../vmisc/diagnostic.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vpiecepath.h"

View File

@ -31,7 +31,6 @@
#include <QDomNode>
#include <QDomNodeList>
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -31,7 +31,6 @@
#include <QDomNode>
#include <QDomNodeList>
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -29,7 +29,6 @@
#include "addpatternpiece.h"
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../ifc/xml/vabstractpattern.h"
#include "vundocommand.h"

View File

@ -33,7 +33,6 @@
#include "../vwidgets/vmaingraphicsview.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/customevents.h"
#include "vundocommand.h"

View File

@ -31,7 +31,6 @@
#include <QDomNode>
#include <QDomNodeList>
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../ifc/xml/vabstractpattern.h"
#include "vundocommand.h"

View File

@ -34,7 +34,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../ifc/xml/vdomdocument.h"
#include "../vmisc/logging.h"
#include "../vmisc/def.h"
#include "../tools/vdatatool.h"
#include "vundocommand.h"

View File

@ -32,7 +32,6 @@
#include <QDomNode>
#include <QDomNodeList>
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -32,7 +32,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "vundocommand.h"

View File

@ -30,7 +30,6 @@
#include <QDomElement>
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vwidgets/vmaingraphicsview.h"
#include "../vundocommand.h"

View File

@ -32,7 +32,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vundocommand.h"

View File

@ -33,7 +33,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vundocommand.h"
#include "moveabstractlabel.h"

View File

@ -33,7 +33,6 @@
#include "../ifc/xml/vabstractpattern.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vundocommand.h"

View File

@ -31,7 +31,6 @@
#include <QDomElement>
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../vwidgets/vmaingraphicsview.h"
#include "../vmisc/vabstractapplication.h"
#include "../vtools/tools/drawTools/vdrawtool.h"

View File

@ -31,7 +31,6 @@
#include <QDomElement>
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../vwidgets/vmaingraphicsview.h"
#include "../vmisc/vabstractapplication.h"
#include "../vtools/tools/drawTools/vdrawtool.h"

View File

@ -31,7 +31,6 @@
#include <QDomElement>
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../vwidgets/vmaingraphicsview.h"
#include "../vmisc/vabstractapplication.h"
#include "../vtools/tools/drawTools/vdrawtool.h"

View File

@ -32,7 +32,6 @@
#include "../ifc/xml/vabstractpattern.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -32,7 +32,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -32,7 +32,6 @@
#include "../ifc/xml/vabstractpattern.h"
#include "../tools/drawTools/toolcurve/vtoolsplinepath.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -32,7 +32,6 @@
#include "../ifc/xml/vabstractpattern.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "vundocommand.h"

View File

@ -31,7 +31,6 @@
#include <QDomNode>
#include <QDomNodeList>
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/def.h"
#include "../vwidgets/vmaingraphicsview.h"

View File

@ -32,7 +32,6 @@
#include <QDomElement>
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../ifc/xml/vabstractpattern.h"
#include "vundocommand.h"

View File

@ -35,7 +35,6 @@
#include "../ifc/xml/vabstractpattern.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/logging.h"
#include "../vmisc/def.h"
#include "../vpatterndb/vpiecenode.h"
#include "../vpatterndb/floatItemData/vpatternlabeldata.h"

View File

@ -33,7 +33,6 @@
#include <QDebug>
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
#include "../tools/nodeDetails/vtoolpiecepath.h"
#include "../tools/vtoolseamallowance.h"
#include "../vpatterndb/vpiecenode.h"

View File

@ -31,7 +31,6 @@
#include <QDomNode>
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../ifc/xml/vabstractpattern.h"
#include "vundocommand.h"

View File

@ -36,7 +36,6 @@
#include "../ifc/ifcdef.h"
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vpiece.h"
#include "vundocommand.h"

View File

@ -39,7 +39,6 @@
#include <QtGlobal>
#include "../ifc/xml/vabstractpattern.h"
#include "../vmisc/logging.h"
Q_DECLARE_LOGGING_CATEGORY(vUndo)

View File

@ -33,9 +33,9 @@
#include <QGraphicsItem>
#include <QObject>
#include <QtGlobal>
#include <QLoggingCategory>
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../vmisc/vabstractapplication.h"
#include "../vwidgets/vmaingraphicsscene.h"
#include "../vwidgets/vcurvepathitem.h"

View File

@ -17,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -48,12 +48,7 @@
#include <QThread>
#include <QGestureEvent>
#include <QScreen>
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
# include <QOpenGLWidget>
#else
# include <QGLWidget>
#endif
#include <QOpenGLWidget>
#include "../vmisc/def.h"
#include "../vmisc/vmath.h"
@ -435,7 +430,6 @@ VMainGraphicsView::VMainGraphicsView(QWidget *parent)
VSettings *settings = qobject_cast<VSettings *>(qApp->Settings());
if (settings && settings->IsOpenGLRender())
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QOpenGLWidget *viewport = new QOpenGLWidget();
QSurfaceFormat fmt;
fmt.setSamples(settings->GetGraphicalOutput() ? 10 : 0);
@ -443,13 +437,6 @@ VMainGraphicsView::VMainGraphicsView(QWidget *parent)
viewport->setFormat(fmt);
setViewport(viewport);
#else
QGLWidget *viewport = new QGLWidget();
QGLFormat fmt = QGLFormat(QGL::DoubleBuffer|QGL::SampleBuffers);
fmt.setStencilBufferSize(8);
viewport->setFormat(fmt);
setViewport(viewport);
#endif
}
zoom = new GraphicsViewZoom(this);
@ -726,11 +713,7 @@ void VMainGraphicsView::SetAntialiasing(bool value)
//---------------------------------------------------------------------------------------------------------------------
bool VMainGraphicsView::IsOpenGLRender() const
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QOpenGLWidget *viewport = qobject_cast<QOpenGLWidget *>(this->viewport());
#else
QGLWidget *viewport = qobject_cast<QGLWidget *>(this->viewport());
#endif
if (viewport)
{
return true;

View File

@ -136,10 +136,6 @@ void VWidgetPopup::Show(QPoint coord)
if (lifeTime > 0)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QTimer::singleShot(lifeTime, this, &QWidget::close);
#else
QTimer::singleShot(lifeTime, this, SLOT(close()));
#endif
}
}

View File

@ -9,11 +9,6 @@ include(../../../common.pri)
QT += widgets printsupport
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
QT += opengl
}
# Name of the library
TARGET = vwidgets
@ -22,13 +17,7 @@ TEMPLATE = lib
CONFIG += staticlib # Making static library
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target

View File

@ -6,11 +6,6 @@
QT += testlib widgets printsupport concurrent
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
QT += opengl
}
QT -= gui
TARGET = CollectionTest
@ -36,13 +31,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= app_bundle debug_and_release debug_and_release_target

View File

@ -21,13 +21,7 @@ TARGET = ParserTest
# Console application.
CONFIG += console
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# CONFIG += testcase adds a 'make check' which is great. But by default it also
# adds a 'make install' that installs the test cases, which we do not want.

View File

@ -60,10 +60,6 @@ int main(int argc, char *argv[])
QCoreApplication a(argc, argv);
qInstallMessageHandler(testMessageOutput);
qmu::Test::QmuParserTester pt;
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
QTimer::singleShot(0, &pt, &qmu::Test::QmuParserTester::Run);
#else
QTimer::singleShot(0, &pt, SLOT(Run()));
#endif
return a.exec();
}

View File

@ -29,13 +29,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= app_bundle debug_and_release debug_and_release_target

View File

@ -29,8 +29,6 @@
#include "tst_abstractregexp.h"
#include "../qmuparser/qmudef.h"
#include "../qmuparser/qmuformulabase.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vtranslatevars.h"
#include "../ifc/ifcdef.h"

View File

@ -28,8 +28,6 @@
#include "tst_buitinregexp.h"
#include "../qmuparser/qmudef.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vtranslatevars.h"
#include "../ifc/ifcdef.h"

View File

@ -29,7 +29,6 @@
#include "tst_measurementregexp.h"
#include "../qmuparser/qmudef.h"
#include "../vmisc/logging.h"
#include "../vpatterndb/vtranslatevars.h"
#include "../vpatterndb/measurements.h"
#include "../ifc/ifcdef.h"

View File

@ -28,7 +28,6 @@
#include "tst_qmuparsererrormsg.h"
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include <QtTest>

View File

@ -27,7 +27,6 @@
*************************************************************************/
#include "tst_tstranslation.h"
#include "../vmisc/logging.h"
#include "../vmisc/def.h"
#include <QDomDocument>

View File

@ -6,11 +6,6 @@
QT += core testlib gui printsupport xml xmlpatterns concurrent
# Don't use Qt OpenGL module since Q5.4
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
QT += opengl
}
TARGET = ValentinaTests
# File with common stuff for whole project
@ -32,13 +27,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# Since Q5.4 available support C++14
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
CONFIG += c++14
} else {
# We use C++11 standard
CONFIG += c++11
}
CONFIG += c++14
# Use out-of-source builds (shadow builds)
CONFIG -= app_bundle debug_and_release debug_and_release_target

Some files were not shown because too many files have changed in this diff Show More