diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-19 01:09:19 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-22 07:34:53 -0400 |
| commit | aae6d6a5aa8d6b101fcc38388222a8a6e7ee2ec6 (patch) | |
| tree | 0550b5896c9f929342d3b5fd534f17f21a7fd579 /src/filerenamer.cpp | |
| parent | f13f5e21c42b3b5bdfdc4fcab50e10abd92c8486 (diff) | |
replaced qWarning()
Diffstat (limited to 'src/filerenamer.cpp')
| -rw-r--r-- | src/filerenamer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filerenamer.cpp b/src/filerenamer.cpp index c5c6782b..b516c902 100644 --- a/src/filerenamer.cpp +++ b/src/filerenamer.cpp @@ -1,7 +1,10 @@ #include "filerenamer.h" +#include <log.h> #include <QMessageBox> #include <QFileInfo> +using namespace MOBase; + FileRenamer::FileRenamer(QWidget* parent, QFlags<RenameFlags> flags) : m_parent(parent), m_flags(flags) { @@ -34,7 +37,7 @@ FileRenamer::RenameResults FileRenamer::rename(const QString& oldName, const QSt qDebug().nospace() << "removing " << newName; // user wants to replace the file, so remove it if (!QFile(newName).remove()) { - qWarning().nospace() << "failed to remove " << newName; + log::warn("failed to remove '{}'", newName); // removal failed, warn the user and allow canceling if (!removeFailed(newName)) { qDebug().nospace() << "canceling " << oldName; @@ -62,7 +65,7 @@ FileRenamer::RenameResults FileRenamer::rename(const QString& oldName, const QSt // target either didn't exist or was removed correctly if (!QFile::rename(oldName, newName)) { - qWarning().nospace() << "failed to rename " << oldName << " to " << newName; + log::warn("failed to rename '{}' to '{}'", oldName, newName); // renaming failed, warn the user and allow canceling if (!renameFailed(oldName, newName)) { |
