| 131 | } |
| 132 | |
| 133 | void App::saveDoc() { |
| 134 | if ( !mSplitter->curEditorExistsAndFocused() ) |
| 135 | return; |
| 136 | |
| 137 | if ( mSplitter->getCurEditor()->getDocument().hasFilepath() ) { |
| 138 | if ( mSplitter->getCurEditor()->save() ) { |
| 139 | updateEditorState(); |
| 140 | } else { |
| 141 | UIMessageBox* msgBox = errorMsgBox( |
| 142 | i18n( "could_not_write_file", |
| 143 | "Could not write file to disk.\nPlease check if the file " |
| 144 | "is read-only or if ecode does not have permissions to write to that file.\n" |
| 145 | "File path is: " ) + |
| 146 | mSplitter->getCurEditor()->getDocument().getFilePath() ); |
| 147 | |
| 148 | setFocusEditorOnClose( msgBox ); |
| 149 | } |
| 150 | } else { |
| 151 | saveFileDialog( mSplitter->getCurEditor() ); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | void App::saveAllProcess() { |
| 156 | if ( mTmpDocs.empty() ) |
nothing calls this directly
no test coverage detected