mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 15:24:03 +02:00
Compare commits
12 commits
3ef14942d7
...
9145b9638b
Author | SHA1 | Date | |
---|---|---|---|
9145b9638b | |||
c89544fe08 | |||
dce2061dc3 | |||
a9ffeebe83 | |||
94f88b1066 | |||
934781660a | |||
bf60cb02b1 | |||
60d8833fb0 | |||
58f8e01f76 | |||
7debd364ce | |||
0c24aeaaed | |||
85a59a617f |
45
appveyor.yml
45
appveyor.yml
|
@ -44,20 +44,25 @@ environment:
|
||||||
- job_name: Windows_Qt_6_4_(GCC_x64)
|
- job_name: Windows_Qt_6_4_(GCC_x64)
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
COMPILER: mingw
|
COMPILER: mingw
|
||||||
|
COMPILER_CPPSTD: gnu17
|
||||||
|
COMPILER_LIBCXX: libstdc++11
|
||||||
QT: Qt\6.4\mingw_64
|
QT: Qt\6.4\mingw_64
|
||||||
QT_VERSION: Qt6_4
|
QT_VERSION: Qt6_4
|
||||||
BUILD_SYSTEM: "qbs"
|
BUILD_SYSTEM: "qbs"
|
||||||
ENABLE_PCH: false
|
ENABLE_PCH: false
|
||||||
GCC_VERSION: 11.2
|
GCC_VERSION: 12.2
|
||||||
MINGW_PATH: C:\Qt\Tools\mingw810_64\bin
|
MINGW_PATH: C:\msys64\mingw64\bin
|
||||||
ARCH: x64
|
ARCH: x64
|
||||||
PYTHON: "C:\\Python311-x64"
|
PYTHON: "C:\\Python311-x64"
|
||||||
PLATFORM: "Windows10+"
|
PLATFORM: "Windows10+"
|
||||||
|
MSYS2_PACKAGES: true
|
||||||
DEPLOY: true
|
DEPLOY: true
|
||||||
|
|
||||||
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
|
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
COMPILER: mingw
|
COMPILER: mingw
|
||||||
|
COMPILER_CPPSTD: gnu17
|
||||||
|
COMPILER_LIBCXX: libstdc++11
|
||||||
QT: Qt\5.15\mingw81_32
|
QT: Qt\5.15\mingw81_32
|
||||||
QT_VERSION: Qt5_15
|
QT_VERSION: Qt5_15
|
||||||
BUILD_SYSTEM: "qbs"
|
BUILD_SYSTEM: "qbs"
|
||||||
|
@ -67,6 +72,7 @@ environment:
|
||||||
ARCH: x86
|
ARCH: x86
|
||||||
PYTHON: "C:\\Python311"
|
PYTHON: "C:\\Python311"
|
||||||
PLATFORM: "Windows7+"
|
PLATFORM: "Windows7+"
|
||||||
|
MSYS2_PACKAGES: false
|
||||||
DEPLOY: true
|
DEPLOY: true
|
||||||
|
|
||||||
- job_name: Windows_Qt_5_6_(GCC_x86)
|
- job_name: Windows_Qt_5_6_(GCC_x86)
|
||||||
|
@ -89,7 +95,7 @@ environment:
|
||||||
BUILD_SYSTEM: "qbs"
|
BUILD_SYSTEM: "qbs"
|
||||||
ARCH: x64
|
ARCH: x64
|
||||||
XCODE_VERSION: 13.4.1
|
XCODE_VERSION: 13.4.1
|
||||||
PLATFORM: "macOS11+"
|
PLATFORM: "macOS_11+"
|
||||||
MACOS_DEPLOYMENT_TARGET: 11.0
|
MACOS_DEPLOYMENT_TARGET: 11.0
|
||||||
MULTI_BUNDLE: true
|
MULTI_BUNDLE: true
|
||||||
ENABLE_CONAN: true
|
ENABLE_CONAN: true
|
||||||
|
@ -103,7 +109,7 @@ environment:
|
||||||
BUILD_SYSTEM: "qbs"
|
BUILD_SYSTEM: "qbs"
|
||||||
ARCH: x64
|
ARCH: x64
|
||||||
XCODE_VERSION: 13.4.1
|
XCODE_VERSION: 13.4.1
|
||||||
PLATFORM: "macOS11+"
|
PLATFORM: "macOS_11+"
|
||||||
MACOS_DEPLOYMENT_TARGET: 11.0
|
MACOS_DEPLOYMENT_TARGET: 11.0
|
||||||
MULTI_BUNDLE: false
|
MULTI_BUNDLE: false
|
||||||
ENABLE_CONAN: true
|
ENABLE_CONAN: true
|
||||||
|
@ -160,6 +166,7 @@ environment:
|
||||||
ARCH: x64
|
ARCH: x64
|
||||||
PYTHON: "C:\\Python311-x64"
|
PYTHON: "C:\\Python311-x64"
|
||||||
PLATFORM: "Windows10+"
|
PLATFORM: "Windows10+"
|
||||||
|
MSYS2_PACKAGES: false
|
||||||
DEPLOY: false
|
DEPLOY: false
|
||||||
|
|
||||||
- job_name: Windows_Qt_6_4_(MSVC_arm64)
|
- job_name: Windows_Qt_6_4_(MSVC_arm64)
|
||||||
|
@ -173,11 +180,14 @@ environment:
|
||||||
ARCH: arm64
|
ARCH: arm64
|
||||||
PYTHON: "C:\\Python311-x64"
|
PYTHON: "C:\\Python311-x64"
|
||||||
PLATFORM: "Windows10+"
|
PLATFORM: "Windows10+"
|
||||||
|
MSYS2_PACKAGES: false
|
||||||
DEPLOY: false
|
DEPLOY: false
|
||||||
|
|
||||||
- job_name: Windows_Qt_5_15_(qbs_GCC_x64)
|
- job_name: Windows_Qt_5_15_(qbs_GCC_x64)
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
COMPILER: mingw
|
COMPILER: mingw
|
||||||
|
COMPILER_CPPSTD: gnu17
|
||||||
|
COMPILER_LIBCXX: libstdc++11
|
||||||
QT: Qt\5.15\mingw81_64
|
QT: Qt\5.15\mingw81_64
|
||||||
QT_VERSION: Qt5_15
|
QT_VERSION: Qt5_15
|
||||||
BUILD_SYSTEM: "qbs"
|
BUILD_SYSTEM: "qbs"
|
||||||
|
@ -187,6 +197,7 @@ environment:
|
||||||
ARCH: x64
|
ARCH: x64
|
||||||
PYTHON: "C:\\Python311-x64"
|
PYTHON: "C:\\Python311-x64"
|
||||||
PLATFORM: "Windows7+"
|
PLATFORM: "Windows7+"
|
||||||
|
MSYS2_PACKAGES: false
|
||||||
DEPLOY: false
|
DEPLOY: false
|
||||||
|
|
||||||
- job_name: Windows_Qt_5_15_(qbs_MSVC_x64)
|
- job_name: Windows_Qt_5_15_(qbs_MSVC_x64)
|
||||||
|
@ -200,6 +211,7 @@ environment:
|
||||||
ARCH: x64
|
ARCH: x64
|
||||||
PYTHON: "C:\\Python311-x64"
|
PYTHON: "C:\\Python311-x64"
|
||||||
PLATFORM: "Windows7+"
|
PLATFORM: "Windows7+"
|
||||||
|
MSYS2_PACKAGES: false
|
||||||
DEPLOY: false
|
DEPLOY: false
|
||||||
|
|
||||||
- job_name: Windows_Qt_5_15_(make_GCC_x64)
|
- job_name: Windows_Qt_5_15_(make_GCC_x64)
|
||||||
|
@ -332,6 +344,10 @@ for:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if ($env:MSYS2_PACKAGES -eq "true") {
|
||||||
|
& 'C:\msys64\usr\bin\bash' -lc "pacman --noconfirm -Syuu"
|
||||||
|
& 'C:\msys64\usr\bin\bash' -lc "pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make"
|
||||||
|
}
|
||||||
$env:Path += ";$env:MINGW_PATH"
|
$env:Path += ";$env:MINGW_PATH"
|
||||||
$env:CC = "gcc.exe"
|
$env:CC = "gcc.exe"
|
||||||
$env:CXX = "g++.exe"
|
$env:CXX = "g++.exe"
|
||||||
|
@ -347,6 +363,7 @@ for:
|
||||||
# Trick qmake to not work through MSYS
|
# Trick qmake to not work through MSYS
|
||||||
- del /F "C:\Program Files\Git\usr\bin\sh.exe"
|
- del /F "C:\Program Files\Git\usr\bin\sh.exe"
|
||||||
- del /F "C:\Program Files\Git\bin\sh.exe"
|
- del /F "C:\Program Files\Git\bin\sh.exe"
|
||||||
|
- dir "%QTDIR%\bin"
|
||||||
- qmake.exe -v
|
- qmake.exe -v
|
||||||
- qbs --version
|
- qbs --version
|
||||||
|
|
||||||
|
@ -380,8 +397,8 @@ for:
|
||||||
& qbs-setup-toolchains.exe --type mingw $env:MINGW_PATH\g++.exe $env:COMPILER
|
& qbs-setup-toolchains.exe --type mingw $env:MINGW_PATH\g++.exe $env:COMPILER
|
||||||
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
|
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
|
||||||
& conan profile update settings.compiler=gcc valentina
|
& conan profile update settings.compiler=gcc valentina
|
||||||
& conan profile update settings.compiler.cppstd=gnu17 valentina
|
& conan profile update settings.compiler.cppstd=$env:COMPILER_CPPSTD valentina
|
||||||
& conan profile update settings.compiler.libcxx=libstdc++11 valentina
|
& conan profile update settings.compiler.libcxx=$env:COMPILER_LIBCXX valentina
|
||||||
& conan profile update settings.compiler.version=$env:GCC_VERSION valentina
|
& conan profile update settings.compiler.version=$env:GCC_VERSION valentina
|
||||||
}
|
}
|
||||||
- qbs-config --list profiles
|
- qbs-config --list profiles
|
||||||
|
@ -424,9 +441,9 @@ for:
|
||||||
if ($env:COMPILER -eq "msvc") {
|
if ($env:COMPILER -eq "msvc") {
|
||||||
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") {
|
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") {
|
||||||
if ($env:ARCH -eq "x64") {
|
if ($env:ARCH -eq "x64") {
|
||||||
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
& "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||||
} else {
|
} else {
|
||||||
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"
|
& "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"
|
||||||
}
|
}
|
||||||
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {
|
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {
|
||||||
if ($env:ARCH -eq "x64") {
|
if ($env:ARCH -eq "x64") {
|
||||||
|
@ -442,10 +459,10 @@ for:
|
||||||
}
|
}
|
||||||
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") {
|
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") {
|
||||||
if ($env:ARCH -eq "x64") {
|
if ($env:ARCH -eq "x64") {
|
||||||
'& "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64'
|
& "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
|
||||||
'& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64'
|
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
|
||||||
} else {
|
} else {
|
||||||
'& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86'
|
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -506,11 +523,7 @@ for:
|
||||||
- sudo xcode-select -s /Applications/Xcode-$XCODE_VERSION.app
|
- sudo xcode-select -s /Applications/Xcode-$XCODE_VERSION.app
|
||||||
- sudo xcode-select -p
|
- sudo xcode-select -p
|
||||||
- brew update > /dev/null
|
- brew update > /dev/null
|
||||||
- rm '/usr/local/bin/ccmake'
|
- brew install --force qbs
|
||||||
- rm '/usr/local/bin/cmake'
|
|
||||||
- rm '/usr/local/bin/cpack'
|
|
||||||
- rm '/usr/local/bin/ctest'
|
|
||||||
- brew install --force coreutils qbs cmake
|
|
||||||
- export QTDIR="${HOME}/${QT}"
|
- export QTDIR="${HOME}/${QT}"
|
||||||
- export PATH="$QTDIR/bin:$HOME/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
- export PATH="$QTDIR/bin:$HOME/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
|
|
|
@ -93,8 +93,8 @@ CppApplication {
|
||||||
prefix: product.sourceDirectory + "/"
|
prefix: product.sourceDirectory + "/"
|
||||||
files: {
|
files: {
|
||||||
var files = ["stable.h"];
|
var files = ["stable.h"];
|
||||||
if (qbs.toolchain.contains("msvc"))
|
// if (qbs.toolchain.contains("msvc"))
|
||||||
files.push("stable.cpp")
|
// files.push("stable.cpp")
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
fileTags: ["cpp_pch_src"]
|
fileTags: ["cpp_pch_src"]
|
||||||
|
|
|
@ -138,14 +138,12 @@ Module {
|
||||||
|
|
||||||
cpp.visibility: "minimal"
|
cpp.visibility: "minimal"
|
||||||
|
|
||||||
Properties {
|
cpp.cxxLanguageVersion: {
|
||||||
condition: Qt.core.versionMajor >= 5 && Qt.core.versionMinor < 12
|
if (Qt.core.versionMajor >= 6) // Start building with C++20 since Qt 6.0
|
||||||
cpp.cxxLanguageVersion: "c++11"
|
return "c++20";
|
||||||
}
|
else if(Qt.core.versionMajor >= 5 && Qt.core.versionMinor >= 12) // Since Qt 5.12 available support for C++17
|
||||||
// Since Qt 5.12 available support for C++17
|
return "c++17";
|
||||||
Properties {
|
return "c++11";
|
||||||
condition: Qt.core.versionMajor >= 5 && Qt.core.versionMinor >= 12
|
|
||||||
cpp.cxxLanguageVersion: "c++17"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property string minimumMacosVersion: {
|
readonly property string minimumMacosVersion: {
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
#include <QUuid>
|
#include <QUuid>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
#include <QWinTaskbarButton>
|
#include <QWinTaskbarButton>
|
||||||
#include <QWinTaskbarProgress>
|
#include <QWinTaskbarProgress>
|
||||||
#endif
|
#endif
|
||||||
|
@ -361,7 +361,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
connect(ui->actionAddBackgroundImage, &QAction::triggered, this, &MainWindow::ActionAddBackgroundImage);
|
connect(ui->actionAddBackgroundImage, &QAction::triggered, this, &MainWindow::ActionAddBackgroundImage);
|
||||||
|
|
||||||
m_progressBar->setVisible(false);
|
m_progressBar->setVisible(false);
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarProgress->setVisible(false);
|
m_taskbarProgress->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
m_statusLabel->setText(tr("Create new pattern piece to start working."));
|
m_statusLabel->setText(tr("Create new pattern piece to start working."));
|
||||||
|
@ -1750,7 +1750,7 @@ void MainWindow::showEvent( QShowEvent *event )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarButton->setWindow(windowHandle());
|
m_taskbarButton->setWindow(windowHandle());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4095,7 +4095,7 @@ void MainWindow::Clear()
|
||||||
m_toolOptions->ClearPropertyBrowser();
|
m_toolOptions->ClearPropertyBrowser();
|
||||||
m_toolOptions->itemClicked(nullptr);
|
m_toolOptions->itemClicked(nullptr);
|
||||||
m_progressBar->setVisible(false);
|
m_progressBar->setVisible(false);
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarProgress->setVisible(false);
|
m_taskbarProgress->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
m_statusLabel->setVisible(true);
|
m_statusLabel->setVisible(true);
|
||||||
|
@ -4510,7 +4510,7 @@ void MainWindow::ShowProgress()
|
||||||
{
|
{
|
||||||
const int newValue = m_progressBar->value() + 1;
|
const int newValue = m_progressBar->value() + 1;
|
||||||
m_progressBar->setValue(newValue);
|
m_progressBar->setValue(newValue);
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarProgress->setValue(newValue);
|
m_taskbarProgress->setValue(newValue);
|
||||||
#endif
|
#endif
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
@ -6059,7 +6059,7 @@ auto MainWindow::LoadPattern(QString fileName, const QString& customMeasureFile)
|
||||||
m_progressBar->setValue(0);
|
m_progressBar->setValue(0);
|
||||||
const int elements = doc->ElementsToParse();
|
const int elements = doc->ElementsToParse();
|
||||||
m_progressBar->setMaximum(elements);
|
m_progressBar->setMaximum(elements);
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarProgress->setVisible(true);
|
m_taskbarProgress->setVisible(true);
|
||||||
m_taskbarProgress->setMaximum(elements);
|
m_taskbarProgress->setMaximum(elements);
|
||||||
#endif
|
#endif
|
||||||
|
@ -6067,7 +6067,7 @@ auto MainWindow::LoadPattern(QString fileName, const QString& customMeasureFile)
|
||||||
FullParseFile();
|
FullParseFile();
|
||||||
|
|
||||||
m_progressBar->setVisible(false);
|
m_progressBar->setVisible(false);
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarProgress->setVisible(false);
|
m_taskbarProgress->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
m_statusLabel->setVisible(true);
|
m_statusLabel->setVisible(true);
|
||||||
|
|
|
@ -128,13 +128,13 @@ MainWindowsNoGUI::MainWindowsNoGUI(QWidget *parent)
|
||||||
: VAbstractMainWindow(parent),
|
: VAbstractMainWindow(parent),
|
||||||
pattern(new VContainer(VAbstractApplication::VApp()->TrVars(), VAbstractValApplication::VApp()->patternUnitsP(),
|
pattern(new VContainer(VAbstractApplication::VApp()->TrVars(), VAbstractValApplication::VApp()->patternUnitsP(),
|
||||||
valentinaNamespace))
|
valentinaNamespace))
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
,m_taskbarButton(new QWinTaskbarButton(this))
|
,m_taskbarButton(new QWinTaskbarButton(this))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
InitTempLayoutScene();
|
InitTempLayoutScene();
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarButton->setWindow(this->windowHandle());
|
m_taskbarButton->setWindow(this->windowHandle());
|
||||||
m_taskbarProgress = m_taskbarButton->progress();
|
m_taskbarProgress = m_taskbarButton->progress();
|
||||||
m_taskbarProgress->setMinimum(0);
|
m_taskbarProgress->setMinimum(0);
|
||||||
|
@ -186,14 +186,14 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator)
|
||||||
QElapsedTimer timer;
|
QElapsedTimer timer;
|
||||||
timer.start();
|
timer.start();
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
QTimer *progressTimer = nullptr;
|
QTimer *progressTimer = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QSharedPointer<DialogLayoutProgress> progress;
|
QSharedPointer<DialogLayoutProgress> progress;
|
||||||
if (VApplication::IsGUIMode())
|
if (VApplication::IsGUIMode())
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarProgress->setVisible(true);
|
m_taskbarProgress->setVisible(true);
|
||||||
m_taskbarProgress->setValue(0);
|
m_taskbarProgress->setValue(0);
|
||||||
m_taskbarProgress->setMaximum(lGenerator.GetNestingTime()*60);
|
m_taskbarProgress->setMaximum(lGenerator.GetNestingTime()*60);
|
||||||
|
@ -402,7 +402,7 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator)
|
||||||
progress->Finished();
|
progress->Finished();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
if (VApplication::IsGUIMode())
|
if (VApplication::IsGUIMode())
|
||||||
{
|
{
|
||||||
progressTimer->stop();
|
progressTimer->stop();
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct PosterData;
|
||||||
class QGraphicsRectItem;
|
class QGraphicsRectItem;
|
||||||
class VMeasurements;
|
class VMeasurements;
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
class QWinTaskbarButton;
|
class QWinTaskbarButton;
|
||||||
class QWinTaskbarProgress;
|
class QWinTaskbarProgress;
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,7 +119,7 @@ protected:
|
||||||
|
|
||||||
QSharedPointer<DialogSaveLayout> m_dialogSaveLayout{};
|
QSharedPointer<DialogSaveLayout> m_dialogSaveLayout{};
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
QWinTaskbarButton *m_taskbarButton;
|
QWinTaskbarButton *m_taskbarButton;
|
||||||
QWinTaskbarProgress *m_taskbarProgress{nullptr};
|
QWinTaskbarProgress *m_taskbarProgress{nullptr};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1265,7 +1265,7 @@ auto VDxfEngine::FromUnicodeToCodec(const QString &str, VTextCodec *codec) -> st
|
||||||
auto VDxfEngine::GetFileNameForLocale() const -> std::string
|
auto VDxfEngine::GetFileNameForLocale() const -> std::string
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
return VDxfEngine::FromUnicodeToCodec(m_fileName, QTextCodec::codecForLocale());
|
return VDxfEngine::FromUnicodeToCodec(m_fileName, VTextCodec::codecForName("System"));
|
||||||
#else
|
#else
|
||||||
return m_fileName.toStdString();
|
return m_fileName.toStdString();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
import "qbs/imports/conan/ConanfileProbe.qbs" as ConanfileProbe
|
import "qbs/imports/conan/ConanfileProbe.qbs" as ConanfileProbe
|
||||||
|
|
||||||
Project {
|
Project {
|
||||||
|
@ -33,6 +35,43 @@ Project {
|
||||||
if (qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")) {
|
if (qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")) {
|
||||||
env.push("LD_LIBRARY_PATH=" + qbs.installRoot + qbs.installPrefix + "/" + buildconfig.libDirName + "/valentina");
|
env.push("LD_LIBRARY_PATH=" + qbs.installRoot + qbs.installPrefix + "/" + buildconfig.libDirName + "/valentina");
|
||||||
}
|
}
|
||||||
|
else if (qbs.targetOS.contains("windows")) {
|
||||||
|
// PATH
|
||||||
|
var path = "";
|
||||||
|
for (var i = 0; i < env.length; ++i) {
|
||||||
|
if (env[i].startsWith("PATH=")) {
|
||||||
|
path = env[i].substring(5);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var fullInstallDir = FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix);
|
||||||
|
if (path.length === 0) {
|
||||||
|
path = fullInstallDir;
|
||||||
|
} else {
|
||||||
|
path = fullInstallDir + ";" + path;
|
||||||
|
}
|
||||||
|
|
||||||
|
var arrayElem = "PATH=" + path;
|
||||||
|
if (i < env.length)
|
||||||
|
env[i] = arrayElem;
|
||||||
|
else
|
||||||
|
env.push(arrayElem);
|
||||||
|
|
||||||
|
// QT_QPA_PLATFORM_PLUGIN_PATH
|
||||||
|
for (var i = 0; i < env.length; ++i) {
|
||||||
|
if (env[i].startsWith("QT_QPA_PLATFORM_PLUGIN_PATH=")) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i >= env.length) {
|
||||||
|
var pluginsPath = "QT_QPA_PLATFORM_PLUGIN_PATH=" + Qt.core.pluginPath
|
||||||
|
env.push(pluginsPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.info("env_after: " + env);
|
||||||
|
}
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue