From 22a0f6b682fb8ef74e11f0e7a2ffac7c8f12222b Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Thu, 21 Jan 2016 12:51:37 +0100 Subject: Fix compile with namespace'ed Qt. Change-Id: I9c0d399943d2f6eb9a0ab136abf24a5c8b108abb Reviewed-by: Christian Stenger --- src/libs/installer/proxycredentialsdialog.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libs') diff --git a/src/libs/installer/proxycredentialsdialog.h b/src/libs/installer/proxycredentialsdialog.h index f4935c53d..81b2f7cef 100644 --- a/src/libs/installer/proxycredentialsdialog.h +++ b/src/libs/installer/proxycredentialsdialog.h @@ -35,7 +35,9 @@ #include +QT_BEGIN_NAMESPACE class QNetworkProxy; +QT_END_NAMESPACE namespace QInstaller { -- cgit v1.2.3 From 85cad029464f1209b5aeab7150b6e3df1fa1f69b Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Thu, 21 Jan 2016 11:40:11 +0100 Subject: Compile with Qt 5.5, 5.6. Minimum version is now 5.5. Change-Id: I60d248ea38e8176e18a9b2a642e81a0ad5fb21d3 Reviewed-by: Simon Hausmann --- src/libs/installer/component.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 5346aac77..d379305a8 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -1026,9 +1026,9 @@ inline bool convert(QQmlV4Function *func, QStringList *toArgs) *toArgs << val->toQString(); for (int i = 1; i < func->length(); i++) { val = (*func)[i]; - if (val->isObject() && val->asObject()->isArrayObject()) { + if (val->isObject() && val->as()->isArrayObject()) { QV4::ScopedValue valtmp(scope); - QV4::Object *array = val->asObject(); + QV4::Object *array = val->as(); uint length = array->getLength(); for (uint ii = 0; ii < length; ++ii) { valtmp = array->getIndexed(ii); -- cgit v1.2.3 From 9d4be1a53be2b643114d051332d8439bc8809e59 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Thu, 4 Feb 2016 12:40:33 +0200 Subject: Fix crash when updating admin installation with user/temp repository Grant permission rights for writing maintenance config file Change-Id: I9364358455b8ad5e98b03c20d949c2562ba2535a Task-number: QTIFW-740 Reviewed-by: Iikka Eklund --- src/libs/installer/packagemanagercore.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/libs') diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 81fd29472..e008a220d 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1025,8 +1025,17 @@ void PackageManagerCore::networkSettingsChanged() d->m_repoFetched = false; d->m_updateSourcesAdded = false; - if (d->isUpdater() || d->isPackageManager()) + if (d->isUpdater() || d->isPackageManager()) { + bool gainedAdminRights = false; + QTemporaryFile tempAdminFile(d->targetDir() + QStringLiteral("/XXXXXX")); + if (!tempAdminFile.open() || !tempAdminFile.isWritable()) { + gainAdminRights(); + gainedAdminRights = true; + } d->writeMaintenanceConfigFiles(); + if (gainedAdminRights) + dropAdminRights(); + } KDUpdater::FileDownloaderFactory::instance().setProxyFactory(proxyFactory()); emit coreNetworkSettingsChanged(); -- cgit v1.2.3 From e67fd518cbdf9c4ea99f88368f4c2b45e625c0c2 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Wed, 17 Feb 2016 10:49:51 +0000 Subject: Revert "Use QQmlV4Function to correctly get empty parameters from script." This reverts commit eb574d77b0ab9a92b61e7738d089cd4ea4304e51. The change will not work with Qt5.5 as it is causing constant crashes in Qt installers. Using this change will require a fix for Qt5. As we are about to make Qt installers based on 2.0 we need to revert this change for now. Change-Id: Ia7906d02db645f2407ab07d14f5a037224574b29 Reviewed-by: Andy Shaw --- src/libs/installer/component.cpp | 79 ++++++++++++++++------------------------ src/libs/installer/component.h | 19 +++++++--- src/libs/installer/installer.pro | 3 +- 3 files changed, 46 insertions(+), 55 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index d379305a8..ebd37a641 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -55,10 +55,6 @@ #include -#include -#include -#include - #include using namespace QInstaller; @@ -706,11 +702,11 @@ void Component::createOperationsForPath(const QString &path) if (fi.isFile()) { static const QString copy = QString::fromLatin1("Copy"); - addOperation(copy, QStringList() << fi.filePath() << target); + addOperation(copy, fi.filePath(), target); } else if (fi.isDir()) { qApp->processEvents(); static const QString mkdir = QString::fromLatin1("Mkdir"); - addOperation(mkdir, QStringList(target)); + addOperation(mkdir, target); QDirIterator it(fi.filePath()); while (it.hasNext()) @@ -750,7 +746,7 @@ void Component::createOperationsForArchive(const QString &archive) if (isZip) { // archives get completely extracted per default (if the script isn't doing other stuff) - addOperation(QLatin1String("Extract"), QStringList() << archive << QLatin1String("@TargetDir@")); + addOperation(QLatin1String("Extract"), archive, QLatin1String("@TargetDir@")); } else { createOperationsForPath(archive); } @@ -1012,44 +1008,24 @@ Operation *Component::createOperation(const QString &operationName, const QStrin return operation; } -namespace { +/*! + Convenience method for calling the operation \a operation with up to ten parameters: + \a parameter1, \a parameter2, \a parameter3, \a parameter4, \a parameter5, \a parameter6, + \a parameter7, \a parameter8, \a parameter9, and \a parameter10. -inline bool convert(QQmlV4Function *func, QStringList *toArgs) + \sa {component::addOperation}{component.addOperation} +*/ +bool Component::addOperation(const QString &operation, const QString ¶meter1, const QString ¶meter2, + const QString ¶meter3, const QString ¶meter4, const QString ¶meter5, const QString ¶meter6, + const QString ¶meter7, const QString ¶meter8, const QString ¶meter9, const QString ¶meter10) { - if (func->length() < 2) - return false; - QV4::Scope scope(func->v4engine()); - QV4::ScopedValue val(scope); - val = (*func)[0]; - - *toArgs << val->toQString(); - for (int i = 1; i < func->length(); i++) { - val = (*func)[i]; - if (val->isObject() && val->as()->isArrayObject()) { - QV4::ScopedValue valtmp(scope); - QV4::Object *array = val->as(); - uint length = array->getLength(); - for (uint ii = 0; ii < length; ++ii) { - valtmp = array->getIndexed(ii); - *toArgs << valtmp->toQStringNoThrow(); - } - } else { - *toArgs << val->toQString(); - } + if (Operation *op = createOperation(operation, parameter1, parameter2, parameter3, parameter4, parameter5, + parameter6, parameter7, parameter8, parameter9, parameter10)) { + addOperation(op); + return true; } - return true; -} -} -/*! - \internal -*/ -bool Component::addOperation(QQmlV4Function *func) -{ - QStringList args; - if (convert(func, &args)) - return addOperation(args[0], args.mid(1)); return false; } @@ -1057,8 +1033,6 @@ bool Component::addOperation(QQmlV4Function *func) Creates and adds an installation operation for \a operation. Add any number of \a parameters. The variables that the parameters contain, such as \c @TargetDir@, are replaced with their values. - - \sa {component::addOperation}{component.addOperation} */ bool Component::addOperation(const QString &operation, const QStringList ¶meters) { @@ -1071,13 +1045,23 @@ bool Component::addOperation(const QString &operation, const QStringList ¶me } /*! - \internal + Convenience method for calling the elevated operation \a operation with up to ten parameters: + \a parameter1, \a parameter2, \a parameter3, \a parameter4, \a parameter5, \a parameter6, + \a parameter7, \a parameter8, \a parameter9, and \a parameter10. + + \sa {component::addElevatedOperation}{component.addElevatedOperation} */ -bool Component::addElevatedOperation(QQmlV4Function *func) +bool Component::addElevatedOperation(const QString &operation, const QString ¶meter1, + const QString ¶meter2, const QString ¶meter3, const QString ¶meter4, const QString ¶meter5, + const QString ¶meter6, const QString ¶meter7, const QString ¶meter8, const QString ¶meter9, + const QString ¶meter10) { - QStringList args; - if (convert(func, &args)) - return addElevatedOperation(args[0], args.mid(1)); + if (Operation *op = createOperation(operation, parameter1, parameter2, parameter3, parameter4, parameter5, + parameter6, parameter7, parameter8, parameter9, parameter10)) { + addElevatedOperation(op); + return true; + } + return false; } @@ -1086,7 +1070,6 @@ bool Component::addElevatedOperation(QQmlV4Function *func) The variables that the parameters contain, such as \c @TargetDir@, are replaced with their values. The operation is executed with elevated rights. - \sa {component::addElevatedOperation}{component.addElevatedOperation} */ bool Component::addElevatedOperation(const QString &operation, const QStringList ¶meters) { diff --git a/src/libs/installer/component.h b/src/libs/installer/component.h index a075a0145..71f10c272 100644 --- a/src/libs/installer/component.h +++ b/src/libs/installer/component.h @@ -44,7 +44,6 @@ #include QT_FORWARD_DECLARE_CLASS(QDebug) -QT_FORWARD_DECLARE_CLASS(QQmlV4Function) namespace KDUpdater { class Update; @@ -131,12 +130,22 @@ public: OperationList operations() const; void addOperation(Operation *operation); - Q_INVOKABLE bool addOperation(QQmlV4Function *args); - bool addOperation(const QString &operation, const QStringList ¶meters); + Q_INVOKABLE bool addOperation(const QString &operation, const QString ¶meter1 = QString(), + const QString ¶meter2 = QString(), const QString ¶meter3 = QString(), + const QString ¶meter4 = QString(), const QString ¶meter5 = QString(), + const QString ¶meter6 = QString(), const QString ¶meter7 = QString(), + const QString ¶meter8 = QString(), const QString ¶meter9 = QString(), + const QString ¶meter10 = QString()); + Q_INVOKABLE bool addOperation(const QString &operation, const QStringList ¶meters); void addElevatedOperation(Operation *operation); - Q_INVOKABLE bool addElevatedOperation(QQmlV4Function *args); - bool addElevatedOperation(const QString &operation, const QStringList ¶meters); + Q_INVOKABLE bool addElevatedOperation(const QString &operation, + const QString ¶meter1 = QString(), const QString ¶meter2 = QString(), + const QString ¶meter3 = QString(), const QString ¶meter4 = QString(), + const QString ¶meter5 = QString(), const QString ¶meter6 = QString(), + const QString ¶meter7 = QString(), const QString ¶meter8 = QString(), + const QString ¶meter9 = QString(), const QString ¶meter10 = QString()); + Q_INVOKABLE bool addElevatedOperation(const QString &operation, const QStringList ¶meters); QStringList downloadableArchives() const; Q_INVOKABLE void addDownloadableArchive(const QString &path); diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro index cfa83d08d..87af31f3c 100644 --- a/src/libs/installer/installer.pro +++ b/src/libs/installer/installer.pro @@ -34,8 +34,7 @@ QT += \ xml \ concurrent \ widgets \ - core-private \ - qml-private + core-private win32:QT += winextras HEADERS += packagemanagercore.h \ -- cgit v1.2.3 From 5707b1e5e5ec9f113332f229b34df72788d3e03a Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Fri, 15 Apr 2016 13:20:44 -0300 Subject: Fix MSVC2015 build. Change-Id: I502e48dea6329bd6f05a776a669093f41698a274 Reviewed-by: Karsten Heimrich --- src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp | 2 +- src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs') diff --git a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp index ee7f55c04..874e94e68 100644 --- a/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp +++ b/src/libs/7zip/win/CPP/7zip/Archive/7z/7zUpdate.cpp @@ -322,7 +322,7 @@ struct CSolidGroup CRecordVector Indices; }; -static wchar_t *g_ExeExts[] = +static const wchar_t *g_ExeExts[] = { L"dll", L"exe", diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp index a57ec2a6b..4b9c6abac 100644 --- a/src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp +++ b/src/libs/7zip/win/CPP/7zip/UI/Common/Update.cpp @@ -902,7 +902,7 @@ HRESULT UpdateArchive( AString path = GetAnsiString(arcPath); AString name = GetAnsiString(fileName); // Warning!!! MAPISendDocuments function changes Current directory - fnSend(0, ";", (LPSTR)(LPCSTR)path, (LPSTR)(LPCSTR)name, 0); + fnSend(0, const_cast(";"), (LPSTR)(LPCSTR)path, (LPSTR)(LPCSTR)name, 0); } } #endif -- cgit v1.2.3 From 220d18b41b836a0c10ea097a6f93c3f5d204bf50 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Wed, 30 Mar 2016 16:06:34 +0300 Subject: Make IFW compile with FreeBSD Change-Id: Ibebc25b738c843c0eb4291faa2bba7ac9836b008 Task-number: QTIFW-841 Reviewed-by: Ralf Nolden Reviewed-by: Karsten Heimrich --- src/libs/installer/adminauthorization_x11.cpp | 6 +++++- src/libs/kdtools/kdsysinfo_x11.cpp | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/libs') diff --git a/src/libs/installer/adminauthorization_x11.cpp b/src/libs/installer/adminauthorization_x11.cpp index 97c6093ae..bf1d0c082 100644 --- a/src/libs/installer/adminauthorization_x11.cpp +++ b/src/libs/installer/adminauthorization_x11.cpp @@ -49,9 +49,13 @@ #include #include #else +#ifdef Q_OS_FREEBSD +#include +#include +#else #include #endif - +#endif #include #include #include diff --git a/src/libs/kdtools/kdsysinfo_x11.cpp b/src/libs/kdtools/kdsysinfo_x11.cpp index e47734c7c..1cdf3d4e8 100644 --- a/src/libs/kdtools/kdsysinfo_x11.cpp +++ b/src/libs/kdtools/kdsysinfo_x11.cpp @@ -36,6 +36,11 @@ #include #include +#ifdef Q_OS_FREEBSD +#include +#include +#endif + #include #include #include @@ -62,7 +67,11 @@ quint64 installedMemory() #else quint64 physmem; size_t len = sizeof physmem; +#ifdef Q_OS_FREEBSD + static int mib[2] = { CTL_HW, HW_PHYSMEM }; +#else static int mib[2] = { CTL_HW, HW_MEMSIZE }; +#endif sysctl(mib, 2, &physmem, &len, 0, 0); return quint64(physmem); #endif -- cgit v1.2.3 From 359d4846ba94f7ded8a951b3363721454632f358 Mon Sep 17 00:00:00 2001 From: Takayuki ORITO Date: Fri, 29 Apr 2016 13:37:37 +0900 Subject: Fix the exception message because missing a space. Added space between 'convert' from 'path'. Change-Id: I25f4eedc7d322d29c8c93dd7dd80fc13232de0b7 Reviewed-by: Niels Weber --- src/libs/installer/lib7z_facade.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs') diff --git a/src/libs/installer/lib7z_facade.cpp b/src/libs/installer/lib7z_facade.cpp index 8f21343db..675403fe8 100644 --- a/src/libs/installer/lib7z_facade.cpp +++ b/src/libs/installer/lib7z_facade.cpp @@ -1351,7 +1351,7 @@ void Lib7z::createArchive(QFileDevice* archive, const QStringList &sourcePaths, const UString nativePath = QString2UString(cleanPath); if (UString2QString(nativePath) != cleanPath) { throw SevenZipException(QCoreApplication::translate("Lib7z", "Could not convert" - "path: %1.").arg(path)); + " path: %1.").arg(path)); } censor.AddItem(true /* always include item */, nativePath, false /* never recurse*/); } -- cgit v1.2.3 From d80d903cfe22dba86cd8d0bdfd6a0e60bbbe0a41 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 12 May 2016 16:57:32 +0200 Subject: Doc: PackageManagerCore::ComponentType is now an enum Change the documentation accordingly. Change-Id: I2f15bf724558794b66e99eab1120dc2d224600de Reviewed-by: Katja Marttila --- src/libs/installer/packagemanagercore.cpp | 48 ++++++++++++++----------------- 1 file changed, 21 insertions(+), 27 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index e008a220d..e6cd4f5a4 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1348,34 +1348,28 @@ void PackageManagerCore::appendRootComponent(Component *component) } /*! - \class PackageManagerCore::ComponentType - \inmodule QtInstallerFramework - \brief The ComponentType class describes a component list. - - This class is used with the components() function to describe what type of \c Component - list it should return. - - \list - \li \c Root returns a list of root components. - - \li \c Descendants returns a list of all descendant components. - - \note In updater mode the list is empty, because component updates cannot have children. - - \li \c Dependencies returns a list of all available dependencies when run as updater. - - \note When running as installer, package manager, or uninstaller, this will always - result in an empty list. - - \li \c Replacements returns a list of all available replacement components relevant to the - run mode. - - \li \c AllNoReplacements returns a list of available components, including root, descendant, + \enum PackageManagerCore::ComponentType + \brief describes the type of the component list to be returned + + \value Root + Returns a list of root components. + \value Descendants + Returns a list of all descendant components. In updater mode the + list is empty, because component updates cannot have children. + \value Dependencies + Returns a list of all available dependencies when run as updater. + When running as installer, package manager, or uninstaller, this + will always result in an empty list. + \value Replacements + Returns a list of all available replacement components relevant to + the run mode. + \value AllNoReplacements + Returns a list of available components, including root, descendant, and dependency components relevant to the run mode. - - \li \c All returns a list of all available components, including root, descendant, - dependency, and replacement components relevant to the run mode. - \endlist + \value All + Returns a list of all available components, including root, + descendant, dependency, and replacement components relevant to the + run mode. */ /*! -- cgit v1.2.3 From fe9314573b4020b28697d66eba7daeb688cb1b2c Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 13 May 2016 11:50:18 +0200 Subject: Doc: Describe return values for boolean Component functions ...to suppress QDoc warnings. Change-Id: Ib79b0392efaed37b4a52932d4f7d98327a3ad306 Reviewed-by: Katja Marttila --- src/libs/installer/component.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index ebd37a641..1e7edf725 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -1013,6 +1013,8 @@ Operation *Component::createOperation(const QString &operationName, const QStrin \a parameter1, \a parameter2, \a parameter3, \a parameter4, \a parameter5, \a parameter6, \a parameter7, \a parameter8, \a parameter9, and \a parameter10. + Returns \c true if the operation succeeds, otherwise returns \c false. + \sa {component::addOperation}{component.addOperation} */ bool Component::addOperation(const QString &operation, const QString ¶meter1, const QString ¶meter2, @@ -1033,6 +1035,8 @@ bool Component::addOperation(const QString &operation, const QString ¶meter1 Creates and adds an installation operation for \a operation. Add any number of \a parameters. The variables that the parameters contain, such as \c @TargetDir@, are replaced with their values. + + Returns \c true if the operation succeeds, otherwise returns \c false. */ bool Component::addOperation(const QString &operation, const QStringList ¶meters) { @@ -1050,6 +1054,8 @@ bool Component::addOperation(const QString &operation, const QStringList ¶me \a parameter7, \a parameter8, \a parameter9, and \a parameter10. \sa {component::addElevatedOperation}{component.addElevatedOperation} + + Returns \c true if the operation succeeds, otherwise returns \c false. */ bool Component::addElevatedOperation(const QString &operation, const QString ¶meter1, const QString ¶meter2, const QString ¶meter3, const QString ¶meter4, const QString ¶meter5, @@ -1070,6 +1076,8 @@ bool Component::addElevatedOperation(const QString &operation, const QString &pa The variables that the parameters contain, such as \c @TargetDir@, are replaced with their values. The operation is executed with elevated rights. + Returns \c true if the operation succeeds, otherwise returns \c false. + */ bool Component::addElevatedOperation(const QString &operation, const QStringList ¶meters) { @@ -1082,8 +1090,9 @@ bool Component::addElevatedOperation(const QString &operation, const QStringList } /*! - Specifies whether operations should be automatically created when the installation starts. This - would be done by calling createOperations(). If you set this to \c false, it is completely up + Returns whether operations should be automatically created when the + installation starts and createOperations() is called. If you set this to + \c false, it is completely up to the component's script to create all operations. \sa {component::autoCreateOperations}{component.autoCreateOperations} -- cgit v1.2.3 From 9bdcadbc3c189f2b2c408538066e3726820defd8 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 13 May 2016 13:59:35 +0200 Subject: Doc: Fix PackageManagerCore::ComponentType brief MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The \enum command \brief commands do not seem to get automatically completed during builds anymore. Change-Id: Id81aa8f3044f6151d6b4d8a441e386deb0ca4844 Reviewed-by: Topi Reiniƶ --- src/libs/installer/packagemanagercore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs') diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index e6cd4f5a4..b6a21be39 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1349,7 +1349,7 @@ void PackageManagerCore::appendRootComponent(Component *component) /*! \enum PackageManagerCore::ComponentType - \brief describes the type of the component list to be returned + \brief This enum holds the type of the component list to be returned: \value Root Returns a list of root components. -- cgit v1.2.3 From 62c34c7e5554b3dc32c3fa3be6dcb930629eb5a4 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 16 May 2016 12:34:21 +0300 Subject: add make install functionality with INSTALL_ROOT Change-Id: I8bad1c9bbe7b705ff0842f15fb0c9bc6c127e9bc Reviewed-by: Simon Hausmann Reviewed-by: Iikka Eklund --- src/libs/7zip/7zip.pro | 3 +++ src/libs/installer/installer.pro | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/libs') diff --git a/src/libs/7zip/7zip.pro b/src/libs/7zip/7zip.pro index 01b69dad2..5e1424d44 100644 --- a/src/libs/7zip/7zip.pro +++ b/src/libs/7zip/7zip.pro @@ -19,3 +19,6 @@ unix { QMAKE_CXXFLAGS += -fvisibility=hidden -w include($$7ZIP_BASE/unix.pri) #this is p7zip } + +target.path = $$[QT_INSTALL_LIBS] +INSTALLS += target diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro index 87af31f3c..53daf978d 100644 --- a/src/libs/installer/installer.pro +++ b/src/libs/installer/installer.pro @@ -221,3 +221,6 @@ win32 { win32-g++*:LIBS += -lmpr -luuid win32-g++*:QMAKE_CXXFLAGS += -Wno-missing-field-initializers } + +target.path = $$[QT_INSTALL_LIBS] +INSTALLS += target -- cgit v1.2.3 From 9b6b59cfc19dc61dd642706a24e1c5d3b6b39609 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 24 May 2016 13:22:00 +0300 Subject: Make Execute operation work without arguments in Windows Since Qt5.5, QProcess start() needs a program to start. When using native arguments the program is empty and QProcess will fail to start. Removed the use of native arguments until QProcess supports setting program through native arguments. Task-number: QTIFW-862 Change-Id: Ia56344e1bf82fbd76e4e8f2ae8b6817e4bb2fce1 Reviewed-by: Kai Koehne --- src/libs/installer/elevatedexecuteoperation.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index 5de3c0203..cb1a8372c 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -172,16 +172,7 @@ bool ElevatedExecuteOperation::Private::run(const QStringList &arguments) } //readProcessOutput should only called from this current Thread -> Qt::DirectConnection QObject::connect(process, SIGNAL(readyRead()), q, SLOT(readProcessOutput()), Qt::DirectConnection); -#ifdef Q_OS_WIN - if (args.count() == 1) { - process->setNativeArguments(args.front()); - qDebug() << "ElevatedExecuteOperation setNativeArguments to start:" << args.front(); - process->start(QString(), QStringList()); - } else -#endif - { - process->start(args.front(), args.mid(1)); - } + process->start(args.front(), args.mid(1)); qDebug() << args.front() << "started, arguments:" << QStringList(args.mid(1)).join(QLatin1String(" ")); bool success = false; -- cgit v1.2.3