Skip to content
Extraits de code Groupes Projets

Add clean logs support + dependent MR

Fusionnées Kubat a demandé de fusionner log-macros vers master
Comparer et Afficher la dernière version
10 fichiers
+ 83
25
Comparer les modifications
  • Côte à côte
  • En ligne
Fichiers
10
@@ -4,14 +4,17 @@
#error "This is a C++ header"
#endif
#include "../VivyApplication.hh"
#include "Utils.hh"
#include "Uuid.hh"
#include "Log.hh"
namespace Vivy
{
class AbstractDocument : public QObject {
Q_OBJECT
VIVY_UNMOVABLE_OBJECT(AbstractDocument)
VIVY_APP_LOGGABLE_OBJECT(AbstractDocument, logger)
void copyOrRenameWith(const QFileInfo &newFile, auto action, auto success)
{
@@ -21,7 +24,7 @@ class AbstractDocument : public QObject {
QDir dirOp;
const QString newAbsDirPath = newFile.dir().absolutePath();
if (!dirOp.exists(newAbsDirPath)) {
qInfo() << "Create folder " << newAbsDirPath;
logInfo() << "Create folder " << VIVY_LOG_QUOTED(newAbsDirPath);
dirOp.mkpath(newAbsDirPath);
}
@@ -30,7 +33,7 @@ class AbstractDocument : public QObject {
}
if (newFile.exists()) {
qWarning() << "Deleting the already existing" << newFile;
logWarning() << "Deleting the already existing file " << VIVY_LOG_QUOTED(newFile);
if (!dirOp.remove(newFile.absoluteFilePath()))
throw std::runtime_error("Failed to remove " +
newFile.absoluteFilePath().toStdString());
Chargement en cours