From 38bb9c86b979599896c18df276b3a415b0ecce14 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 1 Apr 2017 19:23:20 +0300 Subject: [PATCH] Fix building on Mac. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 15 +++++++++++++++ src/app/valentina/mainwindow.h | 3 +++ src/libs/vmisc/vabstractapplication.h | 1 - 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index a7bb330a7..b83dbf5c6 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -4260,6 +4260,21 @@ void MainWindow::Preferences() } } +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::CreateMeasurements() +{ + const QString tape = qApp->TapeFilePath(); + const QString workingDirectory = QFileInfo(tape).absoluteDir().absolutePath(); + + QStringList arguments; + if (isNoScaling) + { + arguments.append(QLatin1String("--") + LONG_OPTION_NO_HDPI_SCALING); + } + + QProcess::startDetached(tape, arguments, workingDirectory); +} + //--------------------------------------------------------------------------------------------------------------------- void MainWindow::ExportLayoutAs() { diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index dcb5f376f..adc618c22 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -114,6 +114,9 @@ private slots: void ToolBarStyles(); void ShowPaper(int index); void Preferences(); +#if defined(Q_OS_MAC) + void CreateMeasurements(); +#endif void ExportLayoutAs(); void ArrowTool(); diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index 75701e48e..25ad17552 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -49,7 +49,6 @@ class QUndoStack; class VAbstractApplication;// use in define -class VAbstractPattern; class VMainGraphicsView; #if defined(qApp)