|
|
@ -4,6 +4,7 @@
|
|
|
|
**
|
|
|
|
**
|
|
|
|
** Created : 920722
|
|
|
|
** Created : 920722
|
|
|
|
**
|
|
|
|
**
|
|
|
|
|
|
|
|
** Copyright (C) 2015 Timothy Pearson. All rights reserved.
|
|
|
|
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
|
|
|
|
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
|
|
|
|
**
|
|
|
|
**
|
|
|
|
** This file is part of the tools module of the Qt GUI Toolkit.
|
|
|
|
** This file is part of the tools module of the Qt GUI Toolkit.
|
|
|
@ -2604,12 +2605,10 @@ QString QString::multiArg( int numArgs, const QString& a1, const QString& a2,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef QT_NO_SPRINTF
|
|
|
|
#ifndef QT_NO_SPRINTF
|
|
|
|
QString &QString::sprintf( const char* cformat, ... )
|
|
|
|
QString &QString::sprintf(const char *cformat, ...)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QLocale locale(QLocale::C);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
va_list ap;
|
|
|
|
va_list ap;
|
|
|
|
va_start( ap, cformat );
|
|
|
|
va_start(ap, cformat);
|
|
|
|
|
|
|
|
|
|
|
|
if ( !cformat || !*cformat ) {
|
|
|
|
if ( !cformat || !*cformat ) {
|
|
|
|
// Qt 1.x compat
|
|
|
|
// Qt 1.x compat
|
|
|
@ -2617,6 +2616,16 @@ QString &QString::sprintf( const char* cformat, ... )
|
|
|
|
return *this;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString &s = vsprintf(cformat, ap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
va_end(ap);
|
|
|
|
|
|
|
|
return s;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString &QString::vsprintf( const char* cformat, va_list ap )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QLocale locale(QLocale::C);
|
|
|
|
|
|
|
|
|
|
|
|
// Parse cformat
|
|
|
|
// Parse cformat
|
|
|
|
|
|
|
|
|
|
|
|
QString result;
|
|
|
|
QString result;
|
|
|
@ -2933,7 +2942,6 @@ QString &QString::sprintf( const char* cformat, ... )
|
|
|
|
result.append(subst.rightJustify(width));
|
|
|
|
result.append(subst.rightJustify(width));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
va_end(ap);
|
|
|
|
|
|
|
|
*this = result;
|
|
|
|
*this = result;
|
|
|
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
return *this;
|
|
|
|