X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a06ee3399bece608790e419054f95807a017a020..676cdcbbdbea031c1bec56230561bf8a0efcd0f6:/src/kitemviews/kitemlistview.cpp diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 0d0304afc..df6539929 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -22,7 +22,7 @@ #include "kitemlistview.h" -#include +#include "dolphindebug.h" #include "kitemlistcontainer.h" #include "kitemlistcontroller.h" #include "kitemlistheader.h" @@ -543,7 +543,7 @@ void KItemListView::endTransaction() --m_activeTransactions; if (m_activeTransactions < 0) { m_activeTransactions = 0; - qWarning() << "Mismatch between beginTransaction()/endTransaction()"; + qCWarning(DolphinDebug) << "Mismatch between beginTransaction()/endTransaction()"; } if (m_activeTransactions == 0) { @@ -1006,7 +1006,7 @@ void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges) const int index = range.index + previouslyInsertedCount; const int count = range.count; if (index < 0 || count <= 0) { - qWarning() << "Invalid item range (index:" << index << ", count:" << count << ")"; + qCWarning(DolphinDebug) << "Invalid item range (index:" << index << ", count:" << count << ")"; continue; } previouslyInsertedCount += count; @@ -1114,14 +1114,14 @@ void KItemListView::slotItemsRemoved(const KItemRangeList& itemRanges) const int index = range.index; const int count = range.count; if (index < 0 || count <= 0) { - qWarning() << "Invalid item range (index:" << index << ", count:" << count << ")"; + qCWarning(DolphinDebug) << "Invalid item range (index:" << index << ", count:" << count << ")"; continue; } const int firstRemovedIndex = index; const int lastRemovedIndex = index + count - 1; - // Remeber which items have to be moved because they are behind the removed range. + // Remember which items have to be moved because they are behind the removed range. QVector itemsToMove; // Remove all KItemListWidget instances that got deleted @@ -2437,7 +2437,7 @@ int KItemListView::showDropIndicator(const QPointF& pos) if (mappedPos.y() >= 0 && mappedPos.y() <= rect.height()) { if (m_model->supportsDropping(widget->index())) { // Keep 30% of the rectangle as the gap instead of always having a fixed gap - const int gap = qMax(4.0, 0.3 * rect.height()); + const int gap = qMax(qreal(4.0), qreal(0.3) * rect.height()); if (mappedPos.y() >= gap && mappedPos.y() <= rect.height() - gap) { return -1; }