summaryrefslogtreecommitdiff
path: root/src/categories.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-01-30 20:32:48 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-01-30 20:32:48 -0600
commit4b522f40e88e1350434aaa7d77fc60cb7ca36930 (patch)
treeab162fb185d043fbb29a9984ba24b1daf906f765 /src/categories.cpp
parent6d453505468ccf86966c358d57aa820b18def4ec (diff)
Make logs more consistent in format and content
Diffstat (limited to 'src/categories.cpp')
-rw-r--r--src/categories.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/categories.cpp b/src/categories.cpp
index 4d89eff9..9e5fa9f7 100644
--- a/src/categories.cpp
+++ b/src/categories.cpp
@@ -72,7 +72,7 @@ void CategoryFactory::loadCategories()
bool ok = false;
int temp = iter->toInt(&ok);
if (!ok) {
- qCritical("invalid id %s", iter->constData());
+ qCritical("invalid category id %s", iter->constData());
}
nexusIDs.push_back(temp);
}
@@ -268,7 +268,7 @@ void CategoryFactory::loadDefaultCategories()
int CategoryFactory::getParentID(unsigned int index) const
{
if (index >= m_Categories.size()) {
- throw MyException(QObject::tr("invalid index %1").arg(index));
+ throw MyException(QObject::tr("invalid category index: %1").arg(index));
}
return m_Categories[index].m_ParentID;
@@ -303,7 +303,7 @@ bool CategoryFactory::isDecendantOf(int id, int parentID) const
bool CategoryFactory::hasChildren(unsigned int index) const
{
if (index >= m_Categories.size()) {
- throw MyException(QObject::tr("invalid index %1").arg(index));
+ throw MyException(QObject::tr("invalid category index: %1").arg(index));
}
return m_Categories[index].m_HasChildren;
@@ -313,7 +313,7 @@ bool CategoryFactory::hasChildren(unsigned int index) const
QString CategoryFactory::getCategoryName(unsigned int index) const
{
if (index >= m_Categories.size()) {
- throw MyException(QObject::tr("invalid index %1").arg(index));
+ throw MyException(QObject::tr("invalid category index: %1").arg(index));
}
return m_Categories[index].m_Name;
@@ -323,7 +323,7 @@ QString CategoryFactory::getCategoryName(unsigned int index) const
int CategoryFactory::getCategoryID(unsigned int index) const
{
if (index >= m_Categories.size()) {
- throw MyException(QObject::tr("invalid index %1").arg(index));
+ throw MyException(QObject::tr("invalid category index: %1").arg(index));
}
return m_Categories[index].m_ID;
@@ -334,7 +334,7 @@ int CategoryFactory::getCategoryIndex(int ID) const
{
std::map<int, unsigned int>::const_iterator iter = m_IDMap.find(ID);
if (iter == m_IDMap.end()) {
- throw MyException(QObject::tr("invalid category id %1").arg(ID));
+ throw MyException(QObject::tr("invalid category id: %1").arg(ID));
}
return iter->second;
}