Changeset View
Changeset View
Standalone View
Standalone View
krusader/Dialogs/newftpgui.cpp
Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Line(s) | 61 | { | |||
---|---|---|---|---|---|
144 | 144 | | |||
145 | QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); | 145 | QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); | ||
146 | mainLayout->addWidget(buttonBox); | 146 | mainLayout->addWidget(buttonBox); | ||
147 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | 147 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | ||
148 | okButton->setText(i18n("&Connect")); | 148 | okButton->setText(i18n("&Connect")); | ||
149 | okButton->setDefault(true); | 149 | okButton->setDefault(true); | ||
150 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | 150 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | ||
151 | 151 | | |||
152 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); | 152 | connect(buttonBox, &QDialogButtonBox::accepted, this, &newFTPGUI::accept); | ||
153 | connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); | 153 | connect(buttonBox, &QDialogButtonBox::rejected, this, &newFTPGUI::reject); | ||
154 | 154 | | |||
155 | connect(prefix, SIGNAL(activated(QString)), | 155 | connect(prefix, QOverload<const QString &>::of(&KComboBox::activated), this, &newFTPGUI::slotTextChanged); | ||
156 | this, SLOT(slotTextChanged(QString))); | 156 | connect(url, QOverload<const QString &>::of(&KHistoryComboBox::activated), url, &KHistoryComboBox::addToHistory); | ||
157 | connect(url, SIGNAL(activated(QString)), | | |||
158 | url, SLOT(addToHistory(QString))); | | |||
159 | 157 | | |||
160 | if(!lastUsedProtocol.isEmpty()) { | 158 | if(!lastUsedProtocol.isEmpty()) { | ||
161 | // update the port field | 159 | // update the port field | ||
162 | slotTextChanged(lastUsedProtocol); | 160 | slotTextChanged(lastUsedProtocol); | ||
163 | } | 161 | } | ||
164 | 162 | | |||
165 | setTabOrder(url, username); | 163 | setTabOrder(url, username); | ||
166 | setTabOrder(username, password); | 164 | setTabOrder(username, password); | ||
Show All 39 Lines |