summaryrefslogtreecommitdiff
path: root/src/modinfodialogfiletree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modinfodialogfiletree.cpp')
-rw-r--r--src/modinfodialogfiletree.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/modinfodialogfiletree.cpp b/src/modinfodialogfiletree.cpp
index 0b519932..207c792d 100644
--- a/src/modinfodialogfiletree.cpp
+++ b/src/modinfodialogfiletree.cpp
@@ -5,8 +5,9 @@
#include "filerenamer.h"
#include <utility.h>
#include <report.h>
+#include <log.h>
-using MOBase::reportError;
+using namespace MOBase;
namespace shell = MOBase::shell;
// if there are more than 50 selected items in the filetree, don't bother
@@ -230,19 +231,19 @@ bool FileTreeTab::deleteFileRecursive(const QModelIndex& parent)
if (m_fs->isDir(index)) {
if (!deleteFileRecursive(index)) {
- qCritical() << "failed to delete" << m_fs->fileName(index);
+ log::error("failed to delete {}", m_fs->fileName(index));
return false;
}
} else {
if (!m_fs->remove(index)) {
- qCritical() << "failed to delete", m_fs->fileName(index);
+ log::error("failed to delete {}", m_fs->fileName(index));
return false;
}
}
}
if (!m_fs->remove(parent)) {
- qCritical() << "failed to delete" << m_fs->fileName(parent);
+ log::error("failed to delete {}", m_fs->fileName(parent));
return false;
}
@@ -256,9 +257,9 @@ void FileTreeTab::changeVisibility(bool visible)
bool changed = false;
bool stop = false;
- qDebug().nospace()
- << (visible ? "unhiding" : "hiding") << " "
- << selection.size() << " filetree files";
+ log::debug(
+ "{} {} filetree files",
+ (visible ? "unhiding" : "hiding"), selection.size());
QFlags<FileRenamer::RenameFlags> flags =
(visible ? FileRenamer::UNHIDE : FileRenamer::HIDE);
@@ -279,13 +280,13 @@ void FileTreeTab::changeVisibility(bool visible)
if (visible) {
if (!canUnhideFile(false, path)) {
- qDebug().nospace() << "cannot unhide " << path << ", skipping";
+ log::debug("cannot unhide {}, skipping", path);
continue;
}
result = unhideFile(renamer, path);
} else {
if (!canHideFile(false, path)) {
- qDebug().nospace() << "cannot hide " << path << ", skipping";
+ log::debug("cannot hide {}, skipping", path);
continue;
}
result = hideFile(renamer, path);
@@ -311,7 +312,7 @@ void FileTreeTab::changeVisibility(bool visible)
}
}
- qDebug().nospace() << (visible ? "unhiding" : "hiding") << " filetree files done";
+ log::debug("{} filetree files done", (visible ? "unhiding" : "hiding"));
if (changed) {
if (origin()) {