This commit is contained in:
2021-12-15 22:59:51 +01:00
parent 8806c99613
commit 92b55c43f6
2 changed files with 86 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
#include <etk/types.hpp>
#include <etk/stdTools.hpp>
#include <etk/system.hpp>
#include <etk/Vector.hpp>
#include <etk/path/fileSystem.hpp>
#include <appl/Buffer.hpp>
@@ -171,7 +172,7 @@ bool appl::Buffer::storeFile() {
if (m_data.dumpIn(m_fileName) == true) {
APPL_INFO("saving file : " << m_fileName);
etk::String extention = m_fileName.getExtention();
if (etk::isIn(extention, {"cpp", "hpp", "h", "hpp"}) {
if (etk::isIn(extention, etk::Vector<etk::String>{"cpp", "hpp", "h", "hpp"})) {
etk::Path clangFile = etk::path::findInParent(m_fileName, ".clang-format");
if (etk::path::isFile(clangFile) == true) {
etk::String output = etk::exec("clang-format " + m_fileName.getAbsolute());// + " -assume-filename=" + clangFile.getAbsolute() + "
@@ -190,7 +191,7 @@ bool appl::Buffer::storeFile() {
APPL_ERROR(" ==> data is differents");
m_fileIsModify = true;
setModification(true);
signalFileIsModify();
signalFileIsModify.emit();
return true;
}
}