| 1717 | } |
| 1718 | |
| 1719 | bool 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 | |
| 1735 | bool MainWin::saveProjectAs() { |
| 1736 | KConfigGroup conf = Settings::group(QStringLiteral("MainWin")); |
no test coverage detected