summaryrefslogtreecommitdiff
path: root/src/plugins/mercurial/authenticationdialog.cpp
blob: e79e3d1a84e1f236055f458749c86f5bdb9fe78e (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "authenticationdialog.h"
#include "ui_authenticationdialog.h"

namespace Mercurial {
namespace Internal  {

AuthenticationDialog::AuthenticationDialog(const QString &username, const QString &password, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AuthenticationDialog)
{
    ui->setupUi(this);
    ui->username->setText(username);
    ui->password->setText(password);
}

AuthenticationDialog::~AuthenticationDialog()
{
    delete ui;
}

void AuthenticationDialog::setPasswordEnabled(bool enabled)
{
    ui->password->setEnabled(enabled);
}

QString AuthenticationDialog::getUserName()
{
    return ui->username->text();
}

QString AuthenticationDialog::getPassword()
{
    return ui->password->text();
}

} // namespace Internal
} // namespace Mercurial