4
0
mirror of https://github.com/QuasarApp/installer-framework.git synced 2025-05-08 02:59:33 +00:00

Merge remote-tracking branch 'origin/3.0' into master

Change-Id: I77d539e079f3c7d61c4a965b222f4e02c35b1108
This commit is contained in:
Katja Marttila 2018-09-17 09:53:22 +03:00
commit b3d140a2c8
7 changed files with 667 additions and 780 deletions

@ -330,7 +330,9 @@ void MetadataJob::xmlTaskFinished()
return;
if (status == XmlDownloadSuccess) {
fetchMetaDataPackages();
if (!fetchMetaDataPackages()) {
emitFinished();
}
} else if (status == XmlDownloadRetry) {
QMetaObject::invokeMethod(this, "doStart", Qt::QueuedConnection);
} else {
@ -460,6 +462,8 @@ void MetadataJob::reset()
m_metadataTask.cancel();
} catch (...) {}
m_tempDirDeleter.releaseAndDeleteAll();
m_metadataResult.clear();
m_taskNumber = 0;
}
void MetadataJob::resetCompressedFetch()

@ -844,6 +844,7 @@ PackageManagerCore::PackageManagerCore(qint64 magicmaker, const QList<OperationB
qRegisterMetaType<QInstaller::PackageManagerCore::Status>("QInstaller::PackageManagerCore::Status");
qRegisterMetaType<QInstaller::PackageManagerCore::WizardPage>("QInstaller::PackageManagerCore::WizardPage");
d->initialize(QHash<QString, QString>());
// Creates and initializes a remote client, makes us get admin rights for QFile, QSettings
// and QProcess operations. Init needs to called to set the server side authorization key.
if (!d->isUpdater()) {
@ -851,8 +852,6 @@ PackageManagerCore::PackageManagerCore(qint64 magicmaker, const QList<OperationB
RemoteClient::instance().setAuthorizationFallbackDisabled(settings().disableAuthorizationFallback());
}
d->initialize(QHash<QString, QString>());
//
// Sanity check to detect a broken installations with missing operations.
// Every installed package should have at least one MinimalProgress operation.

@ -89,7 +89,7 @@ bool RegisterFileTypeOperation::performOperation()
{
#ifdef Q_OS_WIN
ensureOptionalArgumentsRead();
if (!checkArgumentCount(2, 5, tr("<extension> <command> [description [contentType [icon]]]")))
if (!checkArgumentCount(2, 5, QString::fromLatin1("<extension> <command> [description [contentType [icon]]]")))
return false;
QStringList args = arguments();

@ -418,7 +418,16 @@ QJSValue ScriptEngine::loadInContext(const QString &context, const QString &file
" else"
" throw \"Missing Component constructor. Please check your script.\";"
"})();").arg(context);
QJSValue scriptContext = evaluate(scriptContent, fileName);
QString copiedFileName = fileName;
#ifdef Q_OS_WIN
// Workaround bug reported in QTBUG-70425 by appending "file://" when passing a filename to
// QJSEngine::evaluate() to ensure it sees it as a valid URL when qsTr() is used.
if (!copiedFileName.startsWith(QLatin1String("qrc:/")) &&
!copiedFileName.startsWith(QLatin1String(":/"))) {
copiedFileName = QLatin1String("file://") + fileName;
}
#endif
QJSValue scriptContext = evaluate(scriptContent, copiedFileName);
scriptContext.setProperty(QLatin1String("Uuid"), QUuid::createUuid().toString());
if (scriptContext.isError()) {
throw Error(tr("Exception while loading the component script \"%1\": %2").arg(

File diff suppressed because it is too large Load Diff

@ -1524,7 +1524,7 @@ Erreur pendant le chargement %2</translation>
</message>
<message>
<source>Welcome to the %1 Setup Wizard.</source>
<translation>Bienvenue dans l&apos;Assitant d&apos;Installation de : %1.</translation>
<translation>Bienvenue dans l&apos;Assistant d&apos;Installation de : %1.</translation>
</message>
<message>
<source>Add or remove components</source>

@ -125,8 +125,8 @@ int main(int argc, char** argv)
args.removeFirst();
if (!filteredPackages.isEmpty()) {
return printErrorAndUsageAndExit(QCoreApplication::translate("QInstaller",
"Error: --include and --exclude are mutual exclusive options. Use either "
"one or the other."));
"Error: --include and --exclude are mutually exclusive. Use either one or "
"the other."));
}
if (args.isEmpty() || args.first().startsWith(QLatin1Char('-'))) {