summaryrefslogtreecommitdiffstats
path: root/src/qt3support/other/q3process_win.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:27:50 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:31:07 (GMT)
commitf390f9b51cf8686e9ed44f13a33c7349b9e96a09 (patch)
tree162c768769713a7215bca64daf8f2bdc75c9fbee /src/qt3support/other/q3process_win.cpp
parent0bb0699d403b7541472a72a4057ecf0ca366a7cd (diff)
downloadQt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.zip
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.gz
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.bz2
improved string operations all over the place
used character operations whenever possible better usage of QLatin1String
Diffstat (limited to 'src/qt3support/other/q3process_win.cpp')
-rw-r--r--src/qt3support/other/q3process_win.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp
index 3c862ee..7dc28cb 100644
--- a/src/qt3support/other/q3process_win.cpp
+++ b/src/qt3support/other/q3process_win.cpp
@@ -285,7 +285,7 @@ bool Q3Process::start( QStringList *env )
for ( ; it != _arguments.end(); ++it ) {
QString tmp = *it;
// escape a single " because the arguments will be parsed
- tmp.replace( QLatin1String("\""), QLatin1String("\\\"") );
+ tmp.replace( QLatin1Char('\"'), QLatin1String("\\\"") );
if ( tmp.isEmpty() || tmp.contains( QLatin1Char(' ') ) || tmp.contains( QLatin1Char('\t') ) ) {
// The argument must not end with a \ since this would be interpreted
// as escaping the quote -- rather put the \ behind the quote: e.g.
@@ -294,9 +294,9 @@ bool Q3Process::start( QStringList *env )
int i = tmp.length();
while ( i>0 && tmp.at( i-1 ) == QLatin1Char('\\') ) {
--i;
- endQuote += QLatin1String("\\");
+ endQuote += QLatin1Char('\\');
}
- args += QString( QLatin1String(" \"") ) + tmp.left( i ) + endQuote;
+ args += QLatin1String(" \"") + tmp.left( i ) + endQuote;
} else {
args += QLatin1Char(' ') + tmp;
}
@@ -330,7 +330,7 @@ bool Q3Process::start( QStringList *env )
// add PATH if necessary (for DLL loading)
QByteArray path = qgetenv( "PATH" );
if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) {
- QString tmp = QString( QLatin1String("PATH=%1") ).arg(QString::fromLatin1(path.constData()));
+ QString tmp = QString::fromLatin1("PATH=%1").arg(QLatin1String(path.constData()));
uint tmpSize = sizeof(TCHAR) * (tmp.length()+1);
envlist.resize( envlist.size() + tmpSize );
memcpy( envlist.data()+pos, tmp.ucs2(), tmpSize );
@@ -378,7 +378,7 @@ bool Q3Process::start( QStringList *env )
// add PATH if necessary (for DLL loading)
QByteArray path = qgetenv( "PATH" );
if ( env->grep( QRegExp(QLatin1String("^PATH="),FALSE) ).empty() && !path.isNull() ) {
- Q3CString tmp = QString( QLatin1String("PATH=%1") ).arg(QString::fromLatin1(path.constData())).local8Bit();
+ Q3CString tmp = QString::fromLatin1("PATH=%1").arg(QString::fromLatin1(path.constData())).local8Bit();
uint tmpSize = tmp.length() + 1;
envlist.resize( envlist.size() + tmpSize );
memcpy( envlist.data()+pos, tmp.data(), tmpSize );