diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-01-11 23:54:08 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-01-11 23:54:08 -0600 |
commit | 859958033dcb5ba82c6fb9eecea720f107d20109 (patch) | |
tree | afc8bff9aecf337d5059d5ebaf97e2ffb60890a5 /src/tools/qstring.cpp | |
parent | 38e12d6e1287df570c8908b6722597b2e951a738 (diff) | |
download | tqt3-859958033dcb5ba82c6fb9eecea720f107d20109.tar.gz tqt3-859958033dcb5ba82c6fb9eecea720f107d20109.zip |
Automated update from Qt3
Diffstat (limited to 'src/tools/qstring.cpp')
-rw-r--r-- | src/tools/qstring.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp index 67de50301..2610a2cd6 100644 --- a/src/tools/qstring.cpp +++ b/src/tools/qstring.cpp @@ -4,6 +4,7 @@ ** ** Created : 920722 ** +** Copyright (C) 2015 Timothy Pearson. All rights reserved. ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** ** This file is part of the tools module of the TQt GUI Toolkit. @@ -2604,12 +2605,10 @@ TQString TQString::multiArg( int numArgs, const TQString& a1, const TQString& a2 */ #ifndef QT_NO_SPRINTF -TQString &TQString::sprintf( const char* cformat, ... ) +TQString &TQString::sprintf(const char *cformat, ...) { - TQLocale locale(TQLocale::C); - va_list ap; - va_start( ap, cformat ); + va_start(ap, cformat); if ( !cformat || !*cformat ) { // TQt 1.x compat @@ -2617,6 +2616,16 @@ TQString &TQString::sprintf( const char* cformat, ... ) return *this; } + TQString &s = vsprintf(cformat, ap); + + va_end(ap); + return s; +} + +TQString &TQString::vsprintf( const char* cformat, va_list ap ) +{ + TQLocale locale(TQLocale::C); + // Parse cformat TQString result; @@ -2933,7 +2942,6 @@ TQString &TQString::sprintf( const char* cformat, ... ) result.append(subst.rightJustify(width)); } - va_end(ap); *this = result; return *this; |