MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / exportAsFormat

Method exportAsFormat

src/dialogs/MainWindow.cpp:1437–1452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1435}
1436
1437void MainWindow::exportAsFormat(Converter *converter, const QString &filter)
1438{
1439 const QString fileName = FileDialogHelpers::getSaveFileName(this, tr("Export As"), QString(), filter + ";;All files (*)");
1440
1441 if (fileName.isEmpty()) {
1442 return;
1443 }
1444
1445 QFile f(fileName);
1446
1447 f.open(QIODevice::WriteOnly);
1448
1449 QTextStream s(&f);
1450 converter->convert(s);
1451 f.close();
1452}
1453
1454void MainWindow::copyAsFormat(Converter *converter, const QString &mimeType)
1455{

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.80
convertMethod · 0.80
closeMethod · 0.80

Tested by

no test coverage detected