- enhancement: auto convert project icon to ico format
This commit is contained in:
parent
55126ebebe
commit
23f34af034
1
NEWS.md
1
NEWS.md
|
@ -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: ctrl+enter insert a new line at the end of current line
|
||||||
- enhancement: create file in files view
|
- enhancement: create file in files view
|
||||||
- fix: hits in the search view not correctly displayed (overlapped with others)
|
- 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
|
Red Panda C++ Version 0.14.5
|
||||||
- fix: the "gnu c++ 20" option in compiler set options is wrong
|
- fix: the "gnu c++ 20" option in compiler set options is wrong
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QImageWriter>
|
||||||
|
#include <QImageWriter>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
|
@ -117,7 +119,10 @@ void ProjectGeneralWidget::doSave()
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QFile::copy(mIconPath, iconPath);
|
if (QImageWriter::supportedImageFormats().contains("ico")) {
|
||||||
|
ui->lbIcon->pixmap()->save(iconPath,"ico");
|
||||||
|
} else
|
||||||
|
QFile::copy(mIconPath, iconPath);
|
||||||
project->options().icon = iconPath;
|
project->options().icon = iconPath;
|
||||||
mIconPath = iconPath;
|
mIconPath = iconPath;
|
||||||
refreshIcon();
|
refreshIcon();
|
||||||
|
|
Loading…
Reference in New Issue