Verified Commit 4d4ba1e0 authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Fix some warnings

parent 474447be
......@@ -179,7 +179,6 @@ QVariantList HourlyIncidenceModel::layoutLines(const QDateTime &rowStart) const
// Need to convert ints into doubles to get more accurate starting positions
const auto start = ((startDT.time().hour() * 1.0) * (60.0 / mPeriodLength)) + ((startDT.time().minute() * 1.0) / mPeriodLength);
const auto duration = qMax(getDuration(startDT, idx.data(IncidenceOccurrenceModel::EndTime).toDateTime().toTimeZone(QTimeZone::systemTimeZone()), mPeriodLength), 1.0);
const auto end = qMin(start + duration, (24.0 * 60.0) / mPeriodLength);
const auto startMinutesFromDayStart = (startDT.time().hour() * 60) + startDT.time().minute();
const auto endMinutesFromDayStart = qMin((endDT.time().hour() * 60) + endDT.time().minute(), 24 * 60 * 60);
......
......@@ -92,6 +92,7 @@ int IncidenceTreeModel::Private::rowForNode(const Node::Ptr &node) const
void IncidenceTreeModel::Private::assert_and_dump(bool condition, const QString &message)
{
Q_UNUSED(message)
if (!condition) {
//qCCritical(CALENDARVIEW_LOG) << "This should never happen: " << message;
dumpTree();
......@@ -101,9 +102,9 @@ void IncidenceTreeModel::Private::assert_and_dump(bool condition, const QString
void IncidenceTreeModel::Private::dumpTree()
{
for (const Node::Ptr &node : std::as_const(m_toplevelNodeList)) {
//qCDebug(CALENDARVIEW_LOG) << node;
}
//for (const Node::Ptr &node : std::as_const(m_toplevelNodeList)) {
// qCDebug(CALENDARVIEW_LOG) << node;
//}
}
QModelIndex IncidenceTreeModel::Private::indexForNode(const Node::Ptr &node) const
......
......@@ -40,8 +40,9 @@ QVariant MonthViewModel::data(const QModelIndex& idx, int role) const
}
}
int MonthViewModel::rowCount(const QModelIndex& parent) const
int MonthViewModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_startDates.length();
}
......
......@@ -58,8 +58,9 @@ protected:
};
TagManager::TagManager(QObject* parent)
: QObject(parent)
{
m_tagModel = new FlatTagModel;
m_tagModel = new FlatTagModel(this);
}
QSortFilterProxyModel * TagManager::tagModel()
......
......@@ -39,6 +39,7 @@ QVariant WeekViewModel::data(const QModelIndex& idx, int role) const
int WeekViewModel::rowCount(const QModelIndex& parent) const
{
Q_UNUSED(parent)
return m_startDates.length();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment