summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-28 23:24:06 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-28 23:24:06 (GMT)
commit2f5f9ef4050fcb89e453fc427676f2320030b23b (patch)
tree64745e1d098227a43f27fc8d2e46355d1465af20
parent9d636095403f5abecbdff8ffffe658f35ff10001 (diff)
parent2ffe2fafcd8ed7c2b6267a016401af86ed57b540 (diff)
downloadQt-2f5f9ef4050fcb89e453fc427676f2320030b23b.zip
Qt-2f5f9ef4050fcb89e453fc427676f2320030b23b.tar.gz
Qt-2f5f9ef4050fcb89e453fc427676f2320030b23b.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Doc: Put the correct images with the D-Bus and Embedded Linux sections. Call cheaper clear() instead of assigning new QString() Fix some foreach usage to use const refs googlesuggest example: Add newline to end of file Core classes, examples, demos: Some changes from string to char Fix header labels on mac with rtl
-rw-r--r--doc/src/getting-started/examples.qdoc4
-rw-r--r--examples/network/googlesuggest/googlesuggest.cpp3
-rw-r--r--examples/network/googlesuggest/searchbox.cpp3
-rw-r--r--examples/network/network-chat/chatdialog.cpp2
-rw-r--r--examples/network/network-chat/client.cpp4
-rw-r--r--examples/network/network-chat/connection.cpp6
-rw-r--r--examples/network/network-chat/peermanager.cpp2
-rw-r--r--examples/network/qftp/ftpwindow.cpp3
-rw-r--r--examples/network/securesocketclient/sslclient.cpp2
-rw-r--r--examples/network/torrent/trackerclient.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/gui/styles/qmacstyle_mac.mm2
-rw-r--r--src/network/access/qhttpnetworkheader.cpp2
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp2
-rw-r--r--src/network/access/qnetworkrequest.cpp2
-rw-r--r--src/network/kernel/qauthenticator.cpp4
-rw-r--r--src/network/kernel/qnetworkinterface.cpp4
-rw-r--r--src/network/socket/qlocalserver.cpp10
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp10
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp14
-rw-r--r--src/network/ssl/qsslcertificate.cpp4
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp2
23 files changed, 46 insertions, 45 deletions
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 6b4ec61..0c18773 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -406,7 +406,7 @@
\clearfloat
\section1 \l{D-Bus Examples}{D-Bus}
\beginfloatleft
- \l{D-Bus Examples}{\inlineimage qt-embedded-examples.png
+ \l{D-Bus Examples}{\inlineimage dbus-examples.png
}
\endfloat
@@ -416,7 +416,7 @@
\clearfloat
\section1 \l{Qt for Embedded Linux Examples}{Qt for Embedded Linux}
\beginfloatleft
- \l{Qt for Embedded Linux Examples}{\inlineimage dbus-examples.png
+ \l{Qt for Embedded Linux Examples}{\inlineimage qt-embedded-examples.png
}
\endfloat
diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp
index 79bc448..0c85773 100644
--- a/examples/network/googlesuggest/googlesuggest.cpp
+++ b/examples/network/googlesuggest/googlesuggest.cpp
@@ -231,4 +231,5 @@ void GSuggestCompletion::handleNetworkData(QNetworkReply *networkReply)
networkReply->deleteLater();
}
-//! [9] \ No newline at end of file
+//! [9]
+
diff --git a/examples/network/googlesuggest/searchbox.cpp b/examples/network/googlesuggest/searchbox.cpp
index 69dc20e..8ef6f00 100644
--- a/examples/network/googlesuggest/searchbox.cpp
+++ b/examples/network/googlesuggest/searchbox.cpp
@@ -69,4 +69,5 @@ void SearchBox::doSearch()
QString url = QString(GSEARCH_URL).arg(text());
QDesktopServices::openUrl(QUrl(url));
}
-//! [2] \ No newline at end of file
+//! [2]
+
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp
index d8bcb30..da65270 100644
--- a/examples/network/network-chat/chatdialog.cpp
+++ b/examples/network/network-chat/chatdialog.cpp
@@ -79,7 +79,7 @@ void ChatDialog::appendMessage(const QString &from, const QString &message)
QTextCursor cursor(textEdit->textCursor());
cursor.movePosition(QTextCursor::End);
QTextTable *table = cursor.insertTable(1, 2, tableFormat);
- table->cellAt(0, 0).firstCursorPosition().insertText("<" + from + "> ");
+ table->cellAt(0, 0).firstCursorPosition().insertText('<' + from + "> ");
table->cellAt(0, 1).firstCursorPosition().insertText(message);
QScrollBar *bar = textEdit->verticalScrollBar();
bar->setValue(bar->maximum());
diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp
index 2b8725c..f516783 100644
--- a/examples/network/network-chat/client.cpp
+++ b/examples/network/network-chat/client.cpp
@@ -69,8 +69,8 @@ void Client::sendMessage(const QString &message)
QString Client::nickName() const
{
- return QString(peerManager->userName()) + "@" + QHostInfo::localHostName()
- + ":" + QString::number(server.serverPort());
+ return QString(peerManager->userName()) + '@' + QHostInfo::localHostName()
+ + ':' + QString::number(server.serverPort());
}
bool Client::hasConnection(const QHostAddress &senderIp, int senderPort) const
diff --git a/examples/network/network-chat/connection.cpp b/examples/network/network-chat/connection.cpp
index 1df8a2d..5c636b9 100644
--- a/examples/network/network-chat/connection.cpp
+++ b/examples/network/network-chat/connection.cpp
@@ -83,7 +83,7 @@ bool Connection::sendMessage(const QString &message)
return false;
QByteArray msg = message.toUtf8();
- QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + " " + msg;
+ QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + ' ' + msg;
return write(data) == data.size();
}
@@ -118,7 +118,7 @@ void Connection::processReadyRead()
return;
}
- username = QString(buffer) + "@" + peerAddress().toString() + ":"
+ username = QString(buffer) + '@' + peerAddress().toString() + ':'
+ QString::number(peerPort());
currentDataType = Undefined;
numBytesForCurrentDataType = 0;
@@ -162,7 +162,7 @@ void Connection::sendPing()
void Connection::sendGreetingMessage()
{
QByteArray greeting = greetingMessage.toUtf8();
- QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + " " + greeting;
+ QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + ' ' + greeting;
if (write(data) == data.size())
isGreetingMessageSent = true;
}
diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp
index 5ad2dc7..430031b 100644
--- a/examples/network/network-chat/peermanager.cpp
+++ b/examples/network/network-chat/peermanager.cpp
@@ -61,7 +61,7 @@ PeerManager::PeerManager(Client *client)
foreach (QString string, envVariables) {
int index = environment.indexOf(QRegExp(string));
if (index != -1) {
- QStringList stringList = environment.at(index).split("=");
+ QStringList stringList = environment.at(index).split('=');
if (stringList.size() == 2) {
username = stringList.at(1).toUtf8();
break;
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index ae3a2b6..3fd62f8 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -324,7 +324,8 @@ void FtpWindow::processItem(QTreeWidgetItem *item, int /*column*/)
if (isDirectory.value(name)) {
fileList->clear();
isDirectory.clear();
- currentPath += "/" + name;
+ currentPath += '/';
+ currentPath += name;
ftp->cd(name);
ftp->list();
cdToParentButton->setEnabled(true);
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
index 1422f1c..0d6a581 100644
--- a/examples/network/securesocketclient/sslclient.cpp
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -177,7 +177,7 @@ void SslClient::socketReadyRead()
void SslClient::sendData()
{
QString input = form->sessionInput->text();
- appendString(input + "\n");
+ appendString(input + '\n');
socket->write(input.toUtf8() + "\r\n");
form->sessionInput->clear();
}
diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp
index 4f23d54..2397737 100644
--- a/examples/network/torrent/trackerclient.cpp
+++ b/examples/network/torrent/trackerclient.cpp
@@ -105,7 +105,7 @@ void TrackerClient::fetchPeerList()
QString passkey = "?";
if (fullUrl.contains("?passkey")) {
passkey = metaInfo.announceUrl().mid(fullUrl.indexOf("?passkey"), -1);
- passkey += "&";
+ passkey += '&';
}
// Percent encode the hash
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 722d6d3..9179485 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -98,7 +98,7 @@ static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QS
if (!fileName.isEmpty()
&& QT_STAT(QFile::encodeName(fileName), &statBuf) == 0
&& (statBuf.st_mode & S_IFMT) == S_IFREG) {
- mode += "+";
+ mode += '+';
} else {
mode = "wb+";
}
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index f4af579..7a680f2 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -4341,8 +4341,6 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
rect.setY(0);
rect.setHeight(widget->height());
}
- if (opt->direction == Qt::RightToLeft)
- rect.adjust(15, 0, -20, 0);
}
break;
case SE_ProgressBarGroove:
diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp
index c2cc69c..669f9cf 100644
--- a/src/network/access/qhttpnetworkheader.cpp
+++ b/src/network/access/qhttpnetworkheader.cpp
@@ -80,7 +80,7 @@ QByteArray QHttpNetworkHeaderPrivate::headerField(const QByteArray &name, const
QByteArray result;
bool first = true;
- foreach (QByteArray value, allValues) {
+ foreach (const QByteArray &value, allValues) {
if (!first)
result += ", ";
first = false;
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 58123b2..61a95fe 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -753,7 +753,7 @@ void QNetworkAccessHttpBackend::replyHeaderChanged()
QByteArray value = rawHeader(it->first);
if (!value.isEmpty()) {
if (qstricmp(it->first.constData(), "set-cookie") == 0)
- value += "\n";
+ value += '\n';
else
value += ", ";
}
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 6dcd05d..a2bef67 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -649,7 +649,7 @@ static QVariant parseCookieHeader(const QByteArray &raw)
{
QList<QNetworkCookie> result;
QList<QByteArray> cookieList = raw.split(';');
- foreach (QByteArray cookie, cookieList) {
+ foreach (const QByteArray &cookie, cookieList) {
QList<QNetworkCookie> parsed = QNetworkCookie::parseCookies(cookie.trimmed());
if (parsed.count() != 1)
return QVariant(); // invalid Cookie: header
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 193a043..e4023c8 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -270,7 +270,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
break;
case Ntlm:
// #### extract from header
- realm = QString();
+ realm.clear();
break;
case DigestMd5: {
realm = QString::fromLatin1(options.value("realm"));
@@ -281,7 +281,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
break;
}
default:
- realm = QString();
+ realm.clear();
challenge = QByteArray();
phase = Invalid;
}
diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index 367e3c4..1115c63 100644
--- a/src/network/kernel/qnetworkinterface.cpp
+++ b/src/network/kernel/qnetworkinterface.cpp
@@ -541,7 +541,7 @@ QList<QNetworkInterface> QNetworkInterface::allInterfaces()
{
QList<QSharedDataPointer<QNetworkInterfacePrivate> > privs = manager()->allInterfaces();
QList<QNetworkInterface> result;
- foreach (QSharedDataPointer<QNetworkInterfacePrivate> p, privs) {
+ foreach (const QSharedDataPointer<QNetworkInterfacePrivate> &p, privs) {
QNetworkInterface item;
item.d = p;
result << item;
@@ -560,7 +560,7 @@ QList<QHostAddress> QNetworkInterface::allAddresses()
{
QList<QSharedDataPointer<QNetworkInterfacePrivate> > privs = manager()->allInterfaces();
QList<QHostAddress> result;
- foreach (const QSharedDataPointer<QNetworkInterfacePrivate> p, privs) {
+ foreach (const QSharedDataPointer<QNetworkInterfacePrivate> &p, privs) {
foreach (const QNetworkAddressEntry &entry, p->addressEntries)
result += entry.ip();
}
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index ede3c89..ef7fc02 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -122,9 +122,9 @@ void QLocalServer::close()
qDeleteAll(d->pendingConnections);
d->pendingConnections.clear();
d->closeServer();
- d->serverName = QString();
- d->fullServerName = QString();
- d->errorString = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
+ d->errorString.clear();
d->error = QAbstractSocket::UnknownSocketError;
}
@@ -226,8 +226,8 @@ bool QLocalServer::listen(const QString &name)
}
if (!d->listen(name)) {
- d->serverName = QString();
- d->fullServerName = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
return false;
}
diff --git a/src/network/socket/qlocalsocket_tcp.cpp b/src/network/socket/qlocalsocket_tcp.cpp
index 9f574d4..5b5e84f 100644
--- a/src/network/socket/qlocalsocket_tcp.cpp
+++ b/src/network/socket/qlocalsocket_tcp.cpp
@@ -102,8 +102,8 @@ void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState)
switch(newState) {
case QAbstractSocket::UnconnectedState:
state = QLocalSocket::UnconnectedState;
- serverName = QString();
- fullServerName = QString();
+ serverName.clear();
+ fullServerName.clear();
break;
case QAbstractSocket::ConnectingState:
state = QLocalSocket::ConnectingState;
@@ -218,7 +218,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
|| state() == ConnectingState)
return;
- d->errorString = QString();
+ d->errorString.clear();
d->state = ConnectingState;
emit stateChanged(d->state);
@@ -333,8 +333,8 @@ void QLocalSocket::close()
{
Q_D(QLocalSocket);
d->tcpSocket->close();
- d->serverName = QString();
- d->fullServerName = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
QIODevice::close();
}
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 73c2465..1ca11d8 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -109,8 +109,8 @@ void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState)
switch(newState) {
case QAbstractSocket::UnconnectedState:
state = QLocalSocket::UnconnectedState;
- serverName = QString();
- fullServerName = QString();
+ serverName.clear();
+ fullServerName.clear();
break;
case QAbstractSocket::ConnectingState:
state = QLocalSocket::ConnectingState;
@@ -225,7 +225,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
|| state() == ConnectingState)
return;
- d->errorString = QString();
+ d->errorString.clear();
d->unixSocket.setSocketState(QAbstractSocket::ConnectingState);
d->state = ConnectingState;
emit stateChanged(d->state);
@@ -341,7 +341,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
errorOccurred(QLocalSocket::UnknownSocketError, function);
}
connectingSocket = -1;
- connectingName = QString();
+ connectingName.clear();
connectingOpenMode = 0;
}
@@ -438,10 +438,10 @@ void QLocalSocket::close()
if (d->connectingSocket != -1)
::close(d->connectingSocket);
d->connectingSocket = -1;
- d->connectingName = QString();
+ d->connectingName.clear();
d->connectingOpenMode = 0;
- d->serverName = QString();
- d->fullServerName = QString();
+ d->serverName.clear();
+ d->fullServerName.clear();
QIODevice::close();
}
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 9a9b1b5..fd647e2 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -634,11 +634,11 @@ QByteArray QSslCertificatePrivate::QByteArray_from_X509(X509 *x509, QSsl::Encodi
QByteArray tmp;
for (int i = 0; i <= array.size() - 64; i += 64) {
tmp += QByteArray::fromRawData(array.data() + i, 64);
- tmp += "\n";
+ tmp += '\n';
}
if (int remainder = array.size() % 64) {
tmp += QByteArray::fromRawData(array.data() + array.size() - remainder, remainder);
- tmp += "\n";
+ tmp += '\n';
}
return BEGINCERTSTRING "\n" + tmp + ENDCERTSTRING "\n";
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 6947aa7..9623570 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1109,7 +1109,7 @@ void QSslSocket::setCiphers(const QString &ciphers)
{
Q_D(QSslSocket);
d->configuration.ciphers.clear();
- foreach (QString cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
+ foreach (const QString &cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
for (int i = 0; i < 3; ++i) {
// ### Crude
QSslCipher cipher(cipherName, QSsl::SslProtocol(i));
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 892d330..ce2aee1 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -818,7 +818,7 @@ bool QSslSocketBackendPrivate::startHandshake()
QRegExp regexp(commonName, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.exactMatch(peerName)) {
bool matched = false;
- foreach (QString altName, configuration.peerCertificate
+ foreach (const QString &altName, configuration.peerCertificate
.alternateSubjectNames().values(QSsl::DnsEntry)) {
regexp.setPattern(altName);
if (regexp.exactMatch(peerName)) {