diff options
author | Katja Marttila <katja.marttila@qt.io> | 2018-01-12 10:43:29 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2018-02-12 11:53:34 +0000 |
commit | c0b2007d2002055f92f3c7dea2e5df55bd40b2c6 (patch) | |
tree | 2b33d32b9c3a04ea38c36e68c543f37243a6ac94 /src/sdk/installerbase.cpp | |
parent | 0dd63d2e9a3f32fa8c16e31a01f5b897453ee9e5 (diff) |
Enable building IFW with Squish support
Change enables building IFW with Squish support by passing SQUISH_PATH
to qmake when building IFW. Also enables runtime change of Squish port
with command line option --squish-port <port number>. If no port is set,
default port 11233 is used to attach to Squish.
Change-Id: I4821b360031df66968d3592886c2e45598e1b097
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Diffstat (limited to 'src/sdk/installerbase.cpp')
-rw-r--r-- | src/sdk/installerbase.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index 6004d286e..5d5028be1 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -58,6 +58,10 @@ #include <QUuid> #include <QLoggingCategory> +#ifdef ENABLE_SQUISH +#include <qtbuiltinhook.h> +#endif + InstallerBase::InstallerBase(int &argc, char *argv[]) : SDKApp<QApplication>(argc, argv) , m_core(0) @@ -321,6 +325,20 @@ int InstallerBase::run() if (status != QInstaller::PackageManagerCore::Success) return status; +#ifdef ENABLE_SQUISH + int squishPort = 11233; + if (parser.isSet(QLatin1String(CommandLineOptions::SquishPort))) { + squishPort = parser.value(QLatin1String(CommandLineOptions::SquishPort)).toInt(); + } + if (squishPort != 0) { + if (Squish::allowAttaching(squishPort)) + qDebug() << "Attaching to squish port " << squishPort << " succeeded"; + else + qDebug() << "Attaching to squish failed."; + } else { + qWarning() << "Invalid squish port number: " << squishPort; + } +#endif const int result = QCoreApplication::instance()->exec(); if (result != 0) return result; |