При компиляции возникает ошибка (Ubuntu 18.04.6 LTS)
/home/martin/freeLib/freeLib/src/main.cpp:109:92: error: no matching function for call to ‘QString::arg(QStringRef)’
QString sQmFile = QStringLiteral("/translations/language_%1.qm").arg(sLocale.leftRef(2));
^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:44:0,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:1,
from /home/martin/freeLib/freeLib/src/main.cpp:3:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:264:31: note: candidate: QString QString::arg(qlonglong, int, int, QChar) const
Q_REQUIRED_RESULT QString arg(qlonglong a, int fieldwidth=0, int base=10,
^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:264:31: note: no known conversion for argument 1 from ‘QStringRef’ to ‘qlonglong {aka long long int}’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:266:31: note: candidate: QString QString::arg(qulonglong, int, int, QChar) const
Q_REQUIRED_RESULT QString arg(qulonglong a, int fieldwidth=0, int base=10,
^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:266:31: note: no known conversion for argument 1 from ‘QStringRef’ to ‘qulonglong {aka long long unsigned int}’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:928:16: note: candidate: QString QString::arg(long int, int, int, QChar) const
inline QString QString::arg(long a, int fieldWidth, int base, QChar fillChar) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:928:16: note: no known conversion for argument 1 from ‘QStringRef’ to ‘long int’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:930:16: note: candidate: QString QString::arg(ulong, int, int, QChar) const
inline QString QString::arg(ulong a, int fieldWidth, int base, QChar fillChar) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:930:16: note: no known conversion for argument 1 from ‘QStringRef’ to ‘ulong {aka long unsigned int}’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:924:16: note: candidate: QString QString::arg(int, int, int, QChar) const
inline QString QString::arg(int a, int fieldWidth, int base, QChar fillChar) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:924:16: note: no known conversion for argument 1 from ‘QStringRef’ to ‘int’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:926:16: note: candidate: QString QString::arg(uint, int, int, QChar) const
inline QString QString::arg(uint a, int fieldWidth, int base, QChar fillChar) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:926:16: note: no known conversion for argument 1 from ‘QStringRef’ to ‘uint {aka unsigned int}’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:932:16: note: candidate: QString QString::arg(short int, int, int, QChar) const
inline QString QString::arg(short a, int fieldWidth, int base, QChar fillChar) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:932:16: note: no known conversion for argument 1 from ‘QStringRef’ to ‘short int’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:934:16: note: candidate: QString QString::arg(ushort, int, int, QChar) const
inline QString QString::arg(ushort a, int fieldWidth, int base, QChar fillChar) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:934:16: note: no known conversion for argument 1 from ‘QStringRef’ to ‘ushort {aka short unsigned int}’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:280:31: note: candidate: QString QString::arg(double, int, char, int, QChar) const
Q_REQUIRED_RESULT QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1,
^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:280:31: note: no known conversion for argument 1 from ‘QStringRef’ to ‘double’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:282:31: note: candidate: QString QString::arg(char, int, QChar) const
Q_REQUIRED_RESULT QString arg(char a, int fieldWidth = 0,
^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:282:31: note: no known conversion for argument 1 from ‘QStringRef’ to ‘char’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:284:31: note: candidate: QString QString::arg(QChar, int, QChar) const
Q_REQUIRED_RESULT QString arg(QChar a, int fieldWidth = 0,
^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:284:31: note: no known conversion for argument 1 from ‘QStringRef’ to ‘QChar’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:286:31: note: candidate: QString QString::arg(const QString&, int, QChar) const
Q_REQUIRED_RESULT QString arg(const QString &a, int fieldWidth = 0,
^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:286:31: note: no known conversion for argument 1 from ‘QStringRef’ to ‘const QString&’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:936:16: note: candidate: QString QString::arg(const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:936:16: note: candidate expects 2 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:938:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:938:16: note: candidate expects 3 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:940:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:940:16: note: candidate expects 4 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:943:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:943:16: note: candidate expects 5 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:946:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:946:16: note: candidate expects 6 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:949:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:949:16: note: candidate expects 7 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:953:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:953:16: note: candidate expects 8 arguments, 1 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:957:16: note: candidate: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
^~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:957:16: note: candidate expects 9 arguments, 1 provided
freeLib/src/CMakeFiles/freelib.dir/build.make:196: recipe for target 'freeLib/src/CMakeFiles/freelib.dir/main.cpp.o' failed
make[2]: *** [freeLib/src/CMakeFiles/freelib.dir/main.cpp.o] Error 1
make[2]: *** Ожидание завершения заданий…
CMakeFiles/Makefile2:168: recipe for target 'freeLib/src/CMakeFiles/freelib.dir/all' failed
make[1]: *** [freeLib/src/CMakeFiles/freelib.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2