forked from qt-creator/qt-creator
Fix overwriting of new license header template.
This commit is contained in:
@@ -264,7 +264,7 @@ void CppFileSettingsWidget::slotEdit()
|
|||||||
if (path.isEmpty())
|
if (path.isEmpty())
|
||||||
return;
|
return;
|
||||||
QFile file(path);
|
QFile file(path);
|
||||||
if (!file.open(QIODevice::ReadWrite|QIODevice::Text)) {
|
if (!file.open(QIODevice::ReadWrite|QIODevice::Text|QIODevice::Truncate)) {
|
||||||
QMessageBox::warning(this, tr("Template write error"),
|
QMessageBox::warning(this, tr("Template write error"),
|
||||||
tr("Cannot write to %1: %2").arg(path, file.errorString()));
|
tr("Cannot write to %1: %2").arg(path, file.errorString()));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user