Merge branch 'develop' into feature/manual-layout

This commit is contained in:
Roman Telezhynskyi 2020-12-26 22:29:10 +02:00
commit 6f3e65e30e
9 changed files with 49 additions and 71 deletions

View File

@ -105,7 +105,11 @@ before_script:
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests;
fi
else
if [[ "$LEGACY" = false ]]; then
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noTests;
else
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=noTests;
fi
fi
script:
- "$CXX --version"

View File

@ -329,44 +329,30 @@ defineReplace(FindLatestTagDistance){
# In debug mode on Unix system we use all usefull for us compilers keys for checking errors.
# Also trying make all possible for speed up build time.
unix {
LIBS_USED_FOR_QT = \
QtCore \
QtSvg \
QtXml \
QtPrintSupport \
QtXmlPatterns \
QtWidgets \
QtGui \
QtNetwork \
QtTest \
QtConcurrent
# Key -isystem disable checking errors in system headers. Marking ignore for warnings in Qt headers.
!macx{
# Key -isystem disable checking errors in system headers. Mark ignore warnings Qt headers.
ISYSTEM += \
-isystem "$$[QT_INSTALL_HEADERS]" \
-isystem "$$[QT_INSTALL_HEADERS]/QtWidgets" \
-isystem "$$[QT_INSTALL_HEADERS]/QtXml" \
-isystem "$$[QT_INSTALL_HEADERS]/QtGui" \
-isystem "$$[QT_INSTALL_HEADERS]/QtXmlPatterns" \
-isystem "$$[QT_INSTALL_HEADERS]/QtCore" \
-isystem "$$[QT_INSTALL_HEADERS]/QtPrintSupport" \
-isystem "$$[QT_INSTALL_HEADERS]/QtSvg" \
-isystem "$$[QT_INSTALL_HEADERS]/QtNetwork" \
-isystem "$$[QT_INSTALL_HEADERS]/QtTest" \
-isystem "$$[QT_INSTALL_HEADERS]/QtConcurrent"
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]"
for(somelib, $$list($$LIBS_USED_FOR_QT)) {
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]/$${somelib}"
}
} else {
ISYSTEM += \
-isystem "$$[QT_INSTALL_LIBS]/QtWidgets.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtWidgets.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtXml.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtXml.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtGui.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtGui.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtXmlPatterns.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtXmlPatterns.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtCore.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtCore.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtPrintSupport.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtPrintSupport.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtSvg.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtSvg.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtNetwork.framework/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtNetwork.framework/Versions/5/Headers/" \
-isystem "$$[QT_INSTALL_LIBS]/QtTest.framework/Headers/" \
-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/"
for(somelib, $$list($$LIBS_USED_FOR_QT)) {
ISYSTEM += -isystem "$$[QT_INSTALL_LIBS]/$${somelib}.framework/Versions/5/Headers"
ISYSTEM += -isystem "$$[QT_INSTALL_LIBS]/$${somelib}.framework/Headers"
}
}
# Usefull GCC warnings keys.

View File

