Shown client name in detect dialog

This commit is contained in:
Xinyu Hou 2014-11-18 15:34:50 +00:00
parent 2aec1223ae
commit 1a69f458b7
3 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@
#include <QPushButton>
#include <QLabel>
AddClientDialog::AddClientDialog(QWidget *parent) :
AddClientDialog::AddClientDialog(const QString& clientName, QWidget* parent) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
Ui::AddClientDialog(),
m_AddResult(kAddClientIgnore)
@ -29,7 +29,7 @@ AddClientDialog::AddClientDialog(QWidget *parent) :
setupUi(this);
m_pLabelHead = new QLabel(this);
m_pLabelHead->setText("Client wants to connect...");
m_pLabelHead->setText("Client " + clientName + " wants to connect...");
gridLayout->addWidget(m_pLabelHead, 0, 1, 1, 1, Qt::AlignCenter);
QIcon icon(":res/icons/64x64/video-display.png");

View File

@ -38,7 +38,7 @@ class AddClientDialog : public QDialog, public Ui::AddClientDialog
{
Q_OBJECT
public:
AddClientDialog(QWidget *parent = 0);
AddClientDialog(const QString& clientName, QWidget* parent = 0);
~AddClientDialog();
int getAddResult() { return m_AddResult; }

View File

@ -372,7 +372,7 @@ bool ServerConfig::fixNoServer(const QString& name, int& index)
int ServerConfig::showAddClientDialog(const QString& clientName)
{
AddClientDialog addClientDialog(m_pMainWindow);
AddClientDialog addClientDialog(clientName, m_pMainWindow);
addClientDialog.exec();
int result = addClientDialog.getAddResult();