MCPcopy Create free account
hub / github.com/cxasm/notepad-- / on_import

Method on_import

src/batchfindreplace.cpp:292–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292void BatchFindReplace::on_import()
293{
294 QFileDialog fd(this, QString(), CCNotePad::s_lastOpenDirPath);
295 fd.setFileMode(QFileDialog::ExistingFile);
296
297 if (fd.exec() == QDialog::Accepted) //����ɹ���ִ��
298 {
299 QStringList fileNameList = fd.selectedFiles(); //�����ļ��б�������
300 QFileInfo fi(fileNameList[0]);
301
302 QSettings setting(fi.filePath(), QSettings::IniFormat);
303 setting.setIniCodec("UTF-8");
304
305 ui.findKeywordEdit->setPlainText(setting.value("find").toStringList().join(" "));
306 ui.replaceKeywordEdit->setPlainText(setting.value("replace").toStringList().join(" "));
307
308 on_freshBtClick();
309 }
310 else
311 {
312 fd.close();
313 }
314}
315
316void BatchFindReplace::on_mark()
317{

Callers

nothing calls this directly

Calls 2

closeMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected