Changeset 92648 in vbox
- Timestamp:
- Nov 30, 2021 11:55:20 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148543
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestSessionPanel.cpp
r92616 r92648 24 24 #include "QILineEdit.h" 25 25 #include "UIFileManagerGuestSessionPanel.h" 26 #include "UIUserNamePasswordEditor.h" 26 27 27 28 /********************************************************************************************************************************* … … 57 58 58 59 void sltCreateButtonClick(); 59 void sltShowHidePassword(bool flag);60 60 void sltHandleTextChanged(const QString &strText); 61 61 … … 64 64 void prepareWidgets(); 65 65 QILineEdit *m_pUserNameEdit; 66 QILineEdit *m_pPasswordEdit;66 UIPasswordLineEdit *m_pPasswordEdit; 67 67 QPushButton *m_pCreateButton; 68 68 QPushButton *m_pCloseButton; 69 69 QHBoxLayout *m_pMainLayout; 70 QCheckBox *m_pShowPasswordCheckBox;71 70 QColor m_defaultBaseColor; 72 71 QColor m_errorBaseColor; … … 86 85 , m_pCloseButton(0) 87 86 , m_pMainLayout(0) 88 , m_pShowPasswordCheckBox(0)89 87 , m_fMarkedForError(0) 90 88 { … … 111 109 } 112 110 113 m_pPasswordEdit = new QILineEdit;111 m_pPasswordEdit = new UIPasswordLineEdit; 114 112 if (m_pPasswordEdit) 115 113 { … … 117 115 m_pPasswordEdit->setPlaceholderText(QApplication::translate("UIFileManager", "Password")); 118 116 m_pPasswordEdit->setEchoMode(QLineEdit::Password); 119 connect(m_pPasswordEdit, & QILineEdit::textChanged,117 connect(m_pPasswordEdit, &UIPasswordLineEdit::textChanged, 120 118 this, &UIGuestSessionCreateWidget::sltHandleTextChanged); 121 }122 123 m_pShowPasswordCheckBox = new QCheckBox;124 if (m_pShowPasswordCheckBox)125 {126 m_pShowPasswordCheckBox->setText(QApplication::translate("UIFileManager", "Show Password"));127 m_pMainLayout->addWidget(m_pShowPasswordCheckBox);128 connect(m_pShowPasswordCheckBox, &QCheckBox::toggled,129 this, &UIGuestSessionCreateWidget::sltShowHidePassword);130 119 } 131 120 … … 152 141 if (m_pUserNameEdit && m_pPasswordEdit) 153 142 emit sigCreateSession(m_pUserNameEdit->text(), m_pPasswordEdit->text()); 154 }155 156 void UIGuestSessionCreateWidget::sltShowHidePassword(bool flag)157 {158 if (!m_pPasswordEdit)159 return;160 if (flag)161 m_pPasswordEdit->setEchoMode(QLineEdit::Normal);162 else163 m_pPasswordEdit->setEchoMode(QLineEdit::Password);164 143 } 165 144
Note:
See TracChangeset
for help on using the changeset viewer.