summaryrefslogtreecommitdiff
path: root/src/modlistsortproxy.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2019-08-02 01:49:33 -0500
committerGitHub <noreply@github.com>2019-08-02 01:49:33 -0500
commitcff526415d781cb8a7761961ae2bd1fb6775c376 (patch)
treecf5ff4f0d7bdd3767155a8a3e251201861284f89 /src/modlistsortproxy.cpp
parentbdf45aea69ab7df0b01eb87cc80a2641ea4261d0 (diff)
parente4cf2c314d6397c5d73bcf567d4420171238bd29 (diff)
Merge pull request #807 from isanae/logging-rework
Logging rework
Diffstat (limited to 'src/modlistsortproxy.cpp')
-rw-r--r--src/modlistsortproxy.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp
index 2d9ea4a5..77ffad96 100644
--- a/src/modlistsortproxy.cpp
+++ b/src/modlistsortproxy.cpp
@@ -22,6 +22,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "profile.h"
#include "messagedialog.h"
#include "qtgroupingproxy.h"
+#include <log.h>
#include <QMenu>
#include <QCheckBox>
#include <QWidgetAction>
@@ -30,6 +31,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDebug>
#include <QTreeView>
+using namespace MOBase;
ModListSortProxy::ModListSortProxy(Profile* profile, QObject *parent)
: QSortFilterProxyModel(parent)
@@ -194,7 +196,7 @@ bool ModListSortProxy::lessThan(const QModelIndex &left,
QString rightCatName = categories.getCategoryName(categories.getCategoryIndex(rightMod->getPrimaryCategory()));
lt = leftCatName < rightCatName;
} catch (const std::exception &e) {
- qCritical("failed to compare categories: %s", e.what());
+ log::error("failed to compare categories: {}", e.what());
}
}
}
@@ -240,7 +242,7 @@ bool ModListSortProxy::lessThan(const QModelIndex &left,
// nop, already compared by priority
} break;
default: {
- qWarning() << "Sorting is not defined for column " << left.column();
+ log::warn("Sorting is not defined for column {}", left.column());
} break;
}
return lt;
@@ -474,13 +476,13 @@ bool ModListSortProxy::filterAcceptsRow(int row, const QModelIndex &parent) cons
}
if (row >= static_cast<int>(m_Profile->numMods())) {
- qWarning("invalid row index: %d", row);
+ log::warn("invalid row index: {}", row);
return false;
}
QModelIndex idx = sourceModel()->index(row, 0, parent);
if (!idx.isValid()) {
- qDebug("invalid mod index");
+ log::debug("invalid mod index");
return false;
}
if (sourceModel()->hasChildren(idx)) {