MCPcopy Create free account
hub / github.com/KDE/kdiff3 / fixCurrentText

Method fixCurrentText

src/smalldialogs.cpp:202–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void OpenDialog::fixCurrentText(QComboBox* pCB)
203{
204 QString s = pCB->currentText();
205 qsizetype pos = s.indexOf('\n');
206
207 if(pos >= 0)
208 s = s.left(pos);
209 pos = s.indexOf('\r');
210 if(pos >= 0)
211 s = s.left(pos);
212
213 pCB->setEditText(s);
214}
215
216void OpenDialog::accept()
217{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected