From 0987428a93673916caabede2f8c6102978087e6c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 5 Apr 2019 15:42:22 +0300 Subject: [PATCH] Increase required Qt version up to 5.4. --HG-- branch : develop --- README.txt | 20 +- Valentina.pro | 6 +- common.pri | 13 - dist/OBS_debian/debian.control | 16 +- dist/debian/control | 16 +- dist/rpm/valentina.spec | 18 +- src/app/tape/main.cpp | 6 +- src/app/tape/mapplication.cpp | 5 +- src/app/tape/tape.pro | 18 +- src/app/valentina/core/vapplication.cpp | 5 +- .../dialogs/dialoglayoutsettings.cpp | 29 +- .../valentina/dialogs/dialoglayoutsettings.h | 9 +- src/app/valentina/main.cpp | 6 +- src/app/valentina/mainwindow.cpp | 5 - src/app/valentina/mainwindowsnogui.cpp | 24 +- src/app/valentina/valentina.pro | 23 +- src/libs/fervor/fervor.pro | 8 +- src/libs/ifc/ifc.pro | 8 +- src/libs/ifc/xml/vdomdocument.cpp | 1 - src/libs/ifc/xml/vdomdocument.h | 2 +- src/libs/qmuparser/qmuparser.pro | 8 +- src/libs/vdxf/vdxf.pro | 8 +- src/libs/vdxf/vdxfengine.cpp | 8 +- src/libs/vformat/vformat.pro | 8 +- src/libs/vgeometry/vgeometry.pro | 8 +- src/libs/vlayout/vbank.cpp | 1 - src/libs/vlayout/vlayout.pro | 8 +- src/libs/vlayout/vlayoutgenerator.h | 9 +- src/libs/vlayout/vposter.cpp | 17 +- src/libs/vmisc/backport/qmarginsf.cpp | 377 ------------------ src/libs/vmisc/backport/qmarginsf.h | 253 ------------ src/libs/vmisc/def.cpp | 23 +- src/libs/vmisc/def.h | 7 +- src/libs/vmisc/logging.h | 49 --- src/libs/vmisc/qt_dispatch/qt_dispatch.h | 2 - src/libs/vmisc/vabstractapplication.cpp | 11 +- src/libs/vmisc/vmisc.pri | 7 +- src/libs/vmisc/vmisc.pro | 8 +- src/libs/vmisc/vsettings.h | 7 +- src/libs/vobj/vobj.pro | 8 +- src/libs/vpatterndb/vcontainer.cpp | 2 +- src/libs/vpatterndb/vpatterndb.pro | 8 +- .../vpropertyexplorer/vpropertyexplorer.pro | 8 +- .../vpropertyexplorer/vpropertyformwidget.cpp | 8 +- src/libs/vtest/abstracttest.cpp | 1 - src/libs/vtest/vtest.pro | 8 +- src/libs/vtools/dialogs/tools/dialogtool.h | 1 - .../flipping/vtoolflippingbyaxis.cpp | 1 - .../flipping/vtoolflippingbyline.cpp | 1 - .../tools/drawTools/operation/vtoolmove.cpp | 1 - .../drawTools/operation/vtoolrotation.cpp | 1 - .../tooldoublepoint/vtooldoublepoint.cpp | 1 - .../toolsinglepoint/vtoolbasepoint.cpp | 1 - .../toolsinglepoint/vtoolsinglepoint.cpp | 1 - src/libs/vtools/tools/drawTools/vdrawtool.cpp | 1 - src/libs/vtools/tools/vabstracttool.cpp | 1 - src/libs/vtools/tools/vdatatool.h | 2 +- src/libs/vtools/tools/vtoolseamallowance.cpp | 11 - src/libs/vtools/tools/vtooluniondetails.cpp | 1 - src/libs/vtools/undocommands/addgroup.cpp | 1 - .../vtools/undocommands/additemtogroup.cpp | 1 - .../vtools/undocommands/addpatternpiece.cpp | 1 - src/libs/vtools/undocommands/addtocalc.cpp | 1 - .../undocommands/deletepatternpiece.cpp | 1 - src/libs/vtools/undocommands/deletepiece.cpp | 1 - src/libs/vtools/undocommands/delgroup.cpp | 1 - src/libs/vtools/undocommands/deltool.cpp | 1 - .../undocommands/label/moveabstractlabel.cpp | 1 - .../undocommands/label/movedoublelabel.cpp | 1 - .../vtools/undocommands/label/movelabel.cpp | 1 - .../undocommands/label/operationmovelabel.cpp | 1 - .../undocommands/label/operationshowlabel.cpp | 1 - .../undocommands/label/showdoublelabel.cpp | 1 - .../vtools/undocommands/label/showlabel.cpp | 1 - src/libs/vtools/undocommands/movepiece.cpp | 1 - src/libs/vtools/undocommands/movespline.cpp | 1 - .../vtools/undocommands/movesplinepath.cpp | 1 - src/libs/vtools/undocommands/movespoint.cpp | 1 - .../undocommands/removeitemfromgroup.cpp | 1 - src/libs/vtools/undocommands/renamepp.cpp | 1 - .../vtools/undocommands/savepieceoptions.cpp | 1 - .../undocommands/savepiecepathoptions.cpp | 1 - .../vtools/undocommands/savetooloptions.cpp | 1 - .../vtools/undocommands/togglepiecestate.cpp | 1 - src/libs/vtools/undocommands/vundocommand.h | 1 - src/libs/vtools/visualization/visualization.h | 2 +- src/libs/vtools/vtools.pro | 8 +- src/libs/vwidgets/vmaingraphicsview.cpp | 19 +- src/libs/vwidgets/vwidgetpopup.cpp | 4 - src/libs/vwidgets/vwidgets.pro | 13 +- src/test/CollectionTest/CollectionTest.pro | 13 +- src/test/ParserTest/ParserTest.pro | 8 +- src/test/ParserTest/main.cpp | 4 - .../TranslationsTest/TranslationsTest.pro | 8 +- .../TranslationsTest/tst_abstractregexp.cpp | 2 - .../TranslationsTest/tst_buitinregexp.cpp | 2 - .../tst_measurementregexp.cpp | 1 - .../tst_qmuparsererrormsg.cpp | 1 - .../TranslationsTest/tst_tstranslation.cpp | 1 - src/test/ValentinaTest/ValentinaTest.pro | 13 +- src/test/ValentinaTest/tst_vabstractpiece.cpp | 5 - src/test/ValentinaTest/tst_varc.cpp | 1 - src/test/ValentinaTest/tst_vellipticalarc.cpp | 1 - src/test/ValentinaTest/tst_vpointf.cpp | 1 - src/test/ValentinaTest/tst_vposter.cpp | 4 - src/test/ValentinaTest/tst_vspline.cpp | 1 - src/test/ValentinaTest/tst_vsplinepath.cpp | 1 - src/test/ValentinaTest/tst_vtranslatevars.cpp | 1 - 108 files changed, 85 insertions(+), 1179 deletions(-) delete mode 100644 src/libs/vmisc/backport/qmarginsf.cpp delete mode 100644 src/libs/vmisc/backport/qmarginsf.h delete mode 100644 src/libs/vmisc/logging.h diff --git a/README.txt b/README.txt index 69aa012e1..3c631acd9 100644 --- a/README.txt +++ b/README.txt @@ -1,13 +1,12 @@ Pattern making program Author Roman Telezhynskyi -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 individual’s 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 diff --git a/Valentina.pro b/Valentina.pro index 463bbac82..066e2f509 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -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. diff --git a/common.pri b/common.pri index 928af36eb..c15fc9da2 100644 --- a/common.pri +++ b/common.pri @@ -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. diff --git a/dist/OBS_debian/debian.control b/dist/OBS_debian/debian.control index df193b693..f77e5e661 100644 --- a/dist/OBS_debian/debian.control +++ b/dist/OBS_debian/debian.control @@ -3,20 +3,20 @@ Section: graphics Priority: optional Maintainer: Roman Telezhynskyi 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 diff --git a/dist/debian/control b/dist/debian/control index df193b693..f77e5e661 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -3,20 +3,20 @@ Section: graphics Priority: optional Maintainer: Roman Telezhynskyi 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 diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index 89ba4c9b1..02a4bd760 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -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) diff --git a/src/app/tape/main.cpp b/src/app/tape/main.cpp index f388a8823..3356525f3 100644 --- a/src/app/tape/main.cpp +++ b/src/app/tape/main.cpp @@ -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(); } diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index 99a98f211..ca3e5f9aa 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -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); diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index 850c2cf9f..a74998b05 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -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. diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 0de48d911..803953893 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -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); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index bb052aa54..35c8f4e82 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -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 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); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.h b/src/app/valentina/dialogs/dialoglayoutsettings.h index a6264b231..79c4dcf42 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.h +++ b/src/app/valentina/dialogs/dialoglayoutsettings.h @@ -30,17 +30,12 @@ #define DIALOGLAYOUTSETTINGS_H #include -#include "vabstractlayoutdialog.h" +#include +#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 -#endif - namespace Ui { class DialogLayoutSettings; diff --git a/src/app/valentina/main.cpp b/src/app/valentina/main.cpp index 89e05d2c4..89fed0acd 100644 --- a/src/app/valentina/main.cpp +++ b/src/app/valentina/main.cpp @@ -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(); } diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index a156e99c5..a6901b7ed 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -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(); diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index d5a5017e0..e3930899c 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -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) { diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index cf14e3be9..0cf3f876a 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -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. diff --git a/src/libs/fervor/fervor.pro b/src/libs/fervor/fervor.pro index 8a7aadc12..ae945cd24 100644 --- a/src/libs/fervor/fervor.pro +++ b/src/libs/fervor/fervor.pro @@ -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 diff --git a/src/libs/ifc/ifc.pro b/src/libs/ifc/ifc.pro index 50fbfdf9e..cb8dc0b61 100644 --- a/src/libs/ifc/ifc.pro +++ b/src/libs/ifc/ifc.pro @@ -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 diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index f4444b476..43a043e25 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -37,7 +37,6 @@ #include "../exception/vexceptionemptyparameter.h" #include "../exception/vexceptionwrongid.h" #include "../exception/vexception.h" -#include "../vmisc/logging.h" #include "../ifcdef.h" #include diff --git a/src/libs/ifc/xml/vdomdocument.h b/src/libs/ifc/xml/vdomdocument.h index 6fe2acc09..5049c19b7 100644 --- a/src/libs/ifc/xml/vdomdocument.h +++ b/src/libs/ifc/xml/vdomdocument.h @@ -41,11 +41,11 @@ #include #include #include +#include #include "../ifc/ifcdef.h" #include "../vmisc/def.h" #include "../vmisc/diagnostic.h" -#include "../vmisc/logging.h" class QDomElement; class QDomNode; diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index 275fcd871..5a61996d1 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -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 diff --git a/src/libs/vdxf/vdxf.pro b/src/libs/vdxf/vdxf.pro index 22b8a00dd..cdd2d6efe 100644 --- a/src/libs/vdxf/vdxf.pro +++ b/src/libs/vdxf/vdxf.pro @@ -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 diff --git a/src/libs/vdxf/vdxfengine.cpp b/src/libs/vdxf/vdxfengine.cpp index 0e7542038..dc800d65f 100644 --- a/src/libs/vdxf/vdxfengine.cpp +++ b/src/libs/vdxf/vdxfengine.cpp @@ -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(encodedString.length())); -#endif + return codec->fromUnicode(str).toStdString(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vformat/vformat.pro b/src/libs/vformat/vformat.pro index b284aef80..f284b819a 100644 --- a/src/libs/vformat/vformat.pro +++ b/src/libs/vformat/vformat.pro @@ -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 diff --git a/src/libs/vgeometry/vgeometry.pro b/src/libs/vgeometry/vgeometry.pro index 77e1a149c..d125a1745 100644 --- a/src/libs/vgeometry/vgeometry.pro +++ b/src/libs/vgeometry/vgeometry.pro @@ -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 diff --git a/src/libs/vlayout/vbank.cpp b/src/libs/vlayout/vbank.cpp index 6cdf627be..b3f6477fd 100644 --- a/src/libs/vlayout/vbank.cpp +++ b/src/libs/vlayout/vbank.cpp @@ -31,7 +31,6 @@ #include #include "../vmisc/diagnostic.h" -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "vlayoutpiece.h" diff --git a/src/libs/vlayout/vlayout.pro b/src/libs/vlayout/vlayout.pro index acf99518e..4827d4241 100644 --- a/src/libs/vlayout/vlayout.pro +++ b/src/libs/vlayout/vlayout.pro @@ -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 diff --git a/src/libs/vlayout/vlayoutgenerator.h b/src/libs/vlayout/vlayoutgenerator.h index 4e1e3f5d8..80c4265e2 100644 --- a/src/libs/vlayout/vlayoutgenerator.h +++ b/src/libs/vlayout/vlayoutgenerator.h @@ -38,18 +38,11 @@ #include #include #include +#include #include "vbank.h" #include "vlayoutdef.h" -class QMarginsF; - -#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) -# include "../vmisc/backport/qmarginsf.h" -#else -# include -#endif - class QGraphicsItem; class VLayoutPaper; class QElapsedTimer; diff --git a/src/libs/vlayout/vposter.cpp b/src/libs/vlayout/vposter.cpp index 81b686b3d..705d49667 100644 --- a/src/libs/vlayout/vposter.cpp +++ b/src/libs/vlayout/vposter.cpp @@ -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 { diff --git a/src/libs/vmisc/backport/qmarginsf.cpp b/src/libs/vmisc/backport/qmarginsf.cpp deleted file mode 100644 index 51a27e664..000000000 --- a/src/libs/vmisc/backport/qmarginsf.cpp +++ /dev/null @@ -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 - -#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) -#include -#include - -/*! - \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) diff --git a/src/libs/vmisc/backport/qmarginsf.h b/src/libs/vmisc/backport/qmarginsf.h deleted file mode 100644 index f39744800..000000000 --- a/src/libs/vmisc/backport/qmarginsf.h +++ /dev/null @@ -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 -#include -#include - -#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) -#include - -/***************************************************************************** - 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 diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index 390ee46a8..94308d80b 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -307,27 +307,15 @@ QSharedPointer 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 list = QPrinterInfo::availablePrinters(); + const QStringList list = QPrinterInfo::availablePrinterNames(); if(list.isEmpty()) { return QSharedPointer(); } else { - tmpInfo = list.first(); + tmpInfo = QPrinterInfo::printerInfo(list.first()); } -#else - const QStringList list = QPrinterInfo::availablePrinterNames(); - if(list.isEmpty()) - { - return QSharedPointer(); - } - else - { - tmpInfo = QPrinterInfo::printerInfo(list.first()); - } -#endif } auto printer = QSharedPointer(new QPrinter(tmpInfo, mode)); @@ -338,7 +326,6 @@ QSharedPointer PreparePrinter(const QPrinterInfo &info, QPrinter::Prin //--------------------------------------------------------------------------------------------------------------------- QMarginsF GetMinPrinterFields(const QSharedPointer &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 &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(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) } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index c4cb10d14..d09b3bd75 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include #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 -#endif - template class QSharedPointer; #include diff --git a/src/libs/vmisc/logging.h b/src/libs/vmisc/logging.h deleted file mode 100644 index ee98fef11..000000000 --- a/src/libs/vmisc/logging.h +++ /dev/null @@ -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 - -// Backport useful macros -#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) -# ifndef qUtf8Printable -# define qUtf8Printable(string) QString(string).toUtf8().constData() -# endif -#endif - -#include - -#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 diff --git a/src/libs/vmisc/qt_dispatch/qt_dispatch.h b/src/libs/vmisc/qt_dispatch/qt_dispatch.h index aa3e9dcda..17d13bc98 100644 --- a/src/libs/vmisc/qt_dispatch/qt_dispatch.h +++ b/src/libs/vmisc/qt_dispatch/qt_dispatch.h @@ -15,8 +15,6 @@ #include #include -#include "logging.h" - typedef std::function voidBlock; class WorkerClass : public QObject diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 2c54365e6..26d68b1c1 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include #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 diff --git a/src/libs/vmisc/vmisc.pri b/src/libs/vmisc/vmisc.pri index c74e77682..b7b50a8fc 100644 --- a/src/libs/vmisc/vmisc.pri +++ b/src/libs/vmisc/vmisc.pri @@ -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 += \ diff --git a/src/libs/vmisc/vmisc.pro b/src/libs/vmisc/vmisc.pro index 2637e1b0b..c58e10c37 100644 --- a/src/libs/vmisc/vmisc.pro +++ b/src/libs/vmisc/vmisc.pro @@ -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 diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index a9741a8b7..0e85502db 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -34,6 +34,7 @@ #include #include #include +#include #include "../vmisc/def.h" #include "../vlayout/vbank.h" @@ -41,12 +42,6 @@ template class QSharedPointer; -#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) -# include "../vmisc/backport/qmarginsf.h" -#else -# include -#endif - class VSettings : public VCommonSettings { Q_OBJECT diff --git a/src/libs/vobj/vobj.pro b/src/libs/vobj/vobj.pro index d8a984171..e66522189 100644 --- a/src/libs/vobj/vobj.pro +++ b/src/libs/vobj/vobj.pro @@ -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 diff --git a/src/libs/vpatterndb/vcontainer.cpp b/src/libs/vpatterndb/vcontainer.cpp index d39477386..7b7bd5548 100644 --- a/src/libs/vpatterndb/vcontainer.cpp +++ b/src/libs/vpatterndb/vcontainer.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #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" diff --git a/src/libs/vpatterndb/vpatterndb.pro b/src/libs/vpatterndb/vpatterndb.pro index 2e9381294..41811a554 100644 --- a/src/libs/vpatterndb/vpatterndb.pro +++ b/src/libs/vpatterndb/vpatterndb.pro @@ -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 diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index df126b654..781a3db4a 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -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 diff --git a/src/libs/vpropertyexplorer/vpropertyformwidget.cpp b/src/libs/vpropertyexplorer/vpropertyformwidget.cpp index 3a502245d..182cc5631 100644 --- a/src/libs/vpropertyexplorer/vpropertyformwidget.cpp +++ b/src/libs/vpropertyexplorer/vpropertyformwidget.cpp @@ -25,13 +25,7 @@ #include #include #include - -#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) -# include "../vmisc/backport/qmarginsf.h" -#else -# include -#endif - +#include #include #include #include diff --git a/src/libs/vtest/abstracttest.cpp b/src/libs/vtest/abstracttest.cpp index 5c7e1852a..cfe887132 100644 --- a/src/libs/vtest/abstracttest.cpp +++ b/src/libs/vtest/abstracttest.cpp @@ -47,7 +47,6 @@ #include #include -#include "logging.h" #include "vsysexits.h" #include "../vgeometry/vgobject.h" diff --git a/src/libs/vtest/vtest.pro b/src/libs/vtest/vtest.pro index a336d4810..b44c6d494 100644 --- a/src/libs/vtest/vtest.pro +++ b/src/libs/vtest/vtest.pro @@ -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 diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 12513a8eb..2ccca452a 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -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" diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp index 8d8f60f31..4a05c92cf 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp index f2ef954f3..7971defa4 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index ffcb79caf..4f6d5662e 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 44e71454f..071d78871 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp index 794b374e1..e5eb04809 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooldoublepoint.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp index 44a2b6e9f..cb476c363 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp index 9c70ed752..0fe7ac621 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp @@ -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" diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.cpp b/src/libs/vtools/tools/drawTools/vdrawtool.cpp index 654cb3037..1050fdb7b 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.cpp +++ b/src/libs/vtools/tools/drawTools/vdrawtool.cpp @@ -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 QSharedPointer; diff --git a/src/libs/vtools/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp index fa0fc7f6a..b55b7c948 100644 --- a/src/libs/vtools/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -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" diff --git a/src/libs/vtools/tools/vdatatool.h b/src/libs/vtools/tools/vdatatool.h index 5d483cad2..036f838df 100644 --- a/src/libs/vtools/tools/vdatatool.h +++ b/src/libs/vtools/tools/vdatatool.h @@ -34,8 +34,8 @@ #include #include #include +#include -#include "../vmisc/logging.h" #include "../vpatterndb/vcontainer.h" Q_DECLARE_LOGGING_CATEGORY(vTool) diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index c9da4dd7d..851662dbf 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -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()); diff --git a/src/libs/vtools/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp index 62474f573..12407d267 100644 --- a/src/libs/vtools/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/addgroup.cpp b/src/libs/vtools/undocommands/addgroup.cpp index 5ace45524..b9b741c51 100644 --- a/src/libs/vtools/undocommands/addgroup.cpp +++ b/src/libs/vtools/undocommands/addgroup.cpp @@ -31,7 +31,6 @@ #include #include -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/def.h" #include "../vwidgets/vmaingraphicsview.h" diff --git a/src/libs/vtools/undocommands/additemtogroup.cpp b/src/libs/vtools/undocommands/additemtogroup.cpp index 1dea7c284..168d6a58e 100644 --- a/src/libs/vtools/undocommands/additemtogroup.cpp +++ b/src/libs/vtools/undocommands/additemtogroup.cpp @@ -31,7 +31,6 @@ #include #include -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/def.h" #include "../vwidgets/vmaingraphicsview.h" diff --git a/src/libs/vtools/undocommands/addpatternpiece.cpp b/src/libs/vtools/undocommands/addpatternpiece.cpp index 5df17a245..ce028bbb8 100644 --- a/src/libs/vtools/undocommands/addpatternpiece.cpp +++ b/src/libs/vtools/undocommands/addpatternpiece.cpp @@ -29,7 +29,6 @@ #include "addpatternpiece.h" #include "../vmisc/def.h" -#include "../vmisc/logging.h" #include "../ifc/xml/vabstractpattern.h" #include "vundocommand.h" diff --git a/src/libs/vtools/undocommands/addtocalc.cpp b/src/libs/vtools/undocommands/addtocalc.cpp index 32898ba59..3ee5ebb4e 100644 --- a/src/libs/vtools/undocommands/addtocalc.cpp +++ b/src/libs/vtools/undocommands/addtocalc.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/deletepatternpiece.cpp b/src/libs/vtools/undocommands/deletepatternpiece.cpp index 5932e47a2..098f7087f 100644 --- a/src/libs/vtools/undocommands/deletepatternpiece.cpp +++ b/src/libs/vtools/undocommands/deletepatternpiece.cpp @@ -31,7 +31,6 @@ #include #include -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../ifc/xml/vabstractpattern.h" #include "vundocommand.h" diff --git a/src/libs/vtools/undocommands/deletepiece.cpp b/src/libs/vtools/undocommands/deletepiece.cpp index a2e9ef6d2..4a1f90958 100644 --- a/src/libs/vtools/undocommands/deletepiece.cpp +++ b/src/libs/vtools/undocommands/deletepiece.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/delgroup.cpp b/src/libs/vtools/undocommands/delgroup.cpp index ef0594b11..e8ae238fc 100644 --- a/src/libs/vtools/undocommands/delgroup.cpp +++ b/src/libs/vtools/undocommands/delgroup.cpp @@ -32,7 +32,6 @@ #include #include -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/def.h" #include "../vwidgets/vmaingraphicsview.h" diff --git a/src/libs/vtools/undocommands/deltool.cpp b/src/libs/vtools/undocommands/deltool.cpp index 80ec270e5..93bc552c7 100644 --- a/src/libs/vtools/undocommands/deltool.cpp +++ b/src/libs/vtools/undocommands/deltool.cpp @@ -32,7 +32,6 @@ #include "../ifc/ifcdef.h" #include "../ifc/xml/vabstractpattern.h" -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "vundocommand.h" diff --git a/src/libs/vtools/undocommands/label/moveabstractlabel.cpp b/src/libs/vtools/undocommands/label/moveabstractlabel.cpp index a6d9eaa48..4937916c9 100644 --- a/src/libs/vtools/undocommands/label/moveabstractlabel.cpp +++ b/src/libs/vtools/undocommands/label/moveabstractlabel.cpp @@ -30,7 +30,6 @@ #include -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../vwidgets/vmaingraphicsview.h" #include "../vundocommand.h" diff --git a/src/libs/vtools/undocommands/label/movedoublelabel.cpp b/src/libs/vtools/undocommands/label/movedoublelabel.cpp index 4ff3ff916..84aadc52d 100644 --- a/src/libs/vtools/undocommands/label/movedoublelabel.cpp +++ b/src/libs/vtools/undocommands/label/movedoublelabel.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/label/movelabel.cpp b/src/libs/vtools/undocommands/label/movelabel.cpp index a70484ddf..657139513 100644 --- a/src/libs/vtools/undocommands/label/movelabel.cpp +++ b/src/libs/vtools/undocommands/label/movelabel.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/label/operationmovelabel.cpp b/src/libs/vtools/undocommands/label/operationmovelabel.cpp index b2f295551..5143af600 100644 --- a/src/libs/vtools/undocommands/label/operationmovelabel.cpp +++ b/src/libs/vtools/undocommands/label/operationmovelabel.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/label/operationshowlabel.cpp b/src/libs/vtools/undocommands/label/operationshowlabel.cpp index 9478f271c..9650f8585 100644 --- a/src/libs/vtools/undocommands/label/operationshowlabel.cpp +++ b/src/libs/vtools/undocommands/label/operationshowlabel.cpp @@ -31,7 +31,6 @@ #include #include "../ifc/xml/vabstractpattern.h" -#include "../vmisc/logging.h" #include "../vwidgets/vmaingraphicsview.h" #include "../vmisc/vabstractapplication.h" #include "../vtools/tools/drawTools/vdrawtool.h" diff --git a/src/libs/vtools/undocommands/label/showdoublelabel.cpp b/src/libs/vtools/undocommands/label/showdoublelabel.cpp index 356d85413..f615380e9 100644 --- a/src/libs/vtools/undocommands/label/showdoublelabel.cpp +++ b/src/libs/vtools/undocommands/label/showdoublelabel.cpp @@ -31,7 +31,6 @@ #include #include "../ifc/xml/vabstractpattern.h" -#include "../vmisc/logging.h" #include "../vwidgets/vmaingraphicsview.h" #include "../vmisc/vabstractapplication.h" #include "../vtools/tools/drawTools/vdrawtool.h" diff --git a/src/libs/vtools/undocommands/label/showlabel.cpp b/src/libs/vtools/undocommands/label/showlabel.cpp index 87e76c6f0..391d10736 100644 --- a/src/libs/vtools/undocommands/label/showlabel.cpp +++ b/src/libs/vtools/undocommands/label/showlabel.cpp @@ -31,7 +31,6 @@ #include #include "../ifc/xml/vabstractpattern.h" -#include "../vmisc/logging.h" #include "../vwidgets/vmaingraphicsview.h" #include "../vmisc/vabstractapplication.h" #include "../vtools/tools/drawTools/vdrawtool.h" diff --git a/src/libs/vtools/undocommands/movepiece.cpp b/src/libs/vtools/undocommands/movepiece.cpp index fad8d56e1..0e17c557c 100644 --- a/src/libs/vtools/undocommands/movepiece.cpp +++ b/src/libs/vtools/undocommands/movepiece.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/movespline.cpp b/src/libs/vtools/undocommands/movespline.cpp index 88270c336..6f059b6e4 100644 --- a/src/libs/vtools/undocommands/movespline.cpp +++ b/src/libs/vtools/undocommands/movespline.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/movesplinepath.cpp b/src/libs/vtools/undocommands/movesplinepath.cpp index 18c5f1b0d..7b437c6d2 100644 --- a/src/libs/vtools/undocommands/movesplinepath.cpp +++ b/src/libs/vtools/undocommands/movesplinepath.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/movespoint.cpp b/src/libs/vtools/undocommands/movespoint.cpp index a7488f30a..261b37ad4 100644 --- a/src/libs/vtools/undocommands/movespoint.cpp +++ b/src/libs/vtools/undocommands/movespoint.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/removeitemfromgroup.cpp b/src/libs/vtools/undocommands/removeitemfromgroup.cpp index a4236f169..ecabdffa4 100644 --- a/src/libs/vtools/undocommands/removeitemfromgroup.cpp +++ b/src/libs/vtools/undocommands/removeitemfromgroup.cpp @@ -31,7 +31,6 @@ #include #include -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/def.h" #include "../vwidgets/vmaingraphicsview.h" diff --git a/src/libs/vtools/undocommands/renamepp.cpp b/src/libs/vtools/undocommands/renamepp.cpp index 63b5d7261..b05d71c5b 100644 --- a/src/libs/vtools/undocommands/renamepp.cpp +++ b/src/libs/vtools/undocommands/renamepp.cpp @@ -32,7 +32,6 @@ #include #include "../vmisc/def.h" -#include "../vmisc/logging.h" #include "../ifc/xml/vabstractpattern.h" #include "vundocommand.h" diff --git a/src/libs/vtools/undocommands/savepieceoptions.cpp b/src/libs/vtools/undocommands/savepieceoptions.cpp index 45a322bef..a0fc4849c 100644 --- a/src/libs/vtools/undocommands/savepieceoptions.cpp +++ b/src/libs/vtools/undocommands/savepieceoptions.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/savepiecepathoptions.cpp b/src/libs/vtools/undocommands/savepiecepathoptions.cpp index 2ce89619a..7c4c57a9b 100644 --- a/src/libs/vtools/undocommands/savepiecepathoptions.cpp +++ b/src/libs/vtools/undocommands/savepiecepathoptions.cpp @@ -33,7 +33,6 @@ #include #include "../ifc/xml/vabstractpattern.h" -#include "../vmisc/logging.h" #include "../tools/nodeDetails/vtoolpiecepath.h" #include "../tools/vtoolseamallowance.h" #include "../vpatterndb/vpiecenode.h" diff --git a/src/libs/vtools/undocommands/savetooloptions.cpp b/src/libs/vtools/undocommands/savetooloptions.cpp index 36a9b7bb1..8a32b051a 100644 --- a/src/libs/vtools/undocommands/savetooloptions.cpp +++ b/src/libs/vtools/undocommands/savetooloptions.cpp @@ -31,7 +31,6 @@ #include #include "../vmisc/def.h" -#include "../vmisc/logging.h" #include "../ifc/xml/vabstractpattern.h" #include "vundocommand.h" diff --git a/src/libs/vtools/undocommands/togglepiecestate.cpp b/src/libs/vtools/undocommands/togglepiecestate.cpp index 5e22bd383..d4f2a7fef 100644 --- a/src/libs/vtools/undocommands/togglepiecestate.cpp +++ b/src/libs/vtools/undocommands/togglepiecestate.cpp @@ -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" diff --git a/src/libs/vtools/undocommands/vundocommand.h b/src/libs/vtools/undocommands/vundocommand.h index ce2d6db41..687823e29 100644 --- a/src/libs/vtools/undocommands/vundocommand.h +++ b/src/libs/vtools/undocommands/vundocommand.h @@ -39,7 +39,6 @@ #include #include "../ifc/xml/vabstractpattern.h" -#include "../vmisc/logging.h" Q_DECLARE_LOGGING_CATEGORY(vUndo) diff --git a/src/libs/vtools/visualization/visualization.h b/src/libs/vtools/visualization/visualization.h index 106a7d557..2a20ff4c0 100644 --- a/src/libs/vtools/visualization/visualization.h +++ b/src/libs/vtools/visualization/visualization.h @@ -33,9 +33,9 @@ #include #include #include +#include #include "../vmisc/def.h" -#include "../vmisc/logging.h" #include "../vmisc/vabstractapplication.h" #include "../vwidgets/vmaingraphicsscene.h" #include "../vwidgets/vcurvepathitem.h" diff --git a/src/libs/vtools/vtools.pro b/src/libs/vtools/vtools.pro index a5d91f605..44070b93b 100644 --- a/src/libs/vtools/vtools.pro +++ b/src/libs/vtools/vtools.pro @@ -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 diff --git a/src/libs/vwidgets/vmaingraphicsview.cpp b/src/libs/vwidgets/vmaingraphicsview.cpp index 25c2b813f..d35a2b97e 100644 --- a/src/libs/vwidgets/vmaingraphicsview.cpp +++ b/src/libs/vwidgets/vmaingraphicsview.cpp @@ -48,12 +48,7 @@ #include #include #include - -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) -# include -#else -# include -#endif +#include #include "../vmisc/def.h" #include "../vmisc/vmath.h" @@ -435,7 +430,6 @@ VMainGraphicsView::VMainGraphicsView(QWidget *parent) VSettings *settings = qobject_cast(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(this->viewport()); -#else - QGLWidget *viewport = qobject_cast(this->viewport()); -#endif if (viewport) { return true; diff --git a/src/libs/vwidgets/vwidgetpopup.cpp b/src/libs/vwidgets/vwidgetpopup.cpp index afab1f283..61b3d459a 100644 --- a/src/libs/vwidgets/vwidgetpopup.cpp +++ b/src/libs/vwidgets/vwidgetpopup.cpp @@ -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 } } diff --git a/src/libs/vwidgets/vwidgets.pro b/src/libs/vwidgets/vwidgets.pro index 3d98c7f18..86886cc89 100644 --- a/src/libs/vwidgets/vwidgets.pro +++ b/src/libs/vwidgets/vwidgets.pro @@ -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 diff --git a/src/test/CollectionTest/CollectionTest.pro b/src/test/CollectionTest/CollectionTest.pro index 3d1a6c5dd..9cc7885b2 100644 --- a/src/test/CollectionTest/CollectionTest.pro +++ b/src/test/CollectionTest/CollectionTest.pro @@ -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 diff --git a/src/test/ParserTest/ParserTest.pro b/src/test/ParserTest/ParserTest.pro index 034f53fd0..c8cd5854c 100644 --- a/src/test/ParserTest/ParserTest.pro +++ b/src/test/ParserTest/ParserTest.pro @@ -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. diff --git a/src/test/ParserTest/main.cpp b/src/test/ParserTest/main.cpp index e69460db0..0f6eed2f8 100644 --- a/src/test/ParserTest/main.cpp +++ b/src/test/ParserTest/main.cpp @@ -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(); } diff --git a/src/test/TranslationsTest/TranslationsTest.pro b/src/test/TranslationsTest/TranslationsTest.pro index fe189cfd3..3e4c819f3 100644 --- a/src/test/TranslationsTest/TranslationsTest.pro +++ b/src/test/TranslationsTest/TranslationsTest.pro @@ -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 diff --git a/src/test/TranslationsTest/tst_abstractregexp.cpp b/src/test/TranslationsTest/tst_abstractregexp.cpp index c77489f27..4e2acf56e 100644 --- a/src/test/TranslationsTest/tst_abstractregexp.cpp +++ b/src/test/TranslationsTest/tst_abstractregexp.cpp @@ -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" diff --git a/src/test/TranslationsTest/tst_buitinregexp.cpp b/src/test/TranslationsTest/tst_buitinregexp.cpp index 01865d47c..b69c7c491 100644 --- a/src/test/TranslationsTest/tst_buitinregexp.cpp +++ b/src/test/TranslationsTest/tst_buitinregexp.cpp @@ -28,8 +28,6 @@ #include "tst_buitinregexp.h" #include "../qmuparser/qmudef.h" - -#include "../vmisc/logging.h" #include "../vpatterndb/vtranslatevars.h" #include "../ifc/ifcdef.h" diff --git a/src/test/TranslationsTest/tst_measurementregexp.cpp b/src/test/TranslationsTest/tst_measurementregexp.cpp index 0e070d87f..d6aa7e688 100644 --- a/src/test/TranslationsTest/tst_measurementregexp.cpp +++ b/src/test/TranslationsTest/tst_measurementregexp.cpp @@ -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" diff --git a/src/test/TranslationsTest/tst_qmuparsererrormsg.cpp b/src/test/TranslationsTest/tst_qmuparsererrormsg.cpp index afec77d69..bf056376a 100644 --- a/src/test/TranslationsTest/tst_qmuparsererrormsg.cpp +++ b/src/test/TranslationsTest/tst_qmuparsererrormsg.cpp @@ -28,7 +28,6 @@ #include "tst_qmuparsererrormsg.h" #include "../vmisc/def.h" -#include "../vmisc/logging.h" #include diff --git a/src/test/TranslationsTest/tst_tstranslation.cpp b/src/test/TranslationsTest/tst_tstranslation.cpp index 8fdb9680e..03137e4fc 100644 --- a/src/test/TranslationsTest/tst_tstranslation.cpp +++ b/src/test/TranslationsTest/tst_tstranslation.cpp @@ -27,7 +27,6 @@ *************************************************************************/ #include "tst_tstranslation.h" -#include "../vmisc/logging.h" #include "../vmisc/def.h" #include diff --git a/src/test/ValentinaTest/ValentinaTest.pro b/src/test/ValentinaTest/ValentinaTest.pro index a96e2d372..d1141879a 100644 --- a/src/test/ValentinaTest/ValentinaTest.pro +++ b/src/test/ValentinaTest/ValentinaTest.pro @@ -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 diff --git a/src/test/ValentinaTest/tst_vabstractpiece.cpp b/src/test/ValentinaTest/tst_vabstractpiece.cpp index 1f86581a9..57459f89f 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.cpp +++ b/src/test/ValentinaTest/tst_vabstractpiece.cpp @@ -4218,13 +4218,8 @@ void TST_VAbstractPiece::PathRemoveLoop_data() const res << QPointF(20, 10); QTest::newRow("One loop, the first loop, closed a path (six unique points)") << path << res; -#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0) - path.remove(path.size() - 1); - res.remove(res.size() - 1); -#else path.removeLast(); res.removeLast(); -#endif QTest::newRow("One loop, the first loop, unclosed a path (six unique points)") << path << res; path.clear(); diff --git a/src/test/ValentinaTest/tst_varc.cpp b/src/test/ValentinaTest/tst_varc.cpp index 33135fa92..2f5c0948e 100644 --- a/src/test/ValentinaTest/tst_varc.cpp +++ b/src/test/ValentinaTest/tst_varc.cpp @@ -29,7 +29,6 @@ #include "tst_varc.h" #include "../vgeometry/varc.h" #include "../vlayout/vabstractpiece.h" -#include "../vmisc/logging.h" #include diff --git a/src/test/ValentinaTest/tst_vellipticalarc.cpp b/src/test/ValentinaTest/tst_vellipticalarc.cpp index d6ed5499d..d638fbf44 100644 --- a/src/test/ValentinaTest/tst_vellipticalarc.cpp +++ b/src/test/ValentinaTest/tst_vellipticalarc.cpp @@ -29,7 +29,6 @@ #include "tst_vellipticalarc.h" #include "../vgeometry/vellipticalarc.h" #include "../vlayout/vabstractpiece.h" -#include "../vmisc/logging.h" #include #include diff --git a/src/test/ValentinaTest/tst_vpointf.cpp b/src/test/ValentinaTest/tst_vpointf.cpp index 881074c7b..89612d084 100644 --- a/src/test/ValentinaTest/tst_vpointf.cpp +++ b/src/test/ValentinaTest/tst_vpointf.cpp @@ -28,7 +28,6 @@ #include "tst_vpointf.h" #include "../vgeometry/vpointf.h" -#include "../vmisc/logging.h" #include diff --git a/src/test/ValentinaTest/tst_vposter.cpp b/src/test/ValentinaTest/tst_vposter.cpp index 1feb0ea3a..902166c7b 100644 --- a/src/test/ValentinaTest/tst_vposter.cpp +++ b/src/test/ValentinaTest/tst_vposter.cpp @@ -52,11 +52,7 @@ void TST_VPoster::BigPoster() //sets the margins to 0 to perform the test. const qreal left = 0, top = 0, right = 0, bottom = 0; -#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) printer.setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter); -#else - printer.setPageMargins(left, top, right, bottom, QPrinter::Millimeter); -#endif //QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) const QRect image(0, 0, 2622, 3178); // Little bit bigger than A1 diff --git a/src/test/ValentinaTest/tst_vspline.cpp b/src/test/ValentinaTest/tst_vspline.cpp index 0a90a0ab5..99cbcf6ed 100644 --- a/src/test/ValentinaTest/tst_vspline.cpp +++ b/src/test/ValentinaTest/tst_vspline.cpp @@ -28,7 +28,6 @@ #include "tst_vspline.h" #include "../vgeometry/vspline.h" -#include "../vmisc/logging.h" #include diff --git a/src/test/ValentinaTest/tst_vsplinepath.cpp b/src/test/ValentinaTest/tst_vsplinepath.cpp index bb7e8d3af..832978820 100644 --- a/src/test/ValentinaTest/tst_vsplinepath.cpp +++ b/src/test/ValentinaTest/tst_vsplinepath.cpp @@ -28,7 +28,6 @@ #include "tst_vsplinepath.h" #include "../vgeometry/vsplinepath.h" -#include "../vmisc/logging.h" #include diff --git a/src/test/ValentinaTest/tst_vtranslatevars.cpp b/src/test/ValentinaTest/tst_vtranslatevars.cpp index 5d9bd414b..e8285e9c6 100644 --- a/src/test/ValentinaTest/tst_vtranslatevars.cpp +++ b/src/test/ValentinaTest/tst_vtranslatevars.cpp @@ -27,7 +27,6 @@ *************************************************************************/ #include "tst_vtranslatevars.h" -#include "../vmisc/logging.h" #include "../vpatterndb/vtranslatevars.h" #include "../qmuparser/qmuparsererror.h" #include "testvapplication.h"