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

Method slotFileSaveAs

src/kdiff3.cpp:983–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

981}
982
983void KDiff3App::slotFileSaveAs()
984{
985 slotStatusMsg(i18n("Saving file with a new filename..."));
986
987 QString s = QFileDialog::getSaveFileUrl(this, i18n("Save As..."), QUrl::fromLocalFile(QDir::currentPath())).url(QUrl::PreferLocalFile);
988 if(!s.isEmpty())
989 {
990 m_outputFilename = s;
991 m_pMergeResultWindowTitle->setFileName(m_outputFilename);
992 bool bSuccess = m_pMergeResultWindow->saveDocument(m_outputFilename, m_pMergeResultWindowTitle->getEncoding(), m_pMergeResultWindowTitle->getLineEndStyle());
993 if(bSuccess)
994 {
995 m_bOutputModified = false;
996 if(m_bDirCompare)
997 m_pDirectoryMergeWindow->mergeResultSaved(m_outputFilename);
998 }
999 //setWindowTitle(url.fileName(),doc->isModified());
1000
1001 m_bDefaultFilename = false;
1002 }
1003
1004 slotStatusMsg(i18n("Ready."));
1005}
1006
1007void KDiff3App::slotFilePrint()
1008{

Callers

nothing calls this directly

Calls 6

saveDocumentMethod · 0.80
mergeResultSavedMethod · 0.80
isEmptyMethod · 0.45
setFileNameMethod · 0.45
getEncodingMethod · 0.45
getLineEndStyleMethod · 0.45

Tested by

no test coverage detected