summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-06-15 11:49:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-17 09:44:22 +0200
commitd9fb6e6dbb2b322556d581265da2442e3b91a6a3 (patch)
tree8d5ae465adf4db8468c7e0ff1d91113594cb45aa /src/corelib/io
parentd9e722d8560c07adb1852cfd061ffb23197d06fd (diff)
Remove use of 'register' from Qt.
It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/io/qurl.cpp8
-rw-r--r--src/corelib/io/qurlidna.cpp8
-rw-r--r--src/corelib/io/qurlrecode.cpp4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 18f3404c5d..024af79c33 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -220,7 +220,7 @@ QT_BEGIN_NAMESPACE
QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create(QObject *parent)
{
- register int fd = -1;
+ int fd = -1;
#ifdef IN_CLOEXEC
fd = inotify_init1(IN_CLOEXEC);
#endif
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 02e7b967ea..f2e1f9bbc7 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -882,7 +882,7 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro
// schemes are ASCII only, so we don't need the full Unicode toLower
QChar *schemeData = scheme.data(); // force detaching here
for (int i = needsLowercasing; i >= 0; --i) {
- register ushort c = schemeData[i].unicode();
+ ushort c = schemeData[i].unicode();
if (c >= 'A' && c <= 'Z')
schemeData[i] = c + 0x20;
}
@@ -1244,7 +1244,7 @@ inline void QUrlPrivate::parse(const QString &url, QUrl::ParsingMode parsingMode
const ushort *const data = reinterpret_cast<const ushort *>(begin);
for (int i = 0; i < len; ++i) {
- register uint uc = data[i];
+ uint uc = data[i];
if (uc == '#' && hash == -1) {
hash = i;
@@ -1472,7 +1472,7 @@ inline QUrlPrivate::ErrorCode QUrlPrivate::validityError(QString *source, int *p
// check for a path of "text:text/"
for (int i = 0; i < path.length(); ++i) {
- register ushort c = path.at(i).unicode();
+ ushort c = path.at(i).unicode();
if (c == '/') {
// found the slash before the colon
return NoError;
@@ -1512,7 +1512,7 @@ bool QUrlPrivate::validateComponent(QUrlPrivate::Section section, const QString
const ushort *const data = reinterpret_cast<const ushort *>(input.constData());
for (uint i = uint(begin); i < uint(end); ++i) {
- register uint uc = data[i];
+ uint uc = data[i];
if (uc >= 0x80)
continue;
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp
index 5fa4b5f7a1..70db9e09eb 100644
--- a/src/corelib/io/qurlidna.cpp
+++ b/src/corelib/io/qurlidna.cpp
@@ -2028,7 +2028,7 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from)
const QChar *e = src + source->size();
for ( ; out < e; ++out) {
- register ushort uc = out->unicode();
+ ushort uc = out->unicode();
if (uc >= 0x80) {
break;
} else if (uc >= 'A' && uc <= 'Z') {
@@ -2121,7 +2121,7 @@ Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len)
return false;
for (int i = 0; i < len; ++i) {
- register ushort c = uc[i].unicode();
+ ushort c = uc[i].unicode();
if (c == '-' && (i == 0 || i == len - 1))
return false;
@@ -2504,7 +2504,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
const QChar *in = domain.constData() + lastIdx;
const QChar *e = in + labelLength;
for (; in < e; ++in, ++out) {
- register ushort uc = in->unicode();
+ ushort uc = in->unicode();
if (uc > 0x7f)
simple = false;
if (uc >= 'A' && uc <= 'Z')
@@ -2533,7 +2533,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
// That means we need one or two temporaries
qt_nameprep(&result, prevLen);
labelLength = result.length() - prevLen;
- register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
+ int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
aceForm.resize(0);
if (toReserve > aceForm.capacity())
aceForm.reserve(toReserve);
diff --git a/src/corelib/io/qurlrecode.cpp b/src/corelib/io/qurlrecode.cpp
index 6e01272831..5ff0c40a4f 100644
--- a/src/corelib/io/qurlrecode.cpp
+++ b/src/corelib/io/qurlrecode.cpp
@@ -464,7 +464,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
ushort *output = 0;
for ( ; input != end; ++input) {
- register ushort c;
+ ushort c;
EncodingAction action;
// try a run where no change is necessary
@@ -483,7 +483,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
break;
non_trivial:
- register uint decoded;
+ uint decoded;
if (c == '%' && retryBadEncoding) {
// always write "%25"
ensureDetached(result, output, begin, input, end);