diff --git a/kstars/ekos/align/align.cpp b/kstars/ekos/align/align.cpp --- a/kstars/ekos/align/align.cpp +++ b/kstars/ekos/align/align.cpp @@ -1039,7 +1039,7 @@ boxNames.sort(Qt::CaseInsensitive); boxNames.removeDuplicates(); greekBoxNames.removeDuplicates(); - qSort(greekBoxNames.begin(), greekBoxNames.end(), [](const QString & a, const QString & b) + std::sort(greekBoxNames.begin(), greekBoxNames.end(), [](const QString & a, const QString & b) { QStringList aParts = a.split(' '); QStringList bParts = b.split(' '); diff --git a/kstars/ekos/guide/internalguide/internalguider.cpp b/kstars/ekos/guide/internalguide/internalguider.cpp --- a/kstars/ekos/guide/internalguide/internalguider.cpp +++ b/kstars/ekos/guide/internalguide/internalguider.cpp @@ -1190,9 +1190,9 @@ useNativeDetection = true; // For SEP, prefer flux total if (Options::guideAlgorithm() == SEP_THRESHOLD) - qSort(starCenters.begin(), starCenters.end(), [](const Edge *a, const Edge *b) { return a->val > b->val; }); + std::sort(starCenters.begin(), starCenters.end(), [](const Edge *a, const Edge *b) { return a->val > b->val; }); else - qSort(starCenters.begin(), starCenters.end(), [](const Edge *a, const Edge *b) { return a->width > b->width; }); + std::sort(starCenters.begin(), starCenters.end(), [](const Edge *a, const Edge *b) { return a->width > b->width; }); guideFrame->setStarsEnabled(true); guideFrame->updateFrame(); diff --git a/kstars/ekos/scheduler/scheduler.cpp b/kstars/ekos/scheduler/scheduler.cpp --- a/kstars/ekos/scheduler/scheduler.cpp +++ b/kstars/ekos/scheduler/scheduler.cpp @@ -1123,7 +1123,7 @@ return; /* Swap jobs in the list */ - jobs.swap(currentRow, destinationRow); + jobs.swapItemsAt(currentRow, destinationRow); /* Reassign status cells */ setJobStatusCells(currentRow); @@ -1158,7 +1158,7 @@ return; /* Swap jobs in the list */ - jobs.swap(currentRow, destinationRow); + jobs.swapItemsAt(currentRow, destinationRow); /* Reassign status cells */ setJobStatusCells(currentRow); diff --git a/kstars/fitsviewer/fpackutil.c b/kstars/fitsviewer/fpackutil.c --- a/kstars/fitsviewer/fpackutil.c +++ b/kstars/fitsviewer/fpackutil.c @@ -1023,8 +1023,9 @@ while (! stat) { - if (single) + if (single) { stat = -1; /* special status flag to force output primary array */ + } fp_unpack_hdu (infptr, outfptr, fpvar, &stat); diff --git a/kstars/hips/hipsmanager.cpp b/kstars/hips/hipsmanager.cpp --- a/kstars/hips/hipsmanager.cpp +++ b/kstars/hips/hipsmanager.cpp @@ -387,7 +387,7 @@ Q_ASSERT(item); Q_ASSERT(item->image); - int cost = item->image->byteCount(); + int cost = item->image->sizeInBytes(); m_cache.add(key, item, cost); } diff --git a/kstars/hips/hipsrenderer.cpp b/kstars/hips/hipsrenderer.cpp --- a/kstars/hips/hipsrenderer.cpp +++ b/kstars/hips/hipsrenderer.cpp @@ -164,7 +164,7 @@ if (image) { m_rendered++; - m_size += image->byteCount(); + m_size += image->sizeInBytes(); // UV Mapping to apply image unto the destination image // 4x4 = 16 points are mapped from the source image unto the destination image. diff --git a/kstars/skyqpainter.cpp b/kstars/skyqpainter.cpp --- a/kstars/skyqpainter.cpp +++ b/kstars/skyqpainter.cpp @@ -910,7 +910,7 @@ save(); QFont f = font(); const QString qMark = " ? "; - double scaleFactor = 0.8 * size / fontMetrics().width(qMark); + double scaleFactor = 0.8 * size / fontMetrics().horizontalAdvance(qMark); f.setPointSizeF(f.pointSizeF() * scaleFactor); setFont(f); translate(x, y); diff --git a/kstars/tools/scriptbuilder.cpp b/kstars/tools/scriptbuilder.cpp --- a/kstars/tools/scriptbuilder.cpp +++ b/kstars/tools/scriptbuilder.cpp @@ -89,7 +89,7 @@ { child->setExpanded(true); - int w = qfm.width(child->text(icol)) + 4; + int w = qfm.horizontalAdvance(child->text(icol)) + 4; if (icol == 0) { w += 2 * optionsList()->indentation(); diff --git a/kstars/widgets/infoboxwidget.cpp b/kstars/widgets/infoboxwidget.cpp --- a/kstars/widgets/infoboxwidget.cpp +++ b/kstars/widgets/infoboxwidget.cpp @@ -62,7 +62,7 @@ QFontMetrics fm(font()); int w = 0; foreach (const QString &str, m_strings) - w = qMax(w, fm.width(str)); + w = qMax(w, fm.horizontalAdvance(str)); int h = fm.height() * (m_shaded ? 1 : m_strings.size()); // Add padding resize(w + 2 * padX, h + 2 * padY + 2); diff --git a/kstars/widgets/timespinbox.cpp b/kstars/widgets/timespinbox.cpp --- a/kstars/widgets/timespinbox.cpp +++ b/kstars/widgets/timespinbox.cpp @@ -56,7 +56,7 @@ uint wmax = 0; for (int i = 0; i < maximum(); ++i) { - uint w = fm.width('-' + TimeString[i]); + uint w = fm.horizontalAdvance('-' + TimeString[i]); if (w > wmax) wmax = w; }