update the previous fix: SCN_SAVEPOINTLEFT() is only accessible in QScintilla >= 2.8, always save the file on actionSave()

master
Marius Kintel 2014-10-11 18:59:27 -04:00
parent d064b9238f
commit 1cc4f6be53
2 changed files with 2 additions and 2 deletions

View File

@ -1237,8 +1237,6 @@ void MainWindow::actionSave()
actionSaveAs();
}
else {
if (!editor->isContentModified())
return;
setCurrentOutput();
QFile file(this->fileName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {

View File

@ -71,7 +71,9 @@ QString ScintillaEditor::toPlainText()
void ScintillaEditor::setContentModified(bool modified)
{
// FIXME: Due to an issue with QScintilla, we need to do this on the document itself.
#if QSCINTILLA_VERSION >= 0x020800
qsci->SCN_SAVEPOINTLEFT();
#endif
qsci->setModified(modified);
}