From 01f66d3c347473158f12c611380f86a356816536 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Sun, 3 Jul 2016 07:50:14 +0300 Subject: [PATCH 01/36] Resolved issue #461. Improve feature: Add a keyboard shortcut for getting pure 45, 90, 135, 180, 225, 270, 315 and 0 degree angles for all tools. --HG-- branch : feature --- .../vtools/tools/drawTools/toolcurve/vabstractspline.cpp | 8 ++++++++ .../vtools/tools/drawTools/toolcurve/vabstractspline.h | 1 + src/libs/vtools/visualization/line/visline.cpp | 2 +- src/libs/vtools/visualization/line/visline.h | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp index 57faed240..2bcfba7c3 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp @@ -261,6 +261,10 @@ VSpline VAbstractSpline::CorrectedSpline(const VSpline &spline, const SplinePoin if (position == SplinePointPosition::FirstPoint) { QLineF line(spline.GetP1(), pos); + if (QGuiApplication::keyboardModifiers() == Qt::ShiftModifier) + { + line.setAngle(VisLine::CorrectAngle(line.angle())); + } qreal newAngle1 = line.angle(); QString newAngle1F = QString().setNum(newAngle1); @@ -287,6 +291,10 @@ VSpline VAbstractSpline::CorrectedSpline(const VSpline &spline, const SplinePoin else { QLineF line(spline.GetP4(), pos); + if (QGuiApplication::keyboardModifiers() == Qt::ShiftModifier) + { + line.setAngle(VisLine::CorrectAngle(line.angle())); + } qreal newAngle2 = line.angle(); QString newAngle2F = QString().setNum(newAngle2); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h index 148d499b0..5b77b1dc9 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h +++ b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h @@ -30,6 +30,7 @@ #define VABSTRACTSPLINE_H #include "../vdrawtool.h" +#include "visualization/line/visline.h" #include diff --git a/src/libs/vtools/visualization/line/visline.cpp b/src/libs/vtools/visualization/line/visline.cpp index f8ccb91ce..7a245acdf 100644 --- a/src/libs/vtools/visualization/line/visline.cpp +++ b/src/libs/vtools/visualization/line/visline.cpp @@ -43,7 +43,7 @@ VisLine::~VisLine() {} //--------------------------------------------------------------------------------------------------------------------- -qreal VisLine::CorrectAngle(const qreal &angle) const +qreal VisLine::CorrectAngle(const qreal &angle) { qreal ang = angle; if (angle > 360) diff --git a/src/libs/vtools/visualization/line/visline.h b/src/libs/vtools/visualization/line/visline.h index 75c4783d6..80b2ca141 100644 --- a/src/libs/vtools/visualization/line/visline.h +++ b/src/libs/vtools/visualization/line/visline.h @@ -44,8 +44,8 @@ public: virtual int type() const Q_DECL_OVERRIDE {return Type;} enum { Type = UserType + static_cast(Vis::Line)}; + static qreal CorrectAngle(const qreal &angle); protected: - qreal CorrectAngle(const qreal &angle) const; QPointF Ray(const QPointF &firstPoint, const qreal &angle) const; QPointF Ray(const QPointF &firstPoint) const; QLineF Axis(const QPointF &p, const qreal &angle) const; From 2cf22753650a69a09be44365f0cdbbb11b9aa614 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Wed, 13 Jul 2016 14:05:37 +0300 Subject: [PATCH 02/36] Added ToolTip for editing simple curve. --HG-- branch : feature --- src/app/valentina/mainwindow.cpp | 1 + src/libs/vtools/tools/vabstracttool.h | 3 +++ src/libs/vtools/visualization/path/vistoolspline.cpp | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 3de1c204c..a7995d608 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -698,6 +698,7 @@ void MainWindow::ClosedDialogWithApply(int result) { VDrawTool *vtool= static_cast(dialogTool->GetAssociatedTool()); vtool->DialogLinkDestroy(); + connect(vtool, &VDrawTool::ToolTip, this, &MainWindow::ShowToolTip); } ArrowTool(); } diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index 8126fdfb8..526d03936 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -95,6 +95,8 @@ signals: * @brief FullUpdateTree emit if need reparse pattern file. */ void LiteUpdateTree(const Document &parse); + + void ToolTip(const QString &toolTip); protected: /** @brief doc dom document container */ VAbstractPattern *doc; @@ -166,6 +168,7 @@ inline void VAbstractTool::AddVisualization() scene->addItem(visual); vis = visual; + connect(vis, &Visualization::ToolTip, [=] (const QString &toolTip) {emit ToolTip(toolTip);}); } #endif // VABSTRACTTOOL_H diff --git a/src/libs/vtools/visualization/path/vistoolspline.cpp b/src/libs/vtools/visualization/path/vistoolspline.cpp index 3c19651b7..b135f9009 100644 --- a/src/libs/vtools/visualization/path/vistoolspline.cpp +++ b/src/libs/vtools/visualization/path/vistoolspline.cpp @@ -66,7 +66,9 @@ VisToolSpline::VisToolSpline(const VContainer *data, QGraphicsItem *parent) //--------------------------------------------------------------------------------------------------------------------- VisToolSpline::~VisToolSpline() -{} +{ + emit ToolTip(""); +} //--------------------------------------------------------------------------------------------------------------------- void VisToolSpline::RefreshGeometry() @@ -150,6 +152,8 @@ void VisToolSpline::RefreshGeometry() { VSpline spline(*first, *second, angle1, angle2, kAsm1, kAsm2, kCurve); DrawPath(this, spline.GetPath(PathDirection::Show), mainColor, Qt::SolidLine, Qt::RoundCap); + Visualization::toolTip = tr("Use Shift for sticking angle!"); + emit ToolTip(Visualization::toolTip); } } } From a362731040293fbc480b279997a780d88f0fefeb Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Wed, 13 Jul 2016 14:42:50 +0300 Subject: [PATCH 03/36] Added ToolTip for editing SplinePath. --HG-- branch : feature --- src/libs/vtools/visualization/path/vistoolsplinepath.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/vtools/visualization/path/vistoolsplinepath.cpp b/src/libs/vtools/visualization/path/vistoolsplinepath.cpp index 1842c8c1a..894305358 100644 --- a/src/libs/vtools/visualization/path/vistoolsplinepath.cpp +++ b/src/libs/vtools/visualization/path/vistoolsplinepath.cpp @@ -48,6 +48,7 @@ VisToolSplinePath::~VisToolSplinePath() { qDeleteAll(ctrlPoints); qDeleteAll(points); + emit ToolTip(""); } //--------------------------------------------------------------------------------------------------------------------- @@ -99,6 +100,11 @@ void VisToolSplinePath::RefreshGeometry() Visualization::toolTip = tr("Curved path: select three or more points, " "Enter - finish creation"); } + if (mode == Mode::Show) + { + Visualization::toolTip = tr("Use Shift for sticking angle!"); + emit ToolTip(Visualization::toolTip); + } } } From d96c885e0d884bb972d0a2b03b2be20e42d59586 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Wed, 13 Jul 2016 14:59:01 +0300 Subject: [PATCH 04/36] We don't need toolTip after we finished creation of CubicBezierPath. --HG-- branch : feature --- .../vtools/visualization/path/vistoolcubicbezierpath.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp b/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp index d394ec40b..708819cb3 100644 --- a/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp +++ b/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp @@ -275,6 +275,11 @@ void VisToolCubicBezierPath::RefreshToolTip() { Visualization::toolTip = tr("Curved path: select more points for complete segment"); } + + if (mode == Mode::Show) + { + Visualization::toolTip = ""; + } emit ToolTip(Visualization::toolTip); } } From e080d845f31ca0cc105f076a8d4050e88bb3518f Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Wed, 13 Jul 2016 22:50:55 +0300 Subject: [PATCH 05/36] We need to connect ToolTip signal from splines that already exists to ShowToolTip slot. --HG-- branch : feature --- src/app/valentina/xml/vpattern.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 8202161e1..bb03c893c 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -27,6 +27,7 @@ *************************************************************************/ #include "vpattern.h" +#include "mainwindow.h" #include "../vtools/tools/vdatatool.h" #include "../vtools/tools/vtooldetail.h" #include "../vtools/tools/vtooluniondetails.h" @@ -1914,8 +1915,16 @@ void VPattern::ParseToolSpline(VMainGraphicsScene *scene, QDomElement &domElemen const QString color = GetParametrString(domElement, AttrColor, ColorBlack); const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, "0"); - VToolSpline::Create(id, point1, point4, a1, a2, l1, l2, duplicate, color, scene, this, data, parse, - Source::FromFile); + VToolSpline *spl = VToolSpline::Create(id, point1, point4, a1, a2, l1, l2, duplicate, color, scene, this, + data, parse, Source::FromFile); + + if (spl != nullptr) + { + MainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(spl, &VToolSpline::ToolTip, window, &MainWindow::ShowToolTip); + } + //Rewrite attribute formula. Need for situation when we have wrong formula. if (a1 != angle1 || a2 != angle2 || l1 != length1 || l2 != length2) { @@ -2095,7 +2104,16 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement l1 = length1; l2 = length2; - VToolSplinePath::Create(id, points, a1, a2, l1, l2, color, scene, this, data, parse, Source::FromFile); + VToolSplinePath *spl = VToolSplinePath::Create(id, points, a1, a2, l1, l2, color, scene, this, data, parse, + Source::FromFile); + + if (spl != nullptr) + { + MainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(spl, &VToolSplinePath::ToolTip, window, &MainWindow::ShowToolTip); + } + //Rewrite attribute formula. Need for situation when we have wrong formula. int count = 0; for (qint32 i = 0; i < num; ++i) From d248c4f18a25e6529432a36ff26751593119629c Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Mon, 25 Jul 2016 19:23:00 +0300 Subject: [PATCH 06/36] Added VAbstractMainWindow class. --HG-- branch : feature --- src/app/valentina/mainwindowsnogui.cpp | 2 +- src/app/valentina/mainwindowsnogui.h | 3 +- src/libs/vwidgets/vabstractmainwindow.cpp | 36 +++++++++++++++ src/libs/vwidgets/vabstractmainwindow.h | 45 ++++++++++++++++++ src/libs/vwidgets/vwidgets.pri | 56 ++++++++++++----------- 5 files changed, 113 insertions(+), 29 deletions(-) create mode 100644 src/libs/vwidgets/vabstractmainwindow.cpp create mode 100644 src/libs/vwidgets/vabstractmainwindow.h diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index b3e6b9e72..326fbb387 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -57,7 +57,7 @@ //--------------------------------------------------------------------------------------------------------------------- MainWindowsNoGUI::MainWindowsNoGUI(QWidget *parent) - : QMainWindow(parent), listDetails(QVector()), currentScene(nullptr), tempSceneLayout(nullptr), + : VAbstractMainWindow(parent), listDetails(QVector()), currentScene(nullptr), tempSceneLayout(nullptr), pattern(new VContainer(qApp->TrVars(), qApp->patternUnitP())), doc(nullptr), papers(QList()), shadows(QList()), scenes(QList()), details(QList >()), undoAction(nullptr), redoAction(nullptr), actionDockWidgetToolOptions(nullptr), actionDockWidgetGroups(nullptr), diff --git a/src/app/valentina/mainwindowsnogui.h b/src/app/valentina/mainwindowsnogui.h index dbff87c6c..25b446e37 100644 --- a/src/app/valentina/mainwindowsnogui.h +++ b/src/app/valentina/mainwindowsnogui.h @@ -37,13 +37,14 @@ #include "xml/vpattern.h" #include "dialogs/dialogsavelayout.h" #include "../vlayout/vlayoutgenerator.h" +#include "../vwidgets/vabstractmainwindow.h" class QGraphicsScene; class QPrinter; class PosterData; -class MainWindowsNoGUI : public QMainWindow +class MainWindowsNoGUI : public VAbstractMainWindow { Q_OBJECT public: diff --git a/src/libs/vwidgets/vabstractmainwindow.cpp b/src/libs/vwidgets/vabstractmainwindow.cpp new file mode 100644 index 000000000..350c1e98d --- /dev/null +++ b/src/libs/vwidgets/vabstractmainwindow.cpp @@ -0,0 +1,36 @@ +/************************************************************************ + ** + ** @file + ** @author Valentina Zhuravska + ** @date 19 7, 2016 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2016 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "vabstractmainwindow.h" + +VAbstractMainWindow::VAbstractMainWindow(QWidget *parent) : QMainWindow(parent) +{} + +//--------------------------------------------------------------------------------------------------------------------- +VAbstractMainWindow::~VAbstractMainWindow() +{} diff --git a/src/libs/vwidgets/vabstractmainwindow.h b/src/libs/vwidgets/vabstractmainwindow.h new file mode 100644 index 000000000..c51aefb35 --- /dev/null +++ b/src/libs/vwidgets/vabstractmainwindow.h @@ -0,0 +1,45 @@ +/************************************************************************ + ** + ** @file + ** @author Valentina Zhuravska + ** @date 19 7, 2016 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2016 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef VABSTRACTMAINWINDOW_H +#define VABSTRACTMAINWINDOW_H + +#include + +class VAbstractMainWindow : public QMainWindow +{ + Q_OBJECT +public: + explicit VAbstractMainWindow(QWidget *parent = nullptr); + virtual ~VAbstractMainWindow() Q_DECL_OVERRIDE; + +public slots: + virtual void ShowToolTip(const QString &toolTip)=0; +}; + +#endif // VABSTRACTMAINWINDOW_H diff --git a/src/libs/vwidgets/vwidgets.pri b/src/libs/vwidgets/vwidgets.pri index d80356e60..042607eb2 100644 --- a/src/libs/vwidgets/vwidgets.pri +++ b/src/libs/vwidgets/vwidgets.pri @@ -1,27 +1,29 @@ -# ADD TO EACH PATH $$PWD VARIABLE!!!!!! -# This need for corect working file translations.pro - -SOURCES += \ - $$PWD/vmaingraphicsscene.cpp \ - $$PWD/vmaingraphicsview.cpp \ - $$PWD/vwidgetpopup.cpp \ - $$PWD/vcontrolpointspline.cpp \ - $$PWD/vgraphicssimpletextitem.cpp \ - $$PWD/vsimplepoint.cpp \ - $$PWD/vabstractsimple.cpp \ - $$PWD/vnobrushscalepathitem.cpp \ - $$PWD/vsimplecurve.cpp - -win32-msvc*:SOURCES += $$PWD/stable.cpp - -HEADERS += \ - $$PWD/stable.h \ - $$PWD/vmaingraphicsscene.h \ - $$PWD/vmaingraphicsview.h \ - $$PWD/vwidgetpopup.h \ - $$PWD/vcontrolpointspline.h \ - $$PWD/vgraphicssimpletextitem.h \ - $$PWD/vsimplepoint.h \ - $$PWD/vabstractsimple.h \ - $$PWD/vnobrushscalepathitem.h \ - $$PWD/vsimplecurve.h +# ADD TO EACH PATH $$PWD VARIABLE!!!!!! +# This need for corect working file translations.pro + +SOURCES += \ + $$PWD/vmaingraphicsscene.cpp \ + $$PWD/vmaingraphicsview.cpp \ + $$PWD/vwidgetpopup.cpp \ + $$PWD/vcontrolpointspline.cpp \ + $$PWD/vgraphicssimpletextitem.cpp \ + $$PWD/vsimplepoint.cpp \ + $$PWD/vabstractsimple.cpp \ + $$PWD/vnobrushscalepathitem.cpp \ + $$PWD/vsimplecurve.cpp \ + $$PWD/vabstractmainwindow.cpp + +win32-msvc*:SOURCES += $$PWD/stable.cpp + +HEADERS += \ + $$PWD/stable.h \ + $$PWD/vmaingraphicsscene.h \ + $$PWD/vmaingraphicsview.h \ + $$PWD/vwidgetpopup.h \ + $$PWD/vcontrolpointspline.h \ + $$PWD/vgraphicssimpletextitem.h \ + $$PWD/vsimplepoint.h \ + $$PWD/vabstractsimple.h \ + $$PWD/vnobrushscalepathitem.h \ + $$PWD/vsimplecurve.h \ + $$PWD/vabstractmainwindow.h From b5457867e5065a0b9be8d228860dadc69621e9ec Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 20:01:19 +0300 Subject: [PATCH 07/36] Try be more verbose when copy test files. --HG-- branch : develop --- src/test/ValentinaTest/abstracttest.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/test/ValentinaTest/abstracttest.cpp b/src/test/ValentinaTest/abstracttest.cpp index c671f4d9f..920b396a9 100644 --- a/src/test/ValentinaTest/abstracttest.cpp +++ b/src/test/ValentinaTest/abstracttest.cpp @@ -138,9 +138,11 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg { QDir targetDir(tgtFilePath); targetDir.cdUp(); - if (not targetDir.mkdir(QFileInfo(tgtFilePath).fileName())) + const QString dirName = QFileInfo(tgtFilePath).fileName(); + if (not targetDir.mkdir(dirName)) { - QWARN("Can't create subdir./n"); + const QString msg = QString("Can't create dir '%1'.").arg(dirName); + QWARN(qUtf8Printable(msg)); return false; } QDir sourceDir(srcFilePath); @@ -158,9 +160,26 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg } else { + if (QFileInfo(tgtFilePath).exists()) + { + const QString msg = QString("File '%1' exists.").arg(srcFilePath); + QWARN(qUtf8Printable(msg)); + + if (QFile::remove(tgtFilePath)) + { + QWARN("File successfully removed."); + } + else + { + QWARN("Can't remove file."); + return false; + } + } + if (not QFile::copy(srcFilePath, tgtFilePath)) { - QWARN("Can't copy file./n"); + const QString msg = QString("Can't copy file '%1' to '%2'.").arg(srcFilePath).arg(tgtFilePath); + QWARN(qUtf8Printable(msg)); return false; } } From 9e9e2a1455b20139f9c8dbfbc78bbcacf840e88d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 21:55:23 +0300 Subject: [PATCH 08/36] Check which locale supports bitbucket pipelines. --HG-- branch : develop --- bitbucket-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 280d44d27..208c15fea 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -8,6 +8,7 @@ pipelines: develop: - step: script: + - locale - cat /etc/*-release - uname -a - grep -i processor /proc/cpuinfo | wc -l @@ -21,4 +22,4 @@ pipelines: - make -j$(nproc) - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/opt/atlassian/bitbucketci/agent/build/build/src/libs/vpropertyexplorer/bin:/opt/atlassian/bitbucketci/agent/build/build/src/libs/qmuparser/bin" # QTestLib require GUI support for some tests - - xvfb-run -a make check \ No newline at end of file + - xvfb-run -a make check From 6124f2c3146d6c207c763a92a0eaf5d7933af830 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 22:23:28 +0300 Subject: [PATCH 09/36] Because bitbucket pipelines by default uses C locale we will try generate UTF-8 manually. --HG-- branch : develop --- bitbucket-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 208c15fea..e380e5efc 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -9,6 +9,8 @@ pipelines: - step: script: - locale + - locale-gen "en_US.UTF-8" + - dpkg-reconfigure locales - cat /etc/*-release - uname -a - grep -i processor /proc/cpuinfo | wc -l From 1fc22502ac285b1912023083e0e10a3764dd5f2d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 22:29:22 +0300 Subject: [PATCH 10/36] Can't change locale because no English language pack installed. --HG-- branch : develop --- bitbucket-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index e380e5efc..18974c3bf 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -16,7 +16,7 @@ pipelines: - grep -i processor /proc/cpuinfo | wc -l - gcc --version - apt-get update # required to install qt - - apt-get install -y xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf + - apt-get install -y language-pack-en xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf - mkdir build - cd build - qmake --version From 4e35551ff4ab27ea7b3a36279bbb20834b889d4e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 22:37:29 +0300 Subject: [PATCH 11/36] Seems like "local-gen" is inside package "locales". --HG-- branch : develop --- bitbucket-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 18974c3bf..e26d90777 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -16,7 +16,7 @@ pipelines: - grep -i processor /proc/cpuinfo | wc -l - gcc --version - apt-get update # required to install qt - - apt-get install -y language-pack-en xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf + - apt-get install -y locales language-pack-en xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf - mkdir build - cd build - qmake --version From 1813a897e3647c39da64bd26b1ebbdfda3b616f7 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 23:06:10 +0300 Subject: [PATCH 12/36] Forgot that i call locale-gen before "apt-get install". --HG-- branch : develop --- bitbucket-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index e26d90777..884276044 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -8,15 +8,15 @@ pipelines: develop: - step: script: - - locale - - locale-gen "en_US.UTF-8" - - dpkg-reconfigure locales - cat /etc/*-release - uname -a - grep -i processor /proc/cpuinfo | wc -l - gcc --version - apt-get update # required to install qt - apt-get install -y locales language-pack-en xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf + - locale + - locale-gen "en_US.UTF-8" + - dpkg-reconfigure locales - mkdir build - cd build - qmake --version From f34a3e54e428fc32cb3e45e75f324a1131be9d6f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 23:18:29 +0300 Subject: [PATCH 13/36] Documentation says they use Ubuntu, but log says we work with Debian. And ssems like Debian doesn't provide package "language-pack-en". Let's try without it. --HG-- branch : develop --- bitbucket-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 884276044..f8beeef6b 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -13,7 +13,7 @@ pipelines: - grep -i processor /proc/cpuinfo | wc -l - gcc --version - apt-get update # required to install qt - - apt-get install -y locales language-pack-en xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf + - apt-get install -y locales xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf - locale - locale-gen "en_US.UTF-8" - dpkg-reconfigure locales From 2fbac845b5b86bb98c35ca3438477d249dd29d8e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 25 Jul 2016 23:28:26 +0300 Subject: [PATCH 14/36] Looks like "dpkg-reconfigure locales" need some type of dialog with user. Replace with another approach. --HG-- branch : develop --- bitbucket-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index f8beeef6b..02e21f4fd 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -15,8 +15,9 @@ pipelines: - apt-get update # required to install qt - apt-get install -y locales xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf - locale + - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen - locale-gen "en_US.UTF-8" - - dpkg-reconfigure locales + - update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 - mkdir build - cd build - qmake --version From 689024d60f4a7bdcf2d779a56dd0c163d3214454 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 26 Jul 2016 13:33:58 +0300 Subject: [PATCH 15/36] Resolved issue #530. Add debug messages for Layout creation errors. --HG-- branch : develop --- src/libs/vlayout/vbank.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/libs/vlayout/vbank.cpp b/src/libs/vlayout/vbank.cpp index 108c97a0b..53e402dc1 100644 --- a/src/libs/vlayout/vbank.cpp +++ b/src/libs/vlayout/vbank.cpp @@ -28,11 +28,28 @@ #include "vbank.h" #include "vlayoutdetail.h" +#include "../vmisc/logging.h" #include #include #include +#if defined(Q_CC_CLANG) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) +#endif + +Q_LOGGING_CATEGORY(lBank, "layout.bank") + +#if defined(Q_CC_CLANG) + #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) +#endif + //--------------------------------------------------------------------------------------------------------------------- VBank::VBank() :details(QVector()), unsorted(QHash()), big(QHash()), @@ -158,12 +175,14 @@ bool VBank::Prepare() { if (layoutWidth <= 0) { + qCDebug(lBank, "Preparing data for layout error: Layout paper sheet <= 0"); prepare = false; return prepare; } if (details.isEmpty()) { + qCDebug(lBank, "Preparing data for layout error: List of details is empty"); prepare = false; return prepare; } @@ -183,6 +202,7 @@ bool VBank::Prepare() const qint64 square = details.at(i).Square(); if (square <= 0) { + qCDebug(lBank, "Preparing data for layout error: Detail squere <= 0"); prepare = false; return prepare; } From f9c9cedfacaba4a6ac380260f876fa3c87062846 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Tue, 26 Jul 2016 13:45:17 +0300 Subject: [PATCH 16/36] We don't need DialogTool::ShowVisToolTip slot anymore. --HG-- branch : feature --- src/app/valentina/xml/vpattern.cpp | 8 ++++---- src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp | 5 ++++- .../vtools/dialogs/tools/dialogcurveintersectaxis.cpp | 5 ++++- src/libs/vtools/dialogs/tools/dialogendline.cpp | 5 ++++- src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp | 5 ++++- src/libs/vtools/dialogs/tools/dialogrotation.cpp | 5 ++++- src/libs/vtools/dialogs/tools/dialogsplinepath.cpp | 6 +++++- src/libs/vtools/dialogs/tools/dialogtool.cpp | 6 ------ src/libs/vtools/dialogs/tools/dialogtool.h | 1 - 9 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index bb03c893c..89b6d2aaa 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -1920,9 +1920,9 @@ void VPattern::ParseToolSpline(VMainGraphicsScene *scene, QDomElement &domElemen if (spl != nullptr) { - MainWindow *window = qobject_cast(qApp->getMainWindow()); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); SCASSERT(window != nullptr); - connect(spl, &VToolSpline::ToolTip, window, &MainWindow::ShowToolTip); + connect(spl, &VToolSpline::ToolTip, window, &VAbstractMainWindow::ShowToolTip); } //Rewrite attribute formula. Need for situation when we have wrong formula. @@ -2109,9 +2109,9 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement if (spl != nullptr) { - MainWindow *window = qobject_cast(qApp->getMainWindow()); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); SCASSERT(window != nullptr); - connect(spl, &VToolSplinePath::ToolTip, window, &MainWindow::ShowToolTip); + connect(spl, &VToolSplinePath::ToolTip, window, &VAbstractMainWindow::ShowToolTip); } //Rewrite attribute formula. Need for situation when we have wrong formula. diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp index a53098c78..7bb13d604 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp @@ -29,6 +29,7 @@ #include "dialogcubicbezierpath.h" #include "ui_dialogcubicbezierpath.h" #include "../../visualization/path/vistoolcubicbezierpath.h" +#include "../vwidgets/vabstractmainwindow.h" #if QT_VERSION < QT_VERSION_CHECK(5, 1, 0) # include "../vmisc/vmath.h" @@ -129,7 +130,9 @@ void DialogCubicBezierPath::ChosenObject(quint32 id, const SceneObject &type) if (path.CountPoints() == 1) { visPath->VisualMode(NULL_ID); - connect(visPath, &VisToolCubicBezierPath::ToolTip, this, &DialogTool::ShowVisToolTip); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(visPath, &VisToolCubicBezierPath::ToolTip, window, &VAbstractMainWindow::ShowToolTip); } else { diff --git a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp index 52ab4aa38..ba14e3565 100644 --- a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp @@ -36,6 +36,7 @@ #include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" #include "../support/dialogeditwrongformula.h" +#include "../vwidgets/vabstractmainwindow.h" #include @@ -218,7 +219,9 @@ void DialogCurveIntersectAxis::ChosenObject(quint32 id, const SceneObject &type) { number++; line->VisualMode(id); - connect(line, &VisToolCurveIntersectAxis::ToolTip, this, &DialogTool::ShowVisToolTip); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(line, &VisToolCurveIntersectAxis::ToolTip, window, &VAbstractMainWindow::ShowToolTip); } } break; diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index e1a921897..63941d0fb 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -36,6 +36,7 @@ #include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" #include "../support/dialogeditwrongformula.h" +#include "../vwidgets/vabstractmainwindow.h" #include //--------------------------------------------------------------------------------------------------------------------- @@ -167,7 +168,9 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type) if (SetObject(id, ui->comboBoxBasePoint, "")) { vis->VisualMode(id); - connect(vis, &Visualization::ToolTip, this, &DialogTool::ShowVisToolTip); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(vis, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip); prepare = true; } } diff --git a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp index a61a6e3d0..932571b49 100644 --- a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp @@ -36,6 +36,7 @@ #include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" #include "../support/dialogeditwrongformula.h" +#include "../vwidgets/vabstractmainwindow.h" #include @@ -243,7 +244,9 @@ void DialogLineIntersectAxis::ChosenObject(quint32 id, const SceneObject &type) { number++; line->VisualMode(id); - connect(line, &VisToolLineIntersectAxis::ToolTip, this, &DialogTool::ShowVisToolTip); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(line, &VisToolLineIntersectAxis::ToolTip, window, &VAbstractMainWindow::ShowToolTip); } break; case (1): diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index 8af42964d..310b49eda 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -38,6 +38,7 @@ #include "../../visualization/line/vistoolrotation.h" #include "../support/dialogeditwrongformula.h" #include "../qmuparser/qmudef.h" +#include "../vwidgets/vabstractmainwindow.h" //--------------------------------------------------------------------------------------------------------------------- DialogRotation::DialogRotation(const VContainer *data, const quint32 &toolId, QWidget *parent) @@ -217,7 +218,9 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type) VisToolRotation *operation = qobject_cast(vis); SCASSERT(operation != nullptr); - connect(operation, &Visualization::ToolTip, this, &DialogTool::ShowVisToolTip); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(operation, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip); operation->SetOriginPointId(id); operation->RefreshGeometry(); diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index 338f00ce6..918f649bf 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -33,6 +33,7 @@ #include "../../visualization/path/vistoolsplinepath.h" #include "../support/dialogeditwrongformula.h" #include "../qmuparser/qmuparsererror.h" +#include "../vwidgets/vabstractmainwindow.h" #include @@ -182,7 +183,10 @@ void DialogSplinePath::ChosenObject(quint32 id, const SceneObject &type) if (path.CountPoints() == 1) { visPath->VisualMode(NULL_ID); - connect(visPath, &VisToolSplinePath::ToolTip, this, &DialogTool::ShowVisToolTip); + VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); + SCASSERT(window != nullptr); + connect(visPath, &VisToolSplinePath::ToolTip, window, &VAbstractMainWindow::ShowToolTip); + connect(visPath, &VisToolSplinePath::PathChanged, this, &DialogSplinePath::PathUpdated); } else diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index af36c41af..01e24c86a 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -907,12 +907,6 @@ QString DialogTool::getPointName() const return pointName; } -//--------------------------------------------------------------------------------------------------------------------- -void DialogTool::ShowVisToolTip(const QString &toolTip) -{ - emit ToolTip(toolTip); -} - //--------------------------------------------------------------------------------------------------------------------- void DialogTool::ShowDialog(bool click) { diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index ee47436bc..279479857 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -91,7 +91,6 @@ signals: */ void ToolTip(const QString &toolTip); public slots: - void ShowVisToolTip(const QString &toolTip); virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void SelectedObject(bool selected, quint32 object, quint32 tool); void NamePointChanged(); From 6081a5f9d734e4f8c6e04c0cfd38f5b0b5efa4e3 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Tue, 26 Jul 2016 16:16:09 +0300 Subject: [PATCH 17/36] Little fix. --HG-- branch : feature --- src/app/valentina/xml/vpattern.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index ad6ef18a1..6bfd1b954 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -27,7 +27,7 @@ *************************************************************************/ #include "vpattern.h" -#include "mainwindow.h" +#include "../vwidgets/vabstractmainwindow.h" #include "../vtools/tools/vdatatool.h" #include "../vtools/tools/vtooldetail.h" #include "../vtools/tools/vtooluniondetails.h" From 7b7ef6c0e22d7f7e1be9b2c1c9ffc3702e22d3b0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 26 Jul 2016 16:51:38 +0300 Subject: [PATCH 18/36] Fixed build. --HG-- branch : develop --- src/libs/vtools/dialogs/tools/dialogendline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index 422388c3a..4d45c0532 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -170,7 +170,7 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type) vis->VisualMode(id); VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); SCASSERT(window != nullptr); - connect(vis, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip); + connect(vis.data(), &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip); prepare = true; } } From e5cbf86ef25fecba7fa227175350211778a36978 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 11:38:30 +0300 Subject: [PATCH 19/36] Tring restore bitbucket pipeline. Fixing locale is wrong way. Try get error sting about copying. --HG-- branch : develop --- bitbucket-pipelines.yml | 6 +----- src/test/ValentinaTest/abstracttest.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 02e21f4fd..ca612ce6a 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -13,11 +13,7 @@ pipelines: - grep -i processor /proc/cpuinfo | wc -l - gcc --version - apt-get update # required to install qt - - apt-get install -y locales xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf - - locale - - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen - - locale-gen "en_US.UTF-8" - - update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 + - apt-get install -y xvfb qtbase5-dev libqt5svg5-dev qt5-default qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 xpdf - mkdir build - cd build - qmake --version diff --git a/src/test/ValentinaTest/abstracttest.cpp b/src/test/ValentinaTest/abstracttest.cpp index 920b396a9..89f12ac69 100644 --- a/src/test/ValentinaTest/abstracttest.cpp +++ b/src/test/ValentinaTest/abstracttest.cpp @@ -176,9 +176,11 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg } } - if (not QFile::copy(srcFilePath, tgtFilePath)) + QFile srcFile(srcFilePath); + if (not srcFile.copy(tgtFilePath)) { - const QString msg = QString("Can't copy file '%1' to '%2'.").arg(srcFilePath).arg(tgtFilePath); + const QString msg = QString("Can't copy file '%1' to '%2'. Error: %3").arg(srcFilePath).arg(tgtFilePath) + .arg(srcFile.errorString()); QWARN(qUtf8Printable(msg)); return false; } From 01be3c518148dd90310bd2df01b3cccc9106537a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 12:02:28 +0300 Subject: [PATCH 20/36] Try find more about error: "Cannot open %file for input" how was suggested on stackoverflow. --HG-- branch : develop --- src/test/ValentinaTest/abstracttest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/ValentinaTest/abstracttest.cpp b/src/test/ValentinaTest/abstracttest.cpp index 89f12ac69..ecedba3dd 100644 --- a/src/test/ValentinaTest/abstracttest.cpp +++ b/src/test/ValentinaTest/abstracttest.cpp @@ -176,7 +176,16 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg } } + // Check error: Cannot open %file for input QFile srcFile(srcFilePath); + if (not srcFile.open(QFile::ReadOnly)) + { + const QString msg = QString("Error: %3").arg(srcFile.errorString()); + QWARN(qUtf8Printable(msg)); + return false; + } + srcFile.close(); + if (not srcFile.copy(tgtFilePath)) { const QString msg = QString("Can't copy file '%1' to '%2'. Error: %3").arg(srcFilePath).arg(tgtFilePath) From bedce691431da00f3f85c021f362c6daf2781ac1 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 12:44:14 +0300 Subject: [PATCH 21/36] Show file name i the error message. --HG-- branch : develop --- src/test/ValentinaTest/abstracttest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ValentinaTest/abstracttest.cpp b/src/test/ValentinaTest/abstracttest.cpp index ecedba3dd..dc60f451e 100644 --- a/src/test/ValentinaTest/abstracttest.cpp +++ b/src/test/ValentinaTest/abstracttest.cpp @@ -180,7 +180,7 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg QFile srcFile(srcFilePath); if (not srcFile.open(QFile::ReadOnly)) { - const QString msg = QString("Error: %3").arg(srcFile.errorString()); + const QString msg = QString("Can't copy file '%1'. Error: %2").arg(srcFilePath).arg(srcFile.errorString()); QWARN(qUtf8Printable(msg)); return false; } From 3592377324a5397c8b774c7b926182cf2116e997 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 13:20:03 +0300 Subject: [PATCH 22/36] Added appveyor.yml. --HG-- branch : develop --- appveyor.yml | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..a6c4a3ddb --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,173 @@ + +# Notes: +# - Minimal appveyor.yml file is an empty file. All sections are optional. +# - Indent each level of configuration with 2 spaces. Do not use tabs! +# - All section names are case-sensitive. +# - Section names should be unique on each level. + +#---------------------------------# +# general configuration # +#---------------------------------# + +# version format +version: '{build}-{branch}' + +os: Visual Studio 2015 + +# branches to build +branches: + # whitelist + only: + - develop + - release + +# Do not build on tags (GitHub and BitBucket) +skip_tags: true + +#---------------------------------# +# environment configuration # +#---------------------------------# + +# set clone depth +clone_depth: 1 # clone entire repository history if not defined + +# fetch repository as zip archive +shallow_clone: false # default is "false" + +environment: + matrix: + - QT5: Qt\5.7\mingw53_32 + QMAKE_GENERATOR: "MinGW Makefiles" + MINGW_PATH: C:\Qt\Tools\mingw53_32 + - QT5: Qt\5.7\msvc2015_64 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 14 + PLATFORM: X64 + - QT5: Qt\5.7\msvc2015 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 14 + PLATFORM: X86 + - QT5: Qt\5.7\msvc2013_64 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X64 + - QT5: Qt\5.7\msvc2013 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X86 + - QT5: Qt\5.6\mingw49_32 + QMAKE_GENERATOR: "MinGW Makefiles" + MINGW_PATH: C:\Qt\Tools\mingw49_32 + - QT5: Qt\5.6\msvc2015_64 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 14 + PLATFORM: X64 + - QT5: Qt\5.6\msvc2015 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 14 + PLATFORM: X86 + - QT5: Qt\5.6\msvc2013_64 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X64 + - QT5: Qt\5.6\msvc2013 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X86 + - QT5: Qt\5.5\mingw492_32 + QMAKE_GENERATOR: "MinGW Makefiles" + - QT5: Qt\5.5\msvc2013_64 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X64 + - QT5: Qt\5.5\msvc2013 + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X86 + - QT5: Qt\5.4\mingw491_32 + QMAKE_GENERATOR: "MinGW Makefiles" + MINGW_PATH: C:\Qt\Tools\mingw491_32 + - QT5: Qt\5.4\msvc2013_64_opengl + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X64 + - QT5: Qt\5.4\msvc2013_opengl + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X86 + - QT5: Qt\5.3\mingw482_32 + QMAKE_GENERATOR: "MinGW Makefiles" + MINGW_PATH: C:\Qt\Tools\mingw482_32 + - QT5: Qt\5.3\msvc2013_64_opengl + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X64 + - QT5: Qt\5.3\msvc2013_opengl + QMAKE_GENERATOR: "NMake Makefiles JOM" + VSVER: 12 + PLATFORM: X86 + +# scripts that are called at very beginning, before repo cloning +init: + # Installing various utilities + - choco install cppcheck + #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" choco install -y InnoSetup + #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X86" set PATH="C:\Program Files\Inno Setup 5";%PATH% + #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% + - set PATH="C:\%QT5%\bin";%PATH% + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%\bin;%PATH% + - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% + - qmake -v + +#---------------------------------# +# build configuration # +#---------------------------------# + +# build platform +platform: + - x86 + - x64 + +before_build: + - cd c:\projects\valentina + - md build + +# to run your custom scripts instead of automatic MSBuild +build_script: + - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS")) + - if NOT "%QMAKE_GENERATOR%" == "MinGW Makefiles" echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%" + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" echo "Using MinGW" + - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X86" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" + - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 + - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 + - cd build + - cppcheck --error-exitcode=1 --quiet --inline-suppr --template '{file}:{line}:{message}:{id}' --force --report-progress --enable=performance,portability ..\src + - qmake ..\Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings + - if not "%QMAKE_GENERATOR%" == "MinGW Makefiles" (nmake) else (mingw32-make -j%NUMBER_OF_PROCESSORS%) + +# scripts to run after build +after_build: + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" mingw32-make install + +# to run your custom scripts instead of automatic tests +test_script: + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" (mingw32-make check) + +# to disable automatic tests +test: off + +matrix: + fast_finish: true + +#---------------------------------# +# notifications # +#---------------------------------# + +notifications: + # Email + - provider: Email + to: + - dismine@gmail.com + - susan.spencer@gmail.com + - zhuravska19@gmail.com + on_build_status_changed: true From d2857624e35491711be132e762ddc5e793c35e20 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 13:32:22 +0300 Subject: [PATCH 23/36] Skip installing cppcheck. --HG-- branch : develop --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a6c4a3ddb..87996a00a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -110,7 +110,7 @@ environment: # scripts that are called at very beginning, before repo cloning init: # Installing various utilities - - choco install cppcheck + #- choco install cppcheck #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" choco install -y InnoSetup #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X86" set PATH="C:\Program Files\Inno Setup 5";%PATH% #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% @@ -141,7 +141,7 @@ build_script: - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 - cd build - - cppcheck --error-exitcode=1 --quiet --inline-suppr --template '{file}:{line}:{message}:{id}' --force --report-progress --enable=performance,portability ..\src + #- cppcheck --error-exitcode=1 --quiet --inline-suppr --template '{file}:{line}:{message}:{id}' --force --report-progress --enable=performance,portability ..\src - qmake ..\Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings - if not "%QMAKE_GENERATOR%" == "MinGW Makefiles" (nmake) else (mingw32-make -j%NUMBER_OF_PROCESSORS%) From 1c959e3af7ba2cc94329cd96db3c01d183126f5f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 13:45:07 +0300 Subject: [PATCH 24/36] Changed path to mingw. --HG-- branch : develop --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 87996a00a..536fd93a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,7 +38,7 @@ environment: matrix: - QT5: Qt\5.7\mingw53_32 QMAKE_GENERATOR: "MinGW Makefiles" - MINGW_PATH: C:\Qt\Tools\mingw53_32 + MINGW_PATH: C:\Qt\Tools\mingw53_32\bin - QT5: Qt\5.7\msvc2015_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 @@ -57,7 +57,7 @@ environment: PLATFORM: X86 - QT5: Qt\5.6\mingw49_32 QMAKE_GENERATOR: "MinGW Makefiles" - MINGW_PATH: C:\Qt\Tools\mingw49_32 + MINGW_PATH: C:\Qt\Tools\mingw49_32\bin - QT5: Qt\5.6\msvc2015_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 @@ -86,7 +86,7 @@ environment: PLATFORM: X86 - QT5: Qt\5.4\mingw491_32 QMAKE_GENERATOR: "MinGW Makefiles" - MINGW_PATH: C:\Qt\Tools\mingw491_32 + MINGW_PATH: C:\Qt\Tools\mingw491_32\bin - QT5: Qt\5.4\msvc2013_64_opengl QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 @@ -97,7 +97,7 @@ environment: PLATFORM: X86 - QT5: Qt\5.3\mingw482_32 QMAKE_GENERATOR: "MinGW Makefiles" - MINGW_PATH: C:\Qt\Tools\mingw482_32 + MINGW_PATH: C:\Qt\Tools\mingw482_32\bin - QT5: Qt\5.3\msvc2013_64_opengl QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 From 10c5b07f18add2cc546ac7465dcda99ebc2da8b4 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 13:54:01 +0300 Subject: [PATCH 25/36] Path already contained directory bin. --HG-- branch : develop --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 536fd93a9..00e16e4d3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -115,7 +115,7 @@ init: #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X86" set PATH="C:\Program Files\Inno Setup 5";%PATH% #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - set PATH="C:\%QT5%\bin";%PATH% - - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%\bin;%PATH% + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH="%MINGW_PATH%";%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% - qmake -v From b47a5238849573c95ad47f6f666ec4d2f097d291 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 14:03:56 +0300 Subject: [PATCH 26/36] Set QTDIR. --HG-- branch : develop --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 00e16e4d3..7e925d94e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -114,7 +114,8 @@ init: #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" choco install -y InnoSetup #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X86" set PATH="C:\Program Files\Inno Setup 5";%PATH% #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - - set PATH="C:\%QT5%\bin";%PATH% + - set QTDIR=C:\%QT5% + - set PATH=%QTDIR%\bin;%PATH% - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH="%MINGW_PATH%";%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% - qmake -v From 25d5c32749043be87068af2a936e84baacdcbe56 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 14:22:35 +0300 Subject: [PATCH 27/36] Fixed wrong path to mingw. --HG-- branch : develop --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7e925d94e..49c412bec 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,7 +38,7 @@ environment: matrix: - QT5: Qt\5.7\mingw53_32 QMAKE_GENERATOR: "MinGW Makefiles" - MINGW_PATH: C:\Qt\Tools\mingw53_32\bin + MINGW_PATH: C:\Qt\Tools\mingw530_32\bin - QT5: Qt\5.7\msvc2015_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 @@ -57,7 +57,7 @@ environment: PLATFORM: X86 - QT5: Qt\5.6\mingw49_32 QMAKE_GENERATOR: "MinGW Makefiles" - MINGW_PATH: C:\Qt\Tools\mingw49_32\bin + MINGW_PATH: C:\Qt\Tools\mingw492_32\bin - QT5: Qt\5.6\msvc2015_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 @@ -76,6 +76,7 @@ environment: PLATFORM: X86 - QT5: Qt\5.5\mingw492_32 QMAKE_GENERATOR: "MinGW Makefiles" + MINGW_PATH: C:\Qt\Tools\mingw492_32\bin - QT5: Qt\5.5\msvc2013_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 From 15c2c0bda45d1158b97e4df383748001ce1c0075 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 14:50:38 +0300 Subject: [PATCH 28/36] Set path without quotes. Show in log the path variable. --HG-- branch : develop --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 49c412bec..2735ff4d0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -117,8 +117,9 @@ init: #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - set QTDIR=C:\%QT5% - set PATH=%QTDIR%\bin;%PATH% - - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH="%MINGW_PATH%";%PATH% + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%;%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% + - path - qmake -v #---------------------------------# From c7cddbfb280a5f673c740a48143f214d95d9ae4e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 15:15:31 +0300 Subject: [PATCH 29/36] Specify correct name for lrelease on Windows. --HG-- branch : develop --- src/app/translations.pri | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/translations.pri b/src/app/translations.pri index 10e52c35f..bb620bfa2 100755 --- a/src/app/translations.pri +++ b/src/app/translations.pri @@ -45,7 +45,11 @@ for(lang, LANGUAGES) { # Some systems use special name for lrelease. For example opensuse 13.2 has lrelease-qt5. isEmpty(LRELEASE){ - LRELEASE = lrelease + win32{ + LRELEASE = lrelease.exe + } else { + LRELEASE = lrelease + } } # Run generation *.qm file for available *.ts files each time you run qmake. From 78ed2f58712a1887662eca31363b1007d071826e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 16:30:25 +0300 Subject: [PATCH 30/36] Try left in path variable paths we only need and nothing more. --HG-- branch : develop --- appveyor.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2735ff4d0..4ab87bd74 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -110,15 +110,18 @@ environment: # scripts that are called at very beginning, before repo cloning init: + # Path before + - path # Installing various utilities #- choco install cppcheck #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" choco install -y InnoSetup #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X86" set PATH="C:\Program Files\Inno Setup 5";%PATH% #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - set QTDIR=C:\%QT5% - - set PATH=%QTDIR%\bin;%PATH% + - set PATH=%QTDIR%\bin #;%PATH% - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%;%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% + # Path after - path - qmake -v From 8553beacf2d4c57afb0daf93f1cbfadd9e9ba709 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 16:42:33 +0300 Subject: [PATCH 31/36] Mercurial should be in the path. --HG-- branch : develop --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4ab87bd74..68cb40945 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -118,7 +118,7 @@ init: #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X86" set PATH="C:\Program Files\Inno Setup 5";%PATH% #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" if "%PLATFORM%" == "X64" set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - set QTDIR=C:\%QT5% - - set PATH=%QTDIR%\bin #;%PATH% + - set PATH=%QTDIR%\bin;C:\Tools\PsTools;C:\Program Files\Mercurial\ #;%PATH% - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%;%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% # Path after From 7fa320a5ed9ce64d820744a595f1378f5c606f00 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 17:03:00 +0300 Subject: [PATCH 32/36] Enable automatic tests. Disable "make install". --HG-- branch : develop --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 68cb40945..fc73b0fb2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -153,14 +153,14 @@ build_script: # scripts to run after build after_build: - - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" mingw32-make install + #- if "%QMAKE_GENERATOR%" == "MinGW Makefiles" mingw32-make install # to run your custom scripts instead of automatic tests test_script: - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" (mingw32-make check) # to disable automatic tests -test: off +#test: off matrix: fast_finish: true From 60c8e2407837e3b7294d54544ae2da8dd157ff00 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 18:55:27 +0300 Subject: [PATCH 33/36] Set path to internal libraries. --HG-- branch : develop --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index fc73b0fb2..c944cf598 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -121,6 +121,7 @@ init: - set PATH=%QTDIR%\bin;C:\Tools\PsTools;C:\Program Files\Mercurial\ #;%PATH% - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%;%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% + - set PATH=C:\projects\valentina\build\src\libs\vpropertyexplorer\bin;C:\projects\valentina\build\src\libs\qmuparser\bin;%PATH% # Path after - path - qmake -v From 4c8366b21008ef1250ef98aac8158f3d325e90cd Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 19:34:21 +0300 Subject: [PATCH 34/36] Set VC variables for the platform. --HG-- branch : develop --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index c944cf598..24d57bddd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -122,6 +122,9 @@ init: - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" set PATH=%MINGW_PATH%;%PATH% - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% - set PATH=C:\projects\valentina\build\src\libs\vpropertyexplorer\bin;C:\projects\valentina\build\src\libs\qmuparser\bin;%PATH% + # Set VC variables for the platform + - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" if %PLATFORM% == x64 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat" + - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" if %PLATFORM% == x86 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat" # Path after - path - qmake -v From feb950c7de4905905c1d4497429829c07406042d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 20:13:47 +0300 Subject: [PATCH 35/36] vcvarsall.bat also change path variable. --HG-- branch : develop --- appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 24d57bddd..8e6f556a8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -125,6 +125,12 @@ init: # Set VC variables for the platform - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" if %PLATFORM% == x64 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat" - if "%QMAKE_GENERATOR%" == "NMake Makefiles JOM" if %PLATFORM% == x86 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat" + - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS")) + - if NOT "%QMAKE_GENERATOR%" == "MinGW Makefiles" echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%" + - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" echo "Using MinGW" + - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X86" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" + - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 + - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 # Path after - path - qmake -v @@ -144,12 +150,6 @@ before_build: # to run your custom scripts instead of automatic MSBuild build_script: - - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS")) - - if NOT "%QMAKE_GENERATOR%" == "MinGW Makefiles" echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%" - - if "%QMAKE_GENERATOR%" == "MinGW Makefiles" echo "Using MinGW" - - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X86" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" - - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 - - if "%CMAKE_GENERATOR%" == "NMake Makefiles JOM" if "%PLATFORM%" == "X64" call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 - cd build #- cppcheck --error-exitcode=1 --quiet --inline-suppr --template '{file}:{line}:{message}:{id}' --force --report-progress --enable=performance,portability ..\src - qmake ..\Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings From 6afc4bdf000f8f1f6f3c177184f1bf4950a17f33 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Jul 2016 20:24:30 +0300 Subject: [PATCH 36/36] PLATFORM is one of environment variable provided by AppVeyor. --HG-- branch : develop --- appveyor.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e6f556a8..4524ae897 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,71 +42,57 @@ environment: - QT5: Qt\5.7\msvc2015_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 - PLATFORM: X64 - QT5: Qt\5.7\msvc2015 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 - PLATFORM: X86 - QT5: Qt\5.7\msvc2013_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X64 - QT5: Qt\5.7\msvc2013 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X86 - QT5: Qt\5.6\mingw49_32 QMAKE_GENERATOR: "MinGW Makefiles" MINGW_PATH: C:\Qt\Tools\mingw492_32\bin - QT5: Qt\5.6\msvc2015_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 - PLATFORM: X64 - QT5: Qt\5.6\msvc2015 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 14 - PLATFORM: X86 - QT5: Qt\5.6\msvc2013_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X64 - QT5: Qt\5.6\msvc2013 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X86 - QT5: Qt\5.5\mingw492_32 QMAKE_GENERATOR: "MinGW Makefiles" MINGW_PATH: C:\Qt\Tools\mingw492_32\bin - QT5: Qt\5.5\msvc2013_64 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X64 - QT5: Qt\5.5\msvc2013 QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X86 - QT5: Qt\5.4\mingw491_32 QMAKE_GENERATOR: "MinGW Makefiles" MINGW_PATH: C:\Qt\Tools\mingw491_32\bin - QT5: Qt\5.4\msvc2013_64_opengl QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X64 - QT5: Qt\5.4\msvc2013_opengl QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X86 - QT5: Qt\5.3\mingw482_32 QMAKE_GENERATOR: "MinGW Makefiles" MINGW_PATH: C:\Qt\Tools\mingw482_32\bin - QT5: Qt\5.3\msvc2013_64_opengl QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X64 - QT5: Qt\5.3\msvc2013_opengl QMAKE_GENERATOR: "NMake Makefiles JOM" VSVER: 12 - PLATFORM: X86 # scripts that are called at very beginning, before repo cloning init: @@ -139,11 +125,6 @@ init: # build configuration # #---------------------------------# -# build platform -platform: - - x86 - - x64 - before_build: - cd c:\projects\valentina - md build