diff options
-rw-r--r-- | doc/installerfw.qdoc | 28 | ||||
-rw-r--r-- | src/libs/installer/component.h | 12 | ||||
-rw-r--r-- | src/libs/installer/metadatajob.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/remoteobject.h | 2 |
4 files changed, 28 insertions, 16 deletions
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc index 3f8d3a12e..7c7c9f0a8 100644 --- a/doc/installerfw.qdoc +++ b/doc/installerfw.qdoc @@ -1264,8 +1264,8 @@ displayname="Example Repository" /> \endcode - \c{url} will be used as a base url to resolve an \c{Updates.xml} file against. - If \c{url} is itself relative, it will be resolved against the base url of the current document. + \c{url} will be used as a base URL to resolve an \c{Updates.xml} file against. + If \c{url} is itself relative, it will be resolved against the base URL of the current document. \c{displayname} specifies how the repository should be named in the \gui Settings page of the Maintenance Tool. @@ -1280,7 +1280,7 @@ <Repository action="remove" url="http://www.example.com/repository" /> \endcode - \c{url} must match exactly the url that is to be removed. + \c{url} must match exactly the URL that is to be removed. \section2 Replacing Repositories To replace one repository with another, add a \c <Repository> child element to the @@ -1292,32 +1292,34 @@ displayname="New Example Repository" /> \endcode - \c{oldUrl} must match exactly the url that is to be replaced. + \c{oldUrl} must match exactly the URL that is to be replaced. - \c{newUrl} must match exactly the url that is replace to. + \c{newUrl} must match exactly the URL that it is replaced with. \section1 Relocatable Repositories - Some projects contain multiple repositories. To create relocatable set + Some projects contain multiple repositories. To create a relocatable set of repositories you should use relative paths. - So if generic repository available at address \c{http://www.example.com/repositories/generic} - and \c{Updates.xml} contains \c <Repository> element with the following options: + So if the generic repository available at the address + \c{http://www.example.com/repositories/generic} and \c{Updates.xml} + contains \c <Repository> element with the following options: \code <Repository action="add" url="../module" name="user" password="password" displayname="Module Repository" /> \endcode - Resolved address of added repository will be \c{http://www.example.com/repositories/module}. - So that the repository does not contain information about their absolute location. + Then the resolved address of the added repository will be + \c{http://www.example.com/repositories/module}, so that the repository does + not contain information about their absolute location. If you want to change the address, you can simply copy a set of repositories as is. - It recommended for some time to maintain the old generic repository and replace addresses + It is recommended to maintain the old generic repository for some time and replace the addresses as described above. You can also provide the updated installer with the new generic address. - You can use relative path for arguments \c url, \c oldUrl and \c newUrl at - \c <Repository> element. + You can use relative paths for the arguments \c url, \c oldUrl, and \c newUrl in + the \c <Repository> element. */ /*! diff --git a/src/libs/installer/component.h b/src/libs/installer/component.h index 395bf90dd..0d2f0dde3 100644 --- a/src/libs/installer/component.h +++ b/src/libs/installer/component.h @@ -76,7 +76,11 @@ public: { bool operator() (const Component *lhs, const Component *rhs) const { - return lhs->value(scSortingPriority).toInt() < rhs->value(scSortingPriority).toInt(); + const int lhsPriority = lhs->value(scSortingPriority).toInt(); + const int rhsPriority = rhs->value(scSortingPriority).toInt(); + if (lhsPriority == rhsPriority) + return lhs->displayName() > rhs->displayName(); + return lhsPriority < rhsPriority; } }; @@ -84,7 +88,11 @@ public: { bool operator() (const Component *lhs, const Component *rhs) const { - return lhs->value(scSortingPriority).toInt() > rhs->value(scSortingPriority).toInt(); + const int lhsPriority = lhs->value(scSortingPriority).toInt(); + const int rhsPriority = rhs->value(scSortingPriority).toInt(); + if (lhsPriority == rhsPriority) + return lhs->displayName() < rhs->displayName(); + return lhsPriority > rhsPriority; } }; diff --git a/src/libs/installer/metadatajob.cpp b/src/libs/installer/metadatajob.cpp index b3301c761..9c9ef6246 100644 --- a/src/libs/installer/metadatajob.cpp +++ b/src/libs/installer/metadatajob.cpp @@ -500,7 +500,7 @@ MetadataJob::Status MetadataJob::parseUpdatesXml(const QList<FileTaskResult> &re } } else if (action == QLatin1String("remove")) { // remove possible default repositories using the given server url - Repository repository(el.attribute(QLatin1String("url")), true); + Repository repository(resolveUrl(result, el.attribute(QLatin1String("url"))), true); repository.setDisplayName(el.attribute(QLatin1String("displayname"))); repositoryUpdates.insertMulti(action, qMakePair(repository, Repository())); diff --git a/src/libs/installer/remoteobject.h b/src/libs/installer/remoteobject.h index 72c20eaa4..deac75776 100644 --- a/src/libs/installer/remoteobject.h +++ b/src/libs/installer/remoteobject.h @@ -91,6 +91,8 @@ public: T callRemoteMethod(const QString &name, const T1 &arg, const T2 &arg2, const T3 &arg3) const { writeData(name, arg, arg2, arg3); + while (m_socket->bytesToWrite()) + m_socket->waitForBytesWritten(); QByteArray command; QByteArray data; |