~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/shared/qbs/src/lib/tools/installoptions.cpp

  • Committer: Timo Jyrinki
  • Date: 2013-12-02 09:16:15 UTC
  • mfrom: (1.1.29)
  • Revision ID: timo.jyrinki@canonical.com-20131202091615-xbj1os1f604ber1m
New upstream release candidate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
****************************************************************************/
29
29
#include "installoptions.h"
30
30
 
 
31
#include <QDir>
31
32
#include <QSharedData>
32
33
 
33
34
namespace qbs {
98
99
/*!
99
100
 * \brief Sets the base directory for the installation.
100
101
 * \note The argument must either be an empty string or an absolute path to a directory
101
 
 *       (which might not yet exists, in which case it will be created).
 
102
 *       (which might not yet exist, in which case it will be created).
102
103
 */
103
104
void InstallOptions::setInstallRoot(const QString &installRoot)
104
105
{
105
106
    d->installRoot = installRoot;
 
107
    if (!QDir(installRoot).isRoot()) {
 
108
        while (d->installRoot.endsWith(QLatin1Char('/')))
 
109
            d->installRoot.chop(1);
 
110
    }
106
111
}
107
112
 
108
113
/*!