Commit 5d650a87 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix follow BinaryUnitDialect

CCBUG: 454182
parent b7e70692
Pipeline #179956 passed with stage
in 4 minutes and 33 seconds
......@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <KDirModel>
#include <KFileItem>
#include <KFilePlacesModel>
#include <KFormat>
#include <KIO/Global>
#include <KIconLoader>
#include <KLocalizedString>
#include <KUrlMimeData>
......@@ -247,7 +247,7 @@ struct BrowseMainPagePrivate : public Ui_BrowseMainPage {
"Selected %1 of %2 (%3)",
mSelectedMediaItems->count(),
mDocumentCountImages + mDocumentCountVideos,
KFormat().formatByteSize(totalSize));
KIO::convertSize(totalSize));
mDocumentCountLabel->setText(text);
} else {
const QString imageText = i18ncp("@info:status Image files", "%1 image", "%1 images", mDocumentCountImages);
......
......@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KF
#include <KFileItem>
#include <KFormat>
#include <KIO/Global>
#include <KLocalizedString>
// Exiv2
......@@ -337,7 +337,7 @@ ImageMetaInfoModel::~ImageMetaInfoModel()
void ImageMetaInfoModel::setUrl(const QUrl &url)
{
KFileItem item(url);
const QString sizeString = KFormat().formatByteSize(item.size());
const QString sizeString = KIO::convertSize(item.size());
const QString timeString = QLocale().toString(item.time(KFileItem::ModificationTime), QLocale::LongFormat);
d->setGroupEntryValue(GeneralGroup, QStringLiteral("General.Name"), item.name());
......
......@@ -29,8 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <QTimer>
// KF
#include <KFormat>
#include <KGuiItem>
#include <KIO/Global>
#include <KLocalizedString>
// Local
......@@ -111,7 +111,7 @@ void ResizeImageDialog::setCurrentImageUrl(const QUrl &imageUrl)
// mCurrentSize->setText has to be set after the mCurrentImageUrl has been set, otherwise it's -1
QFileInfo fileInfo(mCurrentImageUrl.toLocalFile());
d->mCurrentSize->setText(KFormat().formatByteSize(fileInfo.size()));
d->mCurrentSize->setText(KIO::convertSize(fileInfo.size()));
mValueChanged = false;
}
......@@ -218,7 +218,7 @@ void ResizeImageDialog::slotCalculateImageSize()
} else if (size == -2) {
d->mEstimatedSize->setText(i18n("error"));
} else {
d->mEstimatedSize->setText(KFormat().formatByteSize(size));
d->mEstimatedSize->setText(KIO::convertSize(size));
}
}
......
Supports Markdown
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