blob: 33d9b34a6c1d4ecaeecaed68d968c3f71dc72aaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Copyright (C) 2016 Brian McGillion and Hugues Delorme
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "vcsbaseclientsettings.h"
#include "vcsbasetr.h"
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
using namespace Utils;
namespace VcsBase {
VcsBaseSettings::VcsBaseSettings()
{
binaryPath.setSettingsKey("BinaryPath");
userName.setSettingsKey("Username");
userEmail.setSettingsKey("UserEmail");
logCount.setSettingsKey("LogCount");
logCount.setRange(0, 1000 * 1000);
logCount.setDefaultValue(100);
logCount.setLabelText(Tr::tr("Log count:"));
path.setSettingsKey("Path");
timeout.setSettingsKey("Timeout");
timeout.setRange(0, 3600 * 24 * 365);
timeout.setDefaultValue(30);
timeout.setLabelText(Tr::tr("Timeout:"));
timeout.setSuffix(Tr::tr("s"));
}
VcsBaseSettings::~VcsBaseSettings() = default;
FilePaths VcsBaseSettings::searchPathList() const
{
// FIXME: Filepathify
return Utils::transform(path().split(HostOsInfo::pathListSeparator(), Qt::SkipEmptyParts),
&FilePath::fromUserInput);
}
} // namespace VcsBase
|