@ -128,22 +128,10 @@ void InsertGlobalContours(const QList<QGraphicsScene *> &scenes, const QList<QGr
//---------------------------------------------------------------------------------------------------------------------
MainWindowsNoGUI::MainWindowsNoGUI(QWidget *parent)
: VAbstractMainWindow(parent),
listDetails(),
currentScene(nullptr),
tempSceneLayout(nullptr),
pattern(new VContainer(qApp->TrVars(), qApp->patternUnitsP(), valentinaNamespace)),
doc(nullptr),
undoAction(nullptr),
redoAction(nullptr),
actionDockWidgetToolOptions(nullptr),
actionDockWidgetGroups(nullptr),
isNoScaling(false),
isNeedAutosave(false),
pattern(new VContainer(qApp->TrVars(), qApp->patternUnitsP(), valentinaNamespace))
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
m_taskbarButton(new QWinTaskbarButton(this)),
m_taskbarProgress(nullptr),
,m_taskbarButton(new QWinTaskbarButton(this))
#endif
m_dialogSaveLayout()
{
InitTempLayoutScene();

View File

@ -86,41 +86,41 @@ public slots:
protected slots:
void ExportFMeasurementsToCSV();
protected:
QVector<VLayoutPiece> listDetails;
QVector<VLayoutPiece> listDetails{};
/** @brief currentScene pointer to current scene. */
QGraphicsScene *currentScene;
QGraphicsScene *currentScene{nullptr};
QGraphicsScene *tempSceneLayout;
QGraphicsScene *tempSceneLayout{nullptr};
/** @brief pattern container with data (points, arcs, splines, spline paths, variables) */
VContainer *pattern;
/** @brief doc dom document container */
VPattern *doc;
VPattern *doc{nullptr};
QList<QGraphicsItem *> gcontours{};
QVector<QVector<VLayoutPiece> > detailsOnLayout{};
QAction *undoAction;
QAction *redoAction;
QAction *actionDockWidgetToolOptions;
QAction *actionDockWidgetGroups;
QAction *undoAction{nullptr};
QAction *redoAction{nullptr};
QAction *actionDockWidgetToolOptions{nullptr};
QAction *actionDockWidgetGroups{nullptr};
bool isNoScaling;
bool isNeedAutosave;
bool isNoScaling{false};
bool isNeedAutosave{false};
VPrintLayout *m_layoutSettings{new VPrintLayout(this)};
QSharedPointer<DialogSaveLayout> m_dialogSaveLayout;
/** @brief mouseCoordinate pointer to label who show mouse coordinate. */
QPointer<QLabel> m_mouseCoordinate{nullptr};
QPointer<QLabel> m_unreadPatternMessage{nullptr};
QSharedPointer<DialogSaveLayout> m_dialogSaveLayout{};
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
QWinTaskbarButton *m_taskbarButton;
QWinTaskbarProgress *m_taskbarProgress;
QWinTaskbarProgress *m_taskbarProgress{nullptr};
#endif
static QVector<VLayoutPiece> PrepareDetailsForLayout(const QVector<DetailForLayout> &details);

View File

@ -62,7 +62,7 @@ include(warnings.pri)
CONFIG(release, debug|release){
# Release mode
CONFIG += silent
!macx:CONFIG += silent
!unix:*g++*{
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll

View File

@ -7,7 +7,7 @@
# File with common stuff for whole project
include(../../../common.pri)
QT += core gui widgets printsupport xml concurrent
QT += core gui widgets printsupport xml concurrent svg
# Name of library
TARGET = vlayout

View File

@ -182,7 +182,7 @@ void VLayoutExporter::ExportToPDF(QGraphicsScene *scene) const
printer.setOutputFileName(m_fileName);
printer.setDocName(QFileInfo(m_fileName).fileName());
printer.setResolution(static_cast<int>(PrintDPI));
printer.setOrientation(QPrinter::Portrait);
printer.setPageOrientation(QPageLayout::Portrait);
printer.setFullPage(m_ignorePrinterMargins);
qreal width = FromPixel(m_imageRect.width() * m_xScale + m_margins.left() + m_margins.right(), Unit::Mm);

View File

@ -44,8 +44,8 @@ class VPrintLayout : public QObject
{
Q_OBJECT
public:
VPrintLayout(QObject *parent = nullptr);
~VPrintLayout();
explicit VPrintLayout(QObject *parent = nullptr);
virtual ~VPrintLayout();
auto FileName() const -> QString;
void SetFileName(const QString &fileName);

View File

@ -29,7 +29,7 @@
#ifndef TESTVAPPLICATION_H
#define TESTVAPPLICATION_H
#include "vabstractapplication.h"
#include "vabstractvalapplication.h"
#include "projectversion.h"
#include "../vmisc/vcommonsettings.h"
@ -50,12 +50,12 @@ public:
}
};
class TestVApplication : public VAbstractApplication
class TestVApplication : public VAbstractValApplication
{
Q_OBJECT
public:
TestVApplication(int &argc, char ** argv)
: VAbstractApplication(argc, argv),
: VAbstractValApplication(argc, argv),
m_trVars(nullptr)
{
setApplicationName("ValentinaTest");