summaryrefslogtreecommitdiff
path: root/src/qt3support/other
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt3support/other')
-rw-r--r--src/qt3support/other/q3dragobject.cpp6
-rw-r--r--src/qt3support/other/q3process.cpp2
-rw-r--r--src/qt3support/other/q3process_unix.cpp2
-rw-r--r--src/qt3support/other/q3process_win.cpp10
4 files changed, 10 insertions, 10 deletions
diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp
index 50b75a4e47..89ffe2481a 100644
--- a/src/qt3support/other/q3dragobject.cpp
+++ b/src/qt3support/other/q3dragobject.cpp
@@ -93,7 +93,7 @@ public:
Q3TextDragPrivate() { setSubType(QLatin1String("plain")); }
void setSubType(const QString & st) {
subtype = st;
- fmt = QString(QLatin1String("text/")).toLatin1() + subtype.toLatin1();
+ fmt = "text/" + subtype.toLatin1();
}
QString txt;
@@ -1297,7 +1297,7 @@ QByteArray Q3UriDrag::localFileToUri(const QString& filename)
r.prepend(QString::fromLatin1(hostname));
}
#endif
- return unicodeUriToUri(QString(QLatin1String("file://") + r));
+ return unicodeUriToUri(QLatin1String("file://") + r);
}
/*!
@@ -1352,7 +1352,7 @@ QString Q3UriDrag::uriToLocalFile(const char* uri)
return file;
if (0==qstrnicmp(uri,"file:/",6)) // It is a local file uri
uri += 6;
- else if (QString(QLatin1String(uri)).indexOf(QLatin1String(":/")) != -1) // It is a different scheme uri
+ else if (QString::fromLatin1(uri).indexOf(QLatin1String(":/")) != -1) // It is a different scheme uri
return file;
bool local = uri[0] != '/' || (uri[0] != '\0' && uri[1] == '/');
diff --git a/src/qt3support/other/q3process.cpp b/src/qt3support/other/q3process.cpp
index 6eac812edd..9689de987f 100644
--- a/src/qt3support/other/q3process.cpp
+++ b/src/qt3support/other/q3process.cpp
@@ -483,7 +483,7 @@ QString Q3Process::readLineStdout()
return QString();
if ( !buf->scanNewline( &a ) )
- return QString( QLatin1String(buf->readAll()) );
+ return QLatin1String(buf->readAll());
}
uint size = a.size();
diff --git a/src/qt3support/other/q3process_unix.cpp b/src/qt3support/other/q3process_unix.cpp
index 098c58171b..2492bf2777 100644
--- a/src/qt3support/other/q3process_unix.cpp
+++ b/src/qt3support/other/q3process_unix.cpp
@@ -828,7 +828,7 @@ bool Q3Process::start( QStringList *env )
#ifndef QT_NO_DIR
QFileInfo fileInfo( dir, command );
#else
- QFileInfo fileInfo( dir + "/" + command );
+ QFileInfo fileInfo( dir + QLatin1Char('/') + command );
#endif
if ( fileInfo.isExecutable() ) {
#if defined(Q_OS_MACX)
diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp
index 3c862eed60..7dc28cb731 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 );