Commit 070bccaf authored by Jonathan Marten's avatar Jonathan Marten
Browse files

FSView: Eliminate 'endl' deprecation warnings with Qt 5.15

warning: 'QTextStream& QTextStreamFunctions::endl(QTextStream&)' is deprecated,
use 'Qt::endl'

Compatible with all Qt versions.  'endl' is not needed at the end of
qDebug() output, so it is simply removed.  The debug statements are not
normally compiled anyway.
parent 2afe42cb
......@@ -195,14 +195,14 @@ void FSView::setDirMetric(const QString &k,
double s, unsigned int f, unsigned int d)
{
if (0) qCDebug(FSVIEWLOG) << "setDirMetric '" << k << "': size "
<< s << ", files " << f << ", dirs " << d << endl;
<< s << ", files " << f << ", dirs " << d;
_dirMetric.insert(k, MetricEntry(s, f, d));
}
void FSView::requestUpdate(Inode *i)
{
if (0) qCDebug(FSVIEWLOG) << "FSView::requestUpdate(" << i->path()
<< ")" << endl;
<< ")";
ScanDir *peer = i->dirPeer();
if (!peer) {
......@@ -280,7 +280,7 @@ void FSView::scanFinished(ScanDir *d)
if (0) qCDebug(FSVIEWLOG) << "FSFiew::scanFinished: " << d->path()
<< ", Data " << data
<< ", Progress " << _progress << "/"
<< _progressSize << endl;
<< _progressSize;
}
void FSView::selected(TreeMapItem *i)
......@@ -494,7 +494,7 @@ void FSView::doRedraw()
<< _progress << "/" << _progressSize
<< "= " << percent << "%, "
<< _dirsFinished << " dirs read, in "
<< _lastDir->path() << endl;
<< _lastDir->path();
emit progress(percent, _dirsFinished, _lastDir->path());
}
......@@ -553,7 +553,7 @@ void FSView::doUpdate()
if (1) qCDebug(FSVIEWLOG) << "Phase 3: CSize " << _chunkSize2
<< ", Todo " << todo
<< ", Progress " << _progress
<< "/" << _progressSize << endl;
<< "/" << _progressSize;
}
break;
......@@ -573,7 +573,7 @@ void FSView::doUpdate()
if (1) qCDebug(FSVIEWLOG) << "Phase 4: CSize " << _chunkSize3
<< ", Todo " << todo
<< ", Progress " << _progress
<< "/" << _progressSize << endl;
<< "/" << _progressSize;
}
default:
......
......@@ -524,7 +524,7 @@ void FSViewBrowserExtension::refresh()
}
qCDebug(FSVIEWLOG) << "refreshing"
<< ((Inode *)commonParent)->path() << endl;
<< ((Inode *)commonParent)->path();
_view->requestUpdate((Inode *)commonParent);
}
......
......@@ -75,7 +75,7 @@ Inode::Inode(ScanFile *f, Inode *parent)
Inode::~Inode()
{
if (0) qCDebug(FSVIEWLOG) << "~Inode [" << path()
<< "]" << endl;
<< "]";
/* reset Listener of old Peer */
if (_dirPeer) {
......@@ -109,7 +109,7 @@ QString Inode::path() const
void Inode::init(const QString &path)
{
if (0) qCDebug(FSVIEWLOG) << "Inode::init [" << path
<< "]" << endl;
<< "]";
_info = QFileInfo(path);
......@@ -144,7 +144,7 @@ void Inode::init(const QString &path)
void Inode::sizeChanged(ScanDir *d)
{
if (0) qCDebug(FSVIEWLOG) << "Inode::sizeChanged [" << path() << "] in "
<< d->name() << ": size " << d->size() << endl;
<< d->name() << ": size " << d->size();
_resortNeeded = true;
}
......@@ -152,7 +152,7 @@ void Inode::sizeChanged(ScanDir *d)
void Inode::scanFinished(ScanDir *d)
{
if (0) qCDebug(FSVIEWLOG) << "Inode::scanFinished [" << path() << "] in "
<< d->name() << ": size " << d->size() << endl;
<< d->name() << ": size " << d->size();
_resortNeeded = true;
......
......@@ -105,7 +105,7 @@ void ScanManager::stopScan()
}
if (0) qCDebug(FSVIEWLOG) << "ScanManager::stopScan, scanLength "
<< _list.count() << endl;
<< _list.count();
while (!_list.isEmpty()) {
ScanItem *si = _list.takeFirst();
......@@ -337,7 +337,7 @@ void ScanDir::subScanFinished()
callSizeChanged();
if (0) qCDebug(FSVIEWLOG) << "ScanDir::subScanFinished [" << path()
<< "]: " << _dirsFinished << "/" << _dirs.count() << endl;
<< "]: " << _dirsFinished << "/" << _dirs.count();
if (_dirsFinished < _dirs.count()) {
return;
......@@ -387,7 +387,7 @@ void ScanDir::setupChildRescan()
void ScanDir::callScanStarted()
{
if (0) qCDebug(FSVIEWLOG) << "ScanDir:Started [" << path()
<< "]: size " << size() << ", files " << fileCount() << endl;
<< "]: size " << size() << ", files " << fileCount();
ScanListener *mListener = _manager ? _manager->listener() : nullptr;
......@@ -402,7 +402,7 @@ void ScanDir::callScanStarted()
void ScanDir::callSizeChanged()
{
if (0) qCDebug(FSVIEWLOG) << ". [" << path()
<< "]: size " << size() << ", files " << fileCount() << endl;
<< "]: size " << size() << ", files " << fileCount();
_dirty = true;
......@@ -423,7 +423,7 @@ void ScanDir::callSizeChanged()
void ScanDir::callScanFinished()
{
if (0) qCDebug(FSVIEWLOG) << "ScanDir:Finished [" << path()
<< "]: size " << size() << ", files " << fileCount() << endl;
<< "]: size " << size() << ", files " << fileCount();
ScanListener *mListener = _manager ? _manager->listener() : nullptr;
......
......@@ -506,7 +506,7 @@ bool RectDrawing::drawField(QPainter *p, int f, DrawParams *dp)
QRect r = _rect;
if (0) qCDebug(FSVIEWLOG) << "Rect " << r.x() << "/" << r.y()
<< " - " << r.width() << "x" << r.height() << endl;
<< " - " << r.width() << "x" << r.height();
int h = _fontHeight;
bool rotate = dp->rotated();
......@@ -687,7 +687,7 @@ bool RectDrawing::drawField(QPainter *p, int f, DrawParams *dp)
int w = pixW + _fm->horizontalAdvance(name);
if (0) qCDebug(FSVIEWLOG) << " For '" << name << "': Unused " << unused
<< ", StrW " << w << ", Width " << width << endl;
<< ", StrW " << w << ", Width " << width;
// if we have limited space at 1st line:
// use it only if whole name does fit in last line...
......@@ -792,7 +792,7 @@ bool RectDrawing::drawField(QPainter *p, int f, DrawParams *dp)
}
if (0) qCDebug(FSVIEWLOG) << " Drawing '" << name << "' at "
<< x + pixW << "/" << y << endl;
<< x + pixW << "/" << y;
p->drawText(x + pixW, y,
width - pixW, h,
......@@ -1212,7 +1212,7 @@ void TreeMapItem::addFreeRect(const QRect &r)
if (0) qCDebug(FSVIEWLOG) << "addFree(" << path(0).join(QStringLiteral("/")) << ", "
<< r.x() << "/" << r.y() << "-"
<< r.width() << "x" << r.height() << ")" << endl;
<< r.width() << "x" << r.height() << ")";
if (_freeRects.isEmpty()) {
_freeRects.append(r);
......@@ -1242,7 +1242,7 @@ void TreeMapItem::addFreeRect(const QRect &r)
if (0) qCDebug(FSVIEWLOG) << " united with last to ("
<< last.x() << "/" << last.y() << "-"
<< last.width() << "x" << last.height() << ")" << endl;
<< last.width() << "x" << last.height() << ")";
}
// TreeMapWidget
......@@ -1736,7 +1736,7 @@ TreeMapItem *TreeMapWidget::item(int x, int y) const
qCDebug(FSVIEWLOG) << " Checking " << i->path(0).join(QStringLiteral("/")) << " ("
<< i->itemRect().x() << "/" << i->itemRect().y()
<< "-" << i->itemRect().width()
<< "x" << i->itemRect().height() << ")" << endl;
<< "x" << i->itemRect().height() << ")";
if (i->itemRect().contains(x, y)) {
......@@ -1762,7 +1762,7 @@ TreeMapItem *TreeMapWidget::item(int x, int y) const
qCDebug(FSVIEWLOG) << "item(" << x << "," << y << "): Got "
<< p->path(0).join(QStringLiteral("/")) << " (Size "
<< p->itemRect().width() << "x" << p->itemRect().height()
<< ", Val " << p->value() << ")" << endl;
<< ", Val " << p->value() << ")";
}
return p;
......@@ -1831,7 +1831,7 @@ void TreeMapWidget::setSelected(TreeMapItem *item, bool selected)
if (0) qCDebug(FSVIEWLOG) << (selected ? "S" : "Des") << "elected Item "
<< (item ? item->path(0).join(QLatin1String("")) : QStringLiteral("(null)"))
<< " (depth " << (item ? item->depth() : -1)
<< ")" << endl;
<< ")";
}
void TreeMapWidget::setMarked(int markNo, bool redrawWidget)
......@@ -1948,7 +1948,7 @@ void TreeMapWidget::setCurrent(TreeMapItem *i, bool kbd)
_markNo = 0;
if (1) qCDebug(FSVIEWLOG) << "setCurrent(" << i->path(0).join(QStringLiteral("/"))
<< ") - mark removed" << endl;
<< ") - mark removed";
// always complete redraw needed to remove mark
redraw();
......@@ -2572,7 +2572,7 @@ void TreeMapWidget::drawItems(QPainter *p,
<< item->itemRect().x() << "/" << item->itemRect().y()
<< "-" << item->itemRect().width() << "x"
<< item->itemRect().height() << "), Val " << item->value()
<< ", Sum " << item->sum() << endl;
<< ", Sum " << item->sum();
drawItem(p, item);
item->clearFreeRects();
......@@ -2664,7 +2664,7 @@ void TreeMapWidget::drawItems(QPainter *p,
child_sum += i->value();
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " child: " << i->text(0) << ", value "
<< i->value() << endl;
<< i->value();
}
QRect orig = r;
......@@ -2705,7 +2705,7 @@ void TreeMapWidget::drawItems(QPainter *p,
if (user_sum < child_sum) {
//qCDebug(FSVIEWLOG) << "TreeMWidget " <<
// item->path() << ": User sum " << user_sum << " < Child Items sum " << child_sum << endl;
// item->path() << ": User sum " << user_sum << " < Child Items sum " << child_sum;
// invalid user supplied sum: ignore and use calculate sum
user_sum = child_sum;
......@@ -2752,7 +2752,7 @@ void TreeMapWidget::drawItems(QPainter *p,
if (0) qCDebug(FSVIEWLOG) << "Item " << item->path(0).join(QStringLiteral("/")) << ": SelfR "
<< sr.x() << "/" << sr.y() << "-" << sr.width()
<< "/" << sr.height() << ", self " << self << "/"
<< user_sum << endl;
<< user_sum;
if ((sr.height() >= _fontHeight) && (sr.width() >= _fontHeight)) {
......@@ -2911,7 +2911,7 @@ void TreeMapWidget::drawFill(TreeMapItem *i, QPainter *p, const QRect &r,
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " +drawFill(" << r.x() << "/" << r.y()
<< "-" << r.width() << "x" << r.height()
<< ", len " << len << ")" << endl;
<< ", len " << len << ")";
p->setBrush(Qt::Dense4Pattern);
p->setPen(Qt::NoPen);
......@@ -2936,7 +2936,7 @@ void TreeMapWidget::drawFill(TreeMapItem *i, QPainter *p, const QRect &r,
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " -drawFill(" << r.x() << "/" << r.y()
<< "-" << r.width() << "x" << r.height()
<< ", len " << len << ")" << endl;
<< ", len " << len << ")";
}
// returns false if rect gets to small
......@@ -2964,7 +2964,7 @@ bool TreeMapWidget::drawItemArray(QPainter *p, TreeMapItem *item,
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " +drawItemArray(" << item->path(0).join(QStringLiteral("/"))
<< ", " << r.x() << "/" << r.y() << "-" << r.width()
<< "x" << r.height() << ")" << endl;
<< "x" << r.height() << ")";
if (len > 2 && (item->splitMode() == TreeMapItem::Bisection)) {
......@@ -3015,7 +3015,7 @@ bool TreeMapWidget::drawItemArray(QPainter *p, TreeMapItem *item,
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " -drawItemArray(" << item->path(0).join(QStringLiteral("/"))
<< ")" << endl;
<< ")";
return drawOn;
}
......@@ -3051,7 +3051,7 @@ bool TreeMapWidget::drawItemArray(QPainter *p, TreeMapItem *item,
drawFill(item, p, fullRect, list, idx, len, goBack);
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " -drawItemArray(" << item->path(0).join(QStringLiteral("/"))
<< "): Stop" << endl;
<< "): Stop";
return false;
}
......@@ -3070,7 +3070,7 @@ bool TreeMapWidget::drawItemArray(QPainter *p, TreeMapItem *item,
drawFill(item, p, fullRect, list, idx, len, goBack);
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " -drawItemArray(" << item->path(0).join(QStringLiteral("/"))
<< "): Stop" << endl;
<< "): Stop";
return false;
}
......@@ -3133,7 +3133,7 @@ bool TreeMapWidget::drawItemArray(QPainter *p, TreeMapItem *item,
if (DEBUG_DRAWING)
qCDebug(FSVIEWLOG) << " -drawItemArray(" << item->path(0).join(QStringLiteral("/"))
<< "): Continue" << endl;
<< "): Continue";
return true;
}
......
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