add auto-saving of modified editors

Task-number: QTCREATORBUG-2847
This commit is contained in:
Oswald Buddenhagen
2011-05-10 20:43:03 +02:00
parent a14955d0fb
commit 9ac137fb06
48 changed files with 398 additions and 89 deletions

View File

@@ -117,10 +117,10 @@ bool ImageViewer::createNew(const QString &contents)
return false;
}
bool ImageViewer::open(QString *errorString, const QString &fileName)
bool ImageViewer::open(QString *errorString, const QString &fileName, const QString &realFileName)
{
if (!d_ptr->imageView->openFile(fileName)) {
*errorString = tr("Cannot open image file %1").arg(QDir::toNativeSeparators(fileName));
if (!d_ptr->imageView->openFile(realFileName)) {
*errorString = tr("Cannot open image file %1").arg(QDir::toNativeSeparators(realFileName));
return false;
}
setDisplayName(QFileInfo(fileName).fileName());