- enhancement: auto convert project icon to ico format

This commit is contained in:
Roy Qu 2022-03-17 17:07:28 +08:00
parent 55126ebebe
commit 23f34af034
2 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,7 @@ Red Panda C++ Version 1.0.0
- enhancement: ctrl+enter insert a new line at the end of current line
- enhancement: create file in files view
- fix: hits in the search view not correctly displayed (overlapped with others)
- enhancement: auto convert project icon to ico format
Red Panda C++ Version 0.14.5
- fix: the "gnu c++ 20" option in compiler set options is wrong

View File

@ -24,6 +24,8 @@
#include <QFileDialog>
#include <QIcon>
#include <QImageWriter>
#include <QImageWriter>
#include <QMessageBox>
#include <QTextCodec>
@ -117,6 +119,9 @@ void ProjectGeneralWidget::doSave()
QMessageBox::Ok);
}
}
if (QImageWriter::supportedImageFormats().contains("ico")) {
ui->lbIcon->pixmap()->save(iconPath,"ico");
} else
QFile::copy(mIconPath, iconPath);
project->options().icon = iconPath;
mIconPath = iconPath;