MCPcopy Create free account
hub / github.com/KDE/labplot / saveProject

Method saveProject

src/frontend/MainWin.cpp:1719–1733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1717}
1718
1719bool MainWin::saveProject() {
1720 QString fileName = m_project->fileName();
1721 if (fileName.isEmpty())
1722 return saveProjectAs();
1723 else {
1724 // don't overwrite OPJ files, replace ending
1725 if (fileName.endsWith(QLatin1String(".opj"), Qt::CaseInsensitive)) {
1726 //fileName.replace(QLatin1String(".opj"), QLatin1String(".lml"), Qt::CaseInsensitive);
1727 // better append ending (don't overwrite existing project.lml file)
1728 fileName.append(QLatin1String(".lml"));
1729 DEBUG(Q_FUNC_INFO << ", renamed file name to " << fileName.toStdString())
1730 }
1731 return save(fileName);
1732 }
1733}
1734
1735bool MainWin::saveProjectAs() {
1736 KConfigGroup conf = Settings::group(QStringLiteral("MainWin"));

Callers 1

autoSaveProjectMethod · 0.95

Calls 4

appendMethod · 0.80
toStdStringMethod · 0.80
fileNameMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected