summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-10-27 20:26:56 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-11-02 05:57:56 +0000
commit8b7a4b8dd8ffd4c55fd013179242ecd42441d6a9 (patch)
tree9629a156fcaca875d70feab0f3f525f96c4ceafe /src/corelib/tools/qlocale.h
parenta5a1f338aa0077b5e29bdf774ad4183f1c8c59d9 (diff)
QLocale: add const version of formattedDataSize
QLocale::formattedDataSize() was not marked const when it was added although the function is const. Add a const overload and mark the non-const version as deprecated and remove it with Qt6 Fixes: QTBUG-71445 Change-Id: I56d051d9928b5e00cdaca7a874c543fed27a888d Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/corelib/tools/qlocale.h')
-rw-r--r--src/corelib/tools/qlocale.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index af0eb2929e..1fbd96c6d5 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -1066,7 +1066,10 @@ public:
{ return toCurrencyString(double(i), symbol, precision); }
#endif
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QString formattedDataSize(qint64 bytes, int precision = 2, DataSizeFormats format = DataSizeIecFormat);
+#endif
+ QString formattedDataSize(qint64 bytes, int precision = 2, DataSizeFormats format = DataSizeIecFormat) const;
QStringList uiLanguages() const;