forked from qt-creator/qt-creator
Utils: Remove unused ProxyCredentialsDialog
Change-Id: I8f234ba6e851edc4a5cb41cfabd76cf05670eef2 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -127,7 +127,6 @@ add_qtc_library(Utils
|
|||||||
progressindicator.cpp progressindicator.h
|
progressindicator.cpp progressindicator.h
|
||||||
projectintropage.cpp projectintropage.h
|
projectintropage.cpp projectintropage.h
|
||||||
proxyaction.cpp proxyaction.h
|
proxyaction.cpp proxyaction.h
|
||||||
proxycredentialsdialog.cpp proxycredentialsdialog.h proxycredentialsdialog.ui
|
|
||||||
qrcparser.cpp qrcparser.h
|
qrcparser.cpp qrcparser.h
|
||||||
qtcassert.cpp qtcassert.h
|
qtcassert.cpp qtcassert.h
|
||||||
qtcolorbutton.cpp qtcolorbutton.h
|
qtcolorbutton.cpp qtcolorbutton.h
|
||||||
|
@@ -1,54 +0,0 @@
|
|||||||
// 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 "proxycredentialsdialog.h"
|
|
||||||
#include "ui_proxycredentialsdialog.h"
|
|
||||||
|
|
||||||
#include <QNetworkProxy>
|
|
||||||
|
|
||||||
using namespace Utils;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\class Utils::ProxyCredentialsDialog
|
|
||||||
|
|
||||||
Dialog for asking the user about proxy credentials (username, password).
|
|
||||||
*/
|
|
||||||
|
|
||||||
ProxyCredentialsDialog::ProxyCredentialsDialog(const QNetworkProxy &proxy, QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::ProxyCredentialsDialog)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
setUserName(proxy.user());
|
|
||||||
setPassword(proxy.password());
|
|
||||||
|
|
||||||
const QString proxyString = QString::fromLatin1("%1:%2").arg(proxy.hostName()).arg(proxy.port());
|
|
||||||
ui->infotext->setText(ui->infotext->text().arg(proxyString));
|
|
||||||
}
|
|
||||||
|
|
||||||
ProxyCredentialsDialog::~ProxyCredentialsDialog()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString ProxyCredentialsDialog::userName() const
|
|
||||||
{
|
|
||||||
return ui->usernameLineEdit->text();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProxyCredentialsDialog::setUserName(const QString &username)
|
|
||||||
{
|
|
||||||
ui->usernameLineEdit->setText(username);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString ProxyCredentialsDialog::password() const
|
|
||||||
{
|
|
||||||
return ui->passwordLineEdit->text();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProxyCredentialsDialog::setPassword(const QString &passwd)
|
|
||||||
{
|
|
||||||
ui->passwordLineEdit->setText(passwd);
|
|
||||||
}
|
|
||||||
|
|
@@ -1,37 +0,0 @@
|
|||||||
// 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
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "utils_global.h"
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QNetworkProxy;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace Utils {
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class ProxyCredentialsDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT ProxyCredentialsDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit ProxyCredentialsDialog(const QNetworkProxy &proxy, QWidget *parent = nullptr);
|
|
||||||
~ProxyCredentialsDialog() override;
|
|
||||||
|
|
||||||
QString userName() const;
|
|
||||||
void setUserName(const QString &username);
|
|
||||||
QString password() const;
|
|
||||||
void setPassword(const QString &passwd);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::ProxyCredentialsDialog *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Utils
|
|
@@ -1,106 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>Utils::ProxyCredentialsDialog</class>
|
|
||||||
<widget class="QDialog" name="Utils::ProxyCredentialsDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>279</width>
|
|
||||||
<height>114</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Proxy Credentials</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="infotext">
|
|
||||||
<property name="text">
|
|
||||||
<string>The proxy %1 requires a username and password.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="usernameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Username:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="usernameLineEdit">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Username</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="passwordLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Password:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="passwordLineEdit">
|
|
||||||
<property name="echoMode">
|
|
||||||
<enum>QLineEdit::Password</enum>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Password</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>Utils::ProxyCredentialsDialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>Utils::ProxyCredentialsDialog</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@@ -245,9 +245,6 @@ Project {
|
|||||||
"projectintropage.h",
|
"projectintropage.h",
|
||||||
"proxyaction.cpp",
|
"proxyaction.cpp",
|
||||||
"proxyaction.h",
|
"proxyaction.h",
|
||||||
"proxycredentialsdialog.cpp",
|
|
||||||
"proxycredentialsdialog.h",
|
|
||||||
"proxycredentialsdialog.ui",
|
|
||||||
"qrcparser.cpp",
|
"qrcparser.cpp",
|
||||||
"qrcparser.h",
|
"qrcparser.h",
|
||||||
"qtcassert.cpp",
|
"qtcassert.cpp",
|
||||||
|
Reference in New Issue
Block a